-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CEncoding.h | 4 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CExpander.h | 0 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Filedata.h | 4 | ||||
-rw-r--r-- | noncore/apps/opie-reader/FontControl.h | 4 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Palm2QImage.cpp | 55 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReader.h | 12 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.h | 4 |
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 | |||
@@ -58,3 +58,3 @@ class BuffDoc | |||
58 | lastword.empty(); | 58 | lastword.empty(); |
59 | // // qDebug("Buffdoc created"); | 59 | // odebug << "Buffdoc created" << oendl; |
60 | } | 60 | } |
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 | |||
@@ -63,4 +63,4 @@ class CGeneral8Bit : public CEncoding | |||
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 | } |
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 | |||
@@ -28,3 +28,3 @@ class CFiledata | |||
28 | delete [] data; | 28 | delete [] data; |
29 | // qDebug("~Filedata: deleting"); | 29 | // odebug << "~Filedata: deleting" << oendl; |
30 | } | 30 | } |
@@ -32,3 +32,3 @@ class CFiledata | |||
32 | { | 32 | { |
33 | // qDebug("~Filedata: not deleting"); | 33 | // odebug << "~Filedata: not deleting" << oendl; |
34 | } | 34 | } |
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 | |||
@@ -106,3 +106,3 @@ class FontControl | |||
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; |
@@ -126,3 +126,3 @@ class FontControl | |||
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; |
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,2 +1,10 @@ | |||
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> |
@@ -11,3 +19,2 @@ | |||
11 | 19 | ||
12 | #include <qimage.h> | ||
13 | 20 | ||
@@ -143,3 +150,5 @@ QImage* Palm2QImage | |||
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 |
@@ -147,3 +156,3 @@ QImage* Palm2QImage | |||
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; |
@@ -152,3 +161,3 @@ QImage* Palm2QImage | |||
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; |
@@ -170,3 +179,3 @@ QImage* Palm2QImage | |||
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; |
@@ -189,5 +198,6 @@ QImage* Palm2QImage | |||
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; |
@@ -195,3 +205,4 @@ QImage* Palm2QImage | |||
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; |
@@ -200,3 +211,3 @@ QImage* Palm2QImage | |||
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; |
@@ -215,3 +226,4 @@ QImage* Palm2QImage | |||
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 | ||
@@ -245,8 +257,8 @@ QImage* Palm2QImage | |||
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); |
@@ -277,7 +289,6 @@ QImage* Palm2QImage | |||
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 | */ |
@@ -301,3 +312,3 @@ QImage* 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); |
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 | |||
@@ -138,3 +138,3 @@ public: | |||
138 | { | 138 | { |
139 | // qDebug("m_encd:%d", m_encd); | 139 | // odebug << "m_encd:" << m_encd << oendl; |
140 | switch (m_encd) | 140 | switch (m_encd) |
@@ -142,15 +142,15 @@ public: | |||
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; |
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 | |||
@@ -401,4 +401,4 @@ private slots: | |||
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 ); |