diff options
Diffstat (limited to 'filter/source/pdf/impdialog.hxx')
-rw-r--r-- | filter/source/pdf/impdialog.hxx | 82 |
1 files changed, 52 insertions, 30 deletions
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 17fb57890655..95d25f99d705 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX -#define INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX +#pragma once #include <sfx2/tabdlg.hxx> +#include <sfx2/passwd.hxx> #include <vcl/pdfwriter.hxx> #include <vcl/FilterConfigItem.hxx> @@ -59,7 +59,6 @@ class ImpPDFTabLinksPage; class ImpPDFTabDialog final : public SfxTabDialogController { css::uno::Reference<css::lang::XComponent> mrDoc; - weld::Window* mpParent; FilterConfigItem maConfigItem; FilterConfigItem maConfigI18N; @@ -67,6 +66,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController 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; @@ -83,8 +83,10 @@ class ImpPDFTabDialog final : public SfxTabDialogController sal_Int32 mnPDFTypeSelection; bool mbPDFUACompliance; bool mbExportNotes; + bool mbExportNotesInMargin; bool mbViewPDF; bool mbUseReferenceXObject; + bool mbUseReferenceXObjectUserSelection = false; bool mbExportNotesPages; bool mbExportOnlyNotesPages; bool mbUseTransitionEffects; @@ -95,6 +97,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController bool mbExportFormFields; bool mbAllowDuplicateFieldNames; bool mbExportBookmarks; + bool mbExportBookmarksUserSelection = true; bool mbExportHiddenSlides; bool mbSinglePageSheets; sal_Int32 mnOpenBookmarkLevels; @@ -108,6 +111,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController bool mbDisplayPDFDocumentTitle; sal_Int32 mnMagnification; sal_Int32 mnInitialView; + sal_Int32 mnInitialViewUserSelection; sal_Int32 mnZoom; sal_Int32 mnInitialPage; @@ -124,8 +128,10 @@ class ImpPDFTabDialog final : public SfxTabDialogController bool mbCanExtractForAccessibility; css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords; - bool mbIsRangeChecked; + bool mbIsPageRangeChecked; OUString msPageRange; + bool mbIsSheetRangeChecked; + OUString msSheetRange; bool mbSelectionIsChecked; bool mbExportRelativeFsysLinks; @@ -152,19 +158,19 @@ public: friend class ImpPDFTabLinksPage; friend class ImpPDFTabSigningPage; - ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue >& rFilterData, + ImpPDFTabDialog(weld::Window* pParent, const Sequence< PropertyValue >& rFilterData, const css::uno::Reference< XComponent >& rDoc); virtual ~ImpPDFTabDialog() override; Sequence< PropertyValue > GetFilterData(); + ImpPDFTabOpnFtrPage* getOpenPage() const; ImpPDFTabSecurityPage* getSecurityPage() const; ImpPDFTabLinksPage* getLinksPage() const; ImpPDFTabGeneralPage* getGeneralPage() const; private: - virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; - virtual short Ok() override; + virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; }; @@ -180,10 +186,11 @@ class ImpPDFTabGeneralPage : public SfxTabPage ImpPDFTabDialog* mpParent; std::unique_ptr<weld::RadioButton> mxRbAll; - std::unique_ptr<weld::RadioButton> mxRbRange; + std::unique_ptr<weld::RadioButton> mxRbPageRange; + std::unique_ptr<weld::RadioButton> mxRbSheetRange; std::unique_ptr<weld::RadioButton> mxRbSelection; std::unique_ptr<weld::Entry> mxEdPages; - std::unique_ptr<weld::Label> mxSelectedSheets; + std::unique_ptr<weld::Entry> mxEdSheets; std::unique_ptr<weld::RadioButton> mxRbLosslessCompression; std::unique_ptr<weld::RadioButton> mxRbJPEGCompression; std::unique_ptr<weld::Widget> mxQualityFrame; @@ -202,6 +209,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage std::unique_ptr<weld::CheckButton> mxCbExportHiddenSlides; std::unique_ptr<weld::CheckButton> mxCbSinglePageSheets; std::unique_ptr<weld::CheckButton> mxCbExportNotes; + std::unique_ptr<weld::CheckButton> mxCbExportNotesInMargin; std::unique_ptr<weld::CheckButton> mxCbViewPDF; std::unique_ptr<weld::CheckButton> mxCbUseReferenceXObject; std::unique_ptr<weld::CheckButton> mxCbExportNotesPages; @@ -213,22 +221,31 @@ class ImpPDFTabGeneralPage : public SfxTabPage std::unique_ptr<weld::Label> mxFtWatermark; std::unique_ptr<weld::Entry> mxEdWatermark; std::unique_ptr<weld::Label> mxSlidesFt; - std::unique_ptr<weld::Label> mxSheetsFt; - - DECL_LINK(ToggleAllHdl, weld::ToggleButton&, void); - DECL_LINK(TogglePagesHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleSelectionHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleCompressionHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleReduceImageResolutionHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleWatermarkHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleAddStreamHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleExportFormFieldsHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleExportNotesPagesHdl, weld::ToggleButton&, void); + std::unique_ptr<weld::Label> mxSheetsSelectionFt; + + DECL_LINK(ToggleAllHdl, weld::Toggleable&, void); + DECL_LINK(TogglePagesHdl, weld::Toggleable&, void); + DECL_LINK(ToggleSheetsHdl, weld::Toggleable&, void); + DECL_LINK(ToggleSelectionHdl, weld::Toggleable&, void); + DECL_LINK(ToggleCompressionHdl, weld::Toggleable&, void); + DECL_LINK(ToggleReduceImageResolutionHdl, weld::Toggleable&, void); + DECL_LINK(ToggleWatermarkHdl, weld::Toggleable&, void); + DECL_LINK(ToggleAddStreamHdl, weld::Toggleable&, void); + DECL_LINK(ToggleExportFormFieldsHdl, weld::Toggleable&, void); + DECL_LINK(ToggleExportNotesPagesHdl, weld::Toggleable&, void); void TogglePagesHdl(); + void ToggleSheetsHdl(); void EnableExportNotesPages(); - DECL_LINK(TogglePDFVersionOrUniversalAccessibilityHandle, weld::ToggleButton&, void); + DECL_LINK(TogglePDFVersionOrUniversalAccessibilityHandle, weld::Toggleable&, void); + + std::shared_ptr<weld::MessageDialog> mxPasswordUnusedWarnDialog; + + bool IsReadOnlyProperty(const OUString& rPropertyName) const + { + return mpParent && mpParent->maConfigItem.IsReadOnly(rPropertyName); + } public: @@ -246,6 +263,8 @@ public: /// Class tab page viewer class ImpPDFTabOpnFtrPage : public SfxTabPage { + friend class ImpPDFTabGeneralPage; + bool mbUseCTLFont; std::unique_ptr<weld::RadioButton> mxRbOpnPageOnly; @@ -264,10 +283,11 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage std::unique_ptr<weld::RadioButton> mxRbPgLyContinueFacing; std::unique_ptr<weld::CheckButton> mxCbPgLyFirstOnLeft; - DECL_LINK(ToggleRbPgLyContinueFacingHdl, weld::ToggleButton&, void); - DECL_LINK(ToggleRbMagnHdl, weld::ToggleButton&, void); + DECL_LINK(ToggleRbPgLyContinueFacingHdl, weld::Toggleable&, void); + DECL_LINK(ToggleRbMagnHdl, weld::Toggleable&, void); void ToggleRbPgLyContinueFacingHdl(); + void ToggleInitialView(ImpPDFTabDialog & rParent); public: ImpPDFTabOpnFtrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); @@ -276,7 +296,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ); void GetFilterConfigItem( ImpPDFTabDialog* paParent); - void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); + void SetFilterConfigItem(ImpPDFTabDialog* pParent); }; /// Class tab page viewer @@ -296,7 +316,7 @@ class ImpPDFTabViewerPage : public SfxTabPage std::unique_ptr<weld::RadioButton> m_xRbVisibleBookmarkLevels; std::unique_ptr<weld::SpinButton>m_xNumBookmarkLevels; - DECL_LINK(ToggleRbBookmarksHdl, weld::ToggleButton&, void); + DECL_LINK(ToggleRbBookmarksHdl, weld::Toggleable&, void); public: ImpPDFTabViewerPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); @@ -341,6 +361,10 @@ class ImpPDFTabSecurityPage : public SfxTabPage std::unique_ptr<weld::CheckButton> mxCbEnableCopy; std::unique_ptr<weld::CheckButton> mxCbEnableAccessibility; std::unique_ptr<weld::Label> mxPasswordTitle; + std::unique_ptr<weld::Label> mxPermissionTitle; + + std::shared_ptr< SfxPasswordDialog > mpPasswordDialog; + std::shared_ptr< weld::MessageDialog > mpUnsupportedMsgDialog; DECL_LINK(ClickmaPbSetPwdHdl, weld::Button&, void); @@ -354,7 +378,7 @@ public: void GetFilterConfigItem( ImpPDFTabDialog* paParent); void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); - void ImplPDFASecurityControl( bool bEnableSecurity ); + void ImplPDFASecurityControl(); bool hasPassword() const { return mbHaveOwnerPassword || mbHaveUserPassword; } }; @@ -372,8 +396,8 @@ class ImpPDFTabLinksPage : public SfxTabPage std::unique_ptr<weld::RadioButton> m_xRbOpnLnksLaunch; std::unique_ptr<weld::RadioButton> m_xRbOpnLnksBrowser; - DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::ToggleButton&, void); - DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::ToggleButton&, void); + DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::Toggleable&, void); + DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::Toggleable&, void); public: ImpPDFTabLinksPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); @@ -414,6 +438,4 @@ public: void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); }; -#endif // INCLUDED_FILTER_SOURCE_PDF_IMPDIALOG_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |