From 7a3736f908c0ae207567603c61ce0f617339bac0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 7 Jun 2020 18:12:15 +0200 Subject: 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 --- fpicker/source/office/foldertree.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fpicker/source') 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); } -- cgit