summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-06 16:51:17 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-04-28 11:29:52 +0200
commitd98e014cf6d4cea7ebd7898cbc9124f6fba07684 (patch)
tree195a5e99cea2c8ec6d9bae19cb56f488d75bb6fa /chart2
parent817d35eb829db00329ea5437d50e5c682139f505 (diff)
Extended loplugin:ostr manual changes
I had done these a while ago, when I looked into extending loplugin:ostr to do more automatic rewriting, and these were places where I needed to do something manually, for one reason or another, because the automatic rewriting would not pick it up correctly. However, I got distracted, and a wholesale automatic rewrite would still run into cases where an _ostr/_ustr instance from a library's .rodata would still be referenced after the library has already been dlcose'd. So I never came around to finishing all that. But there appears to be renewed interest in (automatic) rewritings here now, so it probably makes sense if I share this part of my work anyway. Change-Id: I3da9d38398e4bca373cb0000a9d34b49a36ad58a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166792 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index d13d768c032f..f8cf7ad2d1bd 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -32,7 +32,7 @@
#define DECLARE_DUMP_TEST(TestName, BaseClass, DumpMode) \
class TestName : public BaseClass { \
protected:\
- virtual OUString getTestName() override { return #TestName; } \
+ virtual OUString getTestName() override { return u"" #TestName ""_ustr; } \
public:\
TestName() : BaseClass(DumpMode) {}; \
CPPUNIT_TEST_SUITE(TestName); \
@@ -46,7 +46,7 @@
#define CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aActual) \
if(isInDumpMode()) \
- writeActual(OUString::number(aActual), #aActual); \
+ writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -55,7 +55,7 @@
#define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \
if(isInDumpMode()) \
- writeActual(OUString::number(aActual), #aActual); \
+ writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -64,7 +64,7 @@
#define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \
if(isInDumpMode()) \
- writeActual(aActual, #aActual); \
+ writeActual(aActual, u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -73,7 +73,7 @@
#define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \
if(isInDumpMode()) \
- writeActualTransformation(aActual, #aActual); \
+ writeActualTransformation(aActual, u"" #aActual ""_ustr); \
else \
{ \
OUString expectedTransform; \