diff options
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 15 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hxx | 3 | ||||
-rw-r--r-- | filter/uiconfig/ui/pdfgeneralpage.ui | 13 |
3 files changed, 28 insertions, 3 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 52bae8de8f12..f68ea49ed9cb 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -71,6 +71,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue > mnViewPageId(0), mnGeneralPageId(0), mbIsPresentation( false ), + mbIsSpreadsheet( false ), mbIsWriter( false ), mbSelectionPresent( false ), @@ -164,7 +165,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue > } } - // check if source document is a presentation + // check if source document is a presentation or a spredsheet or a textdocument try { Reference< XServiceInfo > xInfo( rxDoc, UNO_QUERY ); @@ -172,6 +173,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue > { if ( xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) ) mbIsPresentation = true; + if ( xInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) + mbIsSpreadsheet = true; if ( xInfo->supportsService( "com.sun.star.text.GenericTextDocument" ) ) mbIsWriter = true; } @@ -479,12 +482,14 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* pParent, const SfxItemSe , mbTaggedPDFUserSelection(false) , mbExportFormFieldsUserSelection(false) , mbIsPresentation(false) + , mbIsSpreadsheet(false) , mbIsWriter(false) , mpaParent(nullptr) { get(mpRbAll, "all"); get(mpRbRange, "range"); get(mpRbSelection, "selection"); + get(mpSelectedSheets, "selectedsheets"); get(mpEdPages, "pages"); get(mpRbLosslessCompression, "losslesscompress"); @@ -529,6 +534,7 @@ void ImpPDFTabGeneralPage::dispose() mpRbAll.clear(); mpRbRange.clear(); mpRbSelection.clear(); + mpSelectedSheets.clear(); mpEdPages.clear(); mpRbLosslessCompression.clear(); mpRbJPEGCompression.clear(); @@ -575,6 +581,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent ) mpRbSelection->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) ); mbIsPresentation = paParent->mbIsPresentation; mbIsWriter = paParent->mbIsWriter; + mbIsSpreadsheet = paParent->mbIsSpreadsheet; mpCbExportEmptyPages->Enable( mbIsWriter ); mpCbExportPlaceholders->Enable( mbIsWriter ); @@ -651,6 +658,12 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent ) mpCbExportHiddenSlides->Show(false); mpCbExportHiddenSlides->Check(false); } + + if( mbIsSpreadsheet ) + { + mpRbSelection->SetText(get<FixedText>("selectedsheets")->GetText()); + } + mpCbExportPlaceholders->Show(mbIsWriter); if( !mbIsWriter ) { diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index c2ae742744db..e96062633988 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -93,6 +93,7 @@ private: protected: // the following data are the configuration used throughout the dialog and pages bool mbIsPresentation; + bool mbIsSpreadsheet; bool mbIsWriter; bool mbSelectionPresent; bool mbUseCTLFont; @@ -198,6 +199,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage VclPtr<RadioButton> mpRbRange; VclPtr<RadioButton> mpRbSelection; VclPtr<Edit> mpEdPages; + VclPtr<FixedText> mpSelectedSheets; VclPtr<RadioButton> mpRbLosslessCompression; VclPtr<RadioButton> mpRbJPEGCompression; @@ -232,6 +234,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage VclPtr<Edit> mpEdWatermark; bool mbIsPresentation; + bool mbIsSpreadsheet; bool mbIsWriter; VclPtr<ImpPDFTabDialog> mpaParent; diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui b/filter/uiconfig/ui/pdfgeneralpage.ui index 836fd2504ffd..1013f9529b86 100644 --- a/filter/uiconfig/ui/pdfgeneralpage.ui +++ b/filter/uiconfig/ui/pdfgeneralpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.18.3 --> <interface> <requires lib="gtk+" version="3.0"/> <object class="GtkAdjustment" id="adjustment1"> @@ -120,7 +120,16 @@ </packing> </child> <child> - <placeholder/> + <object class="GtkLabel" id="selectedsheets"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes">_Selected sheet(s)</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> </child> </object> </child> |