Diffstat (limited to 'noncore/apps/opie-reader/CEncoding.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CEncoding.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/CEncoding.h b/noncore/apps/opie-reader/CEncoding.h index 1dfd74d..76cbfae 100644 --- a/noncore/apps/opie-reader/CEncoding.h +++ b/noncore/apps/opie-reader/CEncoding.h | |||
@@ -1,62 +1,69 @@ | |||
1 | #ifndef __CENCODING_H | 1 | #ifndef __CENCODING_H |
2 | #define __CENCODING_H | 2 | #define __CENCODING_H |
3 | 3 | ||
4 | #include "CExpander.h" | 4 | #include "CExpander.h" |
5 | 5 | ||
6 | #define MAX_ENCODING 6 | 6 | #define MAX_ENCODING 6 |
7 | 7 | ||
8 | class CEncoding : public CCharacterSource | 8 | class CEncoding : public CCharacterSource |
9 | { | 9 | { |
10 | friend class CFilterChain; | 10 | friend class CFilterChain; |
11 | protected: | 11 | protected: |
12 | CExpander_Interface* parent; | 12 | CExpander_Interface* parent; |
13 | linkType hyperlink(unsigned int n, unsigned int noff, QString& t, QString& nm) { return parent->hyperlink(n, noff, t, nm); } | 13 | linkType hyperlink(unsigned int n, unsigned int noff, QString& t, QString& nm) { return parent->hyperlink(n, noff, t, nm); } |
14 | public: | 14 | public: |
15 | virtual QString getTableAsHtml(unsigned long loc) | ||
16 | { | ||
17 | qDebug("CEncoding::getTableAsHtml()"); | ||
18 | return parent->getTableAsHtml(loc); | ||
19 | } | ||
15 | CEncoding() : parent(NULL) {} | 20 | CEncoding() : parent(NULL) {} |
16 | void setparent(CExpander_Interface* p) { parent = p; } | 21 | void setparent(CExpander_Interface* p) { parent = p; } |
17 | virtual ~CEncoding() {}; | 22 | virtual ~CEncoding() {}; |
18 | void locate(unsigned int n) { parent->locate(n); } | 23 | void locate(unsigned int n) { parent->locate(n); } |
19 | bool findanchor(const QString& nm) { return false; } | 24 | bool findanchor(const QString& nm) |
25 | { | ||
26 | return parent->findanchor(nm); | ||
27 | } | ||
20 | void saveposn(const QString& f, size_t posn) { parent->saveposn(posn); } | 28 | void saveposn(const QString& f, size_t posn) { parent->saveposn(posn); } |
21 | void writeposn(const QString& f, size_t posn) { parent->writeposn(posn); } | 29 | void writeposn(const QString& f, size_t posn) { parent->writeposn(posn); } |
22 | linkType forward(QString& f, size_t& loc) { return parent->forward(loc); } | 30 | linkType forward(QString& f, size_t& loc) { return parent->forward(loc); } |
23 | linkType back(QString& f, size_t& loc) { return parent->back(loc); } | 31 | linkType back(QString& f, size_t& loc) { return parent->back(loc); } |
24 | bool hasnavigation() { return parent->hasnavigation(); } | 32 | bool hasnavigation() { return parent->hasnavigation(); } |
25 | virtual int getwidth() { return parent->getwidth(); } | 33 | virtual int getwidth() { return parent->getwidth(); } |
26 | QImage* getPicture(unsigned long tgt) { return parent->getPicture(tgt); } | 34 | QImage* getPicture(unsigned long tgt) { return parent->getPicture(tgt); } |
27 | QImage* getPicture(const QString& href) { return parent->getPicture(href); } | 35 | QImage* getPicture(const QString& href) { return parent->getPicture(href); } |
28 | bool getFile(const QString& href) { qDebug("Encoding Get File"); return parent->getFile(href);} | 36 | bool getFile(const QString& href, const QString& nm) { qDebug("Encoding Get File"); return parent->getFile(href, nm);} |
29 | 37 | unsigned long startSection() { return parent->startSection(); } | |
30 | |||
31 | }; | 38 | }; |
32 | 39 | ||
33 | class CUtf8 : public CEncoding | 40 | class CUtf8 : public CEncoding |
34 | { | 41 | { |
35 | public: | 42 | public: |
36 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); | 43 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
37 | QString about() { return QString("UTF8 decoder (c) Tim Wentford\n")+parent->about(); } | 44 | QString about() { return QString("UTF8 decoder (c) Tim Wentford\n")+parent->about(); } |
38 | }; | 45 | }; |
39 | 46 | ||
40 | class CUcs16be : public CEncoding | 47 | class CUcs16be : public CEncoding |
41 | { | 48 | { |
42 | public: | 49 | public: |
43 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); | 50 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
44 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } | 51 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } |
45 | }; | 52 | }; |
46 | 53 | ||
47 | class CUcs16le : public CEncoding | 54 | class CUcs16le : public CEncoding |
48 | { | 55 | { |
49 | public: | 56 | public: |
50 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); | 57 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
51 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } | 58 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } |
52 | }; | 59 | }; |
53 | 60 | ||
54 | class Ccp1252 : public CEncoding | 61 | class Ccp1252 : public CEncoding |
55 | { | 62 | { |
56 | public: | 63 | public: |
57 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); | 64 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
58 | QString about() { return QString("Codepage 1252 decoder (c) Tim Wentford\n")+parent->about(); } | 65 | QString about() { return QString("Codepage 1252 decoder (c) Tim Wentford\n")+parent->about(); } |
59 | }; | 66 | }; |
60 | 67 | ||
61 | class CPalm : public Ccp1252 | 68 | class CPalm : public Ccp1252 |
62 | { | 69 | { |