diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-29 12:54:26 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-01 12:10:00 +0100 |
commit | 68e3ed223eec7ccfe1a0a1f0cd8e09b88ca9e313 (patch) | |
tree | 406f76c8c60b5c0fc18cf42053634fa654da1829 /cui | |
parent | e98083f2845238ed04c14f9a8e6da8e5db56727b (diff) |
Resolves: tdf#145377 don't use dismissed dialog as parent for error dialogs
the script dialog is dismissed before the error dialogs get executed
Change-Id: I9e143a7e65077d09f436c4744759c78a9970f1d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124467
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 9 | ||||
-rw-r--r-- | cui/source/inc/scriptdlg.hxx | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 1258ee54d432..b000b4b34ecf 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -372,6 +372,7 @@ CuiInputDialog::CuiInputDialog(weld::Window * pParent, InputDialogMode nMode) SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, const OUString& language) : SfxDialogController(pParent, "cui/ui/scriptorganizer.ui", "ScriptOrganizerDialog") + , m_pParent(pParent) , m_sLanguage(language) , m_delErrStr(CuiResId(RID_SVXSTR_DELFAILED)) , m_delErrTitleStr(CuiResId(RID_SVXSTR_DELFAILED_TITLE)) @@ -622,19 +623,19 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void) } catch ( reflection::InvocationTargetException& ite ) { - SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(ite)); + SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(ite)); } catch ( provider::ScriptFrameworkErrorException& ite ) { - SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(ite)); + SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(ite)); } catch ( RuntimeException& re ) { - SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(re)); + SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(re)); } catch ( Exception& e ) { - SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(e)); + SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(e)); } } StoreCurrentSelection(); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 6a1cbd15ae5c..954f3d90e191 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -77,6 +77,7 @@ public: class SvxScriptOrgDialog : public SfxDialogController { protected: + weld::Window* m_pParent; OUString m_sLanguage; static Selection_hash m_lastSelection; const OUString m_delErrStr; |