diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-17 20:10:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-18 10:49:14 +0000 |
commit | 7ed2ddbb5c19451e65595becf9b25e6d583fc48b (patch) | |
tree | a8e28ad785e0ec762b1b3530e11fe8cc9b9895ba /sfx2 | |
parent | 7e342018492689e6de0de145a5d28346e210dfe2 (diff) |
set a parent for this warning dialog
Change-Id: Ia15a3cf7cc5136d2db7463f7486bcc14f4f6a6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145686
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 325c50422479..3c94ca7ffbc5 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -67,6 +67,7 @@ struct SvxOpenGrf_Impl sfx2::FileDialogHelper aFileDlg; OUString sDetectedFilter; + weld::Window* pDialogParent; uno::Reference < XFilePickerControlAccess > xCtrlAcc; }; @@ -74,6 +75,7 @@ struct SvxOpenGrf_Impl SvxOpenGrf_Impl::SvxOpenGrf_Impl(weld::Window* pPreferredParent, sal_Int16 nDialogType) : aFileDlg(nDialogType, FileDialogFlags::Graphic, pPreferredParent) + , pDialogParent(pPreferredParent) { uno::Reference < XFilePicker3 > xFP = aFileDlg.GetFilePicker(); xCtrlAcc.set(xFP, UNO_QUERY); @@ -152,7 +154,7 @@ ErrCode SvxOpenGraphicDialog::Execute() // could not load? if ( nFound == USHRT_MAX ) { - std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(nullptr, + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(mpImpl->pDialogParent, VclMessageType::Warning, VclButtonsType::NONE, SfxResId(SvxOpenGrfErr2ResId(nImpRet)))); xWarn->add_button(GetStandardText(StandardButtonType::Retry), RET_RETRY); |