[Libreoffice-commits] core.git: vcl/source

Vasily Melenchuk Vasily.Melenchuk at cib.de
Thu Jun 1 00:30:30 UTC 2017


 vcl/source/gdi/pdfwriter_impl.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 066665644b398a882e6cded98af5bb060af41d76
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date:   Thu May 25 13:44:52 2017 +0300

    tdf#99680 modified clipping for PDF export
    
    If clipping is requested, but no clipping region is defined,
    clipping is ignored.
    
    Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413
    Reviewed-on: https://gerrit.libreoffice.org/38021
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 815892859b99..3a2a81ef06eb 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12063,12 +12063,13 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
                 getReferenceDevice()->SetMapMode( rNewState.m_aMapMode );
                 m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;
 
-                aLine.append( "q " );
-                if( rNewState.m_aClipRegion.count() )
+                if ( rNewState.m_aClipRegion.count() )
+                {
+                    aLine.append( "q " );
                     m_aPages.back().appendPolyPolygon( rNewState.m_aClipRegion, aLine );
-                else
-                    aLine.append( "0 0 m h " ); // NULL clip, i.e. nothing visible
-                aLine.append( "W* n\n" );
+                    aLine.append( "W* n\n" );
+                }
+
                 rNewState.m_aMapMode = aNewMapMode;
                 getReferenceDevice()->SetMapMode( rNewState.m_aMapMode );
                 m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;


More information about the Libreoffice-commits mailing list