diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-12-24 00:16:59 +0100 |
---|---|---|
committer | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-12-28 22:47:34 +0100 |
commit | 7da3f1bad5f7791756f8450391d94ba78b3d10cc (patch) | |
tree | f81fc81afadffe254194c88454bb3d5f3405ac04 /filter | |
parent | f9fd800b79ddeda00c9b576d059a03984dc13090 (diff) |
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
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 13 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hrc | 1 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hxx | 2 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.src | 12 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 4 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.hxx | 1 | ||||
-rw-r--r-- | filter/source/pdf/pdffilter.cxx | 1 |
7 files changed, 32 insertions, 2 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 2f0682c78640..b10bf68f201a 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, mbExportFormFields( sal_True ), mbAllowDuplicateFieldNames( sal_False ), mbExportBookmarks( sal_True ), + mbExportHiddenSlides ( sal_False), mnOpenBookmarkLevels( -1 ), mbHideViewerToolbar( sal_False ), @@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, mbExportNotes = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_False ); 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 ); mbUseTransitionEffects = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), sal_True ); mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), sal_False ); @@ -341,6 +344,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotes ); 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( "IsSkipEmptyPages" ) ), mbIsSkipEmptyPages ); maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAddStream" ) ), mbAddStream ); @@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent, maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ), maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ), maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ), + maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ), maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ), maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ), maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) ), @@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent { maCbExportNotesPages.Show( sal_True ); maCbExportNotesPages.Check( paParent->mbExportNotesPages ); + maCbExportHiddenSlides.Show( sal_True); + maCbExportHiddenSlides.Check( paParent->mbExportHiddenSlides ); + } else { @@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) ); maCbExportNotesPages.Show( sal_False ); maCbExportNotesPages.Check( sal_False ); + maCbExportHiddenSlides.Show( sal_False); + maCbExportHiddenSlides.Check( sal_False ); } maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages ); @@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) if ( mbIsPresentation ) paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked(); paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked(); + if ( mbIsPresentation ) + paParent->mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked(); paParent->mbIsSkipEmptyPages = !maCbExportEmptyPages.IsChecked(); paParent->mbAddStream = maCbAddStream.IsVisible() && maCbAddStream.IsChecked(); diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc index c8afb6d6d1a4..b84d13f65e2a 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -89,6 +89,7 @@ #define CB_EXPORTNOTESPAGES 27 #define CB_EMBEDSTANDARDFONTS 28 #define FT_ADDSTREAMDESCRIPTION 29 +#define CB_EXPORTHIDDENSLIDES 30 #define FL_OLD_PAGES 51 #define RB_OLD_ALL 52 diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index d55c6c99eb36..ffa08b02f45e 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -113,6 +113,7 @@ protected: sal_Bool mbExportFormFields; sal_Bool mbAllowDuplicateFieldNames; sal_Bool mbExportBookmarks; + sal_Bool mbExportHiddenSlides; sal_Int32 mnOpenBookmarkLevels; sal_Bool mbHideViewerToolbar; @@ -207,6 +208,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage CheckBox maCbAllowDuplicateFieldNames; CheckBox maCbExportBookmarks; + CheckBox maCbExportHiddenSlides; CheckBox maCbExportNotes; CheckBox maCbExportNotesPages; diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 910bbac06ec1..006fa3afa5c4 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -260,10 +260,18 @@ TabPage RID_PDF_TAB_GENER TabStop = TRUE ; 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 { HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES"; - Pos = MAP_APPFONT ( 188 , 144 ) ; + Pos = MAP_APPFONT ( 188 , 157 ) ; Size = MAP_APPFONT ( 158 , 16 ) ; TabStop = TRUE ; WordBreak = TRUE ; @@ -272,7 +280,7 @@ TabPage RID_PDF_TAB_GENER CheckBox 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 ) ; TabStop = TRUE ; Text[ en-US ] = "E~mbed standard fonts"; diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index a027f7479e68..8a5869c4c46b 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -113,6 +113,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc, //already used for i59651 (PDF/A-1) mbUseTransitionEffects ( sal_True ), mbExportBookmarks ( sal_True ), + mbExportHiddenSlides ( sal_False ), mnOpenBookmarkLevels ( -1 ), mbUseLosslessCompression ( sal_False ), mbReduceImageResolution ( sal_False ), @@ -550,6 +551,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue rFilterData[ nData ].Value >>= mbExportBmkToDest; else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ) ) 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" ) ) ) rFilterData[ nData ].Value >>= mnOpenBookmarkLevels; } @@ -809,6 +812,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue pPDFExtOutDevData->SetFormsFormat( mnFormsFormat ); pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields ); pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks ); + pPDFExtOutDevData->SetIsExportHiddenSlides( mbExportHiddenSlides ); pPDFExtOutDevData->SetIsLosslessCompression( mbUseLosslessCompression ); pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution ); pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest ); diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx index 12355d18efa7..3374d0aeca80 100644 --- a/filter/source/pdf/pdfexport.hxx +++ b/filter/source/pdf/pdfexport.hxx @@ -66,6 +66,7 @@ private: sal_Bool mbEmbedStandardFonts; sal_Bool mbUseTransitionEffects; sal_Bool mbExportBookmarks; + sal_Bool mbExportHiddenSlides; sal_Int32 mnOpenBookmarkLevels; sal_Bool mbUseLosslessCompression; diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx index fc263d32a169..7ee1655d39a5 100644 --- a/filter/source/pdf/pdffilter.cxx +++ b/filter/source/pdf/pdffilter.cxx @@ -114,6 +114,7 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) aCfgItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), sal_False ); 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 ); aFilterData = aCfgItem.GetFilterData(); } |