summaryrefslogtreecommitdiff
path: root/sc/qa/unit
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 /sc/qa/unit
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 'sc/qa/unit')
-rw-r--r--sc/qa/unit/ucalc.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index c4ce3fed5a96..1b1cdf90e780 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -54,6 +54,7 @@
#include <editeng/postitem.hxx>
#include <editeng/lineitem.hxx>
+#include <o3tl/nonstaticstring.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
@@ -119,11 +120,11 @@ CPPUNIT_TEST_FIXTURE(Test, testSharedStringPool)
size_t extraCountIgnoreCase = rPool.getCountIgnoreCase();
// Strings that are identical.
- m_pDoc->SetString(ScAddress(0,0,0), "Andy"); // A1
- m_pDoc->SetString(ScAddress(0,1,0), "Andy"); // A2
- m_pDoc->SetString(ScAddress(0,2,0), "Bruce"); // A3
- m_pDoc->SetString(ScAddress(0,3,0), "andy"); // A4
- m_pDoc->SetString(ScAddress(0,4,0), "BRUCE"); // A5
+ m_pDoc->SetString(ScAddress(0,0,0), o3tl::nonStaticString(u"Andy")); // A1
+ m_pDoc->SetString(ScAddress(0,1,0), o3tl::nonStaticString(u"Andy")); // A2
+ m_pDoc->SetString(ScAddress(0,2,0), o3tl::nonStaticString(u"Bruce")); // A3
+ m_pDoc->SetString(ScAddress(0,3,0), o3tl::nonStaticString(u"andy")); // A4
+ m_pDoc->SetString(ScAddress(0,4,0), o3tl::nonStaticString(u"BRUCE")); // A5
{
// These two shared string objects must go out of scope before the purge test.