summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf
authorkergoth <kergoth>2003-08-09 16:24:58 (UTC)
committer kergoth <kergoth>2003-08-09 16:24:58 (UTC)
commite16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (side-by-side diff)
tree9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/unsupported/qpdf
parent1c58d1407f9584fedcdae390a04e2b37e5853361 (diff)
downloadopie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/unsupported/qpdf') (more/less context) (show whitespace changes)
-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
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
@@ -119,7 +119,7 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp
gfxFont-> isSerif ( ),
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 ));
@@ -215,10 +215,17 @@ 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 ( ));
}
@@ -244,6 +251,9 @@ 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 ( )));
m_painter-> save ( );
@@ -251,6 +261,9 @@ void QOutputDev::saveState ( 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 ( )));
@@ -521,7 +534,7 @@ void QOutputDev::doClip ( GfxState *state, bool winding )
j += len;
}
- if ( m_painter-> hasClipping ( ))
+ if ( m_painter && m_painter-> hasClipping ( ))
region &= m_painter-> clipRegion ( );
// m_painter-> setClipRegion ( region );
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
@@ -4,6 +4,6 @@ Priority: optional
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