Kaydet (Commit) 9da741ce authored tarafından Caolán McNamara's avatar Caolán McNamara

can pass window directly to CreateTemplateDialog now

Change-Id: Ic7ff388a338b2b90f4509c807f7ffcb34e468edb
Reviewed-on: https://gerrit.libreoffice.org/64343
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst c650658f
......@@ -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,
......
......@@ -960,14 +960,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,
......
......@@ -654,7 +654,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,
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment