filter/source/pdf/impdialog.cxx |   71 +----------------
 filter/source/pdf/impdialog.hxx |  158 ++++++++++++++++++++--------------------
 2 files changed, 83 insertions(+), 146 deletions(-)

New commits:
commit 16effa3e37e086d5601f93a3078c8c69c3ce5ba3
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Oct 31 18:27:55 2024 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Nov 7 13:39:40 2024 +0100

    pdf: PDF dialog set the default member var. values in header file
    
    Just a simplification and clean-up as this is easier to read.
    
    Change-Id: I8a920849d2bac7ae89d0d7b5f90421a7fac3a0c6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175900
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index a96188fb2da6..afa770cdf361 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -53,73 +53,10 @@ using namespace ::com::sun::star::uno;
  */
 ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, const Sequence< 
PropertyValue >& rFilterData,
     const Reference< XComponent >& rxDoc)
-    : SfxTabDialogController(pParent, "filter/ui/pdfoptionsdialog.ui", 
"PdfOptionsDialog"),
-    mrDoc(rxDoc),
-    maConfigItem( u"Office.Common/Filter/PDF/Export/", &rFilterData ),
-    maConfigI18N( u"Office.Common/I18N/CTL/" ),
-    mbIsPresentation( false ),
-    mbIsSpreadsheet( false ),
-    mbIsWriter( false ),
-
-    mbSelectionPresent( false ),
-    mbUseCTLFont( false ),
-    mbUseLosslessCompression( true ),
-    mnQuality( 90 ),
-    mbReduceImageResolution( false ),
-    mnMaxImageResolution( 300 ),
-    mbUseTaggedPDF( false ),
-    mbUseTaggedPDFUserSelection( false ),
-    mbExportNotes( true ),
-    mbExportNotesInMargin( false ),
-    mbViewPDF( false ),
-    mbUseReferenceXObject( false ),
-    mbExportNotesPages( false ),
-    mbExportOnlyNotesPages( false ),
-    mbUseTransitionEffects( false ),
-    mbIsSkipEmptyPages( true ),
-    mbIsExportPlaceholders( false ),
-    mbAddStream( false ),
-    mnFormsType( 0 ),
-    mbExportFormFields( false ),
-    mbAllowDuplicateFieldNames( false ),
-    mbExportBookmarks( true ),
-    mbExportHiddenSlides ( false ),
-    mbSinglePageSheets ( false ),
-    mnOpenBookmarkLevels( -1 ),
-
-    mbHideViewerToolbar( false ),
-    mbHideViewerMenubar( false ),
-    mbHideViewerWindowControls( false ),
-    mbResizeWinToInit( false ),
-    mbCenterWindow( false ),
-    mbOpenInFullScreenMode( false ),
-    mbDisplayPDFDocumentTitle( false ),
-    mnMagnification( 0 ),
-    mnInitialView( 1 ),
-    mnZoom( 0 ),
-    mnInitialPage( 1 ),
-    mnPageLayout( 0 ),
-    mbFirstPageLeft( false ),
-
-    mbEncrypt( false ),
-    mbRestrictPermissions( false ),
-    mnPrint( 0 ),
-    mnChangesAllowed( 0 ),
-    mbCanCopyOrExtract( false ),
-    mbCanExtractForAccessibility( true ),
-
-    mbIsPageRangeChecked( false ),
-    msPageRange( ' ' ),
-    mbIsSheetRangeChecked( false ),
-    msSheetRange( ' ' ),
-
-    mbSelectionIsChecked( false ),
-    mbExportRelativeFsysLinks( false ),
-    mnViewPDFMode( 0 ),
-    mbConvertOOoTargets( false ),
-    mbExportBmkToPDFDestination( false ),
-
-    mbSignPDF( false )
+    : SfxTabDialogController(pParent, "filter/ui/pdfoptionsdialog.ui", 
"PdfOptionsDialog")
+    , mrDoc(rxDoc)
+    , maConfigItem( u"Office.Common/Filter/PDF/Export/", &rFilterData )
+    , maConfigI18N( u"Office.Common/I18N/CTL/" )
 {
     // check for selection
     try
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 95d25f99d705..0db3c4e66ed5 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -60,94 +60,94 @@ class ImpPDFTabDialog final : public SfxTabDialogController
 {
     css::uno::Reference<css::lang::XComponent> mrDoc;
 
-    FilterConfigItem            maConfigItem;
-    FilterConfigItem            maConfigI18N;
+    FilterConfigItem maConfigItem;
+    FilterConfigItem maConfigI18N;
 
-    Any                         maSelection;
+    Any maSelection;
 
     DECL_LINK(CancelHdl, weld::Button&, void);
     DECL_LINK(OkHdl, weld::Button&, void);
 
     // the following data are the configuration used throughout the dialog and 
pages
-    bool                        mbIsPresentation;
-    bool                        mbIsSpreadsheet;
-    bool                        mbIsWriter;
-    bool                        mbSelectionPresent;
-    bool                        mbUseCTLFont;
-    bool                        mbUseLosslessCompression;
-    sal_Int32                   mnQuality;
-    bool                        mbReduceImageResolution;
-    sal_Int32                   mnMaxImageResolution;
-    bool                        mbUseTaggedPDF;
-    bool                        mbUseTaggedPDFUserSelection;
-    sal_Int32                   mnPDFTypeSelection;
-    bool                        mbPDFUACompliance;
-    bool                        mbExportNotes;
-    bool                        mbExportNotesInMargin;
-    bool                        mbViewPDF;
-    bool                        mbUseReferenceXObject;
-    bool                        mbUseReferenceXObjectUserSelection = false;
-    bool                        mbExportNotesPages;
-    bool                        mbExportOnlyNotesPages;
-    bool                        mbUseTransitionEffects;
-    bool                        mbIsSkipEmptyPages;
-    bool                        mbIsExportPlaceholders;
-    bool                        mbAddStream;
-    sal_Int32                   mnFormsType;
-    bool                        mbExportFormFields;
-    bool                        mbAllowDuplicateFieldNames;
-    bool                        mbExportBookmarks;
-    bool                        mbExportBookmarksUserSelection = true;
-    bool                        mbExportHiddenSlides;
-    bool                        mbSinglePageSheets;
-    sal_Int32                   mnOpenBookmarkLevels;
-
-    bool                        mbHideViewerToolbar;
-    bool                        mbHideViewerMenubar;
-    bool                        mbHideViewerWindowControls;
-    bool                        mbResizeWinToInit;
-    bool                        mbCenterWindow;
-    bool                        mbOpenInFullScreenMode;
-    bool                        mbDisplayPDFDocumentTitle;
-    sal_Int32                   mnMagnification;
-    sal_Int32                   mnInitialView;
-    sal_Int32                   mnInitialViewUserSelection;
-    sal_Int32                   mnZoom;
-    sal_Int32                   mnInitialPage;
-
-    sal_Int32                   mnPageLayout;
-    bool                        mbFirstPageLeft;
-
-    bool                        mbEncrypt;
-
-    bool                        mbRestrictPermissions;
+    bool mbIsPresentation = false;
+    bool mbIsSpreadsheet = false;
+    bool mbIsWriter = false;
+    bool mbSelectionPresent = false;
+    bool mbUseCTLFont = false;
+    bool mbUseLosslessCompression = true;
+    sal_Int32 mnQuality = 90;
+    bool mbReduceImageResolution = false;
+    sal_Int32 mnMaxImageResolution = 300;
+    bool mbUseTaggedPDF = false;
+    bool mbUseTaggedPDFUserSelection = false;
+    sal_Int32 mnPDFTypeSelection;
+    bool mbPDFUACompliance;
+    bool mbExportNotes = true;
+    bool mbExportNotesInMargin = false;
+    bool mbViewPDF = false;
+    bool mbUseReferenceXObject = false;
+    bool mbUseReferenceXObjectUserSelection = false;
+    bool mbExportNotesPages = false;
+    bool mbExportOnlyNotesPages = false;
+    bool mbUseTransitionEffects = false;
+    bool mbIsSkipEmptyPages = true;
+    bool mbIsExportPlaceholders = false;
+    bool mbAddStream = false;
+    sal_Int32 mnFormsType = 0;
+    bool mbExportFormFields = false;
+    bool mbAllowDuplicateFieldNames = false;
+    bool mbExportBookmarks = true;
+    bool mbExportBookmarksUserSelection = true;
+    bool mbExportHiddenSlides = false;
+    bool mbSinglePageSheets = false;
+    sal_Int32 mnOpenBookmarkLevels = -1;
+
+    bool mbHideViewerToolbar = false;
+    bool mbHideViewerMenubar = false;
+    bool mbHideViewerWindowControls = false;
+    bool mbResizeWinToInit = false;
+    bool mbCenterWindow = false;
+    bool mbOpenInFullScreenMode = false;
+    bool mbDisplayPDFDocumentTitle = false;
+    sal_Int32 mnMagnification = 0;
+    sal_Int32 mnInitialView = 1;
+    sal_Int32 mnInitialViewUserSelection;
+    sal_Int32 mnZoom = 0;
+    sal_Int32 mnInitialPage = 1;
+
+    sal_Int32 mnPageLayout = 0;
+    bool mbFirstPageLeft = false;
+
+    bool mbEncrypt = false;
+
+    bool mbRestrictPermissions = false;
     css::uno::Sequence< css::beans::NamedValue > maPreparedOwnerPassword;
-    sal_Int32                   mnPrint;
-    sal_Int32                   mnChangesAllowed;
-    bool                        mbCanCopyOrExtract;
-    bool                        mbCanExtractForAccessibility;
+    sal_Int32 mnPrint = 0;
+    sal_Int32 mnChangesAllowed = 0;
+    bool mbCanCopyOrExtract = false;
+    bool mbCanExtractForAccessibility = true;
     css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords;
 
-    bool                        mbIsPageRangeChecked;
-    OUString                    msPageRange;
-    bool                        mbIsSheetRangeChecked;
-    OUString                    msSheetRange;
-    bool                        mbSelectionIsChecked;
-
-    bool                        mbExportRelativeFsysLinks;
-    sal_Int32                   mnViewPDFMode;
-    bool                        mbConvertOOoTargets;
-    bool                        mbExportBmkToPDFDestination;
-
-    bool                        mbSignPDF;
-    OUString                    msSignPassword;
-    OUString                    msSignLocation;
-    OUString                    msSignContact;
-    OUString                    msSignReason;
-    css::uno::Reference< css::security::XCertificate > maSignCertificate;
-    OUString                    msSignTSA;
-
-    OUString                    maWatermarkText;
+    bool mbIsPageRangeChecked = false;
+    OUString msPageRange = OUString(' ');
+    bool mbIsSheetRangeChecked = false;
+    OUString msSheetRange = OUString(' ');
+    bool mbSelectionIsChecked = false;
+
+    bool mbExportRelativeFsysLinks = false;
+    sal_Int32 mnViewPDFMode = 0;
+    bool mbConvertOOoTargets = false;
+    bool mbExportBmkToPDFDestination = false;
+
+    bool mbSignPDF = false;
+    OUString msSignPassword;
+    OUString msSignLocation;
+    OUString msSignContact;
+    OUString msSignReason;
+    css::uno::Reference<css::security::XCertificate> maSignCertificate;
+    OUString msSignTSA;
+
+    OUString maWatermarkText;
 
 public:
 

Reply via email to