incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1338707 - /incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx
Date Tue, 15 May 2012 13:45:33 GMT
Author: alg
Date: Tue May 15 13:45:32 2012
New Revision: 1338707

URL: http://svn.apache.org/viewvc?rev=1338707&view=rev
Log:
#119348# count created pages for PDF export independent from selected export pages

Modified:
    incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx

Modified: incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx?rev=1338707&r1=1338706&r2=1338707&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx Tue May 15 13:45:32 2012
@@ -195,6 +195,8 @@ sal_Bool PDFExport::ExportSelection( vcl
 				pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages );
 
                 sal_Int32 nSel = aMultiSelection.FirstSelected();
+                sal_Int32 nIncreasingPageNumber(0);
+
                 while ( nSel != sal_Int32(SFX_ENDOFSELECTION) )
                 {
 					Sequence< PropertyValue >   aRenderer( rRenderable->getRenderer( nSel - 1,
rSelection, rRenderOptions ) );
@@ -206,7 +208,11 @@ sal_Bool PDFExport::ExportSelection( vcl
 							aRenderer[ nProperty].Value >>= aPageSize;
 					}
 
-					pPDFExtOutDevData->SetCurrentPageNumber( nSel - 1 );
+                    // #119348# The PageNumber at PDFExtOutDevDatahas to be the target page
number,
+                    // e.g. when exporting only page#2 from two pages, the old mechanism
would
+                    // have set it to '1', but a ├╝page '1' does not yet exist in the export.
This
+                    // will make PDFWriterImpl::createLink and PDFWriterImpl::setLinkURL
fail (see there).
+                    pPDFExtOutDevData->SetCurrentPageNumber(nIncreasingPageNumber++ /*
nSel - 1 */);
 
 					GDIMetaFile	                aMtf;
 					const MapMode               aMapMode( MAP_100TH_MM );



Mime
View raw message