summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/BuffDoc.h2
-rw-r--r--noncore/apps/opie-reader/CEncoding.h4
-rw-r--r--noncore/apps/opie-reader/CExpander.h0
-rw-r--r--noncore/apps/opie-reader/Filedata.h4
-rw-r--r--noncore/apps/opie-reader/FontControl.h4
-rw-r--r--noncore/apps/opie-reader/Palm2QImage.cpp55
-rw-r--r--noncore/apps/opie-reader/QTReader.h12
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.h4
8 files changed, 48 insertions, 37 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
@@ -51,17 +51,17 @@ class BuffDoc
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 }
diff --git a/noncore/apps/opie-reader/CEncoding.h b/noncore/apps/opie-reader/CEncoding.h
index 463fba9..df0104a 100644
--- a/noncore/apps/opie-reader/CEncoding.h
+++ b/noncore/apps/opie-reader/CEncoding.h
@@ -56,18 +56,18 @@ public:
56#include "CEncoding_tables.h" 56#include "CEncoding_tables.h"
57 57
58class CGeneral8Bit : public CEncoding 58class CGeneral8Bit : public CEncoding
59{ 59{
60 int m_index; 60 int m_index;
61 public: 61 public:
62 CGeneral8Bit(int _i) : m_index(_i) 62 CGeneral8Bit(int _i) : m_index(_i)
63 { 63 {
64 // qDebug("8Bit:%d", _i); 64// odebug << "8Bit: " << _i << oendl;
65 // qDebug("%s", unicodetable::iterator(_i)->mime); 65// odebug << unicodetable::iterator(_i)->mime << oendl;
66 } 66 }
67 void getch(tchar& ch, CStyle& sty) 67 void getch(tchar& ch, CStyle& sty)
68 { 68 {
69 parent->getch(ch, sty); 69 parent->getch(ch, sty);
70 ch = unicodetable::unicodevalue(m_index, ch); 70 ch = unicodetable::unicodevalue(m_index, ch);
71 } 71 }
72}; 72};
73 73
diff --git a/noncore/apps/opie-reader/CExpander.h b/noncore/apps/opie-reader/CExpander.h
index 7b21d3e..9fae245 100644
--- a/noncore/apps/opie-reader/CExpander.h
+++ b/noncore/apps/opie-reader/CExpander.h
diff --git a/noncore/apps/opie-reader/Filedata.h b/noncore/apps/opie-reader/Filedata.h
index 096dd31..1b85b71 100644
--- a/noncore/apps/opie-reader/Filedata.h
+++ b/noncore/apps/opie-reader/Filedata.h
@@ -21,21 +21,21 @@ class CFiledata
21 memcpy(data+sizeof(time_t), nm, sizeof(tchar)*nlen); 21 memcpy(data+sizeof(time_t), nm, sizeof(tchar)*nlen);
22 m_own = true; 22 m_own = true;
23 } 23 }
24 ~CFiledata() 24 ~CFiledata()
25 { 25 {
26 if (m_own && data != NULL) 26 if (m_own && data != NULL)
27 { 27 {
28 delete [] data; 28 delete [] data;
29 // qDebug("~Filedata: deleting"); 29// odebug << "~Filedata: deleting" << oendl;
30 } 30 }
31 else 31 else
32 { 32 {
33 // qDebug("~Filedata: not deleting"); 33// odebug << "~Filedata: not deleting" << oendl;
34 } 34 }
35 } 35 }
36 tchar* name() const { return (tchar*)(data+sizeof(time_t)); } 36 tchar* name() const { return (tchar*)(data+sizeof(time_t)); }
37 time_t date() { return *((time_t *)data); } 37 time_t date() { return *((time_t *)data); }
38 void setdate(time_t _t) { *((time_t *)data) = _t; } 38 void setdate(time_t _t) { *((time_t *)data) = _t; }
39 unsigned char* content() { return data; } 39 unsigned char* content() { return data; }
40 size_t length() const { return sizeof(time_t)+sizeof(tchar)*(ustrlen(name())+1); } 40 size_t length() const { return sizeof(time_t)+sizeof(tchar)*(ustrlen(name())+1); }
41 bool operator==(const CFiledata& rhs) 41 bool operator==(const CFiledata& rhs)
diff --git a/noncore/apps/opie-reader/FontControl.h b/noncore/apps/opie-reader/FontControl.h
index 5681496..e56b619 100644
--- a/noncore/apps/opie-reader/FontControl.h
+++ b/noncore/apps/opie-reader/FontControl.h
@@ -99,17 +99,17 @@ class FontControl
99*/ 99*/
100 if (g_size-- == m_size) 100 if (g_size-- == m_size)
101 { 101 {
102 if (--m_size < 0) 102 if (--m_size < 0)
103 { 103 {
104 m_size = 0; 104 m_size = 0;
105 } 105 }
106 } 106 }
107 // qDebug("Font:%d Graphics:%d", m_size, g_size); 107// odebug << "Font:" << m_size << " Graphics:" << g_size << oendl;
108 return true; 108 return true;
109 } 109 }
110 bool increasesize() 110 bool increasesize()
111 { 111 {
112/* 112/*
113 if (++m_size >= m_maxsize) 113 if (++m_size >= m_maxsize)
114 { 114 {
115 m_size = m_maxsize - 1; 115 m_size = m_maxsize - 1;
@@ -119,17 +119,17 @@ class FontControl
119*/ 119*/
120 if (g_size++ == m_size) 120 if (g_size++ == m_size)
121 { 121 {
122 if (++m_size >= m_maxsize) 122 if (++m_size >= m_maxsize)
123 { 123 {
124 m_size = m_maxsize - 1; 124 m_size = m_maxsize - 1;
125 } 125 }
126 } 126 }
127 // qDebug("Font:%d Graphics:%d", m_size, g_size); 127// odebug << "Font:" << m_size << " Graphics:" << g_size << oendl;
128 return true; 128 return true;
129 } 129 }
130 bool ChangeFont(QString& n) 130 bool ChangeFont(QString& n)
131 { 131 {
132 return ChangeFont(n, currentsize()); 132 return ChangeFont(n, currentsize());
133 } 133 }
134 bool ChangeFont(QString& n, int tgt); 134 bool ChangeFont(QString& n, int tgt);
135 void setlead(int _lead) 135 void setlead(int _lead)
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp
index 9339595..b0d4e00 100644
--- a/noncore/apps/opie-reader/Palm2QImage.cpp
+++ b/noncore/apps/opie-reader/Palm2QImage.cpp
@@ -1,20 +1,27 @@
1/* -*- mode: c; indent-tabs-mode: nil; -*- */ 1/* -*- mode: c; indent-tabs-mode: nil; -*- */
2
3/* OPIE */
4#include <opie2/odebug.h>
5
6/* QT */
7#include <qimage.h>
8
9/* STD */
2#include <stdio.h> 10#include <stdio.h>
3#include <stdlib.h> 11#include <stdlib.h>
4#include <string.h> 12#include <string.h>
5#ifndef _WINDOWS 13#ifndef _WINDOWS
6#include <unistd.h> /* for link */ 14#include <unistd.h> /* for link */
7#endif 15#endif
8#include <sys/types.h> 16#include <sys/types.h>
9#include <sys/stat.h> 17#include <sys/stat.h>
10#include <stdarg.h> 18#include <stdarg.h>
11 19
12#include <qimage.h>
13 20
14/***********************************************************************/ 21/***********************************************************************/
15/***********************************************************************/ 22/***********************************************************************/
16/***** *****/ 23/***** *****/
17/***** Code to decode the Palm image format to JPEG *****/ 24/***** Code to decode the Palm image format to JPEG *****/
18/***** *****/ 25/***** *****/
19/***********************************************************************/ 26/***********************************************************************/
20/***********************************************************************/ 27/***********************************************************************/
@@ -136,26 +143,28 @@ QImage* Palm2QImage
136 bits_per_pixel = palmimage[8]; 143 bits_per_pixel = palmimage[8];
137 version = palmimage[9]; 144 version = palmimage[9];
138 next_depth_offset = READ_BIGENDIAN_SHORT(palmimage + 10); 145 next_depth_offset = READ_BIGENDIAN_SHORT(palmimage + 10);
139 transparent_index = palmimage[12]; 146 transparent_index = palmimage[12];
140 compression_type = palmimage[13]; 147 compression_type = palmimage[13];
141 /* bytes 14 and 15 are reserved by Palm and always 0 */ 148 /* bytes 14 and 15 are reserved by Palm and always 0 */
142 149
143#if 0 150#if 0
144// qDebug ("Palm image is %dx%d, %d bpp, version %d, flags 0x%x, compression %d", width, height, bits_per_pixel, version, flags, compression_type); 151// odebug << "Palm image is " << width << "x" << height
152// << ", " << bits_per_pixel << " bpp, version " << version
153// << ", flags 0x" << flags << ", compression " << compression_type << oendl;
145#endif 154#endif
146 155
147 if (compression_type == PALM_COMPRESSION_PACKBITS) { 156 if (compression_type == PALM_COMPRESSION_PACKBITS) {
148// qDebug ("Image uses packbits compression; not yet supported"); 157// odebug << "Image uses packbits compression; not yet supported" << oendl;
149 return NULL; 158 return NULL;
150 } else if ((compression_type != PALM_COMPRESSION_NONE) && 159 } else if ((compression_type != PALM_COMPRESSION_NONE) &&
151 (compression_type != PALM_COMPRESSION_RLE) && 160 (compression_type != PALM_COMPRESSION_RLE) &&
152 (compression_type != PALM_COMPRESSION_SCANLINE)) { 161 (compression_type != PALM_COMPRESSION_SCANLINE)) {
153// qDebug ("Image uses unknown compression, code 0x%x", compression_type); 162// odebug << "Image uses unknown compression, code 0x" << compression_type << oendl;
154 return NULL; 163 return NULL;
155 } 164 }
156 165
157 /* as of PalmOS 4.0, there are 6 different kinds of Palm pixmaps: 166 /* as of PalmOS 4.0, there are 6 different kinds of Palm pixmaps:
158 167
159 1, 2, or 4 bit grayscale 168 1, 2, or 4 bit grayscale
160 8-bit StaticColor using the Palm standard colormap 169 8-bit StaticColor using the Palm standard colormap
161 8-bit PseudoColor using a user-specified colormap 170 8-bit PseudoColor using a user-specified colormap
@@ -163,17 +172,17 @@ QImage* Palm2QImage
163 172
164 Each of these can be compressed with one of four compression schemes, 173 Each of these can be compressed with one of four compression schemes,
165 "RLE", "Scanline", "PackBits", or none. 174 "RLE", "Scanline", "PackBits", or none.
166 175
167 We begin by constructing the colormap. 176 We begin by constructing the colormap.
168 */ 177 */
169 178
170 if (flags & PALM_HAS_COLORMAP_FLAG) { 179 if (flags & PALM_HAS_COLORMAP_FLAG) {
171// qDebug("Palm images with custom colormaps are not currently supported.\n"); 180// odebug << "Palm images with custom colormaps are not currently supported." << oendl;
172 return NULL; 181 return NULL;
173 } else if (bits_per_pixel == 1) { 182 } else if (bits_per_pixel == 1) {
174 colormap = Palm1BitColormap; 183 colormap = Palm1BitColormap;
175 imagedatastart = palmimage + 16; 184 imagedatastart = palmimage + 16;
176 } else if (bits_per_pixel == 2) { 185 } else if (bits_per_pixel == 2) {
177 colormap = Palm2BitColormap; 186 colormap = Palm2BitColormap;
178 imagedatastart = palmimage + 16; 187 imagedatastart = palmimage + 16;
179 } else if (bits_per_pixel == 4) { 188 } else if (bits_per_pixel == 4) {
@@ -182,43 +191,46 @@ QImage* Palm2QImage
182 } else if (bits_per_pixel == 8) { 191 } else if (bits_per_pixel == 8) {
183 colormap = Palm8BitColormap; 192 colormap = Palm8BitColormap;
184 imagedatastart = palmimage + 16; 193 imagedatastart = palmimage + 16;
185 } else if (bits_per_pixel == 16 && (flags & PALM_DIRECT_COLOR_FLAG)) { 194 } else if (bits_per_pixel == 16 && (flags & PALM_DIRECT_COLOR_FLAG)) {
186 colormap = NULL; 195 colormap = NULL;
187 palm_red_bits = palmimage[16]; 196 palm_red_bits = palmimage[16];
188 palm_green_bits = palmimage[17]; 197 palm_green_bits = palmimage[17];
189 palm_blue_bits = palmimage[18]; 198 palm_blue_bits = palmimage[18];
190// qDebug("Bits:%d, %d, %d", palm_red_bits, palm_green_bits, palm_blue_bits); 199// odebug << "Bits:" << palm_red_bits << ", " << palm_green_bits << ", " << palm_blue_bits << oendl;
191 if (palm_blue_bits > 8 || palm_green_bits > 8 || palm_red_bits > 8) { 200 if (palm_blue_bits > 8 || palm_green_bits > 8 || palm_red_bits > 8) {
192// qDebug("Can't handle this format DirectColor image -- too wide in some color (%d:%d:%d)\n", palm_red_bits, palm_green_bits, palm_blue_bits); 201// odebug << "Can't handle this format DirectColor image -- too wide in some color ("
202// << palm_red_bits << ":" << palm_green_bits << ":" << palm_blue_bits << oendl;
193 return NULL; 203 return NULL;
194 } 204 }
195 if (bits_per_pixel > (8 * sizeof(unsigned long))) { 205 if (bits_per_pixel > (8 * sizeof(unsigned long))) {
196// qDebug ("Can't handle this format DirectColor image -- too many bits per pixel (%d)\n", bits_per_pixel); 206// odebug << "Can't handle this format DirectColor image -- too many bits per pixel ("
207// << bits_per_pixel << ")" << oendl;
197 return NULL; 208 return NULL;
198 } 209 }
199 imagedatastart = palmimage + 24; 210 imagedatastart = palmimage + 24;
200 } else { 211 } else {
201// qDebug("Unknown bits-per-pixel of %d encountered.\n", bits_per_pixel); 212// odebug << "Unknown bits-per-pixel of " << bits_per_pixel << " encountered" << oendl;
202 return NULL; 213 return NULL;
203 } 214 }
204 215
205#ifndef USEQPE 216#ifndef USEQPE
206 QImage* qimage = new QImage(width, height, 32); 217 QImage* qimage = new QImage(width, height, 32);
207#else 218#else
208 QImage* qimage = new QImage(width, height, 16); 219 QImage* qimage = new QImage(width, height, 16);
209#endif 220#endif
210 221
211 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */ 222 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */
212 rowbuf = new unsigned char[bytes_per_row * width]; 223 rowbuf = new unsigned char[bytes_per_row * width];
213 lastrow = new unsigned char[bytes_per_row * width]; 224 lastrow = new unsigned char[bytes_per_row * width];
214 225
215 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) { 226 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) {
216// qDebug("inval:%x palm_ptr:%x x_ptr:%x bpr:%x", inval, palm_ptr, x_ptr, bytes_per_row); 227// odebug << "inval:" << inval << " palm_ptr:" << palm_ptr << " x_ptr:" << x_ptr
228// << " bpr:" << bytes_per_row << oendl;
217 229
218 /* first, uncompress the Palm image */ 230 /* first, uncompress the Palm image */
219 if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_RLE)) { 231 if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_RLE)) {
220 for (j = 0; j < bytes_per_row; ) { 232 for (j = 0; j < bytes_per_row; ) {
221 incount = *palm_ptr++; 233 incount = *palm_ptr++;
222 inval = *palm_ptr++; 234 inval = *palm_ptr++;
223 memset(rowbuf + j, inval, incount); 235 memset(rowbuf + j, inval, incount);
224 j += incount; 236 j += incount;
@@ -238,22 +250,22 @@ QImage* Palm2QImage
238 } else if (((flags & PALM_IS_COMPRESSED_FLAG) && 250 } else if (((flags & PALM_IS_COMPRESSED_FLAG) &&
239 (compression_type == PALM_COMPRESSION_NONE)) || 251 (compression_type == PALM_COMPRESSION_NONE)) ||
240 ((flags & PALM_IS_COMPRESSED_FLAG) == 0)) 252 ((flags & PALM_IS_COMPRESSED_FLAG) == 0))
241 { 253 {
242 memcpy (rowbuf, palm_ptr, bytes_per_row); 254 memcpy (rowbuf, palm_ptr, bytes_per_row);
243 palm_ptr += bytes_per_row; 255 palm_ptr += bytes_per_row;
244 } 256 }
245 else { 257 else {
246 qDebug("Case 4"); 258 odebug << "Case 4" << oendl;
247 qDebug("Is compressed:%s", ((flags & PALM_IS_COMPRESSED_FLAG) == 0) ? "false" : "true"); 259 odebug << "Is compressed:" << (((flags & PALM_IS_COMPRESSED_FLAG) == 0) ? "false" : "true") << oendl;
248 qDebug("Has colourmap:%s", ((flags & PALM_HAS_COLORMAP_FLAG) == 0) ? "false" : "true"); 260 odebug << "Has colourmap:" << (((flags & PALM_HAS_COLORMAP_FLAG) == 0) ? "false" : "true") << oendl;
249 qDebug("Has transparency:%s", ((flags & PALM_HAS_TRANSPARENCY_FLAG) == 0) ? "false" : "true"); 261 odebug << "Has transparency:" << (((flags & PALM_HAS_TRANSPARENCY_FLAG) == 0) ? "false" : "true") << oendl;
250 qDebug("Direct colour:%s", ((flags & PALM_DIRECT_COLOR_FLAG) == 0) ? "false" : "true"); 262 odebug << "Direct colour:" << (((flags & PALM_DIRECT_COLOR_FLAG) == 0) ? "false" : "true") << oendl;
251 qDebug("four byte field:%s", ((flags & PALM_4_BYTE_FIELD_FLAG) == 0) ? "false" : "true"); 263 odebug << "four byte field:" << (((flags & PALM_4_BYTE_FIELD_FLAG) == 0) ? "false" : "true") << oendl;
252 memcpy (rowbuf, palm_ptr, bytes_per_row); 264 memcpy (rowbuf, palm_ptr, bytes_per_row);
253 palm_ptr += bytes_per_row; 265 palm_ptr += bytes_per_row;
254 } 266 }
255 /* next, write it to the GDK bitmap */ 267 /* next, write it to the GDK bitmap */
256 if (colormap) { 268 if (colormap) {
257 mask = (1 << bits_per_pixel) - 1; 269 mask = (1 << bits_per_pixel) - 1;
258 for (inbit = 8 - bits_per_pixel, inbyte = rowbuf, j = 0; j < width; ++j) { 270 for (inbit = 8 - bits_per_pixel, inbyte = rowbuf, j = 0; j < width; ++j) {
259 inval = ((*inbyte) & (mask << inbit)) >> inbit; 271 inval = ((*inbyte) & (mask << inbit)) >> inbit;
@@ -270,21 +282,20 @@ QImage* Palm2QImage
270 } 282 }
271 } 283 }
272 } else if (!colormap && 284 } else if (!colormap &&
273 bits_per_pixel == 16) { 285 bits_per_pixel == 16) {
274 for (inbyte = rowbuf, j = 0; j < width; ++j) { 286 for (inbyte = rowbuf, j = 0; j < width; ++j) {
275 inval = ((unsigned short)inbyte[0] << (unsigned short)8) | inbyte[1]; 287 inval = ((unsigned short)inbyte[0] << (unsigned short)8) | inbyte[1];
276 288
277/* 289/*
278 qDebug ("pixel is %d,%d (%d:%d:%d)", 290 odebug << "pixel is " << j << "," << i << " ("
279 j, i, 291 << (((inval >> (bits_per_pixel - palm_red_bits)) & ((1 << palm_red_bits) - 1)) << (8-palm_red_bits)) << ":"
280 ((inval >> (bits_per_pixel - palm_red_bits)) & ((1 << palm_red_bits) - 1)) << (8-palm_red_bits), 292 << (((inval >> palm_blue_bits) & ((1 << palm_green_bits) - 1)) << (8-palm_green_bits)) << ":"
281 ((inval >> palm_blue_bits) & ((1 << palm_green_bits) - 1)) << (8-palm_green_bits), 293 << (((inval >> 0) & ((1 << palm_blue_bits) - 1)) << (8-palm_blue_bits)) << ")" << oendl;
282 ((inval >> 0) & ((1 << palm_blue_bits) - 1)) << (8-palm_blue_bits));
283*/ 294*/
284 QRgb colour = qRgb( 295 QRgb colour = qRgb(
285 ((inval >> (bits_per_pixel - palm_red_bits)) & ((1 << palm_red_bits) - 1)) << (8-palm_red_bits), 296 ((inval >> (bits_per_pixel - palm_red_bits)) & ((1 << palm_red_bits) - 1)) << (8-palm_red_bits),
286 ((inval >> palm_blue_bits) & ((1 << palm_green_bits) - 1)) << (8-palm_green_bits), 297 ((inval >> palm_blue_bits) & ((1 << palm_green_bits) - 1)) << (8-palm_green_bits),
287 ((inval >> 0) & ((1 << palm_blue_bits) - 1)) << (8-palm_blue_bits)); 298 ((inval >> 0) & ((1 << palm_blue_bits) - 1)) << (8-palm_blue_bits));
288 qimage->setPixel(j, i, colour); 299 qimage->setPixel(j, i, colour);
289 inbyte += 2; 300 inbyte += 2;
290 } 301 }
@@ -294,15 +305,15 @@ QImage* Palm2QImage
294 delete [] rowbuf; 305 delete [] rowbuf;
295 delete [] lastrow; 306 delete [] lastrow;
296 307
297 return qimage; 308 return qimage;
298} 309}
299 310
300QImage* hRule(int w, int h, unsigned char r, unsigned char g, unsigned char b) 311QImage* hRule(int w, int h, unsigned char r, unsigned char g, unsigned char b)
301{ 312{
302//// qDebug("hrule [%d, %d]", w, h); 313// odebug << "hrule [" << w << ", " << h << "]" << oendl;
303 QPixmap* qimage = new QPixmap(w, h); 314 QPixmap* qimage = new QPixmap(w, h);
304 qimage->fill(QColor(r,g,b)); 315 qimage->fill(QColor(r,g,b));
305 QImage* ret = new QImage(qimage->convertToImage()); 316 QImage* ret = new QImage(qimage->convertToImage());
306 delete qimage; 317 delete qimage;
307 return ret; 318 return ret;
308} 319}
diff --git a/noncore/apps/opie-reader/QTReader.h b/noncore/apps/opie-reader/QTReader.h
index dfbdfb9..f89de63 100644
--- a/noncore/apps/opie-reader/QTReader.h
+++ b/noncore/apps/opie-reader/QTReader.h
@@ -131,33 +131,33 @@ public:
131 void setencoding(int _f) 131 void setencoding(int _f)
132 { 132 {
133 m_encd = _f; 133 m_encd = _f;
134 setfilter(getfilter()); 134 setfilter(getfilter());
135 } 135 }
136 MarkupType PreferredMarkup(); 136 MarkupType PreferredMarkup();
137 CEncoding* getencoding() 137 CEncoding* getencoding()
138 { 138 {
139 // qDebug("m_encd:%d", m_encd); 139// odebug << "m_encd:" << m_encd << oendl;
140 switch (m_encd) 140 switch (m_encd)
141 { 141 {
142 case 4: 142 case 4:
143 // qDebug("palm"); 143// odebug << "palm" << oendl;
144 return new CPalm; 144 return new CPalm;
145 case 1: 145 case 1:
146 // qDebug("utf8"); 146// odebug << "utf8" << oendl;
147 return new CUtf8; 147 return new CUtf8;
148 case 2: 148 case 2:
149 // qDebug("ucs16be"); 149// odebug << "ucs16be" << oendl;
150 return new CUcs16be; 150 return new CUcs16be;
151 case 3: 151 case 3:
152 // qDebug("ucs16le"); 152// odebug << "ucs16le" << oendl;
153 return new CUcs16le; 153 return new CUcs16le;
154 case 0: 154 case 0:
155 // qDebug("ascii"); 155// odebug << "ascii" << oendl;
156 return new CAscii; 156 return new CAscii;
157 default: 157 default:
158 return new CGeneral8Bit(m_encd-MAX_ENCODING+1); 158 return new CGeneral8Bit(m_encd-MAX_ENCODING+1);
159 } 159 }
160 } 160 }
161 CFilterChain* getfilter() 161 CFilterChain* getfilter()
162 { 162 {
163 CFilterChain * filt = new CFilterChain(getencoding()); 163 CFilterChain * filt = new CFilterChain(getencoding());
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h
index ab6f60e..fe3eebf 100644
--- a/noncore/apps/opie-reader/QTReaderApp.h
+++ b/noncore/apps/opie-reader/QTReaderApp.h
@@ -394,18 +394,18 @@ private slots:
394 bool regVisible; 394 bool regVisible;
395 bool m_fontVisible, m_twoTouch; 395 bool m_fontVisible, m_twoTouch;
396 bool bFromDocView; 396 bool bFromDocView;
397 static unsigned long m_uid; 397 static unsigned long m_uid;
398 long unsigned get_unique_id() { return m_uid++; } 398 long unsigned get_unique_id() { return m_uid++; }
399 /* 399 /*
400 void resizeEvent( QResizeEvent * r) 400 void resizeEvent( QResizeEvent * r)
401 { 401 {
402// qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height()); 402// odebug << "resize:(" << r->oldSize().width() << "," << r->oldSize().height() << ")" << oendl;
403// qDebug("resize:(%u,%u)", r->size().width(), r->size().height()); 403// odebug << "resize:(" << r->size().width() << "," << r->size().height() << ")" << oendl;
404 // bgroup->move( width()-bgroup->width(), 0 ); 404 // bgroup->move( width()-bgroup->width(), 0 );
405 } 405 }
406 */ 406 */
407 CList<Bkmk>* pBkmklist; 407 CList<Bkmk>* pBkmklist;
408 CList<Bkmk>* pOpenlist; 408 CList<Bkmk>* pOpenlist;
409 infowin* m_infoWin; 409 infowin* m_infoWin;
410 GraphicWin* m_graphicwin; 410 GraphicWin* m_graphicwin;
411 QProgressBar* pbar; 411 QProgressBar* pbar;