incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1167640 - in /incubator/ooo/trunk/main: filter/source/pdf/pdfexport.cxx sd/source/ui/unoidl/unomodel.cxx vcl/inc/vcl/pdfextoutdevdata.hxx vcl/source/gdi/pdfextoutdevdata.cxx
Date Sat, 10 Sep 2011 22:49:18 GMT
Author: erack
Date: Sat Sep 10 22:49:17 2011
New Revision: 1167640

URL: http://svn.apache.org/viewvc?rev=1167640&view=rev
Log:
impress212: #i114615# fixed hyperlink export (pdf) if exporting also notes pages

# User sj <sj@openoffice.org>

Modified:
    incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx
    incubator/ooo/trunk/main/sd/source/ui/unoidl/unomodel.cxx
    incubator/ooo/trunk/main/vcl/inc/vcl/pdfextoutdevdata.hxx
    incubator/ooo/trunk/main/vcl/source/gdi/pdfextoutdevdata.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=1167640&r1=1167639&r2=1167640&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/pdf/pdfexport.cxx Sat Sep 10 22:49:17 2011
@@ -196,7 +196,7 @@ sal_Bool PDFExport::ExportSelection( vcl
 			vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData()
);
 			if ( nPageCount )
 			{
-				pPDFExtOutDevData->SetIsExportNotes( bExportNotesPages );
+				pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages );
 
                 sal_Int32 nSel = aMultiSelection.FirstSelected();
                 while ( nSel != sal_Int32(SFX_ENDOFSELECTION) )

Modified: incubator/ooo/trunk/main/sd/source/ui/unoidl/unomodel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/unoidl/unomodel.cxx?rev=1167640&r1=1167639&r2=1167640&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/unoidl/unomodel.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/unoidl/unomodel.cxx Sat Sep 10 22:49:17 2011
@@ -1980,7 +1980,7 @@ void SAL_CALL SdXImpressDocument::render
 									// if necessary, the master page interactions will be exported first
 									sal_Bool bIsBackgroundObjectsVisible = sal_False;	// SJ: #i39428# IsBackgroundObjectsVisible
not available for Draw
 									const rtl::OUString sIsBackgroundObjectsVisible( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundObjectsVisible"
) );
-									if ( mbImpressDoc && ( xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible
) >>= bIsBackgroundObjectsVisible ) && bIsBackgroundObjectsVisible )
+									if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() &&
( xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible
) && bIsBackgroundObjectsVisible )
 									{
 										uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( xPage, uno::UNO_QUERY
);
 										if ( xMasterPageTarget.is() )
@@ -2013,7 +2013,7 @@ void SAL_CALL SdXImpressDocument::render
 									}
 
 									// exporting transition effects to pdf
-									if ( mbImpressDoc && pPDFExtOutDevData->GetIsExportTransitionEffects()
)	// SJ: #i39428# TransitionEffects not available for Draw
+									if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() &&
pPDFExtOutDevData->GetIsExportTransitionEffects() )
 									{
 										const rtl::OUString sEffect( RTL_CONSTASCII_USTRINGPARAM( "Effect" ) );
 										const rtl::OUString sSpeed ( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) );
@@ -2098,7 +2098,6 @@ void SAL_CALL SdXImpressDocument::render
 									}
 								}
 							}
-
 							Size		aPageSize( mpDoc->GetSdPage( 0, PK_STANDARD )->GetSize() );
 							Point aPoint( 0, 0 );
 							Rectangle	aPageRect( aPoint, aPageSize );
@@ -2111,40 +2110,40 @@ void SAL_CALL SdXImpressDocument::render
 							{
 								sal_Int32 nPage = ImplPDFGetBookmarkPage( aIBeg->aBookmark, *mpDoc );
 								if ( nPage != -1 )
-                                {
-                                    if ( aIBeg->nLinkId != -1 )
-									    pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest(
aPageRect, nPage, vcl::PDFWriter::FitRectangle ) );
-                                    else
-									    pPDFExtOutDevData->DescribeRegisteredDest( aIBeg->nDestId, aPageRect,
nPage, vcl::PDFWriter::FitRectangle );
-                                }
+								{
+									if ( aIBeg->nLinkId != -1 )
+										pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest(
aPageRect, nPage, vcl::PDFWriter::FitRectangle ) );
+									else
+										pPDFExtOutDevData->DescribeRegisteredDest( aIBeg->nDestId, aPageRect, nPage,
vcl::PDFWriter::FitRectangle );
+								}
 								else
 									pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aIBeg->aBookmark );
 								aIBeg++;
 							}
 							rBookmarks.clear();
