diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-27 11:40:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-28 08:07:09 +0200 |
commit | 33ecd0d5c4fff9511a8436513936a3f7044a775a (patch) | |
tree | c25809adda140ff89d9f2a2b6dfadba17e188fb0 /vcl/qa | |
parent | 554834484a3323f73b5aeace246bcd9635368967 (diff) |
Change OUStringLiteral from char[] to char16_t[]
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).
For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.
In most places just a u"..." string literal prefix had to be added. In some
places
char const a[] = "...";
variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).
For all uses of macros expanding to string literals, the relevant uses have been
rewritten as
u"" MACRO
instead of changing the macro definitions. It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.
Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/api/XGraphicTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/jpeg/JpegReaderTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/jpeg/JpegWriterTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/vcl/qa/api/XGraphicTest.cxx b/vcl/qa/api/XGraphicTest.cxx index cc4af576e8c8..52374ff77070 100644 --- a/vcl/qa/api/XGraphicTest.cxx +++ b/vcl/qa/api/XGraphicTest.cxx @@ -22,7 +22,7 @@ namespace { using namespace css; -OUStringLiteral const gaDataUrl = "/vcl/qa/api/data/"; +OUStringLiteral const gaDataUrl = u"/vcl/qa/api/data/"; class XGraphicTest : public test::BootstrapFixture { diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx index a26fcbcd7291..9c560459c24a 100644 --- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx +++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx @@ -21,7 +21,7 @@ #include <svdata.hxx> #include <salinst.hxx> -OUStringLiteral const gaDataUrl = "/vcl/qa/cppunit/bitmaprender/data/"; +OUStringLiteral const gaDataUrl = u"/vcl/qa/cppunit/bitmaprender/data/"; class BitmapRenderTest : public test::BootstrapFixture { diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx index 59774337b573..953a35df93b1 100644 --- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx +++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx @@ -13,7 +13,7 @@ #include <bitmapwriteaccess.hxx> #include <tools/stream.hxx> -OUStringLiteral const gaDataUrl("/vcl/qa/cppunit/jpeg/data/"); +OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/"); class JpegReaderTest : public test::BootstrapFixtureBase { diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx index 13b0bbd4373d..2b89f9427395 100644 --- a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx +++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx @@ -13,7 +13,7 @@ #include <vcl/bitmapaccess.hxx> #include <tools/stream.hxx> -OUStringLiteral const gaDataUrl("/vcl/qa/cppunit/jpeg/data/"); +OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/"); class JpegWriterTest : public test::BootstrapFixtureBase { diff --git a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx index d87b129a7155..ca2eb15a5b98 100644 --- a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx +++ b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx @@ -16,7 +16,7 @@ namespace { -OUStringLiteral const gaDataUrl("/vcl/qa/cppunit/widgetdraw/data/"); +OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/widgetdraw/data/"); class WidgetDefinitionReaderTest : public test::BootstrapFixtureBase { |