[Libreoffice-commits] core.git: filter/source filter/uiconfig

Cor Nouws oolst at nouenoff.nl
Tue Feb 7 11:37:47 UTC 2017


 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(-)

New commits:
commit ae1b9d55ee62e904ecc52359f536b9b5966174bd
Author: Cor Nouws <oolst at nouenoff.nl>
Date:   Mon Feb 6 17:20:26 2017 +0100

    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 <Katarina.Behrens at cib.de>
    Tested-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 52bae8d..f68ea49 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 c2ae742..e960626 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 836fd25..1013f95 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>


More information about the Libreoffice-commits mailing list