From ae1b9d55ee62e904ecc52359f536b9b5966174bd Mon Sep 17 00:00:00 2001 From: Cor Nouws Date: Mon, 6 Feb 2017 17:20:26 +0100 Subject: tdf#90436 - better wording for selection in case of PDF export from Calc improved patch Change-Id: I6baf39db88d3fe9322c573a288243689d1696d7f Reviewed-on: https://gerrit.libreoffice.org/33977 Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens --- filter/source/pdf/impdialog.cxx | 15 ++++++++++++++- filter/source/pdf/impdialog.hxx | 3 +++ 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("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 mpRbRange; VclPtr mpRbSelection; VclPtr mpEdPages; + VclPtr mpSelectedSheets; VclPtr mpRbLosslessCompression; VclPtr mpRbJPEGCompression; @@ -232,6 +234,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage VclPtr mpEdWatermark; bool mbIsPresentation; + bool mbIsSpreadsheet; bool mbIsWriter; VclPtr 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 @@ - + @@ -120,7 +120,16 @@ - + + False + True + _Selected sheet(s) + 0 + + + 1 + 2 + -- cgit