-                            //---> i56629, i40318
-                            //get the page name, will be used as outline element in PDF bookmark
pane
-                            String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber
- 1 , PK_STANDARD )->GetName();
-                            if( aPageName.Len() > 0 )
-                            {
-                                // insert the bookmark to this page into the NamedDestinations
-                                if( pPDFExtOutDevData->GetIsExportNamedDestinations()
)
-                                    pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect,
 nPageNumber - 1 );
-                                //
-                                // add the name to the outline, (almost) same code as in
sc/source/ui/unoobj/docuno.cxx
-                                // issue i40318.
-                                //
-                                if( pPDFExtOutDevData->GetIsExportBookmarks() )
-                                {
-                                    // Destination Export
-                                    const sal_Int32 nDestId =
-                                        pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber
- 1 );
+							//---> i56629, i40318
+							//get the page name, will be used as outline element in PDF bookmark pane
+							String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD
)->GetName();
+							if( aPageName.Len() > 0 )
+							{
+								// insert the bookmark to this page into the NamedDestinations
+								if( pPDFExtOutDevData->GetIsExportNamedDestinations() )
+									pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect,  nPageNumber - 1 );
+								//
+								// add the name to the outline, (almost) same code as in sc/source/ui/unoobj/docuno.cxx
+								// issue i40318.
+								//
+								if( pPDFExtOutDevData->GetIsExportBookmarks() )
+								{
+									// Destination Export
+									const sal_Int32 nDestId =
+										pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber - 1 );
     
-                                    // Create a new outline item:
-                                    pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName,
nDestId );
-                                }                            
-                            }
-                            //<--- i56629, i40318
+									// Create a new outline item:
+									pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName, nDestId );
+								}                            
+							}
+							//<--- i56629, i40318
 						}
 						catch( uno::Exception& )
 						{

Modified: incubator/ooo/trunk/main/vcl/inc/vcl/pdfextoutdevdata.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/inc/vcl/pdfextoutdevdata.hxx?rev=1167640&r1=1167639&r2=1167640&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/inc/vcl/pdfextoutdevdata.hxx (original)
+++ incubator/ooo/trunk/main/vcl/inc/vcl/pdfextoutdevdata.hxx Sat Sep 10 22:49:17 2011
@@ -85,6 +85,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : p
 
     sal_Bool                        mbTaggedPDF;
 	sal_Bool				    	mbExportNotes;
+	sal_Bool						mbExportNotesPages;
 	sal_Bool					    mbTransitionEffects;
 	sal_Bool					    mbUseLosslessCompression;
 	sal_Bool					    mbReduceImageResolution;
@@ -116,6 +117,9 @@ public :
 	sal_Bool	GetIsExportNotes() const;
 	void		SetIsExportNotes( const sal_Bool bExportNotes );
 
+	sal_Bool	GetIsExportNotesPages() const;
+	void		SetIsExportNotesPages( const sal_Bool bExportNotesPages );
+
 	sal_Bool	GetIsExportTaggedPDF() const;
 	void		SetIsExportTaggedPDF( const sal_Bool bTaggedPDF );
 

Modified: incubator/ooo/trunk/main/vcl/source/gdi/pdfextoutdevdata.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/pdfextoutdevdata.cxx?rev=1167640&r1=1167639&r2=1167640&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/pdfextoutdevdata.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/pdfextoutdevdata.cxx Sat Sep 10 22:49:17 2011
@@ -510,6 +510,7 @@ PDFExtOutDevData::PDFExtOutDevData( cons
 	mrOutDev				( rOutDev ),
 	mbTaggedPDF				( sal_False ),
 	mbExportNotes			( sal_True ),
+	mbExportNotesPages		( sal_False ),
 	mbTransitionEffects		( sal_True ),
 	mbUseLosslessCompression( sal_True ),
 	mbReduceImageResolution	( sal_False ),
@@ -568,6 +569,14 @@ void PDFExtOutDevData::SetIsExportNotes(
 {
 	mbExportNotes = bExportNotes;
 }
+sal_Bool PDFExtOutDevData::GetIsExportNotesPages() const
+{
+	return mbExportNotesPages;
+}
+void PDFExtOutDevData::SetIsExportNotesPages( const sal_Bool bExportNotesPages )
+{
+	mbExportNotesPages = bExportNotesPages;
+}
 sal_Bool PDFExtOutDevData::GetIsExportTaggedPDF() const
 {
 	return mbTaggedPDF;



Mime
View raw message