summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-06-18 10:24:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-06-18 13:16:23 +0200
commit0572ef356be49b95b22a4794b7937c8c0914468f (patch)
tree3e6ee889e45f921b310f75972f0629b12609a5e6 /sd
parent89a80d637e2831d49cdf48921f961b04fd03cffc (diff)
loplugin:ostr in various
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/AnnotationTest.cxx36
-rw-r--r--sd/qa/unit/import-tests2.cxx6
-rw-r--r--sd/qa/unit/layout-tests.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx2
-rw-r--r--sd/source/ui/framework/module/ModuleController.cxx28
5 files changed, 37 insertions, 37 deletions
diff --git a/sd/qa/unit/AnnotationTest.cxx b/sd/qa/unit/AnnotationTest.cxx
index 4883c7fb12ec..0f9e1c81ad0f 100644
--- a/sd/qa/unit/AnnotationTest.cxx
+++ b/sd/qa/unit/AnnotationTest.cxx
@@ -33,7 +33,7 @@ class AnnotationTest : public SdModelTestBase
{
public:
AnnotationTest()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
};
@@ -52,9 +52,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation)
rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation();
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
- xAnnotation->setAuthor("A");
+ xAnnotation->setAuthor(u"A"_ustr);
uno::Reference<text::XText> xText(xAnnotation->getTextRange());
- xText->setString("X");
+ xText->setString(u"X"_ustr);
xAnnotation->setPosition(geometry::RealPoint2D(0.0, 0.0));
xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0));
@@ -72,9 +72,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation)
rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation();
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
- xAnnotation->setAuthor("B");
+ xAnnotation->setAuthor(u"B"_ustr);
uno::Reference<text::XText> xText(xAnnotation->getTextRange());
- xText->setString("XXX");
+ xText->setString(u"XXX"_ustr);
xAnnotation->setPosition(geometry::RealPoint2D(10.0, 10.0));
xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0));
@@ -100,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsert)
SdPage* pPage = pViewShell->GetActualPage();
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
@@ -117,9 +117,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete)
SdPage* pPage = pViewShell->GetActualPage();
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(3), pPage->GetObjCount());
@@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete)
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({
{ "Id", uno::Any(OUString::number(xAnnotation->GetId())) },
}));
- dispatchCommand(mxComponent, ".uno:DeleteAnnotation", aPropertyValues);
+ dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, aPropertyValues);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
@@ -156,8 +156,8 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo)
SdPage* pPage = pViewShell->GetActualPage();
CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount());
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {});
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
@@ -169,24 +169,24 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo)
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId());
- dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size());
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
- dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, u".uno:Redo"_ustr, {});
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size());
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId());
- dispatchCommand(mxComponent, ".uno:DeleteAnnotation", {});
+ dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, {});
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size());
CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId());
- dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount());
CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size());
@@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate)
aArgs = comphelper::InitPropertySequence({
{ "Text", uno::Any(u"Comment"_ustr) },
});
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, aArgs);
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
SdrObject* pObject = pPage->GetObj(0);
@@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate)
{ "PositionX", uno::Any(sal_Int32(1440)) },
{ "PositionY", uno::Any(sal_Int32(14400)) } });
- dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs);
+ dispatchCommand(mxComponent, u".uno:EditAnnotation"_ustr, aArgs);
CPPUNIT_ASSERT_DOUBLES_EQUAL(25.4, pAnnotationData->mxAnnotation->getPosition().X, 1E-4);
CPPUNIT_ASSERT_DOUBLES_EQUAL(254.0, pAnnotationData->mxAnnotation->getPosition().Y, 1E-4);
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index ab66d016b665..e5c2a0dcc132 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -2027,7 +2027,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString());
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
+ xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
// No more runs
CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException);
@@ -2041,7 +2041,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString());
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
+ xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
// Without the fix, this would fail with
// - Expected: 10
// - Actual : 18
@@ -2058,7 +2058,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString());
uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
+ xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight;
CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
// No more runs
CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException);
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 35641beeee2d..d4f8d54681dd 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf156955)
xmlDocUniquePtr pXmlDoc = load("odp/tdf156955.odp");
// Make sure text box has the right size - without the fix it was 2759.
- assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, "3183");
+ assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, u"3183"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf148966)
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 635696cd3695..4c411f94f6f7 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -840,7 +840,7 @@ void SdDrawDocument::UpdateAllLinks()
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
}
- m_pLinkManager->UpdateAllLinks(true, false, nullptr, ""); // query box: update all links?
+ m_pLinkManager->UpdateAllLinks(true, false, nullptr, u""_ustr); // query box: update all links?
if (s_pDocLockedInsertingLinks == this)
s_pDocLockedInsertingLinks = nullptr; // unlock inserting links
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index 31d92148e6ab..8a60b16b3482 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -49,21 +49,21 @@ ModuleController::ModuleController(const rtl::Reference<::sd::DrawController>& r
mpResourceToFactoryMap member.
*/
ProcessFactory(
- "com.sun.star.drawing.framework.BasicPaneFactory",
- { "private:resource/pane/CenterPane",
- "private:resource/pane/LeftImpressPane",
- "private:resource/pane/BottomImpressPane",
- "private:resource/pane/LeftDrawPane" });
+ u"com.sun.star.drawing.framework.BasicPaneFactory"_ustr,
+ { u"private:resource/pane/CenterPane"_ustr,
+ u"private:resource/pane/LeftImpressPane"_ustr,
+ u"private:resource/pane/BottomImpressPane"_ustr,
+ u"private:resource/pane/LeftDrawPane"_ustr });
ProcessFactory(
- "com.sun.star.drawing.framework.BasicViewFactory",
- { "private:resource/view/ImpressView",
- "private:resource/view/GraphicView",
- "private:resource/view/OutlineView",
- "private:resource/view/NotesView",
- "private:resource/view/NotesPanelView",
- "private:resource/view/HandoutView",
- "private:resource/view/SlideSorter",
- "private:resource/view/PresentationView" });
+ u"com.sun.star.drawing.framework.BasicViewFactory"_ustr,
+ { u"private:resource/view/ImpressView"_ustr,
+ u"private:resource/view/GraphicView"_ustr,
+ u"private:resource/view/OutlineView"_ustr,
+ u"private:resource/view/NotesView"_ustr,
+ u"private:resource/view/NotesPanelView"_ustr,
+ u"private:resource/view/HandoutView"_ustr,
+ u"private:resource/view/SlideSorter"_ustr,
+ u"private:resource/view/PresentationView"_ustr });
ProcessFactory(
u"com.sun.star.drawing.framework.BasicToolBarFactory"_ustr,
{ u"private:resource/toolbar/ViewTabBar"_ustr });