summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 10:32:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-20 23:30:58 +0200
commitc184f93863c27c5a59614ad0c47bea699abb1e7b (patch)
tree4a953e83aabab031afdcd37360875a1b032ff2c4
parent9108c6e2755b8d6de3b20ad9a868dd393d5b80a8 (diff)
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sd
Change-Id: I4dc708ee57a7e305f4e377bde0e486299df56f0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158297 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sd/qa/unit/SVGExportTests.cxx2
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx16
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx14
-rw-r--r--sd/qa/unit/misc-tests.cxx67
-rw-r--r--sd/source/console/PresenterNotesView.cxx4
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx4
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx2
-rw-r--r--sd/source/ui/dlg/TemplateScanner.cxx2
-rw-r--r--sd/source/ui/docshell/docshel3.cxx8
-rw-r--r--sd/source/ui/framework/factories/PresentationFactory.cxx2
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx6
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx4
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx32
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/drviewsf.cxx8
24 files changed, 97 insertions, 104 deletions
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index aae0d2e00a36..713cd3b5a4d6 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -263,7 +263,7 @@ public:
void testSVGPlaceholderLocale()
{
- static constexpr OUStringLiteral aLangISO(u"it-IT");
+ static constexpr OUString aLangISO(u"it-IT"_ustr);
SvtSysLocaleOptions aSysLocaleOptions;
aSysLocaleOptions.SetLocaleConfigString(aLangISO);
aSysLocaleOptions.SetUILocaleConfigString(aLangISO);
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 28cba427ce26..167f67f8674e 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -1409,8 +1409,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkBitmapFill)
// Make sure the fontwork shape has a blip bitmap fill and a colored outline.
// Without the patch, fill and outline were black.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart(
- "//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr");
+ static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:blipFill/a:blip", 1);
assertXPath(pXmlDoc, sPathStart + "/a:ln/a:solidFill/a:srgbClr", "val", "ffbf00");
}
@@ -1423,8 +1422,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkGradientGlow)
// Make sure the fontwork shape has a gradient fill and a colored glow.
// Without the patch, fill was black and no glow applied.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart(
- "//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr");
+ static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "8d281e");
assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow", "rad", "63360");
assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow/a:srgbClr", "val", "ff4500");
@@ -1447,7 +1445,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientLinear)
// Make sure the shape has a lin fill. Without the patch, fill was solid red.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
+ static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:lin", "ang", "3600000");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos", "25000");
@@ -1466,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientRadial)
// Make sure the shape has transparency. In OOXML alpha means 'opacity' with default
// 100000 for full opak, so only the full transparency with val 0 should be written.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
+ static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val", "ff0000");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", 0);
@@ -1506,7 +1504,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134969TransparencyOnColorGradien
// Make sure the shape has a transparency in gradient stops.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
+ static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "60000");
@@ -1518,7 +1516,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testArcTo)
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPath("//a:custGeom/a:pathLst/a:path/a:arcTo");
+ static constexpr OString sPath("//a:custGeom/a:pathLst/a:path/a:arcTo"_ostr);
assertXPath(pXmlDoc, sPath, "wR", "3");
assertXPath(pXmlDoc, sPath, "hR", "3");
assertXPath(pXmlDoc, sPath, "stAng", "1800000");
@@ -1603,7 +1601,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D)
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
// without the fix in place a:sp3d was lost on round trip, and so extrusion was lost.
- constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr");
+ constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "extrusionH", "342900");
assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "contourW", "12700");
assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "w", "114300");
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index 33251774ccf3..97a90b7abaf0 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -514,8 +514,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp
// Resulting pptx has to contain the TextWarp shape
xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart(
- "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp");
+ static constexpr OString sPathStart(
+ "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp"_ostr);
assertXPath(pXmlDocContent, sPathStart + "[@prst='textWave1']");
const OString sPathAdj(sPathStart + "/a:avLst/a:gd");
assertXPath(pXmlDocContent, sPathAdj + "[@name='adj1' and @fmla='val 18750']");
@@ -601,7 +601,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
// slide 1 45° -> adj1 = 20493903, 270° -> adj2 = 5400000, <a:noFill/> exists
xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart1("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
+ static constexpr OString sPathStart1("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent1, sPathStart1 + "[@prst='arc']");
const OString sPathAdj1(sPathStart1 + "/a:avLst/a:gd");
assertXPath(pXmlDocContent1, sPathAdj1 + "[@name='adj1' and @fmla='val 20493903']");
@@ -610,7 +610,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
// slide 2 270° -> adj1 = 5400000, 180° -> adj2 = 10800000
xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
- static constexpr OStringLiteral sPathStart2("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
+ static constexpr OString sPathStart2("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent2, sPathStart2 + "[@prst='chord']");
const OString sPathAdj2(sPathStart2 + "/a:avLst/a:gd");
assertXPath(pXmlDocContent2, sPathAdj2 + "[@name='adj1' and @fmla='val 5400000']");
@@ -618,7 +618,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
// slide 3 120° -> adj1 = 12600000, 30° -> adj2 = 20946396
xmlDocUniquePtr pXmlDocContent3 = parseExport("ppt/slides/slide3.xml");
- static constexpr OStringLiteral sPathStart3("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
+ static constexpr OString sPathStart3("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent3, sPathStart3 + "[@prst='pie']");
const OString sPathAdj3(sPathStart3 + "/a:avLst/a:gd");
assertXPath(pXmlDocContent3, sPathAdj3 + "[@name='adj1' and @fmla='val 12600000']");
@@ -967,8 +967,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf135843)
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- static constexpr OStringLiteral sPathStart(
- "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl");
+ static constexpr OString sPathStart(
+ "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnL/a:solidFill");
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnR/a:solidFill");
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnT/a:solidFill");
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 3cdc212e69db..36259c17355a 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -479,8 +479,8 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
// Verify, that the saved document still has the ODF attributes
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
+ static constexpr OString sPathStart(
+ "/office:document-styles/office:master-styles/draw:layer-set/draw:layer"_ostr);
assertXPath(pXmlDoc,
sPathStart + "[@draw:name='backgroundobjects' and @draw:protected='true']");
assertXPath(pXmlDoc, sPathStart + "[@draw:name='controls' and @draw:display='screen']");
@@ -489,11 +489,10 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
// Verify, that the saved document has got the items in settings.xml
xmlDocUniquePtr pXmlDoc2 = parseExport("settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
- static constexpr OStringLiteral sPathStart2(
- "/office:document-settings/office:settings/"
- "config:config-item-set[@config:name='ooo:view-settings']/"
- "config:config-item-map-indexed[@config:name='Views']/"
- "config:config-item-map-entry");
+ static constexpr OString sPathStart2("/office:document-settings/office:settings/"
+ "config:config-item-set[@config:name='ooo:view-settings']/"
+ "config:config-item-map-indexed[@config:name='Views']/"
+ "config:config-item-map-entry"_ostr);
// Value is a bitfield with first Byte in order '* * * measurelines controls backgroundobjects background layout'
// The first three bits depend on initialization and may change. The values in file are Base64 encoded.
OUString sBase64;
@@ -534,8 +533,8 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
// Verify, that the saved document still has the ODF attributes
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
+ static constexpr OString sPathStart(
+ "/office:document-styles/office:master-styles/draw:layer-set/draw:layer"_ostr);
assertXPath(pXmlDoc,
sPathStart + "[@draw:name='backgroundobjects' and @draw:protected='true']");
assertXPath(pXmlDoc, sPathStart + "[@draw:name='controls' and @draw:display='screen']");
@@ -544,11 +543,10 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
// Verify, that the saved document has no layer items in settings.xml
xmlDocUniquePtr pXmlDoc2 = parseExport("settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
- static constexpr OStringLiteral sPathStart2(
- "/office:document-settings/office:settings/"
- "config:config-item-set[@config:name='ooo:view-settings']/"
- "config:config-item-map-indexed[@config:name='Views']/"
- "config:config-item-map-entry");
+ static constexpr OString sPathStart2("/office:document-settings/office:settings/"
+ "config:config-item-set[@config:name='ooo:view-settings']/"
+ "config:config-item-map-indexed[@config:name='Views']/"
+ "config:config-item-map-entry"_ostr);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']", 0);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='PrintableLayers']", 0);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']", 0);
@@ -572,8 +570,8 @@ void SdMiscTest::testTdf101242_settings_keep()
// Verify, that the saved document has the ODF attributes
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
+ static constexpr OString sPathStart(
+ "/office:document-styles/office:master-styles/draw:layer-set/draw:layer"_ostr);
assertXPath(pXmlDoc,
sPathStart + "[@draw:name='backgroundobjects' and @draw:protected='true']");
assertXPath(pXmlDoc, sPathStart + "[@draw:name='controls' and @draw:display='screen']");
@@ -582,11 +580,10 @@ void SdMiscTest::testTdf101242_settings_keep()
// Verify, that the saved document still has the items in settings.xml
xmlDocUniquePtr pXmlDoc2 = parseExport("settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
- static constexpr OStringLiteral sPathStart2(
- "/office:document-settings/office:settings/"
- "config:config-item-set[@config:name='ooo:view-settings']/"
- "config:config-item-map-indexed[@config:name='Views']/"
- "config:config-item-map-entry");
+ static constexpr OString sPathStart2("/office:document-settings/office:settings/"
+ "config:config-item-set[@config:name='ooo:view-settings']/"
+ "config:config-item-map-indexed[@config:name='Views']/"
+ "config:config-item-map-entry"_ostr);
// Value is a bitfield with first Byte in order '* * * measurelines controls backgroundobjects background layout'
// The first three bits depend on initialization and may change. The values in file are Base64 encoded.
OUString sBase64;
@@ -628,8 +625,8 @@ void SdMiscTest::testTdf101242_settings_remove()
// Verify, that the saved document has the ODF attributes
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
+ static constexpr OString sPathStart(
+ "/office:document-styles/office:master-styles/draw:layer-set/draw:layer"_ostr);
assertXPath(pXmlDoc,
sPathStart + "[@draw:name='backgroundobjects' and @draw:protected='true']");
assertXPath(pXmlDoc, sPathStart + "[@draw:name='controls' and @draw:display='screen']");
@@ -638,11 +635,10 @@ void SdMiscTest::testTdf101242_settings_remove()
// Verify, that the saved document has no layer items in settings.xml
xmlDocUniquePtr pXmlDoc2 = parseExport("settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
- static constexpr OStringLiteral sPathStart2(
- "/office:document-settings/office:settings/"
- "config:config-item-set[@config:name='ooo:view-settings']/"
- "config:config-item-map-indexed[@config:name='Views']/"
- "config:config-item-map-entry");
+ static constexpr OString sPathStart2("/office:document-settings/office:settings/"
+ "config:config-item-set[@config:name='ooo:view-settings']/"
+ "config:config-item-map-indexed[@config:name='Views']/"
+ "config:config-item-map-entry"_ostr);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']", 0);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='PrintableLayers']", 0);
assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']", 0);
@@ -674,11 +670,10 @@ void SdMiscTest::testTdf119392()
// Verify correct bit order in bitfield in the config items in settings.xml
xmlDocUniquePtr pXmlDoc = parseExport("settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-settings/office:settings/"
- "config:config-item-set[@config:name='ooo:view-settings']/"
- "config:config-item-map-indexed[@config:name='Views']/"
- "config:config-item-map-entry");
+ static constexpr OString sPathStart("/office:document-settings/office:settings/"
+ "config:config-item-set[@config:name='ooo:view-settings']/"
+ "config:config-item-map-indexed[@config:name='Views']/"
+ "config:config-item-map-entry"_ostr);
// First Byte is in order 'V-L -P- V-- measurelines controls backgroundobjects background layout'
// Bits need to be: visible=10111111=0xbf=191 printable=01011111=0x5f=95 locked=10000000=0x80=128
// The values in file are Base64 encoded.
@@ -775,8 +770,8 @@ void SdMiscTest::testTdf98839_ShearVFlipH()
save("draw8");
xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'content.xml'", pXmlDoc);
- static constexpr OStringLiteral sPathStart(
- "/office:document-content/office:body/office:drawing/draw:page");
+ static constexpr OString sPathStart(
+ "/office:document-content/office:body/office:drawing/draw:page"_ostr);
assertXPath(pXmlDoc, sPathStart);
const OUString sTransform = getXPath(pXmlDoc, sPathStart + "/draw:custom-shape", "transform");
@@ -841,7 +836,7 @@ void SdMiscTest::testTdf129898LayerDrawnInSlideshow()
SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
// Verify model
- static constexpr OUStringLiteral sName = u"DrawnInSlideshow";
+ static constexpr OUString sName = u"DrawnInSlideshow"_ustr;
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
SdrLayer* pLayer = rLayerAdmin.GetLayer(sName);
CPPUNIT_ASSERT_MESSAGE("No layer DrawnInSlideshow", pLayer);
diff --git a/sd/source/console/PresenterNotesView.cxx b/sd/source/console/PresenterNotesView.cxx
index b9295b51a60d..5c959b78a03c 100644
--- a/sd/source/console/PresenterNotesView.cxx
+++ b/sd/source/console/PresenterNotesView.cxx
@@ -205,8 +205,8 @@ void PresenterNotesView::CreateToolBar (
void PresenterNotesView::SetSlide (const Reference<drawing::XDrawPage>& rxNotesPage)
{
- static constexpr OUStringLiteral sNotesShapeName (
- u"com.sun.star.presentation.NotesShape");
+ static constexpr OUString sNotesShapeName (
+ u"com.sun.star.presentation.NotesShape"_ustr);
static constexpr OUStringLiteral sTextShapeName (
u"com.sun.star.drawing.TextShape");
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index d296a624b78a..1bb51ae40f95 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -264,7 +264,7 @@ bool SdGRFFilter::Export()
beans::PropertyValues aArgs;
TransformItems( SID_SAVEASDOC, rSet, aArgs );
- static constexpr OUStringLiteral sFilterName( u"FilterName" );
+ static constexpr OUString sFilterName( u"FilterName"_ustr );
OUString sShortName( rGraphicFilter.GetExportFormatShortName( nFilter ) );
bool bFilterNameFound = false;
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index 7dd6c82e4761..b69b60a11371 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -81,8 +81,8 @@ void TransformOOo2xDocument( SdDrawDocument* pDocument )
}
}
-constexpr OUStringLiteral gsEnableNumbering( u"enable-numbering" );
-constexpr OUStringLiteral gsTextNamespace( u"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
+constexpr OUString gsEnableNumbering( u"enable-numbering"_ustr );
+constexpr OUString gsTextNamespace( u"urn:oasis:names:tc:opendocument:xmlns:text:1.0"_ustr );
constexpr OUStringLiteral gsTrue( u"true" );
SdTransformOOo2xDocument::SdTransformOOo2xDocument( SdDrawDocument& rDocument )
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 3c66afcd5f16..e102ce27e333 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -669,7 +669,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( xModelSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
- static constexpr OUStringLiteral sPropName( u"BuildId" );
+ static constexpr OUString sPropName( u"BuildId"_ustr );
OUString sBuildId;
xInfoSet->getPropertyValue(sPropName) >>= sBuildId;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 1b4df937ae27..f546fcd951d0 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1570,7 +1570,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(weld::Container*
if( !xCurrentPage.is() )
return;
- static constexpr OUStringLiteral aStrIsEmptyPresObj( u"IsEmptyPresentationObject" );
+ static constexpr OUString aStrIsEmptyPresObj( u"IsEmptyPresentationObject"_ustr );
sal_Int32 nShape, nCount = xCurrentPage->getCount();
for( nShape = 0; nShape < nCount; nShape++ )
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 78f3f1203e27..69d0e9f7dce3 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -134,13 +134,13 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText
Reference<XPropertySetInfo> xInfo(xSet->getPropertySetInfo());
if (xInfo.is())
{
- static constexpr OUStringLiteral aPropName1(u"Name");
+ static constexpr OUString aPropName1(u"Name"_ustr);
if(xInfo->hasPropertyByName(aPropName1))
xSet->getPropertyValue(aPropName1) >>= aDescription;
bAppendIndex = aDescription.isEmpty();
- static constexpr OUStringLiteral aPropName2(u"UINameSingular");
+ static constexpr OUString aPropName2(u"UINameSingular"_ustr);
if(xInfo->hasPropertyByName(aPropName2))
xSet->getPropertyValue(aPropName2) >>= aDescription;
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index bcec46b33ebd..7eb623138713 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -944,7 +944,7 @@ Any CustomAnimationPane::getProperty1Value( sal_Int32 nType, const CustomAnimati
case nPropertyTypeCharHeight:
{
- static constexpr OUStringLiteral aAttributeName( u"CharHeight" );
+ static constexpr OUString aAttributeName( u"CharHeight"_ustr );
Any aValue( pEffect->getProperty( AnimationNodeType::SET, aAttributeName, EValue::To ) );
if( !aValue.hasValue() )
aValue = pEffect->getProperty( AnimationNodeType::ANIMATE, aAttributeName, EValue::To );
@@ -1017,7 +1017,7 @@ bool CustomAnimationPane::setProperty1Value( sal_Int32 nType, const CustomAnimat
case nPropertyTypeCharHeight:
{
- static constexpr OUStringLiteral aAttributeName( u"CharHeight" );
+ static constexpr OUString aAttributeName( u"CharHeight"_ustr );
bEffectChanged = pEffect->setProperty( AnimationNodeType::SET, aAttributeName, EValue::To, rValue );
if( !bEffectChanged )
bEffectChanged = pEffect->setProperty( AnimationNodeType::ANIMATE, aAttributeName, EValue::To, rValue );
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index e0953de3b0e2..aecd1d93db8b 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -85,7 +85,7 @@ struct snew_slide_value_info_layout
}
-constexpr OUStringLiteral EMPTY = u"";
+constexpr OUString EMPTY = u""_ustr;
constexpr snew_slide_value_info_layout notes[] =
{
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index 4b6f3e92ee57..e1291eaa9688 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno;
namespace {
-constexpr OUStringLiteral TITLE = u"Title";
+constexpr OUString TITLE = u"Title"_ustr;
class FolderDescriptor
{
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index f286cd3fc189..abc9dc9fb67e 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -294,9 +294,9 @@ void DrawDocShell::Execute( SfxRequest& rReq )
// setting the new language...
if (!aNewLangTxt.isEmpty())
{
- static constexpr OUStringLiteral aSelectionLangPrefix(u"Current_");
- static constexpr OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
- static constexpr OUStringLiteral aDocumentLangPrefix(u"Default_");
+ static constexpr OUString aSelectionLangPrefix(u"Current_"_ustr);
+ static constexpr OUString aParagraphLangPrefix(u"Paragraph_"_ustr);
+ static constexpr OUString aDocumentLangPrefix(u"Default_"_ustr);
bool bSelection = false;
bool bParagraph = false;
@@ -403,7 +403,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (pItem2)
sApplyText = pItem2->GetValue();
- static constexpr OUStringLiteral sSpellingRule(u"Spelling_");
+ static constexpr OUString sSpellingRule(u"Spelling_"_ustr);
sal_Int32 nPos = 0;
if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
{
diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx
index b6dc735fdc07..d859ac3fbe83 100644
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -68,7 +68,7 @@ private:
//===== PresentationFactory ===================================================
-constexpr OUStringLiteral gsPresentationViewURL = u"private:resource/view/Presentation";
+constexpr OUString gsPresentationViewURL = u"private:resource/view/Presentation"_ustr;
PresentationFactory::PresentationFactory (
const rtl::Reference<::sd::DrawController>& rxController)
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index 8cd05154365c..55cdca4d1976 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -194,8 +194,8 @@ OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber )
else
return "";
- static constexpr OUStringLiteral sNotesShapeName (
- u"com.sun.star.presentation.NotesShape" );
+ static constexpr OUString sNotesShapeName (
+ u"com.sun.star.presentation.NotesShape"_ustr );
static constexpr OUStringLiteral sTextShapeName (
u"com.sun.star.drawing.TextShape" );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index be8a84a81cdd..5fd298d8b4d9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -482,9 +482,9 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow
xShow->displaySlide( xSlide, xDrawPages, xAnimNode, comphelper::containerToSequence(aProperties) );
}
-constexpr OUStringLiteral gsOnClick( u"OnClick" );
-constexpr OUStringLiteral gsBookmark( u"Bookmark" );
-constexpr OUStringLiteral gsVerb( u"Verb" );
+constexpr OUString gsOnClick( u"OnClick"_ustr );
+constexpr OUString gsBookmark( u"Bookmark"_ustr );
+constexpr OUString gsVerb( u"Verb"_ustr );
SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation, ViewShell* pViewSh, ::sd::View* pView, SdDrawDocument* pDoc, vcl::Window* pParentWindow )
: mxModel(pDoc->getUnoModel())
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index d106a937f284..59cf49569d92 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -137,8 +137,8 @@ private:
DECL_LINK(SlideSorterSelectionChangeListener, LinkParamNone*, void);
};
-constexpr OUStringLiteral aCurrentPagePropertyName = u"CurrentPage";
-constexpr OUStringLiteral aEditModePropertyName = u"IsMasterPageMode";
+constexpr OUString aCurrentPagePropertyName = u"CurrentPage"_ustr;
+constexpr OUString aEditModePropertyName = u"IsMasterPageMode"_ustr;
//===== EventMultiplexer ======================================================
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 8eb4422251b6..011bfe939858 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -199,7 +199,7 @@ OUString SAL_CALL DrawController::getImplementationName( )
return "DrawController" ;
}
-constexpr OUStringLiteral ssServiceName = u"com.sun.star.drawing.DrawingDocumentDrawView";
+constexpr OUString ssServiceName = u"com.sun.star.drawing.DrawingDocumentDrawView"_ustr;
sal_Bool SAL_CALL DrawController::supportsService (const OUString& rsServiceName)
{
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index c087ade87b5e..77aeb444979c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2022,8 +2022,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
// exporting transition effects to pdf
if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() && pPDFExtOutDevData->GetIsExportTransitionEffects() )
{
- static constexpr OUStringLiteral sEffect( u"Effect" );
- static constexpr OUStringLiteral sSpeed ( u"Speed" );
+ static constexpr OUString sEffect( u"Effect"_ustr );
+ static constexpr OUString sSpeed ( u"Speed"_ustr );
sal_Int32 nTime = 800;
presentation::AnimationSpeed aAs;
if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 114b60f02475..d86ffed7c562 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1050,21 +1050,21 @@ uno::Reference< container::XNameReplace > SAL_CALL SdXShape::getEvents( )
return new SdUnoEventsAccess( this );
}
-constexpr OUStringLiteral gaStrOnClick( u"OnClick" );
-constexpr OUStringLiteral gaStrServiceName( u"com.sun.star.documents.Events" );
-constexpr OUStringLiteral gaStrEventType( u"EventType" );
-constexpr OUStringLiteral gaStrPresentation( u"Presentation" );
-constexpr OUStringLiteral gaStrLibrary(u"Library");
-constexpr OUStringLiteral gaStrMacroName(u"MacroName");
-constexpr OUStringLiteral gaStrClickAction( u"ClickAction" );
-constexpr OUStringLiteral gaStrBookmark( u"Bookmark" );
-constexpr OUStringLiteral gaStrEffect( u"Effect" );
-constexpr OUStringLiteral gaStrPlayFull( u"PlayFull" );
-constexpr OUStringLiteral gaStrVerb( u"Verb" );
-constexpr OUStringLiteral gaStrSoundURL( u"SoundURL" );
-constexpr OUStringLiteral gaStrSpeed( u"Speed" );
+constexpr OUString gaStrOnClick( u"OnClick"_ustr );
+constexpr OUString gaStrServiceName( u"com.sun.star.documents.Events"_ustr );
+constexpr OUString gaStrEventType( u"EventType"_ustr );
+constexpr OUString gaStrPresentation( u"Presentation"_ustr );
+constexpr OUString gaStrLibrary(u"Library"_ustr);
+constexpr OUString gaStrMacroName(u"MacroName"_ustr);
+constexpr OUString gaStrClickAction( u"ClickAction"_ustr );
+constexpr OUString gaStrBookmark( u"Bookmark"_ustr );
+constexpr OUString gaStrEffect( u"Effect"_ustr );
+constexpr OUString gaStrPlayFull( u"PlayFull"_ustr );
+constexpr OUString gaStrVerb( u"Verb"_ustr );
+constexpr OUString gaStrSoundURL( u"SoundURL"_ustr );
+constexpr OUString gaStrSpeed( u"Speed"_ustr );
constexpr OUStringLiteral gaStrStarBasic( u"StarBasic" );
-constexpr OUStringLiteral gaStrScript( u"Script" );
+constexpr OUString gaStrScript( u"Script"_ustr );
SdUnoEventsAccess::SdUnoEventsAccess( SdXShape* pShape ) noexcept
: mpShape( pShape )
@@ -1420,7 +1420,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) )
{
// Scripting Framework URL
- aAny <<= OUString(gaStrScript);
+ aAny <<= gaStrScript;
pProperties->Name = gaStrEventType;
pProperties->Handle = -1;
pProperties->Value = aAny;
@@ -1476,7 +1476,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
}
else
{
- aAny <<= OUString(gaStrPresentation);
+ aAny <<= gaStrPresentation;
pProperties->Name = gaStrEventType;
pProperties->Handle = -1;
pProperties->Value = aAny;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 9abea2e5b801..40d10ab5a666 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -108,7 +108,7 @@ enum WID_PAGE
}
-constexpr OUStringLiteral sEmptyPageName = u"page";
+constexpr OUString sEmptyPageName = u"page"_ustr;
// this function stores the property maps for draw pages in impress and draw
static const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind ePageKind )
@@ -399,7 +399,7 @@ rtl::Reference<SdrObject> SdGenericDrawPage::CreateSdrObject_( const Reference<
return nullptr;
OUString aType( xShape->getShapeType() );
- static constexpr OUStringLiteral aPrefix( u"com.sun.star.presentation." );
+ static constexpr OUString aPrefix( u"com.sun.star.presentation."_ustr );
if( !aType.startsWith( aPrefix ) )
{
return SvxDrawPage::CreateSdrObject_( xShape );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 8a797c066479..c9bed876e72f 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -965,7 +965,7 @@ namespace {
SdPage& rHandoutPage (*rDocument.GetSdPage(0, PageKind::Handout));
Reference< css::beans::XPropertySet > xHandoutPage( rHandoutPage.getUnoPage(), UNO_QUERY );
- static constexpr OUStringLiteral sPageNumber( u"Number" );
+ static constexpr OUString sPageNumber( u"Number"_ustr );
// Collect the page objects of the handout master.
std::vector<SdrPageObj*> aHandoutPageObjects;
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 83832f7ba561..9246c2cd55ba 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -122,13 +122,13 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_SET_THROW );
form::FormButtonType eButtonType = form::FormButtonType_URL;
- static constexpr OUStringLiteral sButtonType( u"ButtonType" );
+ static constexpr OUString sButtonType( u"ButtonType"_ustr );
if(xPropInfo->hasPropertyByName( sButtonType ) && (xPropSet->getPropertyValue( sButtonType ) >>= eButtonType ) )
{
OUString aString;
// Label
- static constexpr OUStringLiteral sLabel( u"Label" );
+ static constexpr OUString sLabel( u"Label"_ustr );
if(xPropInfo->hasPropertyByName(sLabel))
{
if( xPropSet->getPropertyValue(sLabel) >>= aString )
@@ -136,7 +136,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
}
// URL
- static constexpr OUStringLiteral sTargetURL( u"TargetURL" );
+ static constexpr OUString sTargetURL( u"TargetURL"_ustr );
if(xPropInfo->hasPropertyByName(sTargetURL))
{
if( xPropSet->getPropertyValue(sTargetURL) >>= aString )
@@ -144,7 +144,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
}
// Target
- static constexpr OUStringLiteral sTargetFrame( u"TargetFrame" );
+ static constexpr OUString sTargetFrame( u"TargetFrame"_ustr );
if(xPropInfo->hasPropertyByName(sTargetFrame) )
{
if( xPropSet->getPropertyValue(sTargetFrame) >>= aString )