summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-29 17:05:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-30 09:06:34 +0200
commit923c14135c21ffde2a19ca7875be6ebb79197740 (patch)
tree72ed31d9f814702d866611a2a9d1e1defa9603e5 /include
parent6c99bca30449589a2904891939e12e6a474464eb (diff)
add SfxStyleDialogController
Change-Id: I5b55b8adb46d894f87dcf68c97f6fd56059354a2 Reviewed-on: https://gerrit.libreoffice.org/59768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/mgetempl.hxx1
-rw-r--r--include/sfx2/styledlg.hxx19
-rw-r--r--include/sfx2/tabdlg.hxx6
3 files changed, 24 insertions, 2 deletions
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 4a2c906ca9c2..238d662c33f5 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -64,6 +64,7 @@ class SfxManageStyleSheetPage final : public SfxTabPage
std::unique_ptr<weld::Label> m_xNameFt;
friend class SfxStyleDialog;
+friend class SfxStyleDialogController;
DECL_LINK(GetFocusHdl, weld::Widget&, void);
DECL_LINK(LoseFocusHdl, weld::Widget&, void);
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index 5abf6c653d22..e86c6450e355 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -21,7 +21,6 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
-
#include <sfx2/tabdlg.hxx>
class SfxStyleSheetBase;
@@ -45,6 +44,24 @@ public:
const SfxStyleSheetBase& GetStyleSheet() const { return *pStyle; }
virtual short Ok() override;
+};
+
+class SFX2_DLLPUBLIC SfxStyleDialogController : public SfxTabDialogController
+{
+private:
+ SfxStyleSheetBase& m_rStyle;
+ DECL_DLLPRIVATE_LINK(CancelHdl, weld::Button&, void);
+
+public:
+ SfxStyleDialogController(weld::Window* pParent,
+ const OUString& rUIXMLDescription, const OString& rID, SfxStyleSheetBase&);
+
+ virtual ~SfxStyleDialogController() override;
+
+ SfxStyleSheetBase& GetStyleSheet() { return m_rStyle; }
+ const SfxStyleSheetBase& GetStyleSheet() const { return m_rStyle; }
+
+ virtual short Ok() override;
static OUString GenerateUnusedName(SfxStyleSheetBasePool &rPool);
};
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 64a8ebc5d6ae..ebcaf8c17268 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -230,6 +230,7 @@ protected:
DECL_LINK(OkHdl, weld::Button&, void);
DECL_LINK(ResetHdl, weld::Button&, void);
+ DECL_LINK(BaseFmtHdl, weld::Button&, void);
DECL_LINK(UserHdl, weld::Button&, void);
DECL_LINK(CancelHdl, weld::Button&, void);
private:
@@ -238,6 +239,7 @@ private:
std::unique_ptr<weld::Button> m_xUserBtn;
std::unique_ptr<weld::Button> m_xCancelBtn;
std::unique_ptr<weld::Button> m_xResetBtn;
+ std::unique_ptr<weld::Button> m_xBaseFmtBtn;
std::unique_ptr<weld::SizeGroup> m_xSizeGroup;
std::unique_ptr<SfxItemSet> m_pSet;
@@ -245,6 +247,7 @@ private:
std::unique_ptr<TabDlg_Impl> m_pImpl;
std::unique_ptr<sal_uInt16[]> m_pRanges;
OString m_sAppPageId;
+ bool m_bStandardPushed;
DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool);
@@ -273,7 +276,7 @@ protected:
void Start_Impl();
public:
SfxTabDialogController(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID,
- const SfxItemSet * = nullptr);
+ const SfxItemSet * = nullptr, bool bEditFmt = false);
virtual ~SfxTabDialogController() override;
void AddTabPage( const OString& rName, // Name of the label for the page in the notebook .ui
@@ -298,6 +301,7 @@ public:
const weld::Button* GetUserButton() const { return m_xUserBtn.get(); }
weld::Button* GetUserButton() { return m_xUserBtn.get(); }
void RemoveResetButton();
+ void RemoveStandardButton();
short execute();
static bool runAsync(const std::shared_ptr<SfxTabDialogController>& rController,