summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2017-05-25 13:44:52 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-06-20 21:53:25 +0200
commit581806182ac7da81115c9675b4e828688178aa04 (patch)
treeae14dc34a4cadb11b56aadfc9db5be46eeea8e1a
parent4175045ebe4c895ff4617fbcdaacbbb058751597 (diff)
tdf#99680 modified clipping for PDF export
If clipping is requested, but no clipping region is defined, clipping is ignored. This squashes the following 3 commits: Reviewed-on: https://gerrit.libreoffice.org/38021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/38403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/38694 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/38825 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit f6726209329fefe9decca8fda8e136b8472a95a2) Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx no pdf unit tests on -5-3, so dropping those pieces Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413 d4565858b0135b3177044558db87a68ef828955b 102722140e216cb9ad29107aae3bdaa70472d471 Reviewed-on: https://gerrit.libreoffice.org/38852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 28fb58db826f..e0942f91a1ea 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12378,12 +12378,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() )
+ aLine.append("q ");
+ if ( rNewState.m_aClipRegion.count() )
+ {
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;