Kaydet (Commit) 478b714e 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/64394
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7c95a895
...@@ -435,7 +435,7 @@ public: ...@@ -435,7 +435,7 @@ public:
/// @param nSlot /// @param nSlot
/// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered. /// 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 /// 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, SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion, SfxStyleFamily nRegion,
const OString& sPage, const OString& sPage,
......
...@@ -988,14 +988,14 @@ VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog( ...@@ -988,14 +988,14 @@ VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog(
} }
VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog( VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog(
vcl::Window *pParent, weld::Window *pParent,
SfxStyleSheetBase& rBase, SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion, SfxStyleFamily nRegion,
const OString& sPage, const OString& sPage,
SwWrtShell* pActShell, SwWrtShell* pActShell,
bool bNew ) 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, VclPtr<AbstractGlossaryDlg> SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame,
......
...@@ -665,7 +665,7 @@ public: ...@@ -665,7 +665,7 @@ public:
bool bNewFrame = true, bool bNewFrame = true,
const OString& sDefPage = OString()) override; const OString& sDefPage = OString()) override;
virtual VclPtr<SfxAbstractApplyTabDialog> CreateTemplateDialog( virtual VclPtr<SfxAbstractApplyTabDialog> CreateTemplateDialog(
vcl::Window *pParent, weld::Window *pParent,
SfxStyleSheetBase& rBase, SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion, SfxStyleFamily nRegion,
const OString& sPage, const OString& sPage,
......
...@@ -818,7 +818,7 @@ void SwDocShell::Edit( ...@@ -818,7 +818,7 @@ void SwDocShell::Edit(
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode)); FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); 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)); *(xTmp.get()), nFamily, sPage, pCurrShell, bNew));
std::shared_ptr<ApplyStyle> pApplyStyleHelper(new ApplyStyle(*this, bNew, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified)); std::shared_ptr<ApplyStyle> pApplyStyleHelper(new ApplyStyle(*this, bNew, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified));
pDlg->SetApplyHdl(LINK(pApplyStyleHelper.get(), ApplyStyle, ApplyHdl)); 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