diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-05-24 11:01:31 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-05-24 13:01:27 +0200 |
commit | 7f2bcfe5f69e31a4166830422db5cd95c5bfaa80 (patch) | |
tree | 08ad6ce7a4e0a6256e55ef65b70f1e6d3b8b18f7 /sfx2 | |
parent | 77b72be9548f6e4d06ce8545fafa8a5d47d3e5d2 (diff) |
Resolves tdf#148815 - Make SAL_NO_QUERYSAVE work for SID_RELOAD
Change-Id: Ic23fd7294d1ec8b06f415ea6744190cf2ffe3ae2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134858
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b43a9076ed48..43c111216402 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -633,12 +633,14 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) // If possible ask the User bool bDo = GetViewShell()->PrepareClose(); const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT); - if ( bDo && GetFrame().DocIsModified_Impl() && - !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) ) + if (getenv("SAL_NO_QUERYSAVE")) + bDo = true; + else if (bDo && GetFrame().DocIsModified_Impl() && !rReq.IsAPI() + && (!pSilentItem || !pSilentItem->GetValue())) { - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetWindow().GetFrameWeld(), - VclMessageType::Question, VclButtonsType::YesNo, - SfxResId(STR_QUERY_LASTVERSION))); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetWindow().GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, + SfxResId(STR_QUERY_LASTVERSION))); bDo = RET_YES == xBox->run(); } |