summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-06-07 18:12:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-06-07 20:00:02 +0200
commit7a3736f908c0ae207567603c61ce0f617339bac0 (patch)
tree18b52e6a1ca9cacfa416f41dc94660c9becf3976 /fpicker
parent2d15e6808a217aea9ac7c56e0c4c8ef2dc58ec94 (diff)
New loplugin:elidestringvar
Quoting compilerplugins/clang/elidestringvar.cxx (and see there for a rationale): "Find cases where a variable of a string type (at least for now, only OUString) is initialized with a literal value (incl. as an empty string) and used only once." (This commit includes fixes that become necessary in code changed after the preceding "Upcoming loplugin:elidestringvar" commits.) As a follow-up TODO, uses of the explicit OUString( sal_Unicode value ) ctor where value is char or char16_t literal should be detected too, so that e.g. one_quote would have been treated like two_quote in 4b85108773f9851f358a4daa8869eeadc638d103 "Upcoming loplugin:elidestringvar: sc" > --- a/sc/source/core/tool/compiler.cxx > +++ b/sc/source/core/tool/compiler.cxx > @@ -1902,9 +1902,8 @@ void ScCompiler::CheckTabQuotes( OUString& rString, > if( bNeedsQuote ) > { > const OUString one_quote('\''); > - const OUString two_quote("''"); > // escape embedded quotes > - rString = rString.replaceAll( one_quote, two_quote ); > + rString = rString.replaceAll( one_quote, "''" ); > } > break; > } Change-Id: I7b74f1735a07540e3d789df1d14c84081c824b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/foldertree.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpicker/source/office/foldertree.cxx b/fpicker/source/office/foldertree.cxx
index c2c9c764a742..9e618bd9d0b9 100644
--- a/fpicker/source/office/foldertree.cxx
+++ b/fpicker/source/office/foldertree.cxx
@@ -45,10 +45,9 @@ IMPL_LINK(FolderTree, RequestingChildrenHdl, const weld::TreeIter&, rEntry, bool
void FolderTree::InsertRootEntry(const OUString& rId, const OUString& rRootLabel)
{
- OUString sFolderImage(RID_BMP_FOLDER);
m_xTreeView->insert(nullptr, -1, &rRootLabel, &rId, nullptr, nullptr,
true, m_xScratchIter.get());
- m_xTreeView->set_image(*m_xScratchIter, sFolderImage);
+ m_xTreeView->set_image(*m_xScratchIter, RID_BMP_FOLDER);
m_xTreeView->set_cursor(*m_xScratchIter);
}