diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-03-16 10:40:13 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-03-16 15:26:50 +0100 |
commit | ce1594ad5fb948449f2beac0a2adeaaa07405b4a (patch) | |
tree | 9f55e115ff777cbb38aed6a951f452dc297ad314 /uui | |
parent | 158884cbe3fd7a760bfc409c895f3b6b56f41e22 (diff) |
Some more places to check for AllowOverrideLocking option
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90554
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 10136818b4ef138fc2d5ec3af194beffed009480)
Change-Id: Id09f691ef7e3fbae03771a43af1c7b1d940365bc
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl-locking.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index 8a9af9c77b35..5ecdfbfba502 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -81,13 +81,14 @@ handleLockedDocumentRequest_( std::vector< OUString > aArguments; aArguments.push_back( aDocumentURL ); + bool bAllowOverride = xRetry.is() && officecfg::Office::Common::Misc::AllowOverrideLocking::get(); + sal_Int32 nResult = RET_CANCEL; if ( nMode == UUI_DOC_LOAD_LOCK ) { aArguments.push_back( !aInfo.isEmpty() ? aInfo : Translate::get( STR_UNKNOWNUSER, aResLocale) ); - bool bAllowOverride = xRetry.is() && officecfg::Office::Common::Misc::AllowOverrideLocking::get(); aArguments.push_back( bAllowOverride ? Translate::get( STR_OPENLOCKED_ALLOWIGNORE_MSG, aResLocale ) : "" ); @@ -95,7 +96,7 @@ handleLockedDocumentRequest_( aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); - OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is()); + OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, bAllowOverride); nResult = aDialog.run(); } else if ( nMode == UUI_DOC_SAVE_LOCK ) @@ -104,12 +105,12 @@ handleLockedDocumentRequest_( ? aInfo : Translate::get( STR_UNKNOWNUSER, aResLocale ) ); - aMessage = Translate::get(xRetry.is() ? STR_OVERWRITE_IGNORELOCK_MSG : STR_TRYLATER_MSG, + aMessage = Translate::get(bAllowOverride ? STR_OVERWRITE_IGNORELOCK_MSG : STR_TRYLATER_MSG, aResLocale); aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); - TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is()); + TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, bAllowOverride); nResult = aDialog.run(); } else if ( nMode == UUI_DOC_OWN_LOAD_LOCK || |