summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-09-30 20:39:39 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-10-01 13:51:14 +0200
commit3b6816d9ccc30e249e15c04a851ca6c40bc5661d (patch)
treeafe8ca88ec6c8a546ed98200ba4006a20080b243 /filter
parent4ff28e09412d2c0ef73008d3d85dae9b506e4978 (diff)
Handle SinglePageSheets option for pdf export
When the single page sheets option is selected on the pdf export dialog of Calc, a pdf for general preview of the document is created, which is not meant for printing. Each sheet is exported as a single page, thus causing the resulting pdf to have pages with different sizes. This is a follow-up to commit 079cd016408d54d91 Change-Id: I038761f06bbf4b0425df89bcda4ee111a61be1d5 Reviewed-on: https://gerrit.libreoffice.org/79895 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/pdf/pdfexport.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 74c74ea0c8f9..586d552648a3 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -847,7 +847,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
- Sequence< PropertyValue > aRenderOptions( 7 );
+ Sequence< PropertyValue > aRenderOptions( 8 );
aRenderOptions[ 0 ].Name = "RenderDevice";
aRenderOptions[ 0 ].Value <<= uno::Reference<awt::XDevice>(xDevice.get());
aRenderOptions[ 1 ].Name = "ExportNotesPages";
@@ -863,6 +863,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aRenderOptions[ 5 ].Value <<= aPageRange;
aRenderOptions[ 6 ].Name = "ExportPlaceholders";
aRenderOptions[ 6 ].Value <<= mbExportPlaceholders;
+ aRenderOptions[ 7 ].Name = "SinglePageSheets";
+ aRenderOptions[ 7 ].Value <<= mbSinglePageSheets;
if( !aPageRange.isEmpty() || !aSelection.hasValue() )
{
@@ -912,7 +914,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
}
const bool bExportPages = !bExportNotesPages || !mbExportOnlyNotesPages;
- if( aPageRange.isEmpty() )
+ if( aPageRange.isEmpty() || mbSinglePageSheets)
{
aPageRange = OUString::number( 1 ) + "-" + OUString::number(nPageCount );
}