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 | |
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')
-rw-r--r-- | include/sfx2/tabdlg.hxx | 28 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 2 | ||||
-rw-r--r-- | include/svx/hdft.hxx | 2 | ||||
-rw-r--r-- | include/svx/svxdlg.hxx | 2 |
4 files changed, 24 insertions, 10 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 { diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 37f051a8167b..b1c27bdd4321 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -245,7 +245,7 @@ public: virtual SfxPrinter* GetPrinter( bool bCreate = false ); virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ); virtual bool HasPrintOptionsPage() const; - virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions); + virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions); Printer* GetActivePrinter() const; // Working set diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx index c5a92c5e01d3..e7c0e56269e2 100644 --- a/include/svx/hdft.hxx +++ b/include/svx/hdft.hxx @@ -34,7 +34,7 @@ namespace svx { - SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( vcl::Window* pParent, SfxItemSet* pBBSet ); + SVX_DLLPUBLIC bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet); } class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index d1bd463d953c..92457870721b 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -380,7 +380,7 @@ public: sal_uInt16 nLonger ) = 0; // add for SvxBorderBackgroundDlg virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg( - vcl::Window* pParent, + weld::Window* pParent, const SfxItemSet& rCoreSet, bool bEnableDrawingLayerFillStyles) = 0; |