summaryrefslogtreecommitdiffstats
path: root/include/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-30 09:43:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-07 14:42:31 +0200
commita2304f62e963b413b7575bedfb8d34e5f2d3ea58 (patch)
treee92b8fce9d381deb02a9823ca24cd20a272c08d0 /include/sfx2
parentCppcheck: make 1-argument ctors explicit (diff)
downloadcore-a2304f62e963b413b7575bedfb8d34e5f2d3ea58.tar.gz
core-a2304f62e963b413b7575bedfb8d34e5f2d3ea58.zip
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')
-rw-r--r--include/sfx2/tabdlg.hxx28
-rw-r--r--include/sfx2/viewsh.hxx2
2 files changed, 22 insertions, 8 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