summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-30 12:31:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-01 22:37:37 +0100
commit478b714e4e02595b300f9adf73bd6b04c88e6c8f (patch)
tree7d1dba0544fb91cb485922439e9a44748d0fd849
parent7c95a895983b93d7eff7ecd3eaa07f2830e15e94 (diff)
can pass window directly to CreateTemplateDialog now
Change-Id: Ic7ff388a338b2b90f4509c807f7ffcb34e468edb Reviewed-on: https://gerrit.libreoffice.org/64394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx4
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/uibase/app/docst.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index be930f00e327..5bffda4b0f2d 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -435,7 +435,7 @@ public:
/// @param nSlot
/// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered.
/// Currently used, if nRegion == SfxStyleFamily::Page in order to activate certain dialog pane
- virtual VclPtr<SfxAbstractApplyTabDialog> CreateTemplateDialog(vcl::Window* pParent,
+ virtual VclPtr<SfxAbstractApplyTabDialog> CreateTemplateDialog(weld::Window* pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 6cba9c300ebd..e5451360c27b 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -988,14 +988,14 @@ VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog(
}
VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog(
- vcl::Window *pParent,
+ weld::Window *pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
SwWrtShell* pActShell,
bool bNew )
{
- return VclPtr<AbstractApplyTabController_Impl>::Create(o3tl::make_unique<SwTemplateDlgController>(pParent ? pParent->GetFrameWeld() : nullptr, rBase, nRegion, sPage, pActShell, bNew));
+ return VclPtr<AbstractApplyTabController_Impl>::Create(o3tl::make_unique<SwTemplateDlgController>(pParent, rBase, nRegion, sPage, pActShell, bNew));
}
VclPtr<AbstractGlossaryDlg> SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 20af94170204..ae653f8687d5 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -665,7 +665,7 @@ public:
bool bNewFrame = true,
const OString& sDefPage = OString()) override;
virtual VclPtr<SfxAbstractApplyTabDialog> CreateTemplateDialog(
- vcl::Window *pParent,
+ weld::Window *pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 47f65f43f774..d9bc6d2f0cd9 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -818,7 +818,7 @@ void SwDocShell::Edit(
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(&GetView()->GetViewFrame()->GetWindow(),
+ ScopedVclPtr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(),
*(xTmp.get()), nFamily, sPage, pCurrShell, bNew));
std::shared_ptr<ApplyStyle> pApplyStyleHelper(new ApplyStyle(*this, bNew, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified));
pDlg->SetApplyHdl(LINK(pApplyStyleHelper.get(), ApplyStyle, ApplyHdl));