summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-23 12:35:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-23 15:01:23 +0100
commitd3faa9ea62ba62a71ee7bef68aab4636ed0e338b (patch)
treea1be6b1c16f06923bd628f5a70d81b02604f5242 /sfx2
parentb03fefcc4dbdfee3b9eeb5fa0e586dd12ddcd3d2 (diff)
use recording window as parent
Change-Id: I28a13fa7052579b90afcda22f78e831bf684667b Reviewed-on: https://gerrit.libreoffice.org/85754 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-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);