sd/qa/unit/uiimpress.cxx       |    7 +++----
 sw/qa/uibase/shells/shells.cxx |   14 ++++++--------
 2 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit b1ce4ee3f0ced02059f42573f139a0b38702d590
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Oct 13 14:46:31 2025 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Oct 13 16:07:01 2025 +0200

    No need to convert OString to OUString here; use 'uR' raw literal
    
    Change-Id: I1381eb937b099362631bceb70e2cd93256908f69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192277
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 33b8c3ff7896..cfe019cd7e80 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -178,7 +178,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testDocumentStructureTransformExtractSlide
 {
     createSdImpressDoc("odp/tdf161430.odp");
 
-    OString aJson = R"json(
+    static constexpr OUString aJson = uR"json(
 {
     "Transforms": {
         "SlideCommands": [
@@ -206,12 +206,11 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testDocumentStructureTransformExtractSlide
         ]
     }
 }
-)json"_ostr;
+)json"_ustr;
 
     //transform
     uno::Sequence<css::beans::PropertyValue> aArgs = {
-        comphelper::makePropertyValue(u"DataJson"_ustr,
-                                      uno::Any(OStringToOUString(aJson, 
RTL_TEXTENCODING_UTF8))),
+        comphelper::makePropertyValue(u"DataJson"_ustr, aJson),
     };
     dispatchCommand(mxComponent, u".uno:TransformDocumentStructure"_ustr, 
aArgs);
 
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index 300e0294aa1d..5f67c08f2ba1 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -591,7 +591,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testInsertFieldmarkReadonly)
 CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testDocumentStructureTransformChart)
 {
     createSwDoc("docStructureChartExampleOriginal.odt");
-    OString aJson = R"json(
+    static constexpr OUString aJson = uR"json(
 {
     "Transforms": [
         {"Charts.ByEmbedIndex.0": [
@@ -660,12 +660,11 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testDocumentStructureTransformChart)
         }}
     ]
 }
-)json"_ostr;
+)json"_ustr;
 
     //transform
     uno::Sequence<css::beans::PropertyValue> aArgs = {
-        comphelper::makePropertyValue(u"DataJson"_ustr,
-                                      uno::Any(OStringToOUString(aJson, 
RTL_TEXTENCODING_UTF8))),
+        comphelper::makePropertyValue(u"DataJson"_ustr, aJson),
     };
     dispatchCommand(mxComponent, u".uno:TransformDocumentStructure"_ustr, 
aArgs);
 
@@ -780,7 +779,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testDocumentStructureExtractChart)
 CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testDocumentStructureDocProperties)
 {
     createSwDoc("docStructureChartExampleOriginal.odt");
-    OString aJson = R"json(
+    static constexpr OUString aJson = uR"json(
 {
     "Transforms": [
         { "DocumentProperties": {
@@ -852,11 +851,10 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testDocumentStructureDocProperties)
         } }
     ]
 }
-)json"_ostr;
+)json"_ustr;
 
     uno::Sequence<css::beans::PropertyValue> aArgs = {
-        comphelper::makePropertyValue(u"DataJson"_ustr,
-                                      uno::Any(OStringToOUString(aJson, 
RTL_TEXTENCODING_UTF8))),
+        comphelper::makePropertyValue(u"DataJson"_ustr, aJson),
     };
     dispatchCommand(mxComponent, u".uno:TransformDocumentStructure"_ustr, 
aArgs);
 

Reply via email to