diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-07-09 13:04:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-07-09 15:07:05 +0200 |
commit | f020784e14a55c82418e4f231855040177ac9f82 (patch) | |
tree | a2d5c1d2b5778e564b9ee529de0453c73907ce70 /extensions | |
parent | ac7bba3cc1e13824732f5ab69af602848e4ba227 (diff) |
Make loplugin:stringadd slightly more aggressive
...by assuming that all const member functions are side-effect free. (This
presumably means that some of the special cases in
StringAdd::isSideEffectFree are obsoleted by this more general case, but any
such removal is postponed to later clean-up.)
(Came across this when idly wondering why
8b7f948d9d79393bc6c1b11d239706666fd5d7de "sc, VmlFormControlExporter: avoid
OStringBuffer style" had not been found by the plugin before.)
Change-Id: I6bca10df53885b14a590543aabd61f23b3748572
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118675
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index a492c839712e..875938b7924f 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -848,9 +848,7 @@ void BibDataManager::startQueryWith(const OUString& rQuery) OUString aQueryString; if(!rQuery.isEmpty()) { - aQueryString=aQuoteChar; - aQueryString+=getQueryField(); - aQueryString+=aQuoteChar + " like '"; + aQueryString=aQuoteChar + getQueryField() + aQuoteChar + " like '"; OUString sQuery = rQuery.replaceAll("?","_").replaceAll("*","%"); aQueryString += sQuery + "%'"; } |