summaryrefslogtreecommitdiff
path: root/noncore/unsupported
authorkergoth <kergoth>2003-08-09 16:24:58 (UTC)
committer kergoth <kergoth>2003-08-09 16:24:58 (UTC)
commite16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (unidiff)
tree9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/unsupported
parent1c58d1407f9584fedcdae390a04e2b37e5853361 (diff)
downloadopie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/unsupported') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/gsmtool/gsmtool.pro2
-rw-r--r--noncore/unsupported/mail2/addresspicker.cpp1
-rw-r--r--noncore/unsupported/mail2/bend/opie-mailapplet.control4
-rw-r--r--noncore/unsupported/mail2/opie-mail2.control2
-rw-r--r--noncore/unsupported/mailit/opie-mailit.control2
-rw-r--r--noncore/unsupported/qpdf/QOutputDev.cpp17
-rw-r--r--noncore/unsupported/qpdf/opie-qpdf.control2
-rw-r--r--noncore/unsupported/qpdf/qpdf.cpp0
8 files changed, 22 insertions, 8 deletions
diff --git a/noncore/unsupported/gsmtool/gsmtool.pro b/noncore/unsupported/gsmtool/gsmtool.pro
index 180195f..40d5942 100644
--- a/noncore/unsupported/gsmtool/gsmtool.pro
+++ b/noncore/unsupported/gsmtool/gsmtool.pro
@@ -1,34 +1,34 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 #CONFIG = qt warn_on debug 2 #CONFIG = qt warn_on debug
3 CONFIG = qt warn_on release 3 CONFIG = qt warn_on release
4DESTDIR = $(OPIEDIR)/bin 4DESTDIR = $(OPIEDIR)/bin
5 HEADERS = gsmtool.h 5 HEADERS = gsmtool.h
6 SOURCES = main.cpp gsmtool.cpp 6 SOURCES = main.cpp gsmtool.cpp
7# This doesn't actually work... 7# This doesn't actually work...
8TMAKE_CXXFLAGS += -fexceptions 8TMAKE_CXXFLAGS += -fexceptions
9 INCLUDEPATH+= $(OPIEDIR)/include 9 INCLUDEPATH+= $(OPIEDIR)/include
10 INCLUDEPATH+= $(GSMLIBDIR) 10 #INCLUDEPATH+= $(GSMLIBDIR)
11 DEPENDPATH+= $(OPIEDIR)/include 11 DEPENDPATH+= $(OPIEDIR)/include
12LIBS += -lqpe -L$(GSMLIBDIR)/gsmlib/.libs -lgsmme 12LIBS += -lqpe -L$(GSMLIBDIR)/gsmlib/.libs -lgsmme
13 INTERFACES= gsmtoolbase.ui 13 INTERFACES= gsmtoolbase.ui
14 TARGET = gsmtool 14 TARGET = gsmtool
15 15
16TRANSLATIONS = ../../../i18n/de/gsmtool.ts \ 16TRANSLATIONS = ../../../i18n/de/gsmtool.ts \
17 ../../../i18n/nl/gsmtool.ts \ 17 ../../../i18n/nl/gsmtool.ts \
18 ../../../i18n/da/gsmtool.ts \ 18 ../../../i18n/da/gsmtool.ts \
19 ../../../i18n/xx/gsmtool.ts \ 19 ../../../i18n/xx/gsmtool.ts \
20 ../../../i18n/en/gsmtool.ts \ 20 ../../../i18n/en/gsmtool.ts \
21 ../../../i18n/es/gsmtool.ts \ 21 ../../../i18n/es/gsmtool.ts \
22 ../../../i18n/fr/gsmtool.ts \ 22 ../../../i18n/fr/gsmtool.ts \
23 ../../../i18n/hu/gsmtool.ts \ 23 ../../../i18n/hu/gsmtool.ts \
24 ../../../i18n/ja/gsmtool.ts \ 24 ../../../i18n/ja/gsmtool.ts \
25 ../../../i18n/ko/gsmtool.ts \ 25 ../../../i18n/ko/gsmtool.ts \
26 ../../../i18n/no/gsmtool.ts \ 26 ../../../i18n/no/gsmtool.ts \
27 ../../../i18n/pl/gsmtool.ts \ 27 ../../../i18n/pl/gsmtool.ts \
28 ../../../i18n/pt/gsmtool.ts \ 28 ../../../i18n/pt/gsmtool.ts \
29 ../../../i18n/pt_BR/gsmtool.ts \ 29 ../../../i18n/pt_BR/gsmtool.ts \
30 ../../../i18n/sl/gsmtool.ts \ 30 ../../../i18n/sl/gsmtool.ts \
31 ../../../i18n/zh_CN/gsmtool.ts \ 31 ../../../i18n/zh_CN/gsmtool.ts \
32 ../../../i18n/zh_TW/gsmtool.ts 32 ../../../i18n/zh_TW/gsmtool.ts
33 33
34 34
diff --git a/noncore/unsupported/mail2/addresspicker.cpp b/noncore/unsupported/mail2/addresspicker.cpp
index 7f32725..a97b33f 100644
--- a/noncore/unsupported/mail2/addresspicker.cpp
+++ b/noncore/unsupported/mail2/addresspicker.cpp
@@ -3,48 +3,49 @@
3#include <qtextstream.h> 3#include <qtextstream.h>
4#include <qlistbox.h> 4#include <qlistbox.h>
5#include <qfile.h> 5#include <qfile.h>
6 6
7#include <qpe/resource.h> 7#include <qpe/resource.h>
8 8
9#include <stdlib.h> 9#include <stdlib.h>
10 10
11#include "addresspicker.h" 11#include "addresspicker.h"
12 12
13AddressPicker::AddressPicker(QWidget *parent, const char *name, bool modal, 13AddressPicker::AddressPicker(QWidget *parent, const char *name, bool modal,
14 WFlags fl) : AddressPickerBase(parent, name, modal, fl) 14 WFlags fl) : AddressPickerBase(parent, name, modal, fl)
15{ 15{
16 okButton->setIconSet(Resource::loadPixmap("enter")); 16 okButton->setIconSet(Resource::loadPixmap("enter"));
17 cancelButton->setIconSet(Resource::loadPixmap("editdelete")); 17 cancelButton->setIconSet(Resource::loadPixmap("editdelete"));
18 18
19 connect(okButton, SIGNAL(clicked()), SLOT(accept())); 19 connect(okButton, SIGNAL(clicked()), SLOT(accept()));
20 connect(cancelButton, SIGNAL(clicked()), SLOT(close())); 20 connect(cancelButton, SIGNAL(clicked()), SLOT(close()));
21 21
22 QFile f((QString) getenv("HOME") + "/Applications/" 22 QFile f((QString) getenv("HOME") + "/Applications/"
23 + "addressbook/addressbook.xml"); 23 + "addressbook/addressbook.xml");
24 24
25 if (f.open(IO_ReadOnly)) { 25 if (f.open(IO_ReadOnly)) {
26 QTextStream stream(&f); 26 QTextStream stream(&f);
27 stream.setEncoding( QTextStream::UnicodeUTF8 );
27 QString content; 28 QString content;
28 while (!f.atEnd()) content += stream.readLine() + "\n"; 29 while (!f.atEnd()) content += stream.readLine() + "\n";
29 QStringList lines = QStringList::split(QRegExp("\\n"), content); 30 QStringList lines = QStringList::split(QRegExp("\\n"), content);
30 QStringList::Iterator it; 31 QStringList::Iterator it;
31 for (it = lines.begin(); it != lines.end(); it++) { 32 for (it = lines.begin(); it != lines.end(); it++) {
32 if ((*it).find(QRegExp("^<Contact.*")) != -1) { 33 if ((*it).find(QRegExp("^<Contact.*")) != -1) {
33 int pos = (*it).find("FirstName=\""); 34 int pos = (*it).find("FirstName=\"");
34 QString fname; 35 QString fname;
35 if (pos != -1) { 36 if (pos != -1) {
36 int i = 1; 37 int i = 1;
37 QChar c; 38 QChar c;
38 while (c != '"') { 39 while (c != '"') {
39 c = (*it)[pos + 10 + i]; 40 c = (*it)[pos + 10 + i];
40 if (c != '"') fname += c; 41 if (c != '"') fname += c;
41 i++; 42 i++;
42 } 43 }
43 } 44 }
44 pos = (*it).find("LastName=\""); 45 pos = (*it).find("LastName=\"");
45 QString lname; 46 QString lname;
46 if (pos != -1) { 47 if (pos != -1) {
47 int i = 1; 48 int i = 1;
48 QChar c; 49 QChar c;
49 while (c != '"') { 50 while (c != '"') {
50 c = (*it)[pos + 9 + i]; 51 c = (*it)[pos + 9 + i];
diff --git a/noncore/unsupported/mail2/bend/opie-mailapplet.control b/noncore/unsupported/mail2/bend/opie-mailapplet.control
index e5d3c6e..d618643 100644
--- a/noncore/unsupported/mail2/bend/opie-mailapplet.control
+++ b/noncore/unsupported/mail2/bend/opie-mailapplet.control
@@ -1,10 +1,10 @@
1Package: opie-mailapplet 1Package: opie-mailapplet
2Files: plugins/applets/libbend.so* 2Files: plugins/applets/libbend.so*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Constantin Bergemann <cbergemann@lisa.de> 5Maintainer: Constantin Bergemann <cbergemann@lisa.de>
6Architecture: arm 6Architecture: arm
7Version: 0.0.9-$SUB_VERSION 7Version: $QPE_VERSION$EXTRAVERSION
8Depends: task-opie-minimal libopie1 opie-mail2 8Depends: task-opie-minimal, libopie1, opie-mail2
9Description: A Biff-Like mailchecker 9Description: A Biff-Like mailchecker
10License: LGPL 10License: LGPL
diff --git a/noncore/unsupported/mail2/opie-mail2.control b/noncore/unsupported/mail2/opie-mail2.control
index 7f8aeb6..976dc0b 100644
--- a/noncore/unsupported/mail2/opie-mail2.control
+++ b/noncore/unsupported/mail2/opie-mail2.control
@@ -1,10 +1,10 @@
1Package: opie-mail2 1Package: opie-mail2
2Files: bin/mail $OPIEDIR/lib/libmail.so* apps/1Pim/mail.desktop pics/mail/*.png sounds/mail/*.wav 2Files: bin/mail $OPIEDIR/lib/libmail.so* apps/1Pim/mail.desktop pics/mail/*.png sounds/mail/*.wav
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Constantin Bergemann <cbergemann@lisa.de> 5Maintainer: Constantin Bergemann <cbergemann@lisa.de>
6Architecture: arm 6Architecture: arm
7Version: 0.0.9-$SUB_VERSION 7Version: $QPE_VERSION$EXTRAVERSION
8Depends: task-opie-minimal, libopie1 8Depends: task-opie-minimal, libopie1
9Description: An IMAP mail client 9Description: An IMAP mail client
10License: LGPL 10License: LGPL
diff --git a/noncore/unsupported/mailit/opie-mailit.control b/noncore/unsupported/mailit/opie-mailit.control
index 65b5b36..77d4102 100644
--- a/noncore/unsupported/mailit/opie-mailit.control
+++ b/noncore/unsupported/mailit/opie-mailit.control
@@ -1,9 +1,9 @@
1Package: opie-mailit 1Package: opie-mailit
2Files: bin/mailit apps/1Pim/mailit.desktop pics/mailit 2Files: bin/mailit apps/1Pim/mailit.desktop pics/mailit
3Priority: optional 3Priority: optional
4Section: opie 4Section: opie
5Maintainer: L.J. Potter <llornkcor@handhelds.org> 5Maintainer: L.J. Potter <llornkcor@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $OPIE_VERSION-$SUB_VERSION 7Version: $QPE_VERSION$EXTRAVERSION
8Description: EMail 8Description: EMail
9 A simple POP3 email client for the Opie environment. 9 A simple POP3 email client for the Opie environment.
diff --git a/noncore/unsupported/qpdf/QOutputDev.cpp b/noncore/unsupported/qpdf/QOutputDev.cpp
index 52237f5..022d938 100644
--- a/noncore/unsupported/qpdf/QOutputDev.cpp
+++ b/noncore/unsupported/qpdf/QOutputDev.cpp
@@ -98,49 +98,49 @@ static QOutFontSubst qStdFonts [] = {
98 98
99QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp_t m22 ) 99QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp_t m22 )
100{ 100{
101 static QDict<QOutFontSubst> stdfonts; 101 static QDict<QOutFontSubst> stdfonts;
102 102
103 // build dict for std. fonts on first invocation 103 // build dict for std. fonts on first invocation
104 if ( stdfonts. isEmpty ( )) { 104 if ( stdfonts. isEmpty ( )) {
105 for ( QOutFontSubst *ptr = qStdFonts; ptr-> m_name; ptr++ ) { 105 for ( QOutFontSubst *ptr = qStdFonts; ptr-> m_name; ptr++ ) {
106 stdfonts. insert ( QString ( ptr-> m_name ), ptr ); 106 stdfonts. insert ( QString ( ptr-> m_name ), ptr );
107 } 107 }
108 } 108 }
109 109
110 // compute size and normalized transform matrix 110 // compute size and normalized transform matrix
111 int size = lrint ( sqrt ( m21 * m21 + m22 * m22 )); 111 int size = lrint ( sqrt ( m21 * m21 + m22 * m22 ));
112 112
113 QPDFDBG( printf ( "SET FONT: Name=%s, Size=%d, Bold=%d, Italic=%d, Mono=%d, Serif=%d, Symbol=%d, CID=%d, EmbFN=%s, M=(%f,%f,%f,%f)\n", 113 QPDFDBG( printf ( "SET FONT: Name=%s, Size=%d, Bold=%d, Italic=%d, Mono=%d, Serif=%d, Symbol=%d, CID=%d, EmbFN=%s, M=(%f,%f,%f,%f)\n",
114 (( gfxFont-> getName ( )) ? gfxFont-> getName ( )-> getCString ( ) : "<n/a>" ), 114 (( gfxFont-> getName ( )) ? gfxFont-> getName ( )-> getCString ( ) : "<n/a>" ),
115 size, 115 size,
116 gfxFont-> isBold ( ), 116 gfxFont-> isBold ( ),
117 gfxFont-> isItalic ( ), 117 gfxFont-> isItalic ( ),
118 gfxFont-> isFixedWidth ( ), 118 gfxFont-> isFixedWidth ( ),
119 gfxFont-> isSerif ( ), 119 gfxFont-> isSerif ( ),
120 gfxFont-> isSymbolic ( ), 120 gfxFont-> isSymbolic ( ),
121 gfxFont-> isCIDFont ( ), 121 gfxFont-> isCIDFont ( ),
122 ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName ( ) : "<n/a>" ), 122 ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName()-> getCString ( ) : "<n/a>" ),
123 (double) m11, (double) m12, (double) m21, (double) m22 )); 123 (double) m11, (double) m12, (double) m21, (double) m22 ));
124 124
125 125
126 QString fname (( gfxFont-> getName ( )) ? gfxFont-> getName ( )-> getCString ( ) : "<n/a>" ); 126 QString fname (( gfxFont-> getName ( )) ? gfxFont-> getName ( )-> getCString ( ) : "<n/a>" );
127 127
128 QFont f; 128 QFont f;
129 f. setPixelSize ( size > 0 ? size : 8 ); // type3 fonts misbehave sometimes 129 f. setPixelSize ( size > 0 ? size : 8 ); // type3 fonts misbehave sometimes
130 130
131 // fast lookup for std. fonts 131 // fast lookup for std. fonts
132 QOutFontSubst *subst = stdfonts [fname]; 132 QOutFontSubst *subst = stdfonts [fname];
133 133
134 if ( subst ) { 134 if ( subst ) {
135 if ( subst-> m_sname ) 135 if ( subst-> m_sname )
136 f. setFamily ( subst-> m_sname ); 136 f. setFamily ( subst-> m_sname );
137 f. setStyleHint ( subst-> m_hint, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); 137 f. setStyleHint ( subst-> m_hint, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality ));
138 f. setBold ( subst-> m_bold ); 138 f. setBold ( subst-> m_bold );
139 f. setItalic ( subst-> m_italic ); 139 f. setItalic ( subst-> m_italic );
140 } 140 }
141 else { 141 else {
142 QFont::StyleHint sty; 142 QFont::StyleHint sty;
143 143
144 if ( gfxFont-> isSerif ( )) 144 if ( gfxFont-> isSerif ( ))
145 sty = QFont::Serif; 145 sty = QFont::Serif;
146 else if ( gfxFont-> isFixedWidth ( )) 146 else if ( gfxFont-> isFixedWidth ( ))
@@ -194,84 +194,97 @@ QOutputDev::~QOutputDev ( )
194 delete m_text; 194 delete m_text;
195} 195}
196 196
197 197
198void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) 198void QOutputDev::startPage ( int /*pageNum*/, GfxState *state )
199{ 199{
200 delete m_pixmap; 200 delete m_pixmap;
201 delete m_painter; 201 delete m_painter;
202 202
203 m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))); 203 m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )));
204 m_painter = new QPainter ( m_pixmap ); 204 m_painter = new QPainter ( m_pixmap );
205 205
206 QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )))); 206 QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))));
207 207
208 resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( )); 208 resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( ));
209 setContentsPos ( 0, 0 ); 209 setContentsPos ( 0, 0 );
210 210
211 m_pixmap-> fill ( white ); // clear window 211 m_pixmap-> fill ( white ); // clear window
212 m_text-> clear ( ); // cleat text object 212 m_text-> clear ( ); // cleat text object
213 viewport ( )-> repaint ( ); 213 viewport ( )-> repaint ( );
214} 214}
215 215
216void QOutputDev::endPage ( ) 216void QOutputDev::endPage ( )
217{ 217{
218 QPDFDBG( printf("End page\n") );
218 m_text-> coalesce ( ); 219 m_text-> coalesce ( );
219 220
221 /*
222 * I get stupid crashes after endPage is called and then we do clipping
223 * and other stuff.....
224 */
225#if 0
220 delete m_painter; 226 delete m_painter;
221 m_painter = 0; 227 m_painter = 0;
228#endif
222 229
223 updateContents ( 0, 0, contentsWidth ( ), contentsHeight ( )); 230 updateContents ( 0, 0, contentsWidth ( ), contentsHeight ( ));
224} 231}
225 232
226void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) 233void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ )
227{ 234{
228 fp_t x1, y1, x2, y2, w; 235 fp_t x1, y1, x2, y2, w;
229 236
230 link-> getBorder ( &x1, &y1, &x2, &y2, &w ); 237 link-> getBorder ( &x1, &y1, &x2, &y2, &w );
231 238
232 if ( w > 0 ) { 239 if ( w > 0 ) {
233 int x, y, dx, dy; 240 int x, y, dx, dy;
234 241
235 cvtUserToDev ( x1, y1, &x, &y ); 242 cvtUserToDev ( x1, y1, &x, &y );
236 cvtUserToDev ( x2, y2, &dx, &dy ); 243 cvtUserToDev ( x2, y2, &dx, &dy );
237 244
238 QPen oldpen = m_painter-> pen ( ); 245 QPen oldpen = m_painter-> pen ( );
239 m_painter-> setPen ( blue ); 246 m_painter-> setPen ( blue );
240 m_painter-> drawRect ( x, y, dx, dy ); 247 m_painter-> drawRect ( x, y, dx, dy );
241 m_painter-> setPen ( oldpen ); 248 m_painter-> setPen ( oldpen );
242 } 249 }
243} 250}
244 251
245void QOutputDev::saveState ( GfxState */*state*/ ) 252void QOutputDev::saveState ( GfxState */*state*/ )
246{ 253{
254 if ( ! m_painter )
255 return;
256
247 QPDFDBG( printf ( "SAVE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( ))); 257 QPDFDBG( printf ( "SAVE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( )));
248 258
249 m_painter-> save ( ); 259 m_painter-> save ( );
250} 260}
251 261
252void QOutputDev::restoreState ( GfxState */*state*/ ) 262void QOutputDev::restoreState ( GfxState */*state*/ )
253{ 263{
264 if( ! m_painter )
265 return;
266
254 m_painter-> restore ( ); 267 m_painter-> restore ( );
255 268
256 //m_painter-> setClipRegion ( QRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( ))); 269 //m_painter-> setClipRegion ( QRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( )));
257 //m_painter-> setClipping ( false ); 270 //m_painter-> setClipping ( false );
258 QPDFDBG ( printf ( "RESTORE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( ))); 271 QPDFDBG ( printf ( "RESTORE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( )));
259} 272}
260 273
261void QOutputDev::updateAll ( GfxState *state ) 274void QOutputDev::updateAll ( GfxState *state )
262{ 275{
263 updateLineAttrs ( state, gTrue ); 276 updateLineAttrs ( state, gTrue );
264 //updateFlatness ( state ); 277 //updateFlatness ( state );
265 //updateMiterLimit ( state ); 278 //updateMiterLimit ( state );
266 updateFillColor ( state ); 279 updateFillColor ( state );
267 updateStrokeColor ( state ); 280 updateStrokeColor ( state );
268 updateFont ( state ); 281 updateFont ( state );
269} 282}
270 283
271void QOutputDev::updateCTM ( GfxState *state, fp_t /*m11*/, fp_t /*m12*/, fp_t /*m21*/, fp_t /*m22*/, fp_t /*m31*/, fp_t /*m32*/ ) 284void QOutputDev::updateCTM ( GfxState *state, fp_t /*m11*/, fp_t /*m12*/, fp_t /*m21*/, fp_t /*m22*/, fp_t /*m31*/, fp_t /*m32*/ )
272{ 285{
273 updateLineAttrs ( state, gTrue ); 286 updateLineAttrs ( state, gTrue );
274} 287}
275 288
276void QOutputDev::updateLineDash ( GfxState *state ) 289void QOutputDev::updateLineDash ( GfxState *state )
277{ 290{
@@ -500,49 +513,49 @@ void QOutputDev::doClip ( GfxState *state, bool winding )
500 QRegion region; 513 QRegion region;
501 514
502 QPDFDBG( printf ( "CLIPPING: %d POLYS\n", n )); 515 QPDFDBG( printf ( "CLIPPING: %d POLYS\n", n ));
503 516
504 // draw each subpath 517 // draw each subpath
505 int j = 0; 518 int j = 0;
506 for ( int i = 0; i < n; i++ ) { 519 for ( int i = 0; i < n; i++ ) {
507 int len = lengths [i]; 520 int len = lengths [i];
508 521
509 if ( len >= 3 ) { 522 if ( len >= 3 ) {
510 QPointArray dummy; 523 QPointArray dummy;
511 dummy. setRawData ( points. data ( ) + j, len ); 524 dummy. setRawData ( points. data ( ) + j, len );
512 525
513 QPDFDBG( printf ( " - POLY %d: ", i )); 526 QPDFDBG( printf ( " - POLY %d: ", i ));
514 QPDFDBG( for ( int ii = 0; ii < len; ii++ ) printf ( "(%d/%d) ", points [j+ii]. x ( ), points [j+ii]. y ( ))); 527 QPDFDBG( for ( int ii = 0; ii < len; ii++ ) printf ( "(%d/%d) ", points [j+ii]. x ( ), points [j+ii]. y ( )));
515 QPDFDBG( printf ( "\n" )); 528 QPDFDBG( printf ( "\n" ));
516 529
517 region |= QRegion ( dummy, winding ); 530 region |= QRegion ( dummy, winding );
518 531
519 dummy. resetRawData ( points. data ( ) + j, len ); 532 dummy. resetRawData ( points. data ( ) + j, len );
520 } 533 }
521 j += len; 534 j += len;
522 } 535 }
523 536
524 if ( m_painter-> hasClipping ( )) 537 if ( m_painter && m_painter-> hasClipping ( ))
525 region &= m_painter-> clipRegion ( ); 538 region &= m_painter-> clipRegion ( );
526 539
527 //m_painter-> setClipRegion ( region ); 540 //m_painter-> setClipRegion ( region );
528 //m_painter-> setClipping ( true ); 541 //m_painter-> setClipping ( true );
529 542
530 //m_painter-> fillRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( ), red ); 543 //m_painter-> fillRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( ), red );
531 //m_painter-> drawText ( points [0]. x ( ) + 10, points [0]. y ( ) + 10, "Bla bla" ); 544 //m_painter-> drawText ( points [0]. x ( ) + 10, points [0]. y ( ) + 10, "Bla bla" );
532 qApp-> processEvents ( ); 545 qApp-> processEvents ( );
533} 546}
534 547
535// 548//
536// Transform points in the path and convert curves to line segments. 549// Transform points in the path and convert curves to line segments.
537// Builds a set of subpaths and returns the number of subpaths. 550// Builds a set of subpaths and returns the number of subpaths.
538// If <fillHack> is set, close any unclosed subpaths and activate a 551// If <fillHack> is set, close any unclosed subpaths and activate a
539// kludge for polygon fills: First, it divides up the subpaths into 552// kludge for polygon fills: First, it divides up the subpaths into
540// non-overlapping polygons by simply comparing bounding rectangles. 553// non-overlapping polygons by simply comparing bounding rectangles.
541// Then it connects subaths within a single compound polygon to a single 554// Then it connects subaths within a single compound polygon to a single
542// point so that X can fill the polygon (sort of). 555// point so that X can fill the polygon (sort of).
543// 556//
544int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> &lengths ) 557int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> &lengths )
545{ 558{
546 GfxPath *path = state-> getPath ( ); 559 GfxPath *path = state-> getPath ( );
547 int n = path-> getNumSubpaths ( ); 560 int n = path-> getNumSubpaths ( );
548 561
diff --git a/noncore/unsupported/qpdf/opie-qpdf.control b/noncore/unsupported/qpdf/opie-qpdf.control
index 33df3e1..208dcb1 100644
--- a/noncore/unsupported/qpdf/opie-qpdf.control
+++ b/noncore/unsupported/qpdf/opie-qpdf.control
@@ -1,9 +1,9 @@
1Package: opie-qpdf 1Package: opie-qpdf
2Files: bin/qpdf apps/Applications/qpdf.desktop pics/qpdf/qpdf_icon.png 2Files: bin/qpdf apps/Applications/qpdf.desktop pics/qpdf/qpdf_icon.png
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Robert Griebl <sandman@handhelds.org> 5Maintainer: Robert Griebl <sandman@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, gzip 7Depends: task-opie-minimal, gzip
9Description: A PDF viewer for OPIE. 8Description: A PDF viewer for OPIE.
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/unsupported/qpdf/qpdf.cpp b/noncore/unsupported/qpdf/qpdf.cpp
index 61f097b..de1dcf3 100644
--- a/noncore/unsupported/qpdf/qpdf.cpp
+++ b/noncore/unsupported/qpdf/qpdf.cpp