summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/txtnum.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-09 20:43:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-10 16:40:05 +0100
commit4dba9820cf44718121a38b3f89eb8caa244d7321 (patch)
tree70bd1e02f89742f70b1a542042dd57cacdfc2c4d /sw/source/uibase/shells/txtnum.cxx
parent4c9349aef26499b9d80a4d6354680b688a95fb0b (diff)
rework tdf#113647 solution to be safe
rather than passing the pointer around, tragic use of uno apis means monstrous awt::Window thingy has to be passed around and still smuggled through the dispatch arguments to get through the eye of the XDispatch::dispatch needle Change-Id: I353f8a3b0bb698bb58f75576e49efd701f3db8bf Reviewed-on: https://gerrit.libreoffice.org/44585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/shells/txtnum.cxx')
-rw-r--r--sw/source/uibase/shells/txtnum.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 9fd26cfe69a0..c89fae5043e9 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -183,13 +183,10 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-
- vcl::Window *pParent = GetView().GetWindow();
- const SfxStringItem* pParentItem = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
- if (pParentItem)
- pParent = reinterpret_cast<vcl::Window*>(pParentItem->GetValue().toUInt64());
-
assert(pFact && "Dialog creation failed!");
+ vcl::Window *pParent = rReq.GetDialogParent();
+ if (!pParent)
+ pParent = GetView().GetWindow();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxNumBulletTabDialog(pParent, &aSet, GetShell()));
assert(pDlg && "Dialog creation failed!");
const SfxStringItem* pPageItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);