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 11:55:23 +0100 |
commit | 10136818b4ef138fc2d5ec3af194beffed009480 (patch) | |
tree | 417142b7fe51b97c16da35c984d2fe3c6c12c6b5 /uui | |
parent | bbdb751a10d6a9dc38f391559fa654fa554539a8 (diff) |
Some more places to check for AllowOverrideLocking option
Change-Id: Id09f691ef7e3fbae03771a43af1c7b1d940365bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90554
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
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 07a69699e9b8..52b9d2108347 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -79,13 +79,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 ) : "" ); @@ -93,7 +94,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 ) @@ -102,12 +103,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 || |