diff options
Diffstat (limited to 'filter/source/pdf/pdfexport.cxx')
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 2932d2e52ac9..a0328465900d 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -218,6 +218,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, aMtf.Stop(); aMtf.WindStart(); + bool bEmptyPage = false; if( aMtf.GetActionSize() && ( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) ) { @@ -242,6 +243,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf); bRet = true; } + else + { + bEmptyPage = true; + } pOut->Pop(); @@ -251,7 +256,12 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, *pFirstPage <<= false; ++mnProgressValue; - ++nCurrentPage; + if (!bEmptyPage) + { + // Calculate the page number in the PDF output, which may be smaller than the page number in + // case of hidden slides or a partial export. + ++nCurrentPage; + } } } else |