author | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
commit | e16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (side-by-side diff) | |
tree | 9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/unsupported | |
parent | 1c58d1407f9584fedcdae390a04e2b37e5853361 (diff) | |
download | opie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | noncore/unsupported/gsmtool/gsmtool.pro | 2 | ||||
-rw-r--r-- | noncore/unsupported/mail2/addresspicker.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/mail2/bend/opie-mailapplet.control | 4 | ||||
-rw-r--r-- | noncore/unsupported/mail2/opie-mail2.control | 2 | ||||
-rw-r--r-- | noncore/unsupported/mailit/opie-mailit.control | 2 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/QOutputDev.cpp | 367 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/opie-qpdf.control | 2 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/qpdf.cpp | 2 |
8 files changed, 198 insertions, 184 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 @@ -9,3 +9,3 @@ TMAKE_CXXFLAGS += -fexceptions INCLUDEPATH += $(OPIEDIR)/include -INCLUDEPATH += $(GSMLIBDIR) +#INCLUDEPATH += $(GSMLIBDIR) DEPENDPATH += $(OPIEDIR)/include 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 @@ -26,2 +26,3 @@ AddressPicker::AddressPicker(QWidget *parent, const char *name, bool modal, QTextStream stream(&f); + stream.setEncoding( QTextStream::UnicodeUTF8 ); QString content; 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 @@ -6,4 +6,4 @@ Maintainer: Constantin Bergemann <cbergemann@lisa.de> Architecture: arm -Version: 0.0.9-$SUB_VERSION -Depends: task-opie-minimal libopie1 opie-mail2 +Version: $QPE_VERSION$EXTRAVERSION +Depends: task-opie-minimal, libopie1, opie-mail2 Description: A Biff-Like mailchecker 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 @@ -6,3 +6,3 @@ Maintainer: Constantin Bergemann <cbergemann@lisa.de> Architecture: arm -Version: 0.0.9-$SUB_VERSION +Version: $QPE_VERSION$EXTRAVERSION Depends: task-opie-minimal, libopie1 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 @@ -6,3 +6,3 @@ Maintainer: L.J. Potter <llornkcor@handhelds.org> Architecture: arm -Version: $OPIE_VERSION-$SUB_VERSION +Version: $QPE_VERSION$EXTRAVERSION Description: EMail 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 @@ -88,3 +88,3 @@ static QOutFontSubst qStdFonts [] = { { "Zapf-Dingbats", 0, false, false, QFont::AnyStyle }, - + { 0, 0, false, false, QFont::AnyStyle } @@ -98,7 +98,7 @@ static QOutFontSubst qStdFonts [] = { -QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp_t m22 ) +QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp_t m22 ) { static QDict<QOutFontSubst> stdfonts; - - // build dict for std. fonts on first invocation + + // build dict for std. fonts on first invocation if ( stdfonts. isEmpty ( )) { @@ -106,3 +106,3 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp stdfonts. insert ( QString ( ptr-> m_name ), ptr ); - } + } } @@ -121,4 +121,4 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp gfxFont-> isCIDFont ( ), - ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName ( ) : "<n/a>" ), - (double) m11, (double) m12, (double) m21, (double) m22 )); + ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName()-> getCString ( ) : "<n/a>" ), + (double) m11, (double) m12, (double) m21, (double) m22 ) ); @@ -132,3 +132,3 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp QOutFontSubst *subst = stdfonts [fname]; - + if ( subst ) { @@ -136,3 +136,3 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp f. setFamily ( subst-> m_sname ); - f. setStyleHint ( subst-> m_hint, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); + f. setStyleHint ( subst-> m_hint, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); f. setBold ( subst-> m_bold ); @@ -142,3 +142,3 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp QFont::StyleHint sty; - + if ( gfxFont-> isSerif ( )) @@ -149,4 +149,4 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp sty = QFont::Helvetica; - - f. setStyleHint ( sty, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); + + f. setStyleHint ( sty, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); f. setBold ( gfxFont-> isBold ( ) > 0 ); @@ -154,6 +154,6 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp f. setFixedPitch ( gfxFont-> isFixedWidth ( ) > 0 ); - - // common specifiers in font names + + // common specifiers in font names if ( fname. contains ( "Oblique" ) || fname. contains ( "Italic" )) - f. setItalic ( true ); + f. setItalic ( true ); if ( fname. contains ( "Bold" )) @@ -166,7 +166,7 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp f. setWeight ( QFont::Black ); - } + } // Treat x-sheared fonts as italic if (( m12 > -0.1 ) && ( m12 < 0.1 ) && ((( m21 > -5.0 ) && ( m21 < -0.1 )) || (( m21 > 0.1 ) && ( m21 < 5.0 )))) { - f. setItalic ( true ); - } + f. setItalic ( true ); + } return f; @@ -184,3 +184,3 @@ QOutputDev::QOutputDev ( QWidget *parent, const char *name, int flags ) : QScrol m_painter = 0; - + // create text object @@ -189,3 +189,3 @@ QOutputDev::QOutputDev ( QWidget *parent, const char *name, int flags ) : QScrol -QOutputDev::~QOutputDev ( ) +QOutputDev::~QOutputDev ( ) { @@ -197,3 +197,3 @@ QOutputDev::~QOutputDev ( ) -void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) +void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) { @@ -201,3 +201,3 @@ void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) delete m_painter; - + m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))); @@ -206,3 +206,3 @@ void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )))); - + resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( )); @@ -211,13 +211,20 @@ void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) m_pixmap-> fill ( white ); // clear window - m_text-> clear ( ); // cleat text object - viewport ( )-> repaint ( ); + m_text-> clear ( ); // cleat text object + viewport ( )-> repaint ( ); } -void QOutputDev::endPage ( ) +void QOutputDev::endPage ( ) { + QPDFDBG( printf("End page\n") ); m_text-> coalesce ( ); - + + /* + * I get stupid crashes after endPage is called and then we do clipping + * and other stuff..... + */ +#if 0 delete m_painter; m_painter = 0; - +#endif + updateContents ( 0, 0, contentsWidth ( ), contentsHeight ( )); @@ -225,3 +232,3 @@ void QOutputDev::endPage ( ) -void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) +void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) { @@ -230,9 +237,9 @@ void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) link-> getBorder ( &x1, &y1, &x2, &y2, &w ); - + if ( w > 0 ) { int x, y, dx, dy; - + cvtUserToDev ( x1, y1, &x, &y ); cvtUserToDev ( x2, y2, &dx, &dy ); - + QPen oldpen = m_painter-> pen ( ); @@ -244,13 +251,19 @@ void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) -void QOutputDev::saveState ( GfxState */*state*/ ) +void QOutputDev::saveState ( GfxState */*state*/ ) { + if ( ! m_painter ) + return; + QPDFDBG( printf ( "SAVE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( ))); - m_painter-> save ( ); + m_painter-> save ( ); } -void QOutputDev::restoreState ( GfxState */*state*/ ) +void QOutputDev::restoreState ( GfxState */*state*/ ) { + if( ! m_painter ) + return; + m_painter-> restore ( ); - + // m_painter-> setClipRegion ( QRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( ))); @@ -260,3 +273,3 @@ void QOutputDev::restoreState ( GfxState */*state*/ ) -void QOutputDev::updateAll ( GfxState *state ) +void QOutputDev::updateAll ( GfxState *state ) { @@ -270,3 +283,3 @@ void QOutputDev::updateAll ( GfxState *state ) -void QOutputDev::updateCTM ( GfxState *state, fp_t /*m11*/, fp_t /*m12*/, fp_t /*m21*/, fp_t /*m22*/, fp_t /*m31*/, fp_t /*m32*/ ) +void QOutputDev::updateCTM ( GfxState *state, fp_t /*m11*/, fp_t /*m12*/, fp_t /*m21*/, fp_t /*m22*/, fp_t /*m31*/, fp_t /*m32*/ ) { @@ -275,3 +288,3 @@ void QOutputDev::updateCTM ( GfxState *state, fp_t /*m11*/, fp_t /*m12*/, fp_t / -void QOutputDev::updateLineDash ( GfxState *state ) +void QOutputDev::updateLineDash ( GfxState *state ) { @@ -280,3 +293,3 @@ void QOutputDev::updateLineDash ( GfxState *state ) -void QOutputDev::updateFlatness ( GfxState */*state*/ ) +void QOutputDev::updateFlatness ( GfxState */*state*/ ) { @@ -286,3 +299,3 @@ void QOutputDev::updateFlatness ( GfxState */*state*/ ) -void QOutputDev::updateLineJoin ( GfxState *state ) +void QOutputDev::updateLineJoin ( GfxState *state ) { @@ -291,3 +304,3 @@ void QOutputDev::updateLineJoin ( GfxState *state ) -void QOutputDev::updateLineCap ( GfxState *state ) +void QOutputDev::updateLineCap ( GfxState *state ) { @@ -297,3 +310,3 @@ void QOutputDev::updateLineCap ( GfxState *state ) // unimplemented -void QOutputDev::updateMiterLimit ( GfxState */*state*/ ) +void QOutputDev::updateMiterLimit ( GfxState */*state*/ ) { @@ -302,3 +315,3 @@ void QOutputDev::updateMiterLimit ( GfxState */*state*/ ) -void QOutputDev::updateLineWidth ( GfxState *state ) +void QOutputDev::updateLineWidth ( GfxState *state ) { @@ -307,3 +320,3 @@ void QOutputDev::updateLineWidth ( GfxState *state ) -void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) +void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) { @@ -318,3 +331,3 @@ void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) width = lrint ( state-> getTransformedLineWidth ( )); - + switch ( state-> getLineCap ( )) { @@ -328,3 +341,3 @@ void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) } - + switch (state->getLineJoin()) { @@ -338,3 +351,3 @@ void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) } - + state-> getLineDash ( &dashPattern, &dashLength, &dashStart ); @@ -351,3 +364,3 @@ void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) // Not supported by QT -/* +/* char dashList[20]; @@ -365,3 +378,3 @@ void QOutputDev::updateLineAttrs ( GfxState *state, GBool updateDash ) -void QOutputDev::updateFillColor ( GfxState *state ) +void QOutputDev::updateFillColor ( GfxState *state ) { @@ -373,3 +386,3 @@ void QOutputDev::updateFillColor ( GfxState *state ) -void QOutputDev::updateStrokeColor ( GfxState *state ) +void QOutputDev::updateStrokeColor ( GfxState *state ) { @@ -377,3 +390,3 @@ void QOutputDev::updateStrokeColor ( GfxState *state ) state-> getStrokeRGB ( &rgb ); - + QPen pen = m_painter-> pen ( ); @@ -383,3 +396,3 @@ void QOutputDev::updateStrokeColor ( GfxState *state ) -void QOutputDev::updateFont ( GfxState *state ) +void QOutputDev::updateFont ( GfxState *state ) { @@ -387,6 +400,6 @@ void QOutputDev::updateFont ( GfxState *state ) GfxFont *gfxFont = state-> getFont ( ); - + if ( !gfxFont ) return; - + state-> getFontTransMat ( &m11, &m12, &m21, &m22 ); @@ -394,5 +407,5 @@ void QOutputDev::updateFont ( GfxState *state ) m12 *= state-> getHorizScaling ( ); - + QFont font = matchFont ( gfxFont, m11, m12, m21, m22 ); - + m_painter-> setFont ( font ); @@ -401,3 +414,3 @@ void QOutputDev::updateFont ( GfxState *state ) -void QOutputDev::stroke ( GfxState *state ) +void QOutputDev::stroke ( GfxState *state ) { @@ -410,3 +423,3 @@ void QOutputDev::stroke ( GfxState *state ) QPDFDBG( printf ( "DRAWING: %d POLYS\n", n )); - + // draw each subpath @@ -415,3 +428,3 @@ void QOutputDev::stroke ( GfxState *state ) int len = lengths [i]; - + if ( len >= 2 ) { @@ -421,5 +434,5 @@ void QOutputDev::stroke ( GfxState *state ) QPDFDBG( printf ( "\n" )); - + m_painter-> drawPolyline ( points, j, len ); - } + } j += len; @@ -429,3 +442,3 @@ void QOutputDev::stroke ( GfxState *state ) -void QOutputDev::fill ( GfxState *state ) +void QOutputDev::fill ( GfxState *state ) { @@ -434,3 +447,3 @@ void QOutputDev::fill ( GfxState *state ) -void QOutputDev::eoFill ( GfxState *state ) +void QOutputDev::eoFill ( GfxState *state ) { @@ -448,3 +461,3 @@ void QOutputDev::eoFill ( GfxState *state ) // -void QOutputDev::doFill ( GfxState *state, bool winding ) +void QOutputDev::doFill ( GfxState *state, bool winding ) { @@ -457,6 +470,6 @@ void QOutputDev::doFill ( GfxState *state, bool winding ) QPDFDBG( printf ( "FILLING: %d POLYS\n", n )); - + QPen oldpen = m_painter-> pen ( ); m_painter-> setPen ( QPen ( NoPen )); - + // draw each subpath @@ -465,3 +478,3 @@ void QOutputDev::doFill ( GfxState *state, bool winding ) int len = lengths [i]; - + if ( len >= 3 ) { @@ -471,5 +484,5 @@ void QOutputDev::doFill ( GfxState *state, bool winding ) QPDFDBG( printf ( "\n" )); - + m_painter-> drawPolygon ( points, winding, j, len ); - } + } j += len; @@ -481,3 +494,3 @@ void QOutputDev::doFill ( GfxState *state, bool winding ) -void QOutputDev::clip ( GfxState *state ) +void QOutputDev::clip ( GfxState *state ) { @@ -486,3 +499,3 @@ void QOutputDev::clip ( GfxState *state ) -void QOutputDev::eoClip ( GfxState *state ) +void QOutputDev::eoClip ( GfxState *state ) { @@ -491,3 +504,3 @@ void QOutputDev::eoClip ( GfxState *state ) -void QOutputDev::doClip ( GfxState *state, bool winding ) +void QOutputDev::doClip ( GfxState *state, bool winding ) { @@ -500,5 +513,5 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) QRegion region; - + QPDFDBG( printf ( "CLIPPING: %d POLYS\n", n )); - + // draw each subpath @@ -507,7 +520,7 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) int len = lengths [i]; - - if ( len >= 3 ) { + + if ( len >= 3 ) { QPointArray dummy; dummy. setRawData ( points. data ( ) + j, len ); - + QPDFDBG( printf ( " - POLY %d: ", i )); @@ -515,11 +528,11 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) QPDFDBG( printf ( "\n" )); - + region |= QRegion ( dummy, winding ); - + dummy. resetRawData ( points. data ( ) + j, len ); - } + } j += len; } - - if ( m_painter-> hasClipping ( )) + + if ( m_painter && m_painter-> hasClipping ( )) region &= m_painter-> clipRegion ( ); @@ -528,3 +541,3 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) // m_painter-> setClipping ( true ); - + // m_painter-> fillRect ( 0, 0, m_pixmap-> width ( ), m_pixmap-> height ( ), red ); @@ -543,3 +556,3 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) // -int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> &lengths ) +int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> &lengths ) { @@ -571,3 +584,3 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr int i = 0; - + while ( i < m ) { @@ -578,3 +591,3 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 ); - + QPointArray tmp; @@ -585,3 +598,3 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr tmp = tmp. quadBezier ( ); - + for ( uint loop = 0; loop < tmp. count ( ); loop++ ) { @@ -592,3 +605,3 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr tmp = tmp. cubicBezier ( ); - points. putPoints ( points. count ( ), tmp. count ( ), tmp ); + points. putPoints ( points. count ( ), tmp. count ( ), tmp ); #endif @@ -596,7 +609,7 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr i += 3; - } + } else { state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); - - points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 )); + + points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 )); ++i; @@ -608,3 +621,3 @@ int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArr -void QOutputDev::beginString ( GfxState *state, GString */*s*/ ) +void QOutputDev::beginString ( GfxState *state, GString */*s*/ ) { @@ -613,3 +626,3 @@ void QOutputDev::beginString ( GfxState *state, GString */*s*/ ) -void QOutputDev::endString ( GfxState */*state*/ ) +void QOutputDev::endString ( GfxState */*state*/ ) { @@ -620,6 +633,6 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, fp_t dx, fp_t dy, fp_t originX, fp_t originY, - CharCode code, Unicode *u, int uLen ) + CharCode code, Unicode *u, int uLen ) { fp_t x1, y1, dx1, dy1; - + if ( uLen > 0 ) @@ -641,6 +654,6 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, QFontMetrics fm = m_painter-> fontMetrics ( ); - + for ( int i = 0; i < uLen; i++ ) { QChar c = QChar ( u [i] ); - + if ( fm. inFont ( c )) { @@ -653,9 +666,9 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, } - + if (( uLen == 1 ) && ( str [0] == ' ' )) return; - - + + fp_t m11, m12, m21, m22; - + state-> getFontTransMat ( &m11, &m12, &m21, &m22 ); @@ -663,3 +676,3 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, m12 *= state-> getHorizScaling ( ); - + fp_t fsize = m_painter-> font ( ). pixelSize ( ); @@ -668,6 +681,6 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, QWMatrix oldmat; - - bool dorot = (( m12 < -0.1 ) || ( m12 > 0.1 )) && (( m21 < -0.1 ) || ( m21 > 0.1 )); - if ( dorot ) { + bool dorot = (( m12 < -0.1 ) || ( m12 > 0.1 )) && (( m21 < -0.1 ) || ( m21 > 0.1 )); + + if ( dorot ) { oldmat = m_painter-> worldMatrix ( ); @@ -675,5 +688,5 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, std::cerr << std::endl << "ROTATED: " << m11 << ", " << m12 << ", " << m21 << ", " << m22 << " / SIZE: " << fsize << " / TEXT: " << str. local8Bit ( ) << endl << endl; - + QWMatrix mat ( lrint ( m11 / fsize ), lrint ( m12 / fsize ), -lrint ( m21 / fsize ), -lrint ( m22 / fsize ), lrint ( x1 ), lrint ( y1 )); - + m_painter-> setWorldMatrix ( mat ); @@ -681,14 +694,14 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, x1 = 0; - y1 = 0; + y1 = 0; } #endif - + QPen oldpen = m_painter-> pen ( ); - + if (!( state-> getRender ( ) & 1 )) { QPen fillpen = oldpen; - + fillpen. setColor ( m_painter-> brush ( ). color ( )); m_painter-> setPen ( fillpen ); - } + } @@ -698,5 +711,5 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, m_painter-> fillRect ( lrint ( x1 ), lrint ( y1 ), lrint ( QMAX( fp_t(1), dx1 )), lrint ( QMAX( fsize, dy1 )), m_painter-> pen ( ). color ( )); - + m_painter-> setPen ( oldpen ); - + #ifndef QT_NO_TRANSFORMATIONS @@ -704,6 +717,6 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, m_painter-> setWorldMatrix ( oldmat ); -#endif - +#endif + QPDFDBG( printf ( "DRAW TEXT: \"%s\" at (%ld/%ld)\n", str. local8Bit ( ). data ( ), lrint ( x1 ), lrint ( y1 ))); - } + } else if ( code != 0 ) { @@ -717,3 +730,3 @@ void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y, -void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, int width, int height, GBool invert, GBool inlineImg ) +void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, int width, int height, GBool invert, GBool inlineImg ) { @@ -721,6 +734,6 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, fp_t *ctm = state-> getCTM ( ); - + if ( fabs ( ctm [0] * ctm [3] - ctm [1] * ctm [2] ) < 0.000001 ) { qWarning ( "Singular CTM in drawImage\n" ); - + if ( inlineImg ) { @@ -735,9 +748,9 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, } - - GfxRGB rgb; + + GfxRGB rgb; state-> getFillRGB ( &rgb ); uint val = ( lrint ( rgb. r * 255 ) & 0xff ) << 16 | ( lrint ( rgb. g * 255 ) & 0xff ) << 8 | ( lrint ( rgb. b * 255 ) & 0xff ); - - - QImage img ( width, height, 32 ); + + + QImage img ( width, height, 32 ); img. setAlphaBuffer ( true ); @@ -751,22 +764,22 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, uchar **scanlines = img. jumpTable ( ); - + if ( ctm [3] > 0 ) scanlines += ( height - 1 ); - + for ( int y = 0; y < height; y++ ) { QRgb *scanline = (QRgb *) *scanlines; - + if ( ctm [0] < 0 ) scanline += ( width - 1 ); - + for ( int x = 0; x < width; x++ ) { Guchar alpha; - + imgStr-> getPixel ( &alpha ); - + if ( invert ) alpha ^= 1; - + *scanline = ( alpha == 0 ) ? 0xff000000 | val : val; - + ctm [0] < 0 ? scanline-- : scanline++; @@ -777,9 +790,9 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, } - -#ifndef QT_NO_TRANSFORMATIONS + +#ifndef QT_NO_TRANSFORMATIONS QWMatrix mat ( ctm [0] / width, ctm [1], ctm [2], ctm [3] / height, ctm [4], ctm [5] ); - - std::cerr << "MATRIX T=" << mat. dx ( ) << "/" << mat. dy ( ) << std::endl + + std::cerr << "MATRIX T=" << mat. dx ( ) << "/" << mat. dy ( ) << std::endl << " - M=" << mat. m11 ( ) << "/" << mat. m12 ( ) << "/" << mat. m21 ( ) << "/" << mat. m22 ( ) << std::endl; - + QWMatrix oldmat = m_painter-> worldMatrix ( ); @@ -804,6 +817,6 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, int y = lrint ( ctm [5] ); - + int w = lrint ( ctm [0] ); int h = lrint ( ctm [3] ); - + if ( w < 0 ) { @@ -816,3 +829,3 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, } - + QPDFDBG( printf ( "DRAWING IMAGE MASKED: %d/%d - %dx%d\n", x, y, w, h )); @@ -820,3 +833,3 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, img = img. smoothScale ( w, h ); - qApp-> processEvents ( ); + qApp-> processEvents ( ); m_painter-> drawImage ( x, y, img ); @@ -825,4 +838,4 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, #endif - - delete imgStr; + + delete imgStr; qApp-> processEvents ( ); @@ -831,6 +844,6 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str, -void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg ) +void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg ) { int nComps, nVals, nBits; - + // image parameters @@ -842,6 +855,6 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi fp_t *ctm = state-> getCTM ( ); - + if ( fabs ( ctm [0] * ctm [3] - ctm [1] * ctm [2] ) < 0.000001 ) { qWarning ( "Singular CTM in drawImage\n" ); - + if ( inlineImg ) { @@ -858,3 +871,3 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi QImage img ( width, height, 32 ); - + if ( maskColors ) @@ -870,15 +883,15 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi GfxRGB rgb; - + uchar **scanlines = img. jumpTable ( ); - + if ( ctm [3] > 0 ) scanlines += ( height - 1 ); - + for ( int y = 0; y < height; y++ ) { QRgb *scanline = (QRgb *) *scanlines; - + if ( ctm [0] < 0 ) scanline += ( width - 1 ); - + for ( int x = 0; x < width; x++ ) { @@ -886,8 +899,8 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi colorMap-> getRGB ( pixBuf, &rgb ); - + uint val = ( lrint ( rgb. r * 255 ) & 0xff ) << 16 | ( lrint ( rgb. g * 255 ) & 0xff ) << 8 | ( lrint ( rgb. b * 255 ) & 0xff ); - + if ( maskColors ) { for ( int k = 0; k < nComps; ++k ) { - if (( pixBuf [k] < maskColors [2 * k] ) || ( pixBuf [k] > maskColors [2 * k] )) { + if (( pixBuf [k] < maskColors [2 * k] ) || ( pixBuf [k] > maskColors [2 * k] )) { val |= 0xff000000; @@ -898,3 +911,3 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi *scanline = val; - + ctm [0] < 0 ? scanline-- : scanline++; @@ -902,3 +915,3 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi ctm [3] > 0 ? scanlines-- : scanlines++; - + qApp-> processEvents ( ); @@ -907,6 +920,6 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi -#ifndef QT_NO_TRANSFORMATIONS +#ifndef QT_NO_TRANSFORMATIONS QWMatrix mat ( ctm [0] / width, ctm [1], ctm [2], ctm [3] / height, ctm [4], ctm [5] ); - std::cerr << "MATRIX T=" << mat. dx ( ) << "/" << mat. dy ( ) << std::endl + std::cerr << "MATRIX T=" << mat. dx ( ) << "/" << mat. dy ( ) << std::endl << " - M=" << mat. m11 ( ) << "/" << mat. m12 ( ) << "/" << mat. m21 ( ) << "/" << mat. m22 ( ) << std::endl; @@ -920,4 +933,4 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi m_painter-> drawPixmap ( 0, 0, pm ); -#else - m_painter-> drawImage ( QPoint ( 0, 0 ), img ); +#else + m_painter-> drawImage ( QPoint ( 0, 0 ), img ); #endif @@ -934,6 +947,6 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi int y = lrint ( ctm [5] ); - + int w = lrint ( ctm [0] ); int h = lrint ( ctm [3] ); - + if ( w < 0 ) { @@ -946,10 +959,10 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi } - + QPDFDBG( printf ( "DRAWING IMAGE: %d/%d - %dx%d\n", x, y, w, h )); - img = img. smoothScale ( w, h ); - qApp-> processEvents ( ); + img = img. smoothScale ( w, h ); + qApp-> processEvents ( ); m_painter-> drawImage ( x, y, img ); } - + #endif @@ -979,3 +992,3 @@ bool QOutputDev::findText ( const QString &str, int &l, int &t, int &w, int &h, Unicode *s = new Unicode [len]; - + for ( uint i = 0; i < len; i++ ) @@ -988,3 +1001,3 @@ bool QOutputDev::findText ( const QString &str, int &l, int &t, int &w, int &h, - if ( m_text-> findText ( s, len, top, bottom, &x1, &y1, &x2, &y2 )) { + if ( m_text-> findText ( s, len, top, bottom, &x1, &y1, &x2, &y2 )) { l = lrint ( x1 ); @@ -996,3 +1009,3 @@ bool QOutputDev::findText ( const QString &str, int &l, int &t, int &w, int &h, delete [] s; - + return found; @@ -1007,3 +1020,3 @@ GBool QOutputDev::findText ( Unicode *s, int len, GBool top, GBool bottom, int * fp_t yMax1 = (double) *yMax; - + if ( m_text-> findText ( s, len, top, bottom, &xMin1, &yMin1, &xMax1, &yMax1 )) { @@ -1023,6 +1036,6 @@ QString QOutputDev::getText ( int l, int t, int w, int h ) delete gstr; - return str; + return str; } -QString QOutputDev::getText ( const QRect &r ) +QString QOutputDev::getText ( const QRect &r ) { @@ -1037,3 +1050,3 @@ void QOutputDev::drawContents ( QPainter *p, int clipx, int clipy, int clipw, in p-> drawPixmap ( clipx, clipy, *m_pixmap, clipx, clipy, clipw, cliph ); - else + else p-> fillRect ( clipx, clipy, clipw, cliph, white ); 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 @@ -6,4 +6,4 @@ Maintainer: Robert Griebl <sandman@handhelds.org> Architecture: arm -Version: $QPE_VERSION-$SUB_VERSION Depends: task-opie-minimal, gzip Description: A PDF viewer for OPIE. +Version: $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 @@ -509,3 +509,3 @@ void QPdfDlg::openFile ( const DocLnk &f ) else - QMessageBox::warning ( this, tr( "Error" ), tr( "File does not exist !" )); + QMessageBox::warning ( this, tr( "Error" ), tr( "File does not exist!" )); } |