Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.h | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h index 29d0329..61531c0 100644 --- a/noncore/apps/opie-reader/BuffDoc.h +++ b/noncore/apps/opie-reader/BuffDoc.h | |||
@@ -22,22 +22,22 @@ class BuffDoc | |||
22 | public: | 22 | public: |
23 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) | 23 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) |
24 | { | 24 | { |
25 | if (exp == NULL) | 25 | if (exp == NULL) |
26 | { | 26 | { |
27 | data = NULL; | 27 | data = NULL; |
28 | len = 0; | 28 | len = 0; |
29 | } | 29 | } |
30 | else | 30 | else |
31 | { | 31 | { |
32 | exp->setSaveData(data, len, src, srclen); | 32 | exp->setSaveData(data, len, src, srclen); |
33 | } | 33 | } |
34 | } | 34 | } |
35 | void putSaveData(unsigned char*& src, unsigned short& srclen) | 35 | void putSaveData(unsigned char*& src, unsigned short& srclen) |
36 | { | 36 | { |
37 | if (exp != NULL) | 37 | if (exp != NULL) |
38 | { | 38 | { |
39 | exp->putSaveData(src, srclen); | 39 | exp->putSaveData(src, srclen); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | #ifdef USEQPE | 42 | #ifdef USEQPE |
43 | void suspend() { if (exp != NULL) exp->suspend(); } | 43 | void suspend() { if (exp != NULL) exp->suspend(); } |
@@ -48,22 +48,22 @@ class BuffDoc | |||
48 | #endif | 48 | #endif |
49 | ~BuffDoc() | 49 | ~BuffDoc() |
50 | { | 50 | { |
51 | delete filt; | 51 | delete filt; |
52 | delete exp; | 52 | delete exp; |
53 | } | 53 | } |
54 | BuffDoc() | 54 | BuffDoc() |
55 | { | 55 | { |
56 | exp = NULL; | 56 | exp = NULL; |
57 | filt = NULL; | 57 | filt = NULL; |
58 | lastword.empty(); | 58 | lastword.empty(); |
59 | // // qDebug("Buffdoc created"); | 59 | // odebug << "Buffdoc created" << oendl; |
60 | } | 60 | } |
61 | bool empty() { return (exp == NULL); } | 61 | bool empty() { return (exp == NULL); } |
62 | void setfilter(CFilterChain* _f) | 62 | void setfilter(CFilterChain* _f) |
63 | { | 63 | { |
64 | if (filt != NULL) delete filt; | 64 | if (filt != NULL) delete filt; |
65 | filt = _f; | 65 | filt = _f; |
66 | filt->setsource(exp); | 66 | filt->setsource(exp); |
67 | } | 67 | } |
68 | CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); } | 68 | CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); } |
69 | bool hasrandomaccess() { return (exp == NULL) ? false : exp->hasrandomaccess(); } | 69 | bool hasrandomaccess() { return (exp == NULL) ? false : exp->hasrandomaccess(); } |
@@ -71,22 +71,22 @@ class BuffDoc | |||
71 | int openfile(QWidget* _parent, const char *src); | 71 | int openfile(QWidget* _parent, const char *src); |
72 | tchar getch() | 72 | tchar getch() |
73 | { | 73 | { |
74 | tchar ch = UEOF; | 74 | tchar ch = UEOF; |
75 | CStyle sty; | 75 | CStyle sty; |
76 | if (exp != NULL) | 76 | if (exp != NULL) |
77 | { | 77 | { |
78 | filt->getch(ch, sty); | 78 | filt->getch(ch, sty); |
79 | } | 79 | } |
80 | return ch; | 80 | return ch; |
81 | } | 81 | } |
82 | void getch(tchar& ch, CStyle& sty) | 82 | void getch(tchar& ch, CStyle& sty) |
83 | { | 83 | { |
84 | if (exp != NULL) | 84 | if (exp != NULL) |
85 | { | 85 | { |
86 | filt->getch(ch, sty); | 86 | filt->getch(ch, sty); |
87 | } | 87 | } |
88 | else | 88 | else |
89 | ch = UEOF; | 89 | ch = UEOF; |
90 | } | 90 | } |
91 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } | 91 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } |
92 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } | 92 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } |
@@ -104,13 +104,13 @@ class BuffDoc | |||
104 | void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } | 104 | void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } |
105 | int getpara(CBuffer& buff) | 105 | int getpara(CBuffer& buff) |
106 | { | 106 | { |
107 | tchar ch; | 107 | tchar ch; |
108 | int i = 0; | 108 | int i = 0; |
109 | while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch; | 109 | while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch; |
110 | buff[i] = '\0'; | 110 | buff[i] = '\0'; |
111 | if (i == 0 && ch == UEOF) i = -1; | 111 | if (i == 0 && ch == UEOF) i = -1; |
112 | laststartline = exp->locate(); | 112 | laststartline = exp->locate(); |
113 | return i; | 113 | return i; |
114 | } | 114 | } |
115 | void saveposn(size_t posn) { exp->saveposn(posn); } | 115 | void saveposn(size_t posn) { exp->saveposn(posn); } |
116 | void writeposn(size_t posn) { exp->writeposn(posn); } | 116 | void writeposn(size_t posn) { exp->writeposn(posn); } |