Diffstat (limited to 'noncore/unsupported/qpdf/QOutputDev.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/QOutputDev.cpp | 17 |
1 files changed, 15 insertions, 2 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 @@ -121,3 +121,3 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp gfxFont-> isCIDFont ( ), - ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName ( ) : "<n/a>" ), + ( gfxFont-> getEmbeddedFontName ( ) ? gfxFont-> getEmbeddedFontName()-> getCString ( ) : "<n/a>" ), (double) m11, (double) m12, (double) m21, (double) m22 )); @@ -217,6 +217,13 @@ 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 @@ -246,2 +253,5 @@ void QOutputDev::saveState ( GfxState */*state*/ ) { + if ( ! m_painter ) + return; + QPDFDBG( printf ( "SAVE (CLIP=%d/%d)\n", m_painter-> hasClipping ( ), !m_painter-> clipRegion ( ). isEmpty ( ))); @@ -253,2 +263,5 @@ void QOutputDev::restoreState ( GfxState */*state*/ ) { + if( ! m_painter ) + return; + m_painter-> restore ( ); @@ -523,3 +536,3 @@ void QOutputDev::doClip ( GfxState *state, bool winding ) - if ( m_painter-> hasClipping ( )) + if ( m_painter && m_painter-> hasClipping ( )) region &= m_painter-> clipRegion ( ); |