summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-01 16:51:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-02 13:50:21 +0200
commit9d2c76fd0f3a53dee1e46748cacae1b1f23d91d6 (patch)
tree131e08fbd9448b7c5df10ef4e3def2db02afa009 /sfx2/source
parent357113acdd99974ee90e7f6657b977b1cbb31a0a (diff)
remove SfxCommonTemplateDialog_Impl vcl::Window member
Change-Id: Ib1ab0e76cb56c909f1e16f58b61ce29d1a70a893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101911 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx9
-rw-r--r--sfx2/source/inc/templdgi.hxx15
3 files changed, 7 insertions, 19 deletions
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index fcb2e9aac9a0..bc6fc7babfa1 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -60,7 +60,7 @@ IMPL_LINK(SfxNewStyleDlg, ModifyHdl, weld::ComboBox&, rBox, void)
m_xOKBtn->set_sensitive(!rBox.get_active_text().replaceAll(" ", "").isEmpty());
}
-SfxNewStyleDlg::SfxNewStyleDlg(weld::Window* pParent, SfxStyleSheetBasePool& rInPool, SfxStyleFamily eFam)
+SfxNewStyleDlg::SfxNewStyleDlg(weld::Widget* pParent, SfxStyleSheetBasePool& rInPool, SfxStyleFamily eFam)
: GenericDialogController(pParent, "sfx/ui/newstyle.ui", "CreateStyleDialog")
, m_rPool(rInPool)
, m_eSearchFamily(eFam)
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 022c0e4d3439..18aa04187fcb 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -532,9 +532,9 @@ namespace SfxTemplate
// Constructor
-SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl(SfxBindings* pB, vcl::Window* pW, weld::Builder* pBuilder)
+SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld::Container* pC, weld::Builder* pBuilder)
: pBindings(pB)
- , pWindow(pW)
+ , mpContainer(pC)
, pModule(nullptr)
, pStyleSheetPool(nullptr)
, pCurObjShell(nullptr)
@@ -780,7 +780,6 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
{
if ( bIsWater )
Execute_Impl(SID_STYLE_WATERCAN, "", "", 0);
- GetWindow()->Hide();
impl_clear();
if ( pStyleSheetPool )
EndListening(*pStyleSheetPool);
@@ -1631,7 +1630,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(const OString& rEntry)
nFilter = nAppFilter;
// why? : FloatingWindow must not be parent of a modal dialog
- SfxNewStyleDlg aDlg(pWindow ? pWindow->GetFrameWeld() : nullptr, *pStyleSheetPool, eFam);
+ SfxNewStyleDlg aDlg(mpContainer, *pStyleSheetPool, eFam);
auto nResult = aDlg.run();
if (nResult == RET_OK)
{
@@ -2056,7 +2055,7 @@ void SfxCommonTemplateDialog_Impl::CreateContextMenu()
}
SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanelControl* pDlgWindow)
- : SfxCommonTemplateDialog_Impl(pB, pDlgWindow, pDlgWindow->get_builder())
+ : SfxCommonTemplateDialog_Impl(pB, pDlgWindow->get_container(), pDlgWindow->get_builder())
, m_xActionTbL(pDlgWindow->get_builder()->weld_toolbar("left"))
, m_xActionTbR(pDlgWindow->get_builder()->weld_toolbar("right"))
, m_xToolMenu(pDlgWindow->get_builder()->weld_menu("toolmenu"))
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 03a499c1aca2..8f303fce10b5 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -26,7 +26,6 @@ class SfxTemplateControllerItem;
#include <array>
#include <memory>
-#include <vcl/toolbox.hxx>
#include <vcl/transfer.hxx>
#include <vcl/weld.hxx>
#include <svl/lstner.hxx>
@@ -82,7 +81,7 @@ protected:
SfxBindings* pBindings;
std::array<std::unique_ptr<SfxTemplateControllerItem>, COUNT_BOUND_FUNC> pBoundItems;
- VclPtr<vcl::Window> pWindow;
+ weld::Container* mpContainer;
std::unique_ptr<weld::Builder> mxMenuBuilder;
std::unique_ptr<weld::Menu> mxMenu;
OString sLastItemIdent;
@@ -211,7 +210,7 @@ protected:
public:
- SfxCommonTemplateDialog_Impl(SfxBindings* pB, vcl::Window*, weld::Builder* pBuilder);
+ SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld::Container*, weld::Builder* pBuilder);
virtual ~SfxCommonTemplateDialog_Impl() override;
void MenuSelect(const OString& rIdent);
@@ -238,16 +237,6 @@ public:
bCanShow = b;
}
- vcl::Window* GetWindow()
- {
- return pWindow;
- }
-
- weld::Widget* GetFrameWeld()
- {
- return pWindow ? pWindow->GetFrameWeld() : nullptr;
- }
-
void EnableTreeDrag(bool b);
void EnableExample_Impl(sal_uInt16 nId, bool bEnable);
SfxStyleFamily GetActualFamily() const;