diff options
author | Aron Budea <aron.budea@collabora.com> | 2018-07-09 00:54:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-07-09 16:21:01 +0200 |
commit | 9a7a419baf9a6aa9fc70d9e2a00dec3fbdeee565 (patch) | |
tree | fbb71c9a4e3d8bcbf65ef955c1cd588916247056 /filter | |
parent | Implement reading screen count and screen geometry (diff) | |
download | core-9a7a419baf9a6aa9fc70d9e2a00dec3fbdeee565.tar.gz core-9a7a419baf9a6aa9fc70d9e2a00dec3fbdeee565.zip |
tdf#112690: make page size of exported PDF closer to what is set
regression from 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8
Change-Id: Ia0fddeb112fa0867ec367c085e3682eac078d5f8
Reviewed-on: https://gerrit.libreoffice.org/57166
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 04479fa2d9f3..c7e307f21453 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1004,7 +1004,8 @@ void PDFExport::showErrors( const std::set< vcl::PDFWriter::ErrorCode >& rErrors bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf ) { - basegfx::B2DPolygon aSize(tools::Polygon(tools::Rectangle(Point(0, 0), rMtf.GetPrefSize())).getB2DPolygon()); + //Rectangle(Point, Size) creates a rectangle off by 1, use Rectangle(long, long, long, long) instead + basegfx::B2DPolygon aSize(tools::Polygon(tools::Rectangle(0, 0, rMtf.GetPrefSize().Width(), rMtf.GetPrefSize().Height())).getB2DPolygon()); basegfx::B2DPolygon aSizePDF(OutputDevice::LogicToLogic(aSize, rMtf.GetPrefMapMode(), MapMode(MapUnit::MapPoint))); basegfx::B2DRange aRangePDF(aSizePDF.getB2DRange()); tools::Rectangle aPageRect( Point(), rMtf.GetPrefSize() ); |