-rw-r--r-- | noncore/unsupported/qpdf/QOutputDev.cpp | 17 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/opie-qpdf.control | 2 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/qpdf.cpp | 0 |
3 files changed, 16 insertions, 3 deletions
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 @@ -120,5 +120,5 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp gfxFont-> isSymbolic ( ), gfxFont-> isCIDFont ( ), - ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName ( ) : "<n/a>" ), + ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName()-> getCString ( ) : "<n/a>" ), (double) m11, (double) m12, (double) m21, (double) m22 )); @@ -216,8 +216,15 @@ void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) 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 ( )); @@ -245,4 +252,7 @@ void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) void QOutputDev::saveState ( GfxState */*state*/ ) { + if ( ! m_painter ) + return; + QPDFDBG( printf ( "SAVE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( ))); @@ -252,4 +262,7 @@ void QOutputDev::saveState ( GfxState */*state*/ ) void QOutputDev::restoreState ( GfxState */*state*/ ) { + if( ! m_painter ) + return; + m_painter-> restore ( ); @@ -522,5 +535,5 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) } - if ( m_painter-> hasClipping ( )) + if ( m_painter && m_painter-> hasClipping ( )) region &= m_painter-> clipRegion ( ); 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 @@ -5,5 +5,5 @@ Section: opie/applications 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 |