diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-30 09:43:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-07 14:42:31 +0200 |
commit | a2304f62e963b413b7575bedfb8d34e5f2d3ea58 (patch) | |
tree | e92b8fce9d381deb02a9823ca24cd20a272c08d0 /include/sfx2/tabdlg.hxx | |
parent | 1a86f5643f3c36ead2f9aee42571664c2454ccf7 (diff) |
weld writer page style dialog and SvxBorderBackgroundDlg
writer, format page is complete
Change-Id: I09f6e4354461c4374cdb0d0e0754dfee35415b45
Reviewed-on: https://gerrit.libreoffice.org/60058
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2/tabdlg.hxx')
-rw-r--r-- | include/sfx2/tabdlg.hxx | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index d0c28f1c30f9..8102ff3ba0b6 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -45,15 +45,24 @@ struct TabPageParent TabPageParent(vcl::Window* _pParent) : pParent(_pParent) , pPage(nullptr) + , pController(nullptr) { } - TabPageParent(weld::Container* _pPage) + TabPageParent(weld::Container* _pPage, weld::DialogController* _pController) : pParent(nullptr) , pPage(_pPage) + , pController(_pController) { } + weld::Window* GetFrameWeld() const + { + if (pController) + return pController->getDialog(); + return pParent->GetFrameWeld(); + } VclPtr<vcl::Window> pParent; weld::Container* pPage; + weld::DialogController* pController; }; typedef VclPtr<SfxTabPage> (*CreateTabPage)(TabPageParent pParent, const SfxItemSet *rAttrSet); @@ -256,7 +265,7 @@ private: protected: virtual short Ok(); - void RefreshInputSet(); + virtual void RefreshInputSet(); virtual void PageCreated(const OString &rName, SfxTabPage &rPage); std::unique_ptr<SfxItemSet> m_xExampleSet; @@ -308,6 +317,11 @@ public: const std::function<void(sal_Int32)>&); const SfxItemSet* GetExampleSet() const { return m_xExampleSet.get(); } + + void SetApplyHandler(const Link<weld::Button&,void>& _rHdl); + + //calls Ok without closing dialog + bool Apply(); }; namespace sfx { class ItemConnectionBase; } @@ -352,15 +366,12 @@ protected: } SfxTabDialog* GetTabDialog() const; + SfxTabDialogController* GetDialogController() const; public: void SetTabDialog(SfxTabDialog* pDialog); -protected: - - SfxTabDialogController* GetDialogController() const; void SetDialogController(SfxTabDialogController* pDialog); - +protected: void AddItemConnection( sfx::ItemConnectionBase* pConnection ); - public: virtual ~SfxTabPage() override; virtual void dispose() override; @@ -397,6 +408,9 @@ public: OString GetConfigId() const; + //TODO rename to GetFrameWeld when SfxTabPage doesn't inherit from anything + weld::Window* GetDialogFrameWeld() const; + //TODO rename to get_preferred_size when SfxTabPage doesn't inherit from anything Size get_container_size() const { |