office-gobmx/fpicker
Stephan Bergmann c927aab29e Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit
...and in turn add OUString::operator = and OUString::operator +=
overloads that take a std::u16string_view.  Without making the ctors explicit,
the operator overloads would have caused ambiguities when called with raw
sal_Unicode pointers/non-const arrays, as those can convert to both OUString and
to std::u16string_view.

But the std::u16string_view operator overloads will generally be useful when
changing OUStringLiteral similarly to 4b9e440c51
"Turn OStringLiteral into a consteval'ed, static-refcound rtl_String", at which
point many existing uses of OUStringLiteral will be replaced with uses of
std::u16string_view.

Implementing this change turned up a need for an operator = overload for
OUStringNumber, which has thus been added.  No such need turned up for a
corresponding operator += overload, but which can easily be added when the need
arises.

It also revealed that the operator == overloads between an OUString and a raw
sal_Unicode pointer/non-const array were implemented rather inefficiently,
creating a temporary OUString from the raw argument.  Those have been improved.

Preceding commits have already taken care of many dubious or simply unnecessary
implicit uses of the now-explicit OUString ctors.  This commit makes explicit
the few remaining reasonable uses.  (And in some cases needed to change variable
initialization syntax from using parentheses to using curly braces, to avoid the
most vexing parse issue.  And needed to explicitly add OUString ctors from
char16 const[2] string literal lvalues in a conditional expression in
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx that are only necessary
because MSVC apparently still insists on doing array-to-pointer decay there.)

All of this only affects LIBO_INTERNAL_ONLY.

Change-Id: I7ce31162e9be1c3ff3c0bd184a34b535ec56be9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102098
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-07 19:19:14 +02:00
..
inc
qa/unit
source Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit 2020-09-07 19:19:14 +02:00
uiconfig/ui tdf#118148 Extended tips from HC2/shared/ 2020-08-24 20:48:21 +02:00
AllLangMoTarget_fps.mk
CppunitTest_fpicker_dialogs_test.mk
IwyuFilter_fpicker.yaml
Library_fps.mk fpicker/win32: create instances with uno constructors 2020-07-26 22:15:12 +02:00
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).