summaryrefslogtreecommitdiffstats
path: root/filter/source/pdf/impdialog.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/pdf/impdialog.hxx')
-rw-r--r--filter/source/pdf/impdialog.hxx43
1 files changed, 34 insertions, 9 deletions
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 9682adbc111d..95d25f99d705 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <sfx2/tabdlg.hxx>
+#include <sfx2/passwd.hxx>
#include <vcl/pdfwriter.hxx>
#include <vcl/FilterConfigItem.hxx>
@@ -58,7 +59,6 @@ class ImpPDFTabLinksPage;
class ImpPDFTabDialog final : public SfxTabDialogController
{
css::uno::Reference<css::lang::XComponent> mrDoc;
- weld::Window* mpParent;
FilterConfigItem maConfigItem;
FilterConfigItem maConfigI18N;
@@ -66,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;
@@ -82,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;
@@ -94,6 +97,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController
bool mbExportFormFields;
bool mbAllowDuplicateFieldNames;
bool mbExportBookmarks;
+ bool mbExportBookmarksUserSelection = true;
bool mbExportHiddenSlides;
bool mbSinglePageSheets;
sal_Int32 mnOpenBookmarkLevels;
@@ -107,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;
@@ -123,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;
@@ -157,13 +164,13 @@ public:
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;
};
@@ -179,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;
@@ -201,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;
@@ -212,10 +221,11 @@ 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;
+ 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);
@@ -225,10 +235,18 @@ class ImpPDFTabGeneralPage : public SfxTabPage
DECL_LINK(ToggleExportNotesPagesHdl, weld::Toggleable&, void);
void TogglePagesHdl();
+ void ToggleSheetsHdl();
void EnableExportNotesPages();
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:
ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -245,6 +263,8 @@ public:
/// Class tab page viewer
class ImpPDFTabOpnFtrPage : public SfxTabPage
{
+ friend class ImpPDFTabGeneralPage;
+
bool mbUseCTLFont;
std::unique_ptr<weld::RadioButton> mxRbOpnPageOnly;
@@ -267,6 +287,7 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage
DECL_LINK(ToggleRbMagnHdl, weld::Toggleable&, void);
void ToggleRbPgLyContinueFacingHdl();
+ void ToggleInitialView(ImpPDFTabDialog & rParent);
public:
ImpPDFTabOpnFtrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -275,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
@@ -340,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);
@@ -353,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; }
};