diff options
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 4bc1c96fb13c..f776d28ab4d7 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1014,6 +1014,12 @@ void FmXFormView::breakCreateFormObject() m_xLastCreatedControlModel.clear(); } +Reference<XWindow> FmXFormView::GetParentWindow() +{ + const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast<const vcl::Window*>(m_pView->GetActualOutDev()) : nullptr; + return VCLUnoHelper::GetInterface(const_cast<vcl::Window*>(pCurrentWindow)); +} + IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, void*, void ) { m_nControlWizardEvent = nullptr; @@ -1051,8 +1057,7 @@ IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, void*, void ) // build the argument list ::comphelper::NamedValueCollection aWizardArgs; aWizardArgs.put("ObjectModel", m_xLastCreatedControlModel); - const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast<const vcl::Window*>(m_pView->GetActualOutDev()) : nullptr; - aWizardArgs.put("ParentWindow", VCLUnoHelper::GetInterface(const_cast<vcl::Window*>(pCurrentWindow))); + aWizardArgs.put("ParentWindow", GetParentWindow()); // create the wizard object Reference< XExecutableDialog > xWizard; |