summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/recfloat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/recfloat.cxx')
-rw-r--r--sfx2/source/dialog/recfloat.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 992136fd0fa1..1ff4ba7e0873 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -82,8 +82,10 @@ bool SfxRecordingFloatWrapper_Impl::QueryClose()
css::uno::Reference< css::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() && !xRecorder->getRecordedMacro().isEmpty() )
{
- vcl::Window* pWin = GetWindow();
- std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ SfxRecordingFloat_Impl* pFloatDlg = static_cast<SfxRecordingFloat_Impl*>(GetController().get());
+ weld::Dialog* pDlg = pFloatDlg->getDialog();
+
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pDlg,
VclMessageType::Question, VclButtonsType::YesNo,
SfxResId(STR_MACRO_LOSS)));
xQueryBox->set_default_response(RET_NO);