sfx2/source/view/viewfrm.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 7f2bcfe5f69e31a4166830422db5cd95c5bfaa80 Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Tue May 24 11:01:31 2022 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Tue May 24 13:01:27 2022 +0200 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.tie...@documentfoundation.org> 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(); }