diff options
author | Vasily Melenchuk <Vasily.Melenchuk@cib.de> | 2017-05-25 13:44:52 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-06-01 02:29:40 +0200 |
commit | 066665644b398a882e6cded98af5bb060af41d76 (patch) | |
tree | 96a1bd8d550496011e92a9e0dc75aed688853cc8 | |
parent | 94d9d895edac0b99e0fbc94ff7763292af1fdc5b (diff) |
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@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
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; |