Diffstat (limited to 'noncore/apps/opie-reader/CFilter.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CFilter.h | 93 |
1 files changed, 67 insertions, 26 deletions
diff --git a/noncore/apps/opie-reader/CFilter.h b/noncore/apps/opie-reader/CFilter.h index 2d0c30f..0a03b3e 100644 --- a/noncore/apps/opie-reader/CFilter.h +++ b/noncore/apps/opie-reader/CFilter.h | |||
@@ -11,2 +11,6 @@ class CFilter : public CCharacterSource | |||
11 | CCharacterSource* parent; | 11 | CCharacterSource* parent; |
12 | linkType hyperlink(unsigned int n, QString& w) | ||
13 | { | ||
14 | return parent->hyperlink(n,w); | ||
15 | } | ||
12 | public: | 16 | public: |
@@ -71,4 +75,4 @@ class stripcr : public CFilter | |||
71 | stripcr() {} | 75 | stripcr() {} |
72 | virtual ~stripcr() {} | 76 | ~stripcr() {} |
73 | virtual void getch(tchar& ch, CStyle& sty) | 77 | void getch(tchar& ch, CStyle& sty) |
74 | { | 78 | { |
@@ -89,4 +93,4 @@ class dehyphen : public CFilter | |||
89 | dehyphen() : m_bCharWaiting(false) {} | 93 | dehyphen() : m_bCharWaiting(false) {} |
90 | virtual ~dehyphen() {} | 94 | ~dehyphen() {} |
91 | virtual void getch(tchar& ch, CStyle& sty) | 95 | void getch(tchar& ch, CStyle& sty) |
92 | { | 96 | { |
@@ -121,4 +125,4 @@ class striphtml : public CFilter | |||
121 | striphtml() {} | 125 | striphtml() {} |
122 | virtual ~striphtml() {} | 126 | ~striphtml() {} |
123 | virtual void getch(tchar& ch, CStyle& sty); | 127 | void getch(tchar& ch, CStyle& sty); |
124 | }; | 128 | }; |
@@ -130,4 +134,4 @@ class unindent : public CFilter | |||
130 | unindent() : lc(0) {} | 134 | unindent() : lc(0) {} |
131 | virtual ~unindent() {} | 135 | ~unindent() {} |
132 | virtual void getch(tchar& ch, CStyle& sty) | 136 | void getch(tchar& ch, CStyle& sty) |
133 | { | 137 | { |
@@ -152,4 +156,4 @@ class repara : public CFilter | |||
152 | repara() : tch(0) {} | 156 | repara() : tch(0) {} |
153 | virtual ~repara() {} | 157 | ~repara() {} |
154 | virtual void getch(tchar& ch, CStyle& sty) | 158 | void getch(tchar& ch, CStyle& sty) |
155 | { | 159 | { |
@@ -181,4 +185,4 @@ class indenter : public CFilter | |||
181 | indenter(int _a=5) : amnt(_a), indent(0) {} | 185 | indenter(int _a=5) : amnt(_a), indent(0) {} |
182 | virtual ~indenter() {} | 186 | ~indenter() {} |
183 | virtual void getch(tchar& ch, CStyle& sty) | 187 | void getch(tchar& ch, CStyle& sty) |
184 | { | 188 | { |
@@ -207,4 +211,4 @@ class dblspce : public CFilter | |||
207 | dblspce() : lastlf(false) {} | 211 | dblspce() : lastlf(false) {} |
208 | virtual ~dblspce() {} | 212 | ~dblspce() {} |
209 | virtual void getch(tchar& ch, CStyle& sty) | 213 | void getch(tchar& ch, CStyle& sty) |
210 | { | 214 | { |
@@ -234,4 +238,4 @@ class textfmt : public CFilter | |||
234 | textfmt() : lastchar(0), uselast(false) {} | 238 | textfmt() : lastchar(0), uselast(false) {} |
235 | virtual ~textfmt() {} | 239 | ~textfmt() {} |
236 | virtual void getch(tchar& ch, CStyle& sty); | 240 | void getch(tchar& ch, CStyle& sty); |
237 | }; | 241 | }; |
@@ -242,4 +246,4 @@ class embolden : public CFilter | |||
242 | embolden() {} | 246 | embolden() {} |
243 | virtual ~embolden() {} | 247 | ~embolden() {} |
244 | virtual void getch(tchar& ch, CStyle& sty) | 248 | void getch(tchar& ch, CStyle& sty) |
245 | { | 249 | { |
@@ -257,4 +261,4 @@ class remap : public CFilter | |||
257 | remap() : offset(0) { q[0] = 0; } | 261 | remap() : offset(0) { q[0] = 0; } |
258 | virtual ~remap() {} | 262 | ~remap() {} |
259 | virtual void getch(tchar& ch, CStyle& sty); | 263 | void getch(tchar& ch, CStyle& sty); |
260 | }; | 264 | }; |
@@ -265,4 +269,4 @@ class PeanutFormatter : public CFilter | |||
265 | public: | 269 | public: |
266 | virtual ~PeanutFormatter() {} | 270 | ~PeanutFormatter() {} |
267 | virtual void getch(tchar& ch, CStyle& sty); | 271 | void getch(tchar& ch, CStyle& sty); |
268 | }; | 272 | }; |
@@ -274,4 +278,18 @@ class OnePara : public CFilter | |||
274 | OnePara() : m_lastchar(0) {} | 278 | OnePara() : m_lastchar(0) {} |
275 | virtual ~OnePara() {} | 279 | ~OnePara() {} |
276 | virtual void getch(tchar& ch, CStyle& sty); | 280 | void getch(tchar& ch, CStyle& sty); |
281 | }; | ||
282 | |||
283 | class DePluck : public CFilter | ||
284 | { | ||
285 | tchar* nextpart; | ||
286 | tchar m_buffer; | ||
287 | int m_buffed; | ||
288 | int m_current; | ||
289 | bool m_debuff; | ||
290 | CStyle m_laststyle; | ||
291 | public: | ||
292 | DePluck(tchar* t) : nextpart(t), m_buffer(0), m_buffed(0), m_current(0), m_debuff(false) {} | ||
293 | ~DePluck() {} | ||
294 | void getch(tchar& ch, CStyle& sty); | ||
277 | }; | 295 | }; |
@@ -282,6 +300,29 @@ class repalm : public CFilter | |||
282 | public: | 300 | public: |
283 | virtual ~repalm() {} | 301 | ~repalm() {} |
284 | virtual void getch(tchar& ch, CStyle& sty); | 302 | void getch(tchar& ch, CStyle& sty); |
285 | }; | 303 | }; |
286 | #endif | 304 | #endif |
305 | |||
306 | class FullJust : public CFilter | ||
307 | { | ||
308 | public: | ||
309 | void getch(tchar& ch, CStyle& sty) | ||
310 | { | ||
311 | parent->getch(ch, sty); | ||
312 | if (sty.getJustify() == m_AlignLeft) sty.setFullJustify(); | ||
313 | } | ||
314 | }; | ||
315 | /* | ||
316 | class AddSpace : public CFilter | ||
317 | { | ||
318 | unsigned char m_espc; | ||
319 | public: | ||
320 | AddSpace(unsigned char s) : m_espc(s) {} | ||
321 | void getch(tchar& ch, CStyle& sty) | ||
322 | { | ||
323 | parent->getch(ch, sty); | ||
324 | sty.setExtraSpace(m_espc); | ||
325 | } | ||
326 | }; | ||
327 | */ | ||
287 | #endif | 328 | #endif |