summaryrefslogtreecommitdiff
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
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>
-rw-r--r--compilerplugins/clang/unusedmethods.results2
-rw-r--r--include/sfx2/newstyle.hxx2
-rw-r--r--include/sfx2/templdlg.hxx1
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx9
-rw-r--r--sfx2/source/inc/templdgi.hxx15
6 files changed, 9 insertions, 22 deletions
diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results
index e60976544df9..e5e03c184cf3 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1330,8 +1330,6 @@ sfx2/source/appl/shutdownicon.hxx:112
class rtl::OUString ShutdownIcon::GetUrlDescription(const class rtl::OUString &)
sfx2/source/appl/shutdownicon.hxx:114
void ShutdownIcon::SetVeto(_Bool)
-sfx2/source/inc/templdgi.hxx:246
- class weld::Widget * SfxCommonTemplateDialog_Impl::GetFrameWeld()
shell/inc/xml_parser.hxx:46
xml_parser::xml_parser()
shell/inc/xml_parser.hxx:69
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index ea20fc9fc625..28cfec9e8e55 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -41,7 +41,7 @@ private:
DECL_DLLPRIVATE_LINK(ModifyHdl, weld::ComboBox&, void);
public:
- SfxNewStyleDlg(weld::Window* pParent, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam);
+ SfxNewStyleDlg(weld::Widget* pParent, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam);
virtual ~SfxNewStyleDlg() override;
OUString GetName() const { return comphelper::string::stripStart(m_xColBox->get_active_text(), ' '); }
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 99b7200a9a40..81febcf7f01f 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -36,6 +36,7 @@ public:
virtual void dispose() override;
weld::Builder* get_builder() { return m_xBuilder.get(); }
+ weld::Container* get_container() { return m_xContainer.get(); }
private:
std::unique_ptr<SfxTemplateDialog_Impl> pImpl;
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;