office-gobmx/fpicker
Stephan Bergmann 7a3736f908 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
4b85108773 "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>
2020-06-07 20:00:02 +02:00
..
inc
qa/unit
source New loplugin:elidestringvar 2020-06-07 20:00:02 +02:00
uiconfig/ui
AllLangMoTarget_fps.mk
CppunitTest_fpicker_dialogs_test.mk
IwyuFilter_fpicker.yaml
Library_fps.mk
Library_fps_aqua.mk
Library_fps_office.mk
Makefile
Module_fpicker.mk
README
UIConfig_fps.mk

Native file pickers for macOS and Windows (file open dialog).