Kaydet (Commit) 7da3f1ba authored tarafından Pierre-André Jacquod's avatar Pierre-André Jacquod

option to export hidden slides to pdf files

This add the checkbox hidden pages to the PDF export general tab
and if checked, export also to PDF the hidden slides
üst f9fd800b
...@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, ...@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbExportFormFields( sal_True ), mbExportFormFields( sal_True ),
mbAllowDuplicateFieldNames( sal_False ), mbAllowDuplicateFieldNames( sal_False ),
mbExportBookmarks( sal_True ), mbExportBookmarks( sal_True ),
mbExportHiddenSlides ( sal_False),
mnOpenBookmarkLevels( -1 ), mnOpenBookmarkLevels( -1 ),
mbHideViewerToolbar( sal_False ), mbHideViewerToolbar( sal_False ),
...@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, ...@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbExportNotes = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_False ); mbExportNotes = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_False );
mbExportBookmarks = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True ); mbExportBookmarks = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True );
if ( mbIsPresentation )
mbExportHiddenSlides = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), sal_False );
mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 ); mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 );
mbUseTransitionEffects = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), sal_True ); mbUseTransitionEffects = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), sal_True );
mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), sal_False ); mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), sal_False );
...@@ -341,6 +344,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() ...@@ -341,6 +344,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotes ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotes );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), mbExportBookmarks ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), mbExportBookmarks );
if ( mbIsPresentation )
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), mbExportHiddenSlides );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), mbUseTransitionEffects ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), mbUseTransitionEffects );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), mbIsSkipEmptyPages ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), mbIsSkipEmptyPages );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAddStream" ) ), mbAddStream ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAddStream" ) ), mbAddStream );
...@@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent, ...@@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ), maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ), maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ), maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ), maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ), maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) ), maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) ),
...@@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent ...@@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
{ {
maCbExportNotesPages.Show( sal_True ); maCbExportNotesPages.Show( sal_True );
maCbExportNotesPages.Check( paParent->mbExportNotesPages ); maCbExportNotesPages.Check( paParent->mbExportNotesPages );
maCbExportHiddenSlides.Show( sal_True);
maCbExportHiddenSlides.Check( paParent->mbExportHiddenSlides );
} }
else else
{ {
...@@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent ...@@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) ); maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
maCbExportNotesPages.Show( sal_False ); maCbExportNotesPages.Show( sal_False );
maCbExportNotesPages.Check( sal_False ); maCbExportNotesPages.Check( sal_False );
maCbExportHiddenSlides.Show( sal_False);
maCbExportHiddenSlides.Check( sal_False );
} }
maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages ); maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages );
...@@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) ...@@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
if ( mbIsPresentation ) if ( mbIsPresentation )
paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked(); paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked();
paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked(); paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked();
if ( mbIsPresentation )
paParent->mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked();
paParent->mbIsSkipEmptyPages = !maCbExportEmptyPages.IsChecked(); paParent->mbIsSkipEmptyPages = !maCbExportEmptyPages.IsChecked();
paParent->mbAddStream = maCbAddStream.IsVisible() && maCbAddStream.IsChecked(); paParent->mbAddStream = maCbAddStream.IsVisible() && maCbAddStream.IsChecked();
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
#define CB_EXPORTNOTESPAGES 27 #define CB_EXPORTNOTESPAGES 27
#define CB_EMBEDSTANDARDFONTS 28 #define CB_EMBEDSTANDARDFONTS 28
#define FT_ADDSTREAMDESCRIPTION 29 #define FT_ADDSTREAMDESCRIPTION 29
#define CB_EXPORTHIDDENSLIDES 30
#define FL_OLD_PAGES 51 #define FL_OLD_PAGES 51
#define RB_OLD_ALL 52 #define RB_OLD_ALL 52
......
...@@ -113,6 +113,7 @@ protected: ...@@ -113,6 +113,7 @@ protected:
sal_Bool mbExportFormFields; sal_Bool mbExportFormFields;
sal_Bool mbAllowDuplicateFieldNames; sal_Bool mbAllowDuplicateFieldNames;
sal_Bool mbExportBookmarks; sal_Bool mbExportBookmarks;
sal_Bool mbExportHiddenSlides;
sal_Int32 mnOpenBookmarkLevels; sal_Int32 mnOpenBookmarkLevels;
sal_Bool mbHideViewerToolbar; sal_Bool mbHideViewerToolbar;
...@@ -207,6 +208,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage ...@@ -207,6 +208,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
CheckBox maCbAllowDuplicateFieldNames; CheckBox maCbAllowDuplicateFieldNames;
CheckBox maCbExportBookmarks; CheckBox maCbExportBookmarks;
CheckBox maCbExportHiddenSlides;
CheckBox maCbExportNotes; CheckBox maCbExportNotes;
CheckBox maCbExportNotesPages; CheckBox maCbExportNotesPages;
......
...@@ -260,10 +260,18 @@ TabPage RID_PDF_TAB_GENER ...@@ -260,10 +260,18 @@ TabPage RID_PDF_TAB_GENER
TabStop = TRUE ; TabStop = TRUE ;
Text[ en-US ] = "Export ~notes pages"; Text[ en-US ] = "Export ~notes pages";
}; };
CheckBox CB_EXPORTHIDDENSLIDES
{
HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTHIDDENSLIDES";
Pos = MAP_APPFONT ( 188 , 144 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
TabStop = TRUE ;
Text[ en-US ] = "Export ~hidden pages";
};
CheckBox CB_EXPORTEMPTYPAGES CheckBox CB_EXPORTEMPTYPAGES
{ {
HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES"; HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES";
Pos = MAP_APPFONT ( 188 , 144 ) ; Pos = MAP_APPFONT ( 188 , 157 ) ;
Size = MAP_APPFONT ( 158 , 16 ) ; Size = MAP_APPFONT ( 158 , 16 ) ;
TabStop = TRUE ; TabStop = TRUE ;
WordBreak = TRUE ; WordBreak = TRUE ;
...@@ -272,7 +280,7 @@ TabPage RID_PDF_TAB_GENER ...@@ -272,7 +280,7 @@ TabPage RID_PDF_TAB_GENER
CheckBox CB_EMBEDSTANDARDFONTS CheckBox CB_EMBEDSTANDARDFONTS
{ {
HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EMBEDSTANDARDFONTS"; HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EMBEDSTANDARDFONTS";
Pos = MAP_APPFONT ( 188 , 163 ) ; Pos = MAP_APPFONT ( 188 , 176 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ; Size = MAP_APPFONT ( 158 , 10 ) ;
TabStop = TRUE ; TabStop = TRUE ;
Text[ en-US ] = "E~mbed standard fonts"; Text[ en-US ] = "E~mbed standard fonts";
......
...@@ -113,6 +113,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc, ...@@ -113,6 +113,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
//already used for i59651 (PDF/A-1) //already used for i59651 (PDF/A-1)
mbUseTransitionEffects ( sal_True ), mbUseTransitionEffects ( sal_True ),
mbExportBookmarks ( sal_True ), mbExportBookmarks ( sal_True ),
mbExportHiddenSlides ( sal_False ),
mnOpenBookmarkLevels ( -1 ), mnOpenBookmarkLevels ( -1 ),
mbUseLosslessCompression ( sal_False ), mbUseLosslessCompression ( sal_False ),
mbReduceImageResolution ( sal_False ), mbReduceImageResolution ( sal_False ),
...@@ -550,6 +551,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue ...@@ -550,6 +551,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
rFilterData[ nData ].Value >>= mbExportBmkToDest; rFilterData[ nData ].Value >>= mbExportBmkToDest;
else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ) ) else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ) )
rFilterData[ nData ].Value >>= mbExportBookmarks; rFilterData[ nData ].Value >>= mbExportBookmarks;
else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ) )
rFilterData[ nData ].Value >>= mbExportHiddenSlides;
else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ) ) else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ) )
rFilterData[ nData ].Value >>= mnOpenBookmarkLevels; rFilterData[ nData ].Value >>= mnOpenBookmarkLevels;
} }
...@@ -809,6 +812,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue ...@@ -809,6 +812,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
pPDFExtOutDevData->SetFormsFormat( mnFormsFormat ); pPDFExtOutDevData->SetFormsFormat( mnFormsFormat );
pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields ); pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields );
pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks ); pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks );
pPDFExtOutDevData->SetIsExportHiddenSlides( mbExportHiddenSlides );
pPDFExtOutDevData->SetIsLosslessCompression( mbUseLosslessCompression ); pPDFExtOutDevData->SetIsLosslessCompression( mbUseLosslessCompression );
pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution ); pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest ); pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
......
...@@ -66,6 +66,7 @@ private: ...@@ -66,6 +66,7 @@ private:
sal_Bool mbEmbedStandardFonts; sal_Bool mbEmbedStandardFonts;
sal_Bool mbUseTransitionEffects; sal_Bool mbUseTransitionEffects;
sal_Bool mbExportBookmarks; sal_Bool mbExportBookmarks;
sal_Bool mbExportHiddenSlides;
sal_Int32 mnOpenBookmarkLevels; sal_Int32 mnOpenBookmarkLevels;
sal_Bool mbUseLosslessCompression; sal_Bool mbUseLosslessCompression;
......
...@@ -114,6 +114,7 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) ...@@ -114,6 +114,7 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
aCfgItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), sal_False ); aCfgItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), sal_False );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True ); aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), sal_False );
aCfgItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 ); aCfgItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 );
aFilterData = aCfgItem.GetFilterData(); aFilterData = aCfgItem.GetFilterData();
} }
......
...@@ -1824,7 +1824,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r ...@@ -1824,7 +1824,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{ {
vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() ); vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) ) if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) ||
pPDFExtOutDevData->GetIsExportHiddenSlides() )
{ {
::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL ); ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
......
...@@ -92,6 +92,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData ...@@ -92,6 +92,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
sal_Bool mbReduceImageResolution; sal_Bool mbReduceImageResolution;
sal_Bool mbExportFormFields; sal_Bool mbExportFormFields;
sal_Bool mbExportBookmarks; sal_Bool mbExportBookmarks;
sal_Bool mbExportHiddenSlides;
sal_Bool mbExportNDests; //i56629 sal_Bool mbExportNDests; //i56629
sal_Int32 mnFormsFormat; sal_Int32 mnFormsFormat;
sal_Int32 mnPage; sal_Int32 mnPage;
...@@ -136,6 +137,9 @@ public : ...@@ -136,6 +137,9 @@ public :
sal_Bool GetIsExportBookmarks() const; sal_Bool GetIsExportBookmarks() const;
void SetIsExportBookmarks( const sal_Bool bExportBookmarks ); void SetIsExportBookmarks( const sal_Bool bExportBookmarks );
sal_Bool GetIsExportHiddenSlides() const;
void SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides );
sal_Bool GetIsExportNamedDestinations() const; //i56629 sal_Bool GetIsExportNamedDestinations() const; //i56629
void SetIsExportNamedDestinations( const sal_Bool bExportNDests ); //i56629 void SetIsExportNamedDestinations( const sal_Bool bExportNDests ); //i56629
......
...@@ -512,6 +512,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) : ...@@ -512,6 +512,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
mbUseLosslessCompression( sal_True ), mbUseLosslessCompression( sal_True ),
mbReduceImageResolution ( sal_False ), mbReduceImageResolution ( sal_False ),
mbExportNDests ( sal_False ), mbExportNDests ( sal_False ),
mbExportHiddenSlides ( sal_False ),
mnFormsFormat ( 0 ), mnFormsFormat ( 0 ),
mnPage ( -1 ), mnPage ( -1 ),
mpPageSyncData ( NULL ), mpPageSyncData ( NULL ),
...@@ -614,6 +615,14 @@ void PDFExtOutDevData::SetIsExportBookmarks( const sal_Bool bExportBookmarks ) ...@@ -614,6 +615,14 @@ void PDFExtOutDevData::SetIsExportBookmarks( const sal_Bool bExportBookmarks )
{ {
mbExportBookmarks = bExportBookmarks; mbExportBookmarks = bExportBookmarks;
} }
sal_Bool PDFExtOutDevData::GetIsExportHiddenSlides() const
{
return mbExportHiddenSlides;
}
void PDFExtOutDevData::SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides )
{
mbExportHiddenSlides = bExportHiddenSlides;
}
std::vector< PDFExtOutDevBookmarkEntry >& PDFExtOutDevData::GetBookmarks() std::vector< PDFExtOutDevBookmarkEntry >& PDFExtOutDevData::GetBookmarks()
{ {
return maBookmarks; return maBookmarks;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment