diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-02-08 18:06:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-02-09 05:48:58 +0100 |
commit | 2a7057250c8f73fdfb4c65a7525d17e9770459df (patch) | |
tree | 2fb8b54e2e00f731818041449362ec2163f908ad /uui/source/iahndl.cxx | |
parent | 7d56128654457bfc859217c23a957d1712fd6e1c (diff) |
tdf#108210: Allow to ignore a lock file if there's no filesystem lock
Two cases are handled: when a file is being opened, and when it was
opened read-only already, and one tries to reopen it in edit mode.
The option to ignore locking and open the file anyway is only offered
when there is no filesystem lock present on the file.
Change-Id: I377d3cae4c949ae64d449634acea8fb3f68a5700
Reviewed-on: https://gerrit.libreoffice.org/49448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'uui/source/iahndl.cxx')
-rw-r--r-- | uui/source/iahndl.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 3d9d331476e6..f03372de3f54 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -238,10 +238,11 @@ UUIInteractionHelper::replaceMessageWithArguments( OUString aMessage = _aMessage; SAL_WARN_IF(rArguments.size() == 0, "uui", "replaceMessageWithArguments: No arguments passed!"); - if (rArguments.size() > 0) - aMessage = aMessage.replaceAll("$(ARG1)", rArguments[0]); - if (rArguments.size() > 1) - aMessage = aMessage.replaceAll("$(ARG2)", rArguments[1]); + for (size_t i = 0; i < rArguments.size(); ++i) + { + const OUString sReplaceTemplate = "$(ARG" + OUString::number(i+1) + ")"; + aMessage = aMessage.replaceAll(sReplaceTemplate, rArguments[i]); + } return aMessage; } |