diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 13:18:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-11 12:41:09 +0200 |
commit | bc91cc47505c448ded7297074ccff809b59e8ed1 (patch) | |
tree | ddd3d33ff41ae6021738a0dcda4f9dbb5c177dea /svx | |
parent | 28a43d53b25c183a7997cc18819d6ee0c675df19 (diff) |
loplugin:ostr in svx
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'svx')
253 files changed, 2630 insertions, 2591 deletions
diff --git a/svx/inc/sdr/primitive2d/primitivefactory2d.hxx b/svx/inc/sdr/primitive2d/primitivefactory2d.hxx index eb1c8fd9b92f..ab0b6d783f1f 100644 --- a/svx/inc/sdr/primitive2d/primitivefactory2d.hxx +++ b/svx/inc/sdr/primitive2d/primitivefactory2d.hxx @@ -51,7 +51,7 @@ public: OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.graphic.PrimitiveFactory2D"; + return u"com.sun.star.comp.graphic.PrimitiveFactory2D"_ustr; } sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override @@ -61,7 +61,7 @@ public: css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.graphic.PrimitiveFactory2D" }; + return { u"com.sun.star.graphic.PrimitiveFactory2D"_ustr }; } }; diff --git a/svx/qa/unit/XTableImportExportTest.cxx b/svx/qa/unit/XTableImportExportTest.cxx index cfab5c47c58f..a1d5673b096e 100644 --- a/svx/qa/unit/XTableImportExportTest.cxx +++ b/svx/qa/unit/XTableImportExportTest.cxx @@ -41,7 +41,7 @@ CPPUNIT_TEST_FIXTURE(XTableImportExportTest, testImportExport) BitmapChecksum aChecksum(0); { - rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, "REF"); + rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, u"REF"_ustr); uno::Reference<container::XNameContainer> xNameContainer(xBitmapList->createInstance()); CPPUNIT_ASSERT(xNameContainer.is()); @@ -51,20 +51,20 @@ CPPUNIT_TEST_FIXTURE(XTableImportExportTest, testImportExport) Graphic aGraphic(aBitmapEx); uno::Reference<awt::XBitmap> xBitmap(aGraphic.GetXGraphic(), css::uno::UNO_QUERY); - xNameContainer->insertByName("SomeBitmap", uno::Any(xBitmap)); + xNameContainer->insertByName(u"SomeBitmap"_ustr, uno::Any(xBitmap)); xBitmapList->Save(); aChecksum = aBitmap.GetChecksum(); } { - rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, "REF"); + rtl::Reference<XBitmapList> xBitmapList = new XBitmapList(aTempURL, u"REF"_ustr); bool bResult = xBitmapList->Load(); CPPUNIT_ASSERT(bResult); uno::Reference<container::XNameContainer> xNameContainer(xBitmapList->createInstance()); CPPUNIT_ASSERT(xNameContainer.is()); - uno::Any aAny = xNameContainer->getByName("SomeBitmap"); + uno::Any aAny = xNameContainer->getByName(u"SomeBitmap"_ustr); CPPUNIT_ASSERT(aAny.has<uno::Reference<awt::XBitmap>>()); auto xBitmap = aAny.get<uno::Reference<awt::XBitmap>>(); CPPUNIT_ASSERT(xBitmap.is()); diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx index 477a331a870d..07a4b9f916ab 100644 --- a/svx/qa/unit/classicshapes.cxx +++ b/svx/qa/unit/classicshapes.cxx @@ -27,7 +27,7 @@ class ClassicshapesTest : public UnoApiTest { public: ClassicshapesTest() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } @@ -173,8 +173,8 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf130076Flip) uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape2(getShape(2, nPageIndex)); uno::Reference<beans::XPropertySet> xShapeProps2(xShape2, uno::UNO_QUERY); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue("CircleStartAngle") >>= nAngle1); - CPPUNIT_ASSERT(xShapeProps2->getPropertyValue("CircleStartAngle") >>= nAngle2); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CircleStartAngle"_ustr) >>= nAngle1); + CPPUNIT_ASSERT(xShapeProps2->getPropertyValue(u"CircleStartAngle"_ustr) >>= nAngle2); CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Incorrect vertical flip starting angle on page " + OUString::number(nPageIndex)) .toUtf8() diff --git a/svx/qa/unit/core.cxx b/svx/qa/unit/core.cxx index d7055993ca94..6349397c7d33 100644 --- a/svx/qa/unit/core.cxx +++ b/svx/qa/unit/core.cxx @@ -27,7 +27,7 @@ class Test : public UnoApiTest { public: Test() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } }; @@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChartExportToPdf) uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); // When exporting that chart to PDF: - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "application/pdf", + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"application/pdf"_ustr, maTempFile.GetURL()); // Then make sure we get a valid, non-empty PDF: @@ -71,14 +71,15 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicObjectResolver) // Test name in root folder { - uno::Reference<graphic::XGraphic> xGraphic = xGraphicHelper->loadGraphic("SomeImage.png"); + uno::Reference<graphic::XGraphic> xGraphic + = xGraphicHelper->loadGraphic(u"SomeImage.png"_ustr); CPPUNIT_ASSERT_EQUAL(true, xGraphic.is()); } // Test name in sub-folder { uno::Reference<graphic::XGraphic> xGraphic - = xGraphicHelper->loadGraphic("Pictures/SomeOtherImage.png"); + = xGraphicHelper->loadGraphic(u"Pictures/SomeOtherImage.png"_ustr); CPPUNIT_ASSERT_EQUAL(true, xGraphic.is()); } @@ -87,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicObjectResolver) uno::Reference<graphic::XGraphic> xGraphic; try { - xGraphic = xGraphicHelper->loadGraphic("NoneExistent.png"); + xGraphic = xGraphicHelper->loadGraphic(u"NoneExistent.png"_ustr); } catch (const uno::Exception&) { diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index 27848c6a23c0..304ae64f23b2 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -50,7 +50,7 @@ class CustomshapesTest : public UnoApiTest { public: CustomshapesTest() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } @@ -90,7 +90,8 @@ sal_uInt8 CustomshapesTest::countShapes() Color CustomshapesTest::getColor(uno::Reference<drawing::XShape> xShape, const double& fX, const double& fY) { - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL()); + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr, + maTempFile.GetURL()); SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ); vcl::PngImageReader aPNGReader(aFileStream); Bitmap aBMP = aPNGReader.read().GetBitmap(); @@ -113,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302) const SdrCustomShapeGeometryItem& rGeometryItem( pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); const css::uno::Any* pAny - = rGeometryItem.GetPropertyValueByName("TextPath", "SameLetterHeights"); + = rGeometryItem.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr); if (pAny) *pAny >>= bSameHeights; @@ -124,11 +125,11 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302) SdrView* pSdrView = pViewShell->GetDrawView(); pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView()); - dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {}); + dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {}); const SdrCustomShapeGeometryItem& rGeometryItem1 = pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY); - pAny = rGeometryItem1.GetPropertyValueByName("TextPath", "SameLetterHeights"); + pAny = rGeometryItem1.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr); if (pAny) *pAny >>= bSameHeights; @@ -136,11 +137,11 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302) pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView()); - dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {}); + dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {}); const SdrCustomShapeGeometryItem& rGeometryItem2 = pSdrCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY); - pAny = rGeometryItem2.GetPropertyValueByName("TextPath", "SameLetterHeights"); + pAny = rGeometryItem2.GetPropertyValueByName(u"TextPath"_ustr, u"SameLetterHeights"_ustr); if (pAny) *pAny >>= bSameHeights; @@ -161,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf147409_GeomItemHash) // Apply FontworkSameLetterHeights toggle // Without patch a debug build fails assert in SfxItemPool::DirectPutItemInPoolImpl and so crashes. - dispatchCommand(mxComponent, ".uno:FontworkSameLetterHeights", {}); + dispatchCommand(mxComponent, u".uno:FontworkSameLetterHeights"_ustr, {}); } CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash) @@ -178,7 +179,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash) // Apply extrusion toggle // Without patch a debug build fails assert in SfxItemPool::DirectPutItemInPoolImpl and so crashes. - dispatchCommand(mxComponent, ".uno:ExtrusionToggle", {}); + dispatchCommand(mxComponent, u".uno:ExtrusionToggle"_ustr, {}); } CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_NonUI) @@ -190,7 +191,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_NonUI) // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL()); + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr, + maTempFile.GetURL()); // Read bitmap and test color // The expected values are taken from an image generated by Word @@ -226,7 +228,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FrontLightDim) // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL()); + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr, + maTempFile.GetURL()); // Read bitmap and test color // The expected values are taken from an image generated by Word @@ -255,7 +258,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FirstLightHarsh) // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL()); + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr, + maTempFile.GetURL()); // Read bitmap and test color in center SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ); @@ -309,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterZ_odt) awt::Rectangle aBoundRect; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect; awt::Point aAnchorPosition; - xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition; + xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition; sal_Int32 nActualLeft = aBoundRect.X - aAnchorPosition.X; // Without the fix it would have failed with left = 7731. @@ -334,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_odt) awt::Rectangle aBoundRect; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect; awt::Point aAnchorPosition; - xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition; + xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition; sal_Int32 nActualTop = aBoundRect.Y - aAnchorPosition.Y; // Without the fix it would have failed with top = 2252. @@ -359,7 +363,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_doc) awt::Rectangle aBoundRect; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect; awt::Point aAnchorPosition; - xPropSet->getPropertyValue("AnchorPosition") >>= aAnchorPosition; + xPropSet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition; sal_Int32 nActualTop = aBoundRect.Y - aAnchorPosition.Y; // Without the fix it would have failed with top = 2330 @@ -799,10 +803,10 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf115813_OOXML_XY_handle) uno::Reference<drawing::XShape> xShape(getShape(i)); SdrObjCustomShape& rSdrObjCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); - OUString sShapeType("non-primitive"); // default for ODF + OUString sShapeType(u"non-primitive"_ustr); // default for ODF const SdrCustomShapeGeometryItem& rGeometryItem( rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr); if (pAny) *pAny >>= sShapeType; @@ -869,10 +873,10 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP) uno::Reference<drawing::XShape> xShape(getShape(i)); SdrObjCustomShape& rSdrObjCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); - OUString sShapeType("non-primitive"); // only to initialize, value not used here + OUString sShapeType(u"non-primitive"_ustr); // only to initialize, value not used here const SdrCustomShapeGeometryItem& rGeometryItem( rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr); if (pAny) *pAny >>= sShapeType; @@ -1178,7 +1182,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176) } // Save and reload - saveAndReload("draw8"); + saveAndReload(u"draw8"_ustr); // Expected values of point 4 of the shape polygon const OString sTestCase[] = { "FlipH"_ostr, "FlipV"_ostr, "FlipHV"_ostr }; @@ -1213,7 +1217,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf148501_OctagonBevel) // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); - GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, "image/png", maTempFile.GetURL()); + GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr, + maTempFile.GetURL()); // Read bitmap and test color // expected in order top-left, top, top-right, right, bottom-right: @@ -1246,7 +1251,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS const uno::Reference<drawing::XShape>& xShape) { uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW); - uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry"); + uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr); uno::Sequence<beans::PropertyValue> aCustomShapeGeometry; if (!(anotherAny >>= aCustomShapeGeometry)) return false; @@ -1338,7 +1343,7 @@ bool lcl_getShapeCoordinates(uno::Sequence<drawing::EnhancedCustomShapeParameter const uno::Reference<drawing::XShape>& xShape) { uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW); - uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry"); + uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr); uno::Sequence<beans::PropertyValue> aCustomShapeGeometry; if (!(anotherAny >>= aCustomShapeGeometry)) return false; diff --git a/svx/qa/unit/gallery/test_gallery.cxx b/svx/qa/unit/gallery/test_gallery.cxx index 6fb033e5f880..7e2df25e14cb 100644 --- a/svx/qa/unit/gallery/test_gallery.cxx +++ b/svx/qa/unit/gallery/test_gallery.cxx @@ -309,7 +309,8 @@ void GalleryObjTest::TestInsertGalleryObject() CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0), pGalleryTheme->GetObjectCount()); - std::vector<OUString> imageList{ "galtest1.png", "galtest2.png", "galtest3.jpg" }; + std::vector<OUString> imageList{ u"galtest1.png"_ustr, u"galtest2.png"_ustr, + u"galtest3.jpg"_ustr }; for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++) { @@ -354,7 +355,8 @@ void GalleryObjTest::TestRemoveGalleryObject() CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0), pGalleryTheme->GetObjectCount()); - std::vector<OUString> imageList{ "galtest1.png", "galtest2.png", "galtest3.jpg" }; + std::vector<OUString> imageList{ u"galtest1.png"_ustr, u"galtest2.png"_ustr, + u"galtest3.jpg"_ustr }; for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++) { @@ -409,7 +411,7 @@ void GalleryObjTest::TestChangePositionGalleryObject() CPPUNIT_ASSERT_EQUAL_MESSAGE("Object count inconsistent", sal_uInt32(0), pGalleryTheme->GetObjectCount()); - OUString imageList[] = { "galtest1.png", "galtest2.png", "galtest3.jpg" }; + OUString imageList[] = { u"galtest1.png"_ustr, u"galtest2.png"_ustr, u"galtest3.jpg"_ustr }; for (sal_uInt32 i = 0; i < (sizeof(imageList) / sizeof(imageList[0])); i++) { diff --git a/svx/qa/unit/gluepointTest.cxx b/svx/qa/unit/gluepointTest.cxx index fbade68c3558..b77d16919acb 100644 --- a/svx/qa/unit/gluepointTest.cxx +++ b/svx/qa/unit/gluepointTest.cxx @@ -28,7 +28,7 @@ class GluePointTest : public UnoApiTest { public: GluePointTest() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } @@ -57,7 +57,7 @@ bool lcl_getGeometryGluePoints( const uno::Reference<drawing::XShape>& xShape) { uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW); - uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry"); + uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr); uno::Sequence<beans::PropertyValue> aCustomShapeGeometry; if (!(anotherAny >>= aCustomShapeGeometry)) return false; diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx index 681e3100aca1..ef90c753421a 100644 --- a/svx/qa/unit/sdr.cxx +++ b/svx/qa/unit/sdr.cxx @@ -31,7 +31,7 @@ class SdrTest : public UnoApiXmlTest { public: SdrTest() - : UnoApiXmlTest("svx/qa/unit/data/") + : UnoApiXmlTest(u"svx/qa/unit/data/"_ustr) { } @@ -101,32 +101,32 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) // - Actual : 162 // - In <>, attribute 'xy13' of '(//shadow/transform)[1]' incorrect value. // i.e. shadow alignment was ignored while scaling the shadow. - assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, "-568"); - assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy23"_ostr, "162"); + assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, u"-568"_ustr); + assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy23"_ostr, u"162"_ustr); - assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, "-1795"); - assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy23"_ostr, "162"); + assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, u"-1795"_ustr); + assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy23"_ostr, u"162"_ustr); - assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy13"_ostr, "-3021"); - assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy23"_ostr, "161"); + assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy13"_ostr, u"-3021"_ustr); + assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy23"_ostr, u"161"_ustr); - assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, "-568"); - assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy23"_ostr, "-749"); + assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, u"-568"_ustr); + assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy23"_ostr, u"-749"_ustr); - assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy13"_ostr, "-3021"); - assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy23"_ostr, "-750"); + assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy13"_ostr, u"-3021"_ustr); + assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy23"_ostr, u"-750"_ustr); - assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, "-567"); - assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, "-1692"); + assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, u"-567"_ustr); + assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, u"-1692"_ustr); - assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, "-1795"); - assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy23"_ostr, "-1693"); + assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, u"-1795"_ustr); + assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy23"_ostr, u"-1693"_ustr); - assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, "-3023"); - assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, "-1692"); + assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, u"-3023"_ustr); + assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, u"-1692"_ustr); - assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, "-1795"); - assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy23"_ostr, "-750"); + assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, u"-1795"_ustr); + assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy23"_ostr, u"-750"_ustr); } { // Page 2 contains a table with shadow alignment center @@ -143,8 +143,8 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) // - Expected: -5196 // - Actual : 0 // - In<>, attribute 'xy13' of '//shadow/transform' incorrect value. - assertXPath(pDocument, "//shadow/transform"_ostr, "xy13"_ostr, "-5196"); - assertXPath(pDocument, "//shadow/transform"_ostr, "xy23"_ostr, "-2290"); + assertXPath(pDocument, "//shadow/transform"_ostr, "xy13"_ostr, u"-5196"_ustr); + assertXPath(pDocument, "//shadow/transform"_ostr, "xy23"_ostr, u"-2290"_ustr); } } diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index 3254e64161fb..9b2b0036ac6f 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -47,7 +47,7 @@ class SvdrawTest : public UnoApiXmlTest { public: SvdrawTest() - : UnoApiXmlTest("svx/qa/unit/data/") + : UnoApiXmlTest(u"svx/qa/unit/data/"_ustr) { } @@ -89,10 +89,10 @@ xmlDocUniquePtr lcl_dumpAndParseFirstObjectWithAssert(SdrPage* pSdrPage) CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText) { // Create a new Draw document with a rectangle. - mxComponent = loadFromDesktop("private:factory/sdraw"); + mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape( - xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); xShape->setPosition(awt::Point(1000, 1000)); @@ -103,12 +103,12 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText) // Add semi-transparent text on the rectangle. uno::Reference<text::XTextRange> xShapeText(xShape, uno::UNO_QUERY); - xShapeText->getText()->setString("hello"); + xShapeText->getText()->setString(u"hello"_ustr); uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY); - xShapeProperties->setPropertyValue("CharColor", uno::Any(COL_RED)); + xShapeProperties->setPropertyValue(u"CharColor"_ustr, uno::Any(COL_RED)); sal_Int16 nTransparence = 75; - xShapeProperties->setPropertyValue("CharTransparence", uno::Any(nTransparence)); + xShapeProperties->setPropertyValue(u"CharTransparence"_ustr, uno::Any(nTransparence)); // Generates drawinglayer primitives for the page. auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get()); @@ -130,19 +130,19 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText) CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) { // Given a path object: - mxComponent = loadFromDesktop("private:factory/sdraw"); + mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape( - xFactory->createInstance("com.sun.star.drawing.ClosedBezierShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.ClosedBezierShape"_ustr), uno::UNO_QUERY); // When setting its scale by both using setSize() and scaling in a transform matrix: // Set size and basic properties. xShape->setPosition(awt::Point(2512, 6062)); xShape->setSize(awt::Size(112, 112)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_SOLID)); - xShapeProps->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_SOLID)); - xShapeProps->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(0))); + xShapeProps->setPropertyValue(u"FillStyle"_ustr, uno::Any(drawing::FillStyle_SOLID)); + xShapeProps->setPropertyValue(u"LineStyle"_ustr, uno::Any(drawing::LineStyle_SOLID)); + xShapeProps->setPropertyValue(u"FillColor"_ustr, uno::Any(static_cast<sal_Int32>(0))); // Add it to the draw page. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -184,7 +184,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) drawing::PolygonFlags_NORMAL, }, }; - xShapeProps->setPropertyValue("PolyPolygonBezier", uno::Any(aPolyPolygonBezierCoords)); + xShapeProps->setPropertyValue(u"PolyPolygonBezier"_ustr, uno::Any(aPolyPolygonBezierCoords)); drawing::HomogenMatrix3 aMatrix; aMatrix.Line1.Column1 = 56; aMatrix.Line2.Column1 = -97; @@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) aMatrix.Line1.Column3 = 3317; aMatrix.Line2.Column3 = 5583; aMatrix.Line3.Column3 = 1; - xShapeProps->setPropertyValue("Transformation", uno::Any(aMatrix)); + xShapeProps->setPropertyValue(u"Transformation"_ustr, uno::Any(aMatrix)); // Then make sure the scaling is only applied once: // Without the accompanying fix in place, this test would have failed with: @@ -208,18 +208,18 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag) { // Given a document with a groupshape, which has 2 children. - mxComponent = loadFromDesktop("private:factory/sdraw"); + mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xRect1( - xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY); xRect1->setPosition(awt::Point(1000, 1000)); xRect1->setSize(awt::Size(10000, 10000)); uno::Reference<drawing::XShape> xRect2( - xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY); xRect2->setPosition(awt::Point(1000, 1000)); xRect2->setSize(awt::Size(10000, 10000)); uno::Reference<drawing::XShapes> xGroup( - xFactory->createInstance("com.sun.star.drawing.GroupShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.GroupShape"_ustr), uno::UNO_QUERY); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -228,12 +228,12 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag) xGroup->add(xRect1); xGroup->add(xRect2); uno::Reference<text::XTextRange> xRect2Text(xRect2, uno::UNO_QUERY); - xRect2Text->setString("x"); + xRect2Text->setString(u"x"_ustr); uno::Sequence<beans::PropertyValue> aGrabBag = { - comphelper::makePropertyValue("OOXLayout", true), + comphelper::makePropertyValue(u"OOXLayout"_ustr, true), }; uno::Reference<beans::XPropertySet> xGroupProps(xGroup, uno::UNO_QUERY); - xGroupProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag)); + xGroupProps->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aGrabBag)); // When editing the shape text of the 2nd rectangle (insert a char at the start). SfxViewShell* pViewShell = SfxViewShell::Current(); @@ -241,11 +241,11 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag) SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xRect2); pSdrView->SdrBeginTextEdit(pObject); EditView& rEditView = pSdrView->GetTextEditOutlinerView()->GetEditView(); - rEditView.InsertText("y"); + rEditView.InsertText(u"y"_ustr); pSdrView->SdrEndTextEdit(); // Then make sure that grab-bag is empty to avoid losing the new text. - xGroupProps->getPropertyValue("InteropGrabBag") >>= aGrabBag; + xGroupProps->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; // Without the accompanying fix in place, this test would have failed with: // assertion failed // - Expression: !aGrabBag.hasElements() @@ -289,39 +289,39 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) assertXPath(pXmlDoc, "/primitive2D"_ostr, 1); OString aBasePath("/primitive2D/sdrrectangle/group/polypolygoncolor"_ostr); - assertXPath(pXmlDoc, aBasePath, "color"_ostr, "#729fcf"); + assertXPath(pXmlDoc, aBasePath, "color"_ostr, u"#729fcf"_ustr); assertXPath(pXmlDoc, aBasePath + "/polypolygon", "height"_ostr, - "99"); // weird Rectangle is created with size 100 - assertXPath(pXmlDoc, aBasePath + "/polypolygon", "width"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/polypolygon", "minx"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/polypolygon", "miny"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxx"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxy"_ostr, "99"); + u"99"_ustr); // weird Rectangle is created with size 100 + assertXPath(pXmlDoc, aBasePath + "/polypolygon", "width"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/polypolygon", "minx"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/polypolygon", "miny"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxx"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/polypolygon", "maxy"_ostr, u"99"_ustr); aBasePath = "/primitive2D/sdrrectangle/group/polypolygoncolor/polypolygon/polygon"_ostr; assertXPath(pXmlDoc, aBasePath + "/point", 5); - assertXPath(pXmlDoc, aBasePath + "/point[1]", "x"_ostr, "49.5"); // hmm, weird, why? - assertXPath(pXmlDoc, aBasePath + "/point[1]", "y"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/point[2]", "x"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/point[2]", "y"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/point[3]", "x"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/point[3]", "y"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/point[4]", "x"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/point[4]", "y"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/point[5]", "x"_ostr, "99"); - assertXPath(pXmlDoc, aBasePath + "/point[5]", "y"_ostr, "99"); + assertXPath(pXmlDoc, aBasePath + "/point[1]", "x"_ostr, u"49.5"_ustr); // hmm, weird, why? + assertXPath(pXmlDoc, aBasePath + "/point[1]", "y"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[2]", "x"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[2]", "y"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[3]", "x"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[3]", "y"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[4]", "x"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[4]", "y"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[5]", "x"_ostr, u"99"_ustr); + assertXPath(pXmlDoc, aBasePath + "/point[5]", "y"_ostr, u"99"_ustr); aBasePath = "/primitive2D/sdrrectangle/group/polygonstroke"_ostr; assertXPath(pXmlDoc, aBasePath, 1); - assertXPath(pXmlDoc, aBasePath + "/line", "color"_ostr, "#3465a4"); - assertXPath(pXmlDoc, aBasePath + "/line", "width"_ostr, "0"); - assertXPath(pXmlDoc, aBasePath + "/line", "linejoin"_ostr, "Round"); - assertXPath(pXmlDoc, aBasePath + "/line", "linecap"_ostr, "BUTT"); + assertXPath(pXmlDoc, aBasePath + "/line", "color"_ostr, u"#3465a4"_ustr); + assertXPath(pXmlDoc, aBasePath + "/line", "width"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, aBasePath + "/line", "linejoin"_ostr, u"Round"_ustr); + assertXPath(pXmlDoc, aBasePath + "/line", "linecap"_ostr, u"BUTT"_ustr); - assertXPathContent(pXmlDoc, aBasePath + "/polygon", "49.5,99 0,99 0,0 99,0 99,99"); + assertXPathContent(pXmlDoc, aBasePath + "/polygon", u"49.5,99 0,99 0,0 99,0 99,99"_ustr); // If solid line, then there is no line stroke information assertXPath(pXmlDoc, aBasePath + "/stroke", 0); @@ -373,13 +373,13 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testFontWorks) assertXPath(pXmlDoc, "/primitive2D"_ostr, 1); - assertXPath(pXmlDoc, "//scene"_ostr, "projectionMode"_ostr, "Perspective"); - assertXPath(pXmlDoc, "//scene/extrude3D[1]/fill"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pXmlDoc, "//scene"_ostr, "projectionMode"_ostr, u"Perspective"_ustr); + assertXPath(pXmlDoc, "//scene/extrude3D[1]/fill"_ostr, "color"_ostr, u"#ff0000"_ustr); assertXPath(pXmlDoc, "//scene/extrude3D[1]/object3Dattributes/material"_ostr, "color"_ostr, - "#ff0000"); + u"#ff0000"_ustr); // ODF default 50% is represented by Specular Intensity = 2^5. The relationship is not linear. assertXPath(pXmlDoc, "//scene/extrude3D[1]/object3Dattributes/material"_ostr, - "specularIntensity"_ostr, "32"); + "specularIntensity"_ostr, u"32"_ustr); } CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_EOLinCurvedText) @@ -475,9 +475,9 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMetal) // ODF specifies for metal = true specular color as rgb(200,200,200) and adding 15 to specularity // Together with extrusion-first-light-level 67% and extrusion-specularity 80% factor is // 0.67*0.8 * 200/255 = 0.42 and color #6b6b6b - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#6b6b6b"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#6b6b6b"_ustr); // 3D specularIntensity = 2^(50/10) + 15 = 47, with default extrusion-shininess 50% - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "47"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"47"_ustr); } CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong) @@ -489,8 +489,8 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong) xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage); // The rendering method and normals kind were always 'Flat' without the patch. - assertXPath(pXmlDoc, "//scene"_ostr, "shadeMode"_ostr, "Phong"); - assertXPath(pXmlDoc, "//object3Dattributes"_ostr, "normalsKind"_ostr, "Specific"); + assertXPath(pXmlDoc, "//scene"_ostr, "shadeMode"_ostr, u"Phong"_ustr); + assertXPath(pXmlDoc, "//object3Dattributes"_ostr, "normalsKind"_ostr, u"Specific"_ustr); } CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT) @@ -507,14 +507,14 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT) // to forth light, as only first light is specular. Because first and third lights are off, the // forth light is the second one in the dump. The gray color corresponding to // FirstLightLevel = 38000/2^16 is #949494. - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#000000"); - assertXPath(pXmlDoc, "(//light)[2]"_ostr, "color"_ostr, "#949494"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#000000"_ustr); + assertXPath(pXmlDoc, "(//light)[2]"_ostr, "color"_ostr, u"#949494"_ustr); // To make the second light soft, part of its intensity is moved to lights 5,6,7 and 8. - assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, "#1e1e1e"); - assertXPath(pXmlDoc, "(//light)[3]"_ostr, "color"_ostr, "#3b3b3b"); + assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, u"#1e1e1e"_ustr); + assertXPath(pXmlDoc, "(//light)[3]"_ostr, "color"_ostr, u"#3b3b3b"_ustr); // The 3D property specularIntensity is not related to 'extrusion-specularity' but to // 'extrusion-shininess'. specularIntensity = 2^(shininess/10), here default 32. - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "32"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"32"_ustr); } CPPUNIT_TEST_FIXTURE(SvdrawTest, testMaterialSpecular) @@ -530,11 +530,11 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testMaterialSpecular) // -level'. 3D specularIntensity is derived from property 'draw:extrusion-shininess'. Both are // object properties, not scene properties. Those were wrong in various forms before the patch. // Specularity = 77% * first-light-level 67% = 0.5159, which corresponds to gray color #848484. - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, "#848484"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specular"_ostr, u"#848484"_ustr); // extrusion-shininess 50% corresponds to 3D specularIntensity 32, use 2^(50/10). - assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, "32"); + assertXPath(pXmlDoc, "(//material)[1]"_ostr, "specularIntensity"_ostr, u"32"_ustr); // extrusion-first-light-level 67% corresponds to gray color #ababab, use 255 * 0.67. - assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, "#ababab"); + assertXPath(pXmlDoc, "(//light)[1]"_ostr, "color"_ostr, u"#ababab"_ustr); // The first light is harsh, the second light soft. So the 3D scene should have 6 lights (1+1+4). assertXPath(pXmlDoc, "//light"_ostr, 6); } @@ -572,7 +572,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testPageViewDrawLayerClip) loadFromFile(u"page-view-draw-layer-clip.docx"); // When saving that document to PDF: - save("writer_pdf_Export"); + save(u"writer_pdf_Export"_ustr); // Then make sure that line shape gets clipped: std::unique_ptr<vcl::pdf::PDFiumDocument> pDoc = parsePDFExport(); @@ -726,27 +726,35 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testClipVerticalTextOverflow) // - In <>, XPath contents of child does not match // i.e. the vertically overflowing text wasn't clipped & overflowing text // was drawn anyways. - assertXPathContent(pDocument, "count((//sdrblocktext)[4]//textsimpleportion)"_ostr, "6"); + assertXPathContent(pDocument, "count((//sdrblocktext)[4]//textsimpleportion)"_ostr, u"6"_ustr); // make sure text is aligned correctly after the overflowing text is clipped - assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[1]"_ostr, "y"_ostr, "3749"); - assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[6]"_ostr, "y"_ostr, "7559"); + assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[1]"_ostr, "y"_ostr, + u"3749"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[4]//textsimpleportion)[6]"_ostr, "y"_ostr, + u"7559"_ustr); // make sure the text that isn't overflowing is still aligned properly - assertXPathContent(pDocument, "count((//sdrblocktext)[5]//textsimpleportion)"_ostr, "3"); - assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr, "5074"); - assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr, "6598"); + assertXPathContent(pDocument, "count((//sdrblocktext)[5]//textsimpleportion)"_ostr, u"3"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr, + u"5074"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr, + u"6598"_ustr); // Test vertically overflowing text, with vertical text direction - assertXPathContent(pDocument, "count((//sdrblocktext)[6]//textsimpleportion)"_ostr, "12"); + assertXPathContent(pDocument, "count((//sdrblocktext)[6]//textsimpleportion)"_ostr, u"12"_ustr); // make sure text is aligned correctly after the overflowing text is clipped - assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[1]"_ostr, "x"_ostr, "13093"); - assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[12]"_ostr, "x"_ostr, "4711"); + assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[1]"_ostr, "x"_ostr, + u"13093"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[6]//textsimpleportion)[12]"_ostr, "x"_ostr, + u"4711"_ustr); // make sure the text that isn't overflowing is still aligned properly - assertXPathContent(pDocument, "count((//sdrblocktext)[7]//textsimpleportion)"_ostr, "3"); - assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[1]"_ostr, "x"_ostr, "25417"); - assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[3]"_ostr, "x"_ostr, "23893"); + assertXPathContent(pDocument, "count((//sdrblocktext)[7]//textsimpleportion)"_ostr, u"3"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[1]"_ostr, "x"_ostr, + u"25417"_ustr); + assertXPath(pDocument, "((//sdrblocktext)[7]//textsimpleportion)[3]"_ostr, "x"_ostr, + u"23893"_ustr); } } diff --git a/svx/qa/unit/svdraw/test_SdrTextObject.cxx b/svx/qa/unit/svdraw/test_SdrTextObject.cxx index 218db2a52f0e..8de4937c63ea 100644 --- a/svx/qa/unit/svdraw/test_SdrTextObject.cxx +++ b/svx/qa/unit/svdraw/test_SdrTextObject.cxx @@ -32,7 +32,7 @@ void SdrTextObjTest::AllFamiliesCanBeRestoredFromSavedString() for (SfxStyleFamily family : allFamilies) { - OUString styleName = "styleName"; + OUString styleName = u"styleName"_ustr; SdrTextObj::AppendFamilyToStyleName(styleName, family); SfxStyleFamily readFamily = SdrTextObj::ReadFamilyFromStyleName(styleName); CPPUNIT_ASSERT_EQUAL(static_cast<int>(family), static_cast<int>(readFamily)); diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index aa862e0e33a4..6331a23cbe98 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -36,7 +36,7 @@ class Test : public UnoApiXmlTest { public: Test() - : UnoApiXmlTest("svx/qa/unit/data/") + : UnoApiXmlTest(u"svx/qa/unit/data/"_ustr) { } @@ -81,36 +81,36 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) //- Actual : 2 //- In <>, XPath contents of child does not match // i.e. the shadow's transparency was miscalculated. - assertXPathContent(pDocument, "count(//objectinfo/unifiedtransparence)"_ostr, "0"); - - assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "blur"_ostr, "141"); - assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "blur"_ostr, "141"); - assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "blur"_ostr, "141"); - assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "blur"_ostr, "141"); - assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "blur"_ostr, "141"); + assertXPathContent(pDocument, "count(//objectinfo/unifiedtransparence)"_ostr, u"0"_ustr); + + assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[1]"_ostr, "blur"_ostr, u"141"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[2]"_ostr, "blur"_ostr, u"141"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[3]"_ostr, "blur"_ostr, u"141"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[4]"_ostr, "blur"_ostr, u"141"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "//objectinfo/shadow[5]"_ostr, "blur"_ostr, u"141"_ustr); assertXPath(pDocument, "//objectinfo/group/sdrCell[1]/unifiedtransparence"_ostr, 0); assertXPath(pDocument, "//objectinfo/group/sdrCell[2]/unifiedtransparence"_ostr, 0); assertXPath(pDocument, "//objectinfo/group/sdrCell[3]/group/unifiedtransparence"_ostr, - "transparence"_ostr, "80"); + "transparence"_ostr, u"80"_ustr); assertXPath(pDocument, "//objectinfo/group/sdrCell[4]/group/unifiedtransparence"_ostr, - "transparence"_ostr, "80"); + "transparence"_ostr, u"80"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape) { // Given a document with a table shape, editing cell text: - mxComponent = loadFromDesktop("private:factory/simpress", - "com.sun.star.presentation.PresentationDocument"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, + u"com.sun.star.presentation.PresentationDocument"_ustr); uno::Sequence<beans::PropertyValue> aArgs - = { comphelper::makePropertyValue("Rows", sal_Int32(2)), - comphelper::makePropertyValue("Columns", sal_Int32(2)) }; - dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); + = { comphelper::makePropertyValue(u"Rows"_ustr, sal_Int32(2)), + comphelper::makePropertyValue(u"Columns"_ustr, sal_Int32(2)) }; + dispatchCommand(mxComponent, u".uno:InsertTable"_ustr, aArgs); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx index 0d6f35e5c9cd..e65ec6528832 100644 --- a/svx/qa/unit/unodraw.cxx +++ b/svx/qa/unit/unodraw.cxx @@ -45,7 +45,7 @@ class UnodrawTest : public UnoApiXmlTest { public: UnodrawTest() - : UnoApiXmlTest("svx/qa/unit/data/") + : UnoApiXmlTest(u"svx/qa/unit/data/"_ustr) { } }; @@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport) uno::Sequence<beans::PropertyValue> aProperties( comphelper::InitPropertySequence({ { "URL", uno::Any(maTempFile.GetURL()) }, - { "MediaType", uno::Any(OUString("image/jpeg")) } })); + { "MediaType", uno::Any(u"image/jpeg"_ustr) } })); CPPUNIT_ASSERT(xExportFilter->filter(aProperties)); } @@ -86,7 +86,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998) uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); uno::Reference<awt::XControlModel> xModel( - xFactory->createInstance("com.sun.star.awt.UnoControlDialogModel"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.awt.UnoControlDialogModel"_ustr), uno::UNO_QUERY); CPPUNIT_ASSERT(xModel.is()); uno::Reference<beans::XPropertySet> xModelProps(xModel, uno::UNO_QUERY); @@ -94,20 +94,20 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998) // This resulted in a uno::RuntimeException, assigning a shape to a dialog model's image was // broken. - xModelProps->setPropertyValue("ImageURL", xShape->getPropertyValue("GraphicURL")); + xModelProps->setPropertyValue(u"ImageURL"_ustr, xShape->getPropertyValue(u"GraphicURL"_ustr)); uno::Reference<graphic::XGraphic> xGraphic; - xModelProps->getPropertyValue("Graphic") >>= xGraphic; + xModelProps->getPropertyValue(u"Graphic"_ustr) >>= xGraphic; CPPUNIT_ASSERT(xGraphic.is()); } CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect) { // Create an Impress document an insert a table shape. - mxComponent = loadFromDesktop("private:factory/simpress", - "com.sun.star.presentation.PresentationDocument"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, + u"com.sun.star.presentation.PresentationDocument"_ustr); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape( - xFactory->createInstance("com.sun.star.drawing.TableShape"), uno::UNO_QUERY); + xFactory->createInstance(u"com.sun.star.drawing.TableShape"_ustr), uno::UNO_QUERY); xShape->setPosition(awt::Point(1000, 1000)); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY); @@ -119,17 +119,17 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect) uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); // Without the accompanying fix in place, this test would have failed with throwing a // beans.UnknownPropertyException, as shadow-as-direct-formatting on tables were not possible. - xShapeProps->setPropertyValue("Shadow", uno::Any(true)); + xShapeProps->setPropertyValue(u"Shadow"_ustr, uno::Any(true)); Color nRed = COL_LIGHTRED; - xShapeProps->setPropertyValue("ShadowColor", uno::Any(nRed)); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed); + xShapeProps->setPropertyValue(u"ShadowColor"_ustr, uno::Any(nRed)); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"ShadowColor"_ustr) >>= nRed); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nRed); // Add text. - uno::Reference<table::XCellRange> xTable(xShapeProps->getPropertyValue("Model"), + uno::Reference<table::XCellRange> xTable(xShapeProps->getPropertyValue(u"Model"_ustr), uno::UNO_QUERY); uno::Reference<text::XTextRange> xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY); - xCell->setString("A1"); + xCell->setString(u"A1"_ustr); // Generates drawinglayer primitives for the shape. auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get()); @@ -160,22 +160,23 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect) CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets) { // Create a title shape with 2 paragraphs in it. - mxComponent = loadFromDesktop("private:factory/simpress", - "com.sun.star.presentation.PresentationDocument"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, + u"com.sun.star.presentation.PresentationDocument"_ustr); uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPages> xDrawPages = xSupplier->getDrawPages(); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPages->getByIndex(0), uno::UNO_QUERY); // A default document contains a title shape and a text shape on the first slide. uno::Reference<drawing::XShape> xTitleShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); uno::Reference<lang::XServiceInfo> xTitleShapeInfo(xTitleShape, uno::UNO_QUERY); - CPPUNIT_ASSERT(xTitleShapeInfo->supportsService("com.sun.star.presentation.TitleTextShape")); + CPPUNIT_ASSERT( + xTitleShapeInfo->supportsService(u"com.sun.star.presentation.TitleTextShape"_ustr)); uno::Reference<text::XTextRange> xTitleShapeText(xTitleShape, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTitleShapeText->getText(); uno::Reference<text::XTextRange> xCursor = xText->createTextCursor(); - xText->insertString(xCursor, "foo", /*bAbsorb=*/false); + xText->insertString(xCursor, u"foo"_ustr, /*bAbsorb=*/false); xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH, /*bAbsorb=*/false); - xText->insertString(xCursor, "bar", /*bAbsorb=*/false); + xText->insertString(xCursor, u"bar"_ustr, /*bAbsorb=*/false); // Check that the title shape has 2 paragraphs. uno::Reference<container::XEnumerationAccess> xTextEA(xText, uno::UNO_QUERY); @@ -192,20 +193,20 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets) CPPUNIT_TEST_FIXTURE(UnodrawTest, testPngExport) { // Given an empty Impress document: - mxComponent = loadFromDesktop("private:factory/simpress", - "com.sun.star.presentation.PresentationDocument"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, + u"com.sun.star.presentation.PresentationDocument"_ustr); // When exporting that document to PNG with a JSON size: uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); SvMemoryStream aStream; uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OUString("impress_png_Export"); - aMediaDescriptor["FilterOptions"] - <<= OUString("{\"PixelHeight\":{\"type\":\"long\",\"value\":\"192\"}," - "\"PixelWidth\":{\"type\":\"long\",\"value\":\"192\"}}"); - aMediaDescriptor["OutputStream"] <<= xOut; - xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList()); + aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_png_Export"_ustr; + aMediaDescriptor[u"FilterOptions"_ustr] + <<= u"{\"PixelHeight\":{\"type\":\"long\",\"value\":\"192\"}," + "\"PixelWidth\":{\"type\":\"long\",\"value\":\"192\"}}"_ustr; + aMediaDescriptor[u"OutputStream"_ustr] <<= xOut; + xStorable->storeToURL(u"private:stream"_ustr, aMediaDescriptor.getAsConstPropertyValueList()); // Then make sure that the size request is handled: aStream.Seek(STREAM_SEEK_TO_BEGIN); diff --git a/svx/qa/unit/xml.cxx b/svx/qa/unit/xml.cxx index 673113467fbb..95c158fa1f3c 100644 --- a/svx/qa/unit/xml.cxx +++ b/svx/qa/unit/xml.cxx @@ -25,7 +25,7 @@ class Test : public UnoApiTest { public: Test() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } }; @@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, test3DObjectFallback) uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); uno::Reference<graphic::XGraphic> xGraphic; - xShape->getPropertyValue("Graphic") >>= xGraphic; + xShape->getPropertyValue(u"Graphic"_ustr) >>= xGraphic; // Without the accompanying fix in place, this test would have failed, we could not read // Models/Fallbacks/duck.png, as we assumed a format like Pictures/something.png, i.e. a single // slash in the path. diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx index c2bce82b9cf5..781835069985 100644 --- a/svx/qa/unit/xoutdev.cxx +++ b/svx/qa/unit/xoutdev.cxx @@ -27,7 +27,7 @@ class XOutdevTest : public UnoApiTest { public: XOutdevTest() - : UnoApiTest("svx/qa/unit/data/") + : UnoApiTest(u"svx/qa/unit/data/"_ustr) { } }; @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testPdfGraphicExport) XOutFlags const eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension | XOutFlags::UseNativeIfPossible; OUString aTempURL = maTempFile.GetURL(); - XOutBitmap::WriteGraphic(aGraphic, aTempURL, "pdf", eFlags); + XOutBitmap::WriteGraphic(aGraphic, aTempURL, u"pdf"_ustr, eFlags); // Assert that the output looks like a PDF. SvStream* pStream = maTempFile.GetStream(StreamMode::READ); @@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testTdf60684) XOutFlags const eFlags = XOutFlags::DontExpandFilename | XOutFlags::DontAddExtension | XOutFlags::UseNativeIfPossible; OUString aTempURL = maTempFile.GetURL(); - XOutBitmap::WriteGraphic(aGraphic, aTempURL, "png", eFlags); + XOutBitmap::WriteGraphic(aGraphic, aTempURL, u"png"_ustr, eFlags); SvStream* pStream = maTempFile.GetStream(StreamMode::READ); CPPUNIT_ASSERT(pStream->TellEnd() > 4); @@ -93,8 +93,8 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testTdf60684) CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi) { // Given an empty Impress document with a (title) shape: - mxComponent = loadFromDesktop("private:factory/simpress", - "com.sun.star.presentation.PresentationDocument"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, + u"com.sun.star.presentation.PresentationDocument"_ustr); // When setting the theme index of the shape's fill color: uno::Reference<drawing::XDrawPagesSupplier> xPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -107,14 +107,14 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi) aComplexColor.setThemeColor(model::ThemeColorType::Accent1); aComplexColor.addTransformation({ model::TransformationType::LumMod, 2000 }); aComplexColor.addTransformation({ model::TransformationType::LumOff, 8000 }); - xShape->setPropertyValue("FillComplexColor", + xShape->setPropertyValue(u"FillComplexColor"_ustr, uno::Any(model::color::createXComplexColor(aComplexColor))); } // Then make sure the value we read back is the expected one: { uno::Reference<util::XComplexColor> xComplexColor; - CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= xComplexColor); + CPPUNIT_ASSERT(xShape->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor); CPPUNIT_ASSERT(xComplexColor.is()); auto aComplexColor = model::color::getFromXComplexColor(xComplexColor); CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType()); diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 2f59e302bb73..28d2cdf3a001 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -282,7 +282,7 @@ void SAL_CALL AccessibleControlShape::grabFocus() OUString SAL_CALL AccessibleControlShape::getImplementationName() { - return "com.sun.star.comp.accessibility.AccessibleControlShape"; + return u"com.sun.star.comp.accessibility.AccessibleControlShape"_ustr; } OUString AccessibleControlShape::CreateAccessibleBaseName() @@ -318,8 +318,8 @@ OUString if ( sDesc.isEmpty() ) { // no -> use the default aDG.Initialize (STR_ObjNameSingulUno); - aDG.AddProperty ("ControlBackground", DescriptionGenerator::PropertyType::Color); - aDG.AddProperty ( "ControlBorder", DescriptionGenerator::PropertyType::Integer); + aDG.AddProperty (u"ControlBackground"_ustr, DescriptionGenerator::PropertyType::Color); + aDG.AddProperty ( u"ControlBorder"_ustr, DescriptionGenerator::PropertyType::Integer); } // ensure that we are listening to the Name property m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, DESC_PROPERTY_NAME ); diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx index d94ce4886add..ff5e92e95527 100644 --- a/svx/source/accessibility/AccessibleGraphicShape.cxx +++ b/svx/source/accessibility/AccessibleGraphicShape.cxx @@ -96,7 +96,7 @@ void SAL_CALL OUString SAL_CALL AccessibleGraphicShape::getImplementationName() { - return "AccessibleGraphicShape"; + return u"AccessibleGraphicShape"_ustr; } @@ -104,7 +104,7 @@ css::uno::Sequence< OUString> SAL_CALL AccessibleGraphicShape::getSupportedServiceNames() { ThrowIfDisposed (); - const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleGraphicShape" }; + const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleGraphicShape"_ustr }; return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals); } diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx index 9275ad1803f2..33cce7ac3b90 100644 --- a/svx/source/accessibility/AccessibleOLEShape.cxx +++ b/svx/source/accessibility/AccessibleOLEShape.cxx @@ -103,7 +103,7 @@ void SAL_CALL OUString SAL_CALL AccessibleOLEShape::getImplementationName() { - return "AccessibleOLEShape"; + return u"AccessibleOLEShape"_ustr; } @@ -111,7 +111,7 @@ css::uno::Sequence< OUString> SAL_CALL AccessibleOLEShape::getSupportedServiceNames() { ThrowIfDisposed(); - const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleOLEShape" }; + const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleOLEShape"_ustr }; return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals); } diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 1504c6869e75..91dc32a2ec48 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -190,7 +190,7 @@ void AccessibleShape::UpdateStates() try { drawing::FillStyle aFillStyle; - bShapeIsOpaque = ( xSet->getPropertyValue ("FillStyle") >>= aFillStyle) + bShapeIsOpaque = ( xSet->getPropertyValue (u"FillStyle"_ustr) >>= aFillStyle) && aFillStyle == drawing::FillStyle_SOLID; } catch (css::beans::UnknownPropertyException&) @@ -290,7 +290,7 @@ OUString SAL_CALL AccessibleShape::getAccessibleDescription() if( m_pShape && !m_pShape->GetDescription().isEmpty()) return m_pShape->GetDescription() ; else - return " "; + return u" "_ustr; } // XAccessibleContext @@ -533,7 +533,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds() // Transform coordinates from internal to pixel. if (maShapeTreeInfo.GetViewForwarder() == nullptr) throw uno::RuntimeException ( - "AccessibleShape has no valid view forwarder", + u"AccessibleShape has no valid view forwarder"_ustr, getXWeak()); ::Size aPixelSize = maShapeTreeInfo.GetViewForwarder()->LogicToPixel ( ::Size (aBoundingBox.Width, aBoundingBox.Height)); @@ -624,7 +624,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground() if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue ("LineColor"); + aColor = aSet->getPropertyValue (u"LineColor"_ustr); aColor >>= nColor; } } @@ -647,9 +647,9 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground() if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue ("FillColor"); + aColor = aSet->getPropertyValue (u"FillColor"_ustr); aColor >>= nColor; - aColor = aSet->getPropertyValue ("FillTransparence"); + aColor = aSet->getPropertyValue (u"FillTransparence"_ustr); short nTrans=0; aColor >>= nTrans; Color crBk(nColor); @@ -832,7 +832,7 @@ uno::Any SAL_CALL AccessibleShape::getExtendedAttributes() OUString SAL_CALL AccessibleShape::getImplementationName() { - return "AccessibleShape"; + return u"AccessibleShape"_ustr; } @@ -840,7 +840,7 @@ uno::Sequence<OUString> SAL_CALL AccessibleShape::getSupportedServiceNames() { ThrowIfDisposed (); - const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleShape" }; + const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleShape"_ustr }; return comphelper::concatSequences(AccessibleContextBase::getSupportedServiceNames(), vals); } @@ -1043,20 +1043,20 @@ void AccessibleShape::UpdateNameAndDescription() Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY_THROW); // Get the accessible name. - OUString sString = GetOptionalProperty(xSet, "Title"); + OUString sString = GetOptionalProperty(xSet, u"Title"_ustr); if (!sString.isEmpty()) { SetAccessibleName(sString, AccessibleContextBase::FromShape); } else { - sString = GetOptionalProperty(xSet, "Name"); + sString = GetOptionalProperty(xSet, u"Name"_ustr); if (!sString.isEmpty()) SetAccessibleName(sString, AccessibleContextBase::FromShape); } // Get the accessible description. - sString = GetOptionalProperty(xSet, "Description"); + sString = GetOptionalProperty(xSet, u"Description"_ustr); if (!sString.isEmpty()) SetAccessibleDescription(sString, AccessibleContextBase::FromShape); } diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 8dddb606876d..c486ab8ccd86 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -258,15 +258,15 @@ namespace accessibility SvxTextForwarder& AccessibleTextHelper_Impl::GetTextForwarder() const { if( !maEditSource.IsValid() ) - throw uno::RuntimeException("Unknown edit source", mxFrontEnd); + throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd); SvxTextForwarder* pTextForwarder = maEditSource.GetTextForwarder(); if( !pTextForwarder ) - throw uno::RuntimeException("Unable to fetch text forwarder, model might be dead", mxFrontEnd); + throw uno::RuntimeException(u"Unable to fetch text forwarder, model might be dead"_ustr, mxFrontEnd); if( !pTextForwarder->IsValid() ) - throw uno::RuntimeException("Text forwarder is invalid, model might be dead", mxFrontEnd); + throw uno::RuntimeException(u"Text forwarder is invalid, model might be dead"_ustr, mxFrontEnd); return *pTextForwarder; } @@ -274,15 +274,15 @@ namespace accessibility SvxViewForwarder& AccessibleTextHelper_Impl::GetViewForwarder() const { if( !maEditSource.IsValid() ) - throw uno::RuntimeException("Unknown edit source", mxFrontEnd); + throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd); SvxViewForwarder* pViewForwarder = maEditSource.GetViewForwarder(); if( !pViewForwarder ) - throw uno::RuntimeException("Unable to fetch view forwarder, model might be dead", mxFrontEnd); + throw uno::RuntimeException(u"Unable to fetch view forwarder, model might be dead"_ustr, mxFrontEnd); if( !pViewForwarder->IsValid() ) - throw uno::RuntimeException("View forwarder is invalid, model might be dead", mxFrontEnd); + throw uno::RuntimeException(u"View forwarder is invalid, model might be dead"_ustr, mxFrontEnd); return *pViewForwarder; } @@ -290,18 +290,18 @@ namespace accessibility SvxEditViewForwarder& AccessibleTextHelper_Impl::GetEditViewForwarder() const { if( !maEditSource.IsValid() ) - throw uno::RuntimeException("Unknown edit source", mxFrontEnd); + throw uno::RuntimeException(u"Unknown edit source"_ustr, mxFrontEnd); SvxEditViewForwarder* pViewForwarder = maEditSource.GetEditViewForwarder(); if( !pViewForwarder ) { - throw uno::RuntimeException("No edit view forwarder, object not in edit mode", mxFrontEnd); + throw uno::RuntimeException(u"No edit view forwarder, object not in edit mode"_ustr, mxFrontEnd); } if( !pViewForwarder->IsValid() ) { - throw uno::RuntimeException("View forwarder is invalid, object not in edit mode", mxFrontEnd); + throw uno::RuntimeException(u"View forwarder is invalid, object not in edit mode"_ustr, mxFrontEnd); } return *pViewForwarder; @@ -310,7 +310,7 @@ namespace accessibility SvxEditSourceAdapter& AccessibleTextHelper_Impl::GetEditSource() const { if( !maEditSource.IsValid() ) - throw uno::RuntimeException("AccessibleTextHelper_Impl::GetEditSource: no edit source", mxFrontEnd ); + throw uno::RuntimeException(u"AccessibleTextHelper_Impl::GetEditSource: no edit source"_ustr, mxFrontEnd ); return maEditSource; } @@ -1435,7 +1435,7 @@ namespace accessibility if( 0 > i || i >= getAccessibleChildCount() || GetTextForwarder().GetParagraphCount() <= i ) { - throw lang::IndexOutOfBoundsException("Invalid child index", mxFrontEnd); + throw lang::IndexOutOfBoundsException(u"Invalid child index"_ustr, mxFrontEnd); } DBG_ASSERT(mxFrontEnd.is(), "AccessibleTextHelper_Impl::UpdateVisibleChildren: no frontend set"); @@ -1474,12 +1474,12 @@ namespace accessibility { // make given position relative if( !mxFrontEnd.is() ) - throw uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid", mxFrontEnd ); + throw uno::RuntimeException(u"AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid"_ustr, mxFrontEnd ); uno::Reference< XAccessibleContext > xFrontEndContext = mxFrontEnd->getAccessibleContext(); if( !xFrontEndContext.is() ) - throw uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid", mxFrontEnd ); + throw uno::RuntimeException(u"AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid"_ustr, mxFrontEnd ); uno::Reference< XAccessibleComponent > xFrontEndComponent( xFrontEndContext, uno::UNO_QUERY_THROW ); diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index ad133fa8f4bf..3bb2a2db0dea 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -79,7 +79,7 @@ void DescriptionGenerator::Initialize(std::u16string_view sPrefix) { if (mxSet.is()) { - uno::Any aValue = mxSet->getPropertyValue("Style"); + uno::Any aValue = mxSet->getPropertyValue(u"Style"_ustr); uno::Reference<container::XNamed> xStyle(aValue, uno::UNO_QUERY); if (xStyle.is()) msDescription.append(xStyle->getName()); diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 1287f7e9ea2f..a3a3e76d616c 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -487,7 +487,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getBackground() // XServiceInfo OUString SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationName() { - return "com.sun.star.comp.ui.SvxGraphCtrlAccessibleContext"; + return u"com.sun.star.comp.ui.SvxGraphCtrlAccessibleContext"_ustr; } sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString& sServiceName ) @@ -497,9 +497,9 @@ sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedServiceNames() { - return { "com.sun.star.accessibility.Accessible", - "com.sun.star.accessibility.AccessibleContext", - "com.sun.star.drawing.AccessibleGraphControl" }; + return { u"com.sun.star.accessibility.Accessible"_ustr, + u"com.sun.star.accessibility.AccessibleContext"_ustr, + u"com.sun.star.drawing.AccessibleGraphControl"_ustr }; } // XTypeProvider @@ -511,7 +511,7 @@ Sequence<sal_Int8> SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId() // XServiceName OUString SvxGraphCtrlAccessibleContext::getServiceName() { - return "com.sun.star.accessibility.AccessibleContext"; + return u"com.sun.star.accessibility.AccessibleContext"_ustr; } // XAccessibleSelection diff --git a/svx/source/accessibility/SvxShapeTypes.cxx b/svx/source/accessibility/SvxShapeTypes.cxx index b02a153a4cdb..1ef37dcb504f 100644 --- a/svx/source/accessibility/SvxShapeTypes.cxx +++ b/svx/source/accessibility/SvxShapeTypes.cxx @@ -91,67 +91,67 @@ void RegisterDrawShapeTypes() <type>SvxShapeTypes</type> enum. */ static ShapeTypeDescriptor const aSvxShapeTypeList[] = { - ShapeTypeDescriptor ( DRAWING_TEXT, "com.sun.star.drawing.TextShape", + ShapeTypeDescriptor ( DRAWING_TEXT, u"com.sun.star.drawing.TextShape"_ustr, CreateSvxAccessibleShape), - ShapeTypeDescriptor (DRAWING_RECTANGLE, "com.sun.star.drawing.RectangleShape", + ShapeTypeDescriptor (DRAWING_RECTANGLE, u"com.sun.star.drawing.RectangleShape"_ustr, CreateSvxAccessibleShape), - ShapeTypeDescriptor ( DRAWING_ELLIPSE, "com.sun.star.drawing.EllipseShape", + ShapeTypeDescriptor ( DRAWING_ELLIPSE, u"com.sun.star.drawing.EllipseShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CONTROL, "com.sun.star.drawing.ControlShape", + ShapeTypeDescriptor ( DRAWING_CONTROL, u"com.sun.star.drawing.ControlShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CONNECTOR, "com.sun.star.drawing.ConnectorShape", + ShapeTypeDescriptor ( DRAWING_CONNECTOR, u"com.sun.star.drawing.ConnectorShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_MEASURE, "com.sun.star.drawing.MeasureShape", + ShapeTypeDescriptor ( DRAWING_MEASURE, u"com.sun.star.drawing.MeasureShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_LINE, "com.sun.star.drawing.LineShape", + ShapeTypeDescriptor ( DRAWING_LINE, u"com.sun.star.drawing.LineShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_POLY_POLYGON, "com.sun.star.drawing.PolyPolygonShape", + ShapeTypeDescriptor ( DRAWING_POLY_POLYGON, u"com.sun.star.drawing.PolyPolygonShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_POLY_LINE, "com.sun.star.drawing.PolyLineShape", + ShapeTypeDescriptor ( DRAWING_POLY_LINE, u"com.sun.star.drawing.PolyLineShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER, "com.sun.star.drawing.OpenBezierShape", + ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER, u"com.sun.star.drawing.OpenBezierShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER, "com.sun.star.drawing.ClosedBezierShape", + ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER, u"com.sun.star.drawing.ClosedBezierShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND, "com.sun.star.drawing.OpenFreeHandShape", + ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND, u"com.sun.star.drawing.OpenFreeHandShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND, "com.sun.star.drawing.ClosedFreeHandShape", + ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND, u"com.sun.star.drawing.ClosedFreeHandShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH, "com.sun.star.drawing.PolyPolygonPathShape", + ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH, u"com.sun.star.drawing.PolyPolygonPathShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH, "com.sun.star.drawing.PolyLinePathShape", + ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH, u"com.sun.star.drawing.PolyLinePathShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT, "com.sun.star.drawing.GraphicObjectShape", + ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT, u"com.sun.star.drawing.GraphicObjectShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_GROUP, "com.sun.star.drawing.GroupShape", + ShapeTypeDescriptor ( DRAWING_GROUP, u"com.sun.star.drawing.GroupShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_OLE, "com.sun.star.drawing.OLE2Shape", + ShapeTypeDescriptor ( DRAWING_OLE, u"com.sun.star.drawing.OLE2Shape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_PAGE, "com.sun.star.drawing.PageShape", + ShapeTypeDescriptor ( DRAWING_PAGE, u"com.sun.star.drawing.PageShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CAPTION, "com.sun.star.drawing.CaptionShape", + ShapeTypeDescriptor ( DRAWING_CAPTION, u"com.sun.star.drawing.CaptionShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_FRAME, "com.sun.star.drawing.FrameShape", + ShapeTypeDescriptor ( DRAWING_FRAME, u"com.sun.star.drawing.FrameShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_PLUGIN, "com.sun.star.drawing.PluginShape", + ShapeTypeDescriptor ( DRAWING_PLUGIN, u"com.sun.star.drawing.PluginShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_APPLET, "com.sun.star.drawing.AppletShape", + ShapeTypeDescriptor ( DRAWING_APPLET, u"com.sun.star.drawing.AppletShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_3D_SCENE, "com.sun.star.drawing.Shape3DSceneObject", + ShapeTypeDescriptor ( DRAWING_3D_SCENE, u"com.sun.star.drawing.Shape3DSceneObject"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_3D_CUBE, "com.sun.star.drawing.Shape3DCubeObject", + ShapeTypeDescriptor ( DRAWING_3D_CUBE, u"com.sun.star.drawing.Shape3DCubeObject"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_3D_SPHERE, "com.sun.star.drawing.Shape3DSphereObject", + ShapeTypeDescriptor ( DRAWING_3D_SPHERE, u"com.sun.star.drawing.Shape3DSphereObject"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_3D_LATHE, "com.sun.star.drawing.Shape3DLatheObject", + ShapeTypeDescriptor ( DRAWING_3D_LATHE, u"com.sun.star.drawing.Shape3DLatheObject"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE, "com.sun.star.drawing.Shape3DExtrudeObject", + ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE, u"com.sun.star.drawing.Shape3DExtrudeObject"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_CUSTOM, "com.sun.star.drawing.CustomShape", + ShapeTypeDescriptor ( DRAWING_CUSTOM, u"com.sun.star.drawing.CustomShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_TABLE, "com.sun.star.drawing.TableShape", + ShapeTypeDescriptor ( DRAWING_TABLE, u"com.sun.star.drawing.TableShape"_ustr, CreateSvxAccessibleShape ), - ShapeTypeDescriptor ( DRAWING_MEDIA, "com.sun.star.drawing.MediaShape", + ShapeTypeDescriptor ( DRAWING_MEDIA, u"com.sun.star.drawing.MediaShape"_ustr, CreateSvxAccessibleShape ), }; diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index fb65752d67d8..191f71efc4ad 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -519,7 +519,7 @@ sal_Bool SvxShowCharSetItemAcc::doAccessibleAction ( sal_Int32 nIndex ) OUString SvxShowCharSetItemAcc::getAccessibleActionDescription ( sal_Int32 nIndex ) { if( nIndex == 0 ) - return "press"; + return u"press"_ustr; throw IndexOutOfBoundsException(); } diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 8c0e0ca1c0c1..81a4ac0344c5 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -86,13 +86,13 @@ OUString SvxPixelCtlAccessible::getAccessibleDescription( ) { ::osl::MutexGuard aGuard( m_aMutex ); - return mpPixelCtl ? mpPixelCtl->GetAccessibleDescription() : ""; + return mpPixelCtl ? mpPixelCtl->GetAccessibleDescription() : u""_ustr; } OUString SvxPixelCtlAccessible::getAccessibleName( ) { ::osl::MutexGuard aGuard( m_aMutex ); - return mpPixelCtl ? mpPixelCtl->GetAccessibleName() : ""; + return mpPixelCtl ? mpPixelCtl->GetAccessibleName() : u""_ustr; } Reference< XAccessibleRelationSet > SAL_CALL SvxPixelCtlAccessible::getAccessibleRelationSet() diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 80efbc4bd319..1acd58e6a35d 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -578,7 +578,7 @@ OUString SvxRectCtlChildAccessibleContext::getAccessibleActionDescription ( sal_ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - return "select"; + return u"select"_ustr; } diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index e52594b15c31..8e73d20ee164 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -145,7 +145,7 @@ bool lcl_ExecuteFilterDialog(const uno::Sequence<beans::PropertyValue>& rPropsFo try { uno::Reference<ui::dialogs::XExecutableDialog> xFilterDialog( - comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.svtools.SvFilterOptionsDialog" ), uno::UNO_QUERY); + comphelper::getProcessServiceFactory()->createInstance( u"com.sun.star.svtools.SvFilterOptionsDialog"_ustr ), uno::UNO_QUERY); uno::Reference<beans::XPropertyAccess> xFilterProperties( xFilterDialog, uno::UNO_QUERY); if( xFilterDialog.is() && xFilterProperties.is() ) @@ -280,8 +280,8 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra uno::Sequence<beans::PropertyValue> aPropsForDialog { - comphelper::makePropertyValue("Graphic", xGraphic), - comphelper::makePropertyValue("FilterName", aExportFilter) + comphelper::makePropertyValue(u"Graphic"_ustr, xGraphic), + comphelper::makePropertyValue(u"FilterName"_ustr, aExportFilter) }; uno::Sequence<beans::PropertyValue> aFilterData; @@ -353,21 +353,21 @@ void GraphicHelper::SaveShapeAsGraphicToPath( { uno::Reference<lang::XMultiServiceFactory> xMSF(xContext->getServiceManager(), uno::UNO_QUERY); uno::Reference<document::XExporter> xExporter( - xMSF->createInstance("com.sun.star.comp.PDF.PDFFilter"), uno::UNO_QUERY); + xMSF->createInstance(u"com.sun.star.comp.PDF.PDFFilter"_ustr), uno::UNO_QUERY); xExporter->setSourceDocument(xComponent); uno::Reference<drawing::XShapes> xShapes = drawing::ShapeCollection::create(comphelper::getProcessComponentContext()); xShapes->add(xShape); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("Selection", xShapes), + comphelper::makePropertyValue(u"Selection"_ustr, xShapes), }; SvFileStream aStream(sPath, StreamMode::READWRITE | StreamMode::TRUNC); uno::Reference<io::XOutputStream> xStream(new utl::OStreamWrapper(aStream)); uno::Sequence<beans::PropertyValue> aDescriptor { - comphelper::makePropertyValue("FilterData", aFilterData), - comphelper::makePropertyValue("OutputStream", xStream) + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData), + comphelper::makePropertyValue(u"OutputStream"_ustr, xStream) }; uno::Reference<document::XFilter> xFilter(xExporter, uno::UNO_QUERY); xFilter->filter(aDescriptor); @@ -376,9 +376,9 @@ void GraphicHelper::SaveShapeAsGraphicToPath( { uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter = drawing::GraphicExportFilter::create(xContext); - uno::Sequence<beans::PropertyValue> aDescriptor{ comphelper::makePropertyValue("MediaType", + uno::Sequence<beans::PropertyValue> aDescriptor{ comphelper::makePropertyValue(u"MediaType"_ustr, aExportMimeType), - comphelper::makePropertyValue("URL", sPath) }; + comphelper::makePropertyValue(u"URL"_ustr, sPath) }; uno::Reference<lang::XComponent> xSourceDocument(xShape, uno::UNO_QUERY_THROW); xGraphicExporter->setSourceDocument(xSourceDocument); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 082532d75f2d..b8b6d04e4cf4 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1506,9 +1506,9 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex // For ooxml-foo shapes, the way to calculate the adjustment value from the handle position depends on // the type of the shape, therefore need 'Type'. - OUString sShapeType("non-primitive"); // default for ODF + OUString sShapeType(u"non-primitive"_ustr); // default for ODF const SdrCustomShapeGeometryItem& rGeometryItem(mrSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); - const Any* pAny = rGeometryItem.GetPropertyValueByName("Type"); + const Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr); if (pAny) *pAny >>= sShapeType; @@ -2174,7 +2174,7 @@ void EnhancedCustomShape2d::CreateSubPath( // Some shapes will need special handling, decide on property 'Type'. OUString sShpType; SdrCustomShapeGeometryItem& rGeometryItem = const_cast<SdrCustomShapeGeometryItem&>(mrSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); - Any* pAny = rGeometryItem.GetPropertyValueByName("Type"); + Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr); if (pAny) *pAny >>= sShpType; // User defined shapes in MS binary format, which contain command U or T after import @@ -2183,8 +2183,8 @@ void EnhancedCustomShape2d::CreateSubPath( // The only own or imported preset shapes with U command are those listed below. // Command T is not used in preset shapes. const std::unordered_set<OUString> aPresetShapesWithU = - { "ellipse", "ring", "smiley", "sun", "forbidden", "flowchart-connector", - "flowchart-summing-junction", "flowchart-or", "cloud-callout"}; + { u"ellipse"_ustr, u"ring"_ustr, u"smiley"_ustr, u"sun"_ustr, u"forbidden"_ustr, u"flowchart-connector"_ustr, + u"flowchart-summing-junction"_ustr, u"flowchart-or"_ustr, u"cloud-callout"_ustr}; std::unordered_set<OUString>::const_iterator aIter = aPresetShapesWithU.find(sShpType); const bool bIsPresetShapeWithU(aIter != aPresetShapesWithU.end()); @@ -2805,7 +2805,7 @@ void EnhancedCustomShape2d::AdaptObjColor( rCustomShapeSet.Get( XATTR_FILLCOLOR ).GetColorValue(), std::min(nColorIndex, nColorCount-1), dBrightness ); - rObj.SetMergedItem( XFillColorItem( "", aFillColor ) ); + rObj.SetMergedItem( XFillColorItem( u""_ustr, aFillColor ) ); } break; } @@ -2828,7 +2828,7 @@ void EnhancedCustomShape2d::AdaptObjColor( aBGradient.SetColorStops(aColorStops); } - rObj.SetMergedItem( XFillGradientItem( "", aBGradient ) ); + rObj.SetMergedItem( XFillGradientItem( u""_ustr, aBGradient ) ); break; } case drawing::FillStyle_HATCH: @@ -2844,7 +2844,7 @@ void EnhancedCustomShape2d::AdaptObjColor( dBrightness )); } - rObj.SetMergedItem( XFillHatchItem( "", aXHatch ) ); + rObj.SetMergedItem( XFillHatchItem( u""_ustr, aXHatch ) ); break; } case drawing::FillStyle_BITMAP: diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index eadc201c7ae6..56dd2a18337a 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -68,7 +68,7 @@ namespace { void GetOrigin( const SdrCustomShapeGeometryItem& rItem, double& rOriginX, double& rOriginY ) { css::drawing::EnhancedCustomShapeParameterPair aOriginParaPair; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Origin" ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Origin"_ustr ); if ( ! ( pAny && ( *pAny >>= aOriginParaPair ) && ( aOriginParaPair.First.Value >>= rOriginX ) && ( aOriginParaPair.Second.Value >>= rOriginY ) ) ) { rOriginX = 0.50; @@ -79,7 +79,7 @@ void GetOrigin( const SdrCustomShapeGeometryItem& rItem, double& rOriginX, doubl void GetRotateAngle( const SdrCustomShapeGeometryItem& rItem, double& rAngleX, double& rAngleY ) { css::drawing::EnhancedCustomShapeParameterPair aRotateAngleParaPair; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "RotateAngle" ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"RotateAngle"_ustr ); if ( ! ( pAny && ( *pAny >>= aRotateAngleParaPair ) && ( aRotateAngleParaPair.First.Value >>= rAngleX ) && ( aRotateAngleParaPair.Second.Value >>= rAngleY ) ) ) { rAngleX = 0.0; @@ -92,7 +92,7 @@ void GetRotateAngle( const SdrCustomShapeGeometryItem& rItem, double& rAngleX, d void GetSkew( const SdrCustomShapeGeometryItem& rItem, double& rSkewAmount, double& rSkewAngle ) { css::drawing::EnhancedCustomShapeParameterPair aSkewParaPair; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Skew" ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Skew"_ustr ); if ( ! ( pAny && ( *pAny >>= aSkewParaPair ) && ( aSkewParaPair.First.Value >>= rSkewAmount ) && ( aSkewParaPair.Second.Value >>= rSkewAngle ) ) ) { rSkewAmount = 50; @@ -108,7 +108,7 @@ void GetExtrusionDepth( const SdrCustomShapeGeometryItem& rItem, const double* p { css::drawing::EnhancedCustomShapeParameterPair aDepthParaPair; double fDepth = 0, fFraction = 0; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "Depth" ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"Depth"_ustr ); if ( pAny && ( *pAny >>= aDepthParaPair ) && ( aDepthParaPair.First.Value >>= fDepth ) && ( aDepthParaPair.Second.Value >>= fFraction ) ) { rForwardDepth = fDepth * fFraction; @@ -130,7 +130,7 @@ void GetExtrusionDepth( const SdrCustomShapeGeometryItem& rItem, const double* p double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, double fDefault ) { double fRetValue = fDefault; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName ); if ( pAny ) *pAny >>= fRetValue; return fRetValue; @@ -139,7 +139,7 @@ double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rProp drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const drawing::ShadeMode eDefault ) { drawing::ShadeMode eRet( eDefault ); - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "ShadeMode" ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, u"ShadeMode"_ustr ); if ( pAny ) { if (!(*pAny >>= eRet)) @@ -157,7 +157,7 @@ drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const bool GetBool( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, const bool bDefault ) { bool bRetValue = bDefault; - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName ); if ( pAny ) *pAny >>= bRetValue; return bRetValue; @@ -167,7 +167,7 @@ drawing::Position3D GetPosition3D( const SdrCustomShapeGeometryItem& rItem, cons const drawing::Position3D& rDefault, const double* pMap ) { drawing::Position3D aRetValue( rDefault ); - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName ); if ( pAny ) *pAny >>= aRetValue; if ( pMap ) @@ -182,7 +182,7 @@ drawing::Position3D GetPosition3D( const SdrCustomShapeGeometryItem& rItem, cons drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, const drawing::Direction3D& rDefault ) { drawing::Direction3D aRetValue( rDefault ); - const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName ); + const Any* pAny = rItem.GetPropertyValueByName( u"Extrusion"_ustr, rPropertyName ); if ( pAny ) *pAny >>= aRetValue; return aRetValue; @@ -191,7 +191,7 @@ drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, co sal_Int16 GetMetalType(const SdrCustomShapeGeometryItem& rItem, const sal_Int16 eDefault) { sal_Int16 aRetValue(eDefault); - const Any* pAny = rItem.GetPropertyValueByName("Extrusion", "MetalType"); + const Any* pAny = rItem.GetPropertyValueByName(u"Extrusion"_ustr, u"MetalType"_ustr); if (pAny) *pAny >>= aRetValue; return aRetValue; @@ -256,7 +256,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( pMap = &fMap; } - if ( GetBool( rGeometryItem, "Extrusion", false ) ) + if ( GetBool( rGeometryItem, u"Extrusion"_ustr, false ) ) { bool bIsMirroredX(rSdrObjCustomShape.IsMirroredX()); bool bIsMirroredY(rSdrObjCustomShape.IsMirroredY()); @@ -340,7 +340,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( fDepth = 1.0; drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL ); - const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" ); + const Any* pAny = rGeometryItem.GetPropertyValueByName( u"Extrusion"_ustr, u"ProjectionMode"_ustr ); if (pAny) { if(!(*pAny >>= eProjectionMode)) @@ -363,7 +363,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( bool bUseTwoFillStyles( false ); drawing::ShadeMode eShadeMode( GetShadeMode( rGeometryItem, drawing::ShadeMode_FLAT ) ); - bool bUseExtrusionColor = GetBool( rGeometryItem, "Color", false ); + bool bUseExtrusionColor = GetBool( rGeometryItem, u"Color"_ustr, false ); drawing::FillStyle eFillStyle( aSet.Get(XATTR_FILLSTYLE).GetValue() ); pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem(static_cast<sal_uInt16>(eShadeMode))); @@ -578,7 +578,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( p3DObj->NbcSetLayer( pShape2d->GetLayer() ); p3DObj->SetMergedItemSet( aLocalSet ); if ( bUseExtrusionColor ) - p3DObj->SetMergedItem( XFillColorItem( "", rSdrObjCustomShape.GetMergedItem( XATTR_SECONDARYFILLCOLOR ).GetColorValue() ) ); + p3DObj->SetMergedItem( XFillColorItem( u""_ustr, rSdrObjCustomShape.GetMergedItem( XATTR_SECONDARYFILLCOLOR ).GetColorValue() ) ); p3DObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) ); p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) ); p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) ); @@ -606,7 +606,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( else if ( aLocalFillStyle == drawing::FillStyle_NONE ) { const XLineColorItem& rLineColor = p3DObj->GetMergedItem( XATTR_LINECOLOR ); - p3DObj->SetMergedItem( XFillColorItem( "", rLineColor.GetColorValue() ) ); + p3DObj->SetMergedItem( XFillColorItem( u""_ustr, rLineColor.GetColorValue() ) ); p3DObj->SetMergedItem( makeSvx3DDoubleSidedItem( true ) ); p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) ); p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) ); @@ -674,7 +674,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( double fXRotate, fYRotate; GetRotateAngle( rGeometryItem, fXRotate, fYRotate ); drawing::Direction3D aRotationCenterDefault( 0, 0, 0 ); - drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, "RotationCenter", aRotationCenterDefault ) ); + drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, u"RotationCenter"_ustr, aRotationCenterDefault ) ); aRotationCenter.DirectionX *= aSnapRect.getOpenWidth(); aRotationCenter.DirectionY *= aSnapRect.getOpenHeight(); if (pMap) @@ -741,7 +741,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // ToDo: These default ViewPoint values are used as default by MS Office. But ODF // default is (3500, -3500, 25000), details in tdf#146192. drawing::Position3D aViewPointDefault( 3472, -3472, 25000 ); - drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, "ViewPoint", aViewPointDefault, pMap ) ); + drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, u"ViewPoint"_ustr, aViewPointDefault, pMap ) ); fViewPointX = aViewPoint.PositionX + fOriginX; fViewPointY = - aViewPoint.PositionY + fOriginY; fViewPointZ = aViewPoint.PositionZ; @@ -818,12 +818,12 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // light and material // "LightFace" has nothing corresponding in 3D rendering engine. - /* bool bLightFace = */ GetBool(rGeometryItem, "LightFace", true); // default in ODF + /* bool bLightFace = */ GetBool(rGeometryItem, u"LightFace"_ustr, true); // default in ODF // Light directions drawing::Direction3D aFirstLightDirectionDefault(50000.0, 0.0, 10000.0); - drawing::Direction3D aFirstLightDirection(GetDirection3D( rGeometryItem, "FirstLightDirection", aFirstLightDirectionDefault)); + drawing::Direction3D aFirstLightDirection(GetDirection3D( rGeometryItem, u"FirstLightDirection"_ustr, aFirstLightDirectionDefault)); if (aFirstLightDirection.DirectionX == 0.0 && aFirstLightDirection.DirectionY == 0.0 && aFirstLightDirection.DirectionZ == 0.0) aFirstLightDirection.DirectionZ = 1.0; @@ -831,7 +831,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( aLight1Vector.normalize(); drawing::Direction3D aSecondLightDirectionDefault(-50000.0, 0.0, 10000.0); - drawing::Direction3D aSecondLightDirection(GetDirection3D( rGeometryItem, "SecondLightDirection", aSecondLightDirectionDefault)); + drawing::Direction3D aSecondLightDirection(GetDirection3D( rGeometryItem, u"SecondLightDirection"_ustr, aSecondLightDirectionDefault)); if (aSecondLightDirection.DirectionX == 0.0 && aSecondLightDirection.DirectionY == 0.0 && aSecondLightDirection.DirectionZ == 0.0) aSecondLightDirection.DirectionZ = 1.0; @@ -855,16 +855,16 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // The 3D-Scene light "3" is currently not used. // ODF default 66%. MS Office default 38000/65536=0.579 is set in import filter. - double fLight1Intensity = GetDouble(rGeometryItem, "FirstLightLevel", 66) / 100.0; + double fLight1Intensity = GetDouble(rGeometryItem, u"FirstLightLevel"_ustr, 66) / 100.0; // ODF and MS Office have both default 'true'. - bool bFirstLightHarsh = GetBool(rGeometryItem, "FirstLightHarsh", true); + bool bFirstLightHarsh = GetBool(rGeometryItem, u"FirstLightHarsh"_ustr, true); // ODF default 66%. MS Office default 38000/65536=0.579 is set in import filter - double fLight2Intensity = GetDouble(rGeometryItem, "SecondLightLevel", 66) / 100.0; + double fLight2Intensity = GetDouble(rGeometryItem, u"SecondLightLevel"_ustr, 66) / 100.0; // ODF has default 'true'. MS Office default 'false' is set in import. - bool bSecondLightHarsh = GetBool(rGeometryItem, "SecondLightHarsh", true); + bool bSecondLightHarsh = GetBool(rGeometryItem, u"SecondLightHarsh"_ustr, true); // ODF default 33%. MS Office default 20000/65536=0.305 is set in import filter. - double fAmbientIntensity = GetDouble(rGeometryItem, "Brightness", 33) / 100.0; + double fAmbientIntensity = GetDouble(rGeometryItem, u"Brightness"_ustr, 33) / 100.0; double fLight1IntensityForSpecular(fLight1Intensity); // remember original value if (!bFirstLightHarsh || !bSecondLightHarsh) // might need softing lights @@ -981,7 +981,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // default 65536 (100%), if the user sets surface 'Metal' in the UI of MS Office. // We will change the material color of the 3D object as ersatz. // ODF data type is percent with default 0%. MSO default is set in import filter. - double fDiffusion = GetDouble(rGeometryItem, "Diffusion", 0.0) / 100.0; + double fDiffusion = GetDouble(rGeometryItem, u"Diffusion"_ustr, 0.0) / 100.0; // ODF standard specifies for value true: "the specular color for the shading of an // extruded shape is gray (red, green and blue values of 200) instead of white and 15% is @@ -991,14 +991,14 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // MS Office uses current material color in case 'Metal' is set. To detect, whether // rendering similar to MS Office has to be used the property 'MetalType' is used. It is // set on import and in the extrusion bar. - bool bMetal = GetBool(rGeometryItem, "Metal", false); + bool bMetal = GetBool(rGeometryItem, u"Metal"_ustr, false); sal_Int16 eMetalType( GetMetalType(rGeometryItem, drawing::EnhancedCustomShapeMetalType::MetalODF)); bool bMetalMSCompatible = eMetalType == drawing::EnhancedCustomShapeMetalType::MetalMSCompatible; // Property "Specularity" corresponds to 3D object style attribute dr3d:specular-color. - double fSpecularity = GetDouble(rGeometryItem, "Specularity", 0) / 100.0; + double fSpecularity = GetDouble(rGeometryItem, u"Specularity"_ustr, 0) / 100.0; if (bMetal && !bMetalMSCompatible) { @@ -1013,7 +1013,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( // Shininess ODF default 50 (unit %). MS Office default 5, import filter makes *10. // Shininess corresponds to "Specular Intensity" with the nonlinear relationship // "Specular Intensity" = 2^c3DShininess = 2^("Shininess" / 10) - double fShininess = GetDouble(rGeometryItem, "Shininess", 50) / 10.0; + double fShininess = GetDouble(rGeometryItem, u"Shininess"_ustr, 50) / 10.0; fShininess = std::clamp<double>(pow(2, fShininess), 0.0, 100.0); sal_uInt16 nIntensity = static_cast<sal_uInt16>(basegfx::fround(fShininess)); if (bMetal && !bMetalMSCompatible) @@ -1046,7 +1046,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( = static_cast<sal_uInt16>(static_cast<double>(nBrightness) * fDiffusion); nBrightness = std::clamp<sal_uInt16>(nBrightness, 0, 100); Color aNewMatColor = Color::HSBtoRGB(nHue, nSaturation, nBrightness); - pNext->GetProperties().SetObjectItem(XFillColorItem("", aNewMatColor)); + pNext->GetProperties().SetObjectItem(XFillColorItem(u""_ustr, aNewMatColor)); } // Using material color instead of gray in case of MS Office compatible rendering. diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 1d554bdfa8db..13155cb681d4 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -126,7 +126,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg // XServiceInfo OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName() { - return "com.sun.star.drawing.EnhancedCustomShapeEngine"; + return u"com.sun.star.drawing.EnhancedCustomShapeEngine"_ustr; } sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName ) { @@ -134,7 +134,7 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS } Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() { - return { "com.sun.star.drawing.CustomShapeEngine" }; + return { u"com.sun.star.drawing.CustomShapeEngine"_ustr }; } // XCustomShapeEngine @@ -260,7 +260,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() // retrieving the TextPath property to check if feature is enabled const SdrCustomShapeGeometryItem& rGeometryItem(pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); bool bTextPathOn = false; - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "TextPath" ); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"TextPath"_ustr ); if ( pAny ) *pAny >>= bTextPathOn; diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 75833dcdd914..61029942e7c1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -103,7 +103,7 @@ static bool InitializeFontWorkData( nTextAreaCount >>= 1; const SdrCustomShapeGeometryItem& rGeometryItem( rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "ScaleX" ); + const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"ScaleX"_ustr ); if (pAny) *pAny >>= rFWData.bScaleX; else @@ -517,7 +517,7 @@ static bool GetFontWorkOutline( bool bSameLetterHeights = false; const SdrCustomShapeGeometryItem& rGeometryItem(rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); - const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "SameLetterHeights" ); + const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"SameLetterHeights"_ustr ); if ( pAny ) *pAny >>= bSameLetterHeights; diff --git a/svx/source/diagram/IDiagramHelper.cxx b/svx/source/diagram/IDiagramHelper.cxx index 3ea16b055060..d2ce6c4f6a31 100644 --- a/svx/source/diagram/IDiagramHelper.cxx +++ b/svx/source/diagram/IDiagramHelper.cxx @@ -352,7 +352,7 @@ void DiagramFrameHdl::clicked(const Point& /*rPnt*/) // and only then take action. That would require // to evaluate & keep that (maybe during creation). // For now, just trigger to open the Dialog - comphelper::dispatchCommand(".uno:EditDiagram", {}); + comphelper::dispatchCommand(u".uno:EditDiagram"_ustr, {}); } void DiagramFrameHdl::CreateB2dIAObject() diff --git a/svx/source/dialog/ClassificationCommon.cxx b/svx/source/dialog/ClassificationCommon.cxx index 885dff644e9b..decf901b7d51 100644 --- a/svx/source/dialog/ClassificationCommon.cxx +++ b/svx/source/dialog/ClassificationCommon.cxx @@ -116,8 +116,8 @@ void insertCreationOrigin(uno::Reference<beans::XPropertyContainer> const& rxPro return; OUString sValue = (eOrigin == sfx::ClassificationCreationOrigin::BAF_POLICY) - ? OUString("BAF_POLICY") - : OUString("MANUAL"); + ? u"BAF_POLICY"_ustr + : u"MANUAL"_ustr; addOrInsertDocumentProperty(rxPropertyContainer, rKeyCreator.makeCreationOriginKey(), sValue); } } // end svx::classification namespace diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx index 53620a125f3f..e3d06b1bdbc1 100644 --- a/svx/source/dialog/ClassificationDialog.cxx +++ b/svx/source/dialog/ClassificationDialog.cxx @@ -74,7 +74,7 @@ constexpr OUString constRecentlyUsedFileName(u"recentlyUsed.xml"_ustr); OUString lcl_getClassificationUserPath() { - OUString sPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/classification/"); + OUString sPath(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/classification/"_ustr); rtl::Bootstrap::expandMacros(sPath); return sPath; } @@ -118,15 +118,15 @@ OUString classificationTypeToString(svx::ClassificationType const & reType) switch(reType) { case svx::ClassificationType::CATEGORY: - return "CATEGORY"; break; + return u"CATEGORY"_ustr; break; case svx::ClassificationType::MARKING: - return "MARKING"; break; + return u"MARKING"_ustr; break; case svx::ClassificationType::TEXT: - return "TEXT"; break; + return u"TEXT"_ustr; break; case svx::ClassificationType::INTELLECTUAL_PROPERTY_PART: - return "INTELLECTUAL_PROPERTY_PART"; break; + return u"INTELLECTUAL_PROPERTY_PART"_ustr; break; case svx::ClassificationType::PARAGRAPH: - return "PARAGRAPH"; break; + return u"PARAGRAPH"_ustr; break; } return OUString(); } @@ -156,27 +156,27 @@ void writeResultToXml(tools::XmlWriter & rXmlWriter, ClassificationDialog::ClassificationDialog(weld::Window* pParent, const css::uno::Reference<css::document::XDocumentProperties>& rDocProps, const bool bPerParagraph, std::function<void()> aParagraphSignHandler) - : GenericDialogController(pParent, "svx/ui/classificationdialog.ui", "AdvancedDocumentClassificationDialog") + : GenericDialogController(pParent, u"svx/ui/classificationdialog.ui"_ustr, u"AdvancedDocumentClassificationDialog"_ustr) , maHelper(rDocProps) , maInternationalHelper(rDocProps, /*bUseLocalizedPolicy*/ false) , m_bPerParagraph(bPerParagraph) , m_aParagraphSignHandler(std::move(aParagraphSignHandler)) , m_nCurrentSelectedCategory(-1) - , m_xOkButton(m_xBuilder->weld_button("ok")) - , m_xSignButton(m_xBuilder->weld_button("signButton")) - , m_xToolBox(m_xBuilder->weld_toggle_button("toolbox")) - , m_xRecentlyUsedListBox(m_xBuilder->weld_combo_box("recentlyUsedCB")) - , m_xClassificationListBox(m_xBuilder->weld_combo_box("classificationCB")) - , m_xInternationalClassificationListBox(m_xBuilder->weld_combo_box("internationalClassificationCB")) - , m_xMarkingLabel(m_xBuilder->weld_label("markingLabel")) - , m_xMarkingListBox(m_xBuilder->weld_tree_view("markingLB")) - , m_xIntellectualPropertyPartListBox(m_xBuilder->weld_tree_view("intellectualPropertyPartLB")) - , m_xIntellectualPropertyPartNumberListBox(m_xBuilder->weld_tree_view("intellectualPropertyPartNumberLB")) - , m_xIntellectualPropertyPartAddButton(m_xBuilder->weld_button("intellectualPropertyPartAddButton")) - , m_xIntellectualPropertyPartEdit(m_xBuilder->weld_entry("intellectualPropertyPartEntry")) - , m_xIntellectualPropertyExpander(m_xBuilder->weld_expander("intellectualPropertyExpander")) + , m_xOkButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xSignButton(m_xBuilder->weld_button(u"signButton"_ustr)) + , m_xToolBox(m_xBuilder->weld_toggle_button(u"toolbox"_ustr)) + , m_xRecentlyUsedListBox(m_xBuilder->weld_combo_box(u"recentlyUsedCB"_ustr)) + , m_xClassificationListBox(m_xBuilder->weld_combo_box(u"classificationCB"_ustr)) + , m_xInternationalClassificationListBox(m_xBuilder->weld_combo_box(u"internationalClassificationCB"_ustr)) + , m_xMarkingLabel(m_xBuilder->weld_label(u"markingLabel"_ustr)) + , m_xMarkingListBox(m_xBuilder->weld_tree_view(u"markingLB"_ustr)) + , m_xIntellectualPropertyPartListBox(m_xBuilder->weld_tree_view(u"intellectualPropertyPartLB"_ustr)) + , m_xIntellectualPropertyPartNumberListBox(m_xBuilder->weld_tree_view(u"intellectualPropertyPartNumberLB"_ustr)) + , m_xIntellectualPropertyPartAddButton(m_xBuilder->weld_button(u"intellectualPropertyPartAddButton"_ustr)) + , m_xIntellectualPropertyPartEdit(m_xBuilder->weld_entry(u"intellectualPropertyPartEntry"_ustr)) + , m_xIntellectualPropertyExpander(m_xBuilder->weld_expander(u"intellectualPropertyExpander"_ustr)) , m_xEditWindow(new ClassificationEditView) - , m_xEditWindowWeld(new weld::CustomWeld(*m_xBuilder, "classificationEditWindow", *m_xEditWindow)) + , m_xEditWindowWeld(new weld::CustomWeld(*m_xBuilder, u"classificationEditWindow"_ustr, *m_xEditWindow)) { m_xOkButton->connect_clicked(LINK(this, ClassificationDialog, OkHdl)); m_xSignButton->connect_clicked(LINK(this, ClassificationDialog, ButtonClicked)); @@ -535,7 +535,7 @@ std::vector<ClassificationResult> ClassificationDialog::getResult() eFontWeight = WEIGHT_BOLD; } // Font weight to string - OUString sWeightProperty = "NORMAL"; + OUString sWeightProperty = u"NORMAL"_ustr; if (eFontWeight == WEIGHT_BOLD) sWeightProperty = "BOLD"; // Insert into collection diff --git a/svx/source/dialog/FileExportedDialog.cxx b/svx/source/dialog/FileExportedDialog.cxx index 787e0a20d312..b38ed3ae11b8 100644 --- a/svx/source/dialog/FileExportedDialog.cxx +++ b/svx/source/dialog/FileExportedDialog.cxx @@ -17,9 +17,10 @@ #include <com/sun/star/system/SystemShellExecute.hpp> FileExportedDialog::FileExportedDialog(weld::Window* pParent, OUString atitle) - : GenericDialogController(pParent, "svx/ui/fileexporteddialog.ui", "FileExportedDialog") - , m_xFileLabel(m_xBuilder->weld_label("Filelabel")) - , m_xButton(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"svx/ui/fileexporteddialog.ui"_ustr, + u"FileExportedDialog"_ustr) + , m_xFileLabel(m_xBuilder->weld_label(u"Filelabel"_ustr)) + , m_xButton(m_xBuilder->weld_button(u"ok"_ustr)) { m_xFileLabel->set_label(atitle); m_xButton->connect_clicked(LINK(this, FileExportedDialog, OpenHdl)); diff --git a/svx/source/dialog/GenericCheckDialog.cxx b/svx/source/dialog/GenericCheckDialog.cxx index 09fc3d678769..92c7e6b27c55 100644 --- a/svx/source/dialog/GenericCheckDialog.cxx +++ b/svx/source/dialog/GenericCheckDialog.cxx @@ -15,11 +15,11 @@ namespace svx { GenericCheckEntry::GenericCheckEntry(weld::Container* pParent, std::unique_ptr<CheckData>& pCheckData) - : m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/genericcheckentry.ui")) - , m_xContainer(m_xBuilder->weld_container("checkEntryBox")) - , m_xLabel(m_xBuilder->weld_label("label")) - , m_xMarkButton(m_xBuilder->weld_button("markButton")) - , m_xPropertiesButton(m_xBuilder->weld_button("propertiesButton")) + : m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/genericcheckentry.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"checkEntryBox"_ustr)) + , m_xLabel(m_xBuilder->weld_label(u"label"_ustr)) + , m_xMarkButton(m_xBuilder->weld_button(u"markButton"_ustr)) + , m_xPropertiesButton(m_xBuilder->weld_button(u"propertiesButton"_ustr)) , m_pCheckData(pCheckData) { m_xLabel->set_label(m_pCheckData->getText()); @@ -43,9 +43,10 @@ IMPL_LINK_NOARG(GenericCheckEntry, PropertiesButtonClicked, weld::Button&, void) GenericCheckDialog::GenericCheckDialog(weld::Window* pParent, CheckDataCollection& rCheckDataCollection) - : GenericDialogController(pParent, "svx/ui/genericcheckdialog.ui", "GenericCheckDialog") + : GenericDialogController(pParent, u"svx/ui/genericcheckdialog.ui"_ustr, + u"GenericCheckDialog"_ustr) , m_rCheckDataCollection(rCheckDataCollection) - , m_xCheckBox(m_xBuilder->weld_box("checkBox")) + , m_xCheckBox(m_xBuilder->weld_box(u"checkBox"_ustr)) { set_title(m_rCheckDataCollection.getTitle()); } diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 5aaa30e437cf..6a144db7faac 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -27,30 +27,30 @@ using namespace css; SafeModeDialog::SafeModeDialog(weld::Window* pParent) - : GenericDialogController(pParent, "svx/ui/safemodedialog.ui", "SafeModeDialog") - , mxBtnContinue(m_xBuilder->weld_button("btn_continue")) - , mxBtnRestart(m_xBuilder->weld_button("btn_restart")) - , mxBtnApply(m_xBuilder->weld_button("btn_apply")) - , mxBoxRestore(m_xBuilder->weld_container("group_restore")) - , mxBoxConfigure(m_xBuilder->weld_container("group_configure")) - , mxBoxDeinstall(m_xBuilder->weld_container("group_deinstall")) - , mxBoxReset(m_xBuilder->weld_container("group_reset")) - , mxRadioRestore(m_xBuilder->weld_radio_button("radio_restore")) - , mxRadioConfigure(m_xBuilder->weld_radio_button("radio_configure")) - , mxRadioExtensions(m_xBuilder->weld_radio_button("radio_extensions")) - , mxRadioReset(m_xBuilder->weld_radio_button("radio_reset")) - , mxCBCheckProfilesafeConfig(m_xBuilder->weld_check_button("check_profilesafe_config")) - , mxCBCheckProfilesafeExtensions(m_xBuilder->weld_check_button("check_profilesafe_extensions")) - , mxCBDisableAllExtensions(m_xBuilder->weld_check_button("check_disable_all_extensions")) - , mxCBDeinstallUserExtensions(m_xBuilder->weld_check_button("check_deinstall_user_extensions")) - , mxCBResetSharedExtensions(m_xBuilder->weld_check_button("check_reset_shared_extensions")) - , mxCBResetBundledExtensions(m_xBuilder->weld_check_button("check_reset_bundled_extensions")) - , mxCBDisableHWAcceleration(m_xBuilder->weld_check_button("check_disable_hw_acceleration")) - , mxCBResetCustomizations(m_xBuilder->weld_check_button("check_reset_customizations")) - , mxCBResetWholeUserProfile(m_xBuilder->weld_check_button("check_reset_whole_userprofile")) - , mxBugLink(m_xBuilder->weld_link_button("linkbutton_bugs")) - , mxUserProfileLink(m_xBuilder->weld_link_button("linkbutton_profile")) - , mxBtnCreateZip(m_xBuilder->weld_button("btn_create_zip")) + : GenericDialogController(pParent, u"svx/ui/safemodedialog.ui"_ustr, u"SafeModeDialog"_ustr) + , mxBtnContinue(m_xBuilder->weld_button(u"btn_continue"_ustr)) + , mxBtnRestart(m_xBuilder->weld_button(u"btn_restart"_ustr)) + , mxBtnApply(m_xBuilder->weld_button(u"btn_apply"_ustr)) + , mxBoxRestore(m_xBuilder->weld_container(u"group_restore"_ustr)) + , mxBoxConfigure(m_xBuilder->weld_container(u"group_configure"_ustr)) + , mxBoxDeinstall(m_xBuilder->weld_container(u"group_deinstall"_ustr)) + , mxBoxReset(m_xBuilder->weld_container(u"group_reset"_ustr)) + , mxRadioRestore(m_xBuilder->weld_radio_button(u"radio_restore"_ustr)) + , mxRadioConfigure(m_xBuilder->weld_radio_button(u"radio_configure"_ustr)) + , mxRadioExtensions(m_xBuilder->weld_radio_button(u"radio_extensions"_ustr)) + , mxRadioReset(m_xBuilder->weld_radio_button(u"radio_reset"_ustr)) + , mxCBCheckProfilesafeConfig(m_xBuilder->weld_check_button(u"check_profilesafe_config"_ustr)) + , mxCBCheckProfilesafeExtensions(m_xBuilder->weld_check_button(u"check_profilesafe_extensions"_ustr)) + , mxCBDisableAllExtensions(m_xBuilder->weld_check_button(u"check_disable_all_extensions"_ustr)) + , mxCBDeinstallUserExtensions(m_xBuilder->weld_check_button(u"check_deinstall_user_extensions"_ustr)) + , mxCBResetSharedExtensions(m_xBuilder->weld_check_button(u"check_reset_shared_extensions"_ustr)) + , mxCBResetBundledExtensions(m_xBuilder->weld_check_button(u"check_reset_bundled_extensions"_ustr)) + , mxCBDisableHWAcceleration(m_xBuilder->weld_check_button(u"check_disable_hw_acceleration"_ustr)) + , mxCBResetCustomizations(m_xBuilder->weld_check_button(u"check_reset_customizations"_ustr)) + , mxCBResetWholeUserProfile(m_xBuilder->weld_check_button(u"check_reset_whole_userprofile"_ustr)) + , mxBugLink(m_xBuilder->weld_link_button(u"linkbutton_bugs"_ustr)) + , mxUserProfileLink(m_xBuilder->weld_link_button(u"linkbutton_profile"_ustr)) + , mxBtnCreateZip(m_xBuilder->weld_button(u"btn_create_zip"_ustr)) { m_xDialog->set_centered_on_parent(false); mxRadioRestore->connect_toggled(LINK(this, SafeModeDialog, RadioBtnHdl)); diff --git a/svx/source/dialog/SafeModeUI.cxx b/svx/source/dialog/SafeModeUI.cxx index 4e32669f0278..e1bf55370ee3 100644 --- a/svx/source/dialog/SafeModeUI.cxx +++ b/svx/source/dialog/SafeModeUI.cxx @@ -43,7 +43,7 @@ SafeModeUI::SafeModeUI() OUString SAL_CALL SafeModeUI::getImplementationName() { - return "com.sun.star.comp.svx.SafeModeUI"; + return u"com.sun.star.comp.svx.SafeModeUI"_ustr; } sal_Bool SAL_CALL SafeModeUI::supportsService(const OUString& sServiceName) @@ -53,7 +53,7 @@ sal_Bool SAL_CALL SafeModeUI::supportsService(const OUString& sServiceName) css::uno::Sequence< OUString > SAL_CALL SafeModeUI::getSupportedServiceNames() { - return { "com.sun.star.dialog.SafeModeUI" }; + return { u"com.sun.star.dialog.SafeModeUI"_ustr }; } css::uno::Any SAL_CALL SafeModeUI::dispatchWithReturnValue(const css::util::URL&, diff --git a/svx/source/dialog/ThemeColorEditDialog.cxx b/svx/source/dialog/ThemeColorEditDialog.cxx index eb3bb5dcd9f4..9ec24b8fa43d 100644 --- a/svx/source/dialog/ThemeColorEditDialog.cxx +++ b/svx/source/dialog/ThemeColorEditDialog.cxx @@ -13,33 +13,35 @@ namespace svx { ThemeColorEditDialog::ThemeColorEditDialog(weld::Window* pParent, model::ColorSet& rColorSet) - : GenericDialogController(pParent, "svx/ui/themecoloreditdialog.ui", "ThemeColorEditDialog") + : GenericDialogController(pParent, u"svx/ui/themecoloreditdialog.ui"_ustr, + u"ThemeColorEditDialog"_ustr) , maColorSet(rColorSet) - , mxThemeColorsNameEntry(m_xBuilder->weld_entry("entryThemeColorsName")) - , mxDark1(new ColorListBox(m_xBuilder->weld_menu_button("buttonDark1"), + , mxThemeColorsNameEntry(m_xBuilder->weld_entry(u"entryThemeColorsName"_ustr)) + , mxDark1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonDark1"_ustr), [pParent] { return pParent; })) - , mxLight1(new ColorListBox(m_xBuilder->weld_menu_button("buttonLight1"), + , mxLight1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonLight1"_ustr), [pParent] { return pParent; })) - , mxDark2(new ColorListBox(m_xBuilder->weld_menu_button("buttonDark2"), + , mxDark2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonDark2"_ustr), [pParent] { return pParent; })) - , mxLight2(new ColorListBox(m_xBuilder->weld_menu_button("buttonLight2"), + , mxLight2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonLight2"_ustr), [pParent] { return pParent; })) - , mxAccent1(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent1"), + , mxAccent1(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent1"_ustr), [pParent] { return pParent; })) - , mxAccent2(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent2"), + , mxAccent2(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent2"_ustr), [pParent] { return pParent; })) - , mxAccent3(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent3"), + , mxAccent3(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent3"_ustr), [pParent] { return pParent; })) - , mxAccent4(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent4"), + , mxAccent4(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent4"_ustr), [pParent] { return pParent; })) - , mxAccent5(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent5"), + , mxAccent5(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent5"_ustr), [pParent] { return pParent; })) - , mxAccent6(new ColorListBox(m_xBuilder->weld_menu_button("buttonAccent6"), + , mxAccent6(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonAccent6"_ustr), [pParent] { return pParent; })) - , mxHyperlink(new ColorListBox(m_xBuilder->weld_menu_button("buttonHyperlink"), + , mxHyperlink(new ColorListBox(m_xBuilder->weld_menu_button(u"buttonHyperlink"_ustr), [pParent] { return pParent; })) - , mxFollowHyperlink(new ColorListBox(m_xBuilder->weld_menu_button("buttonFollowHyperlink"), - [pParent] { return pParent; })) + , mxFollowHyperlink( + new ColorListBox(m_xBuilder->weld_menu_button(u"buttonFollowHyperlink"_ustr), + [pParent] { return pParent; })) { mxThemeColorsNameEntry->set_text(rColorSet.getName()); mxDark1->SelectEntry(rColorSet.getColor(model::ThemeColorType::Dark1)); diff --git a/svx/source/dialog/ThemeDialog.cxx b/svx/source/dialog/ThemeDialog.cxx index 88ce467834ae..d20ce3be360b 100644 --- a/svx/source/dialog/ThemeDialog.cxx +++ b/svx/source/dialog/ThemeDialog.cxx @@ -17,13 +17,13 @@ namespace svx { ThemeDialog::ThemeDialog(weld::Window* pParent, model::Theme* pTheme) - : GenericDialogController(pParent, "svx/ui/themedialog.ui", "ThemeDialog") + : GenericDialogController(pParent, u"svx/ui/themedialog.ui"_ustr, u"ThemeDialog"_ustr) , mpWindow(pParent) , mpTheme(pTheme) , mxValueSetThemeColors(new svx::ThemeColorValueSet) , mxValueSetThemeColorsWindow( - new weld::CustomWeld(*m_xBuilder, "valueset_theme_colors", *mxValueSetThemeColors)) - , mxAdd(m_xBuilder->weld_button("button_add")) + new weld::CustomWeld(*m_xBuilder, u"valueset_theme_colors"_ustr, *mxValueSetThemeColors)) + , mxAdd(m_xBuilder->weld_button(u"button_add"_ustr)) { mxValueSetThemeColors->SetColCount(3); mxValueSetThemeColors->SetLineCount(4); diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 1385aea0c974..97ccaac469a0 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -227,8 +227,8 @@ IMPL_LINK( MaskData, CbxHdl, weld::Toggleable&, rCbx, void ) pSet->SelectItem( 1 ); pSet->Select(); - pMask->m_xTbxPipette->set_item_active("pipette", true); - PipetteHdl("pipette"); + pMask->m_xTbxPipette->set_item_active(u"pipette"_ustr, true); + PipetteHdl(u"pipette"_ustr); } IMPL_LINK( MaskData, CbxTransHdl, weld::Toggleable&, rCbx, void ) @@ -346,34 +346,34 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n } SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent) - : SfxDockingWindow(pBindinx, pCW, pParent, "DockingColorReplace", - "svx/ui/dockingcolorreplace.ui") - , m_xTbxPipette(m_xBuilder->weld_toolbar("toolbar")) + : SfxDockingWindow(pBindinx, pCW, pParent, u"DockingColorReplace"_ustr, + u"svx/ui/dockingcolorreplace.ui"_ustr) + , m_xTbxPipette(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) , m_xCtlPipette(new BmpColorWindow) - , m_xCtlPipetteWin(new weld::CustomWeld(*m_xBuilder, "toolcolor", *m_xCtlPipette)) - , m_xBtnExec(m_xBuilder->weld_button("replace")) - , m_xCbx1(m_xBuilder->weld_check_button("cbx1")) + , m_xCtlPipetteWin(new weld::CustomWeld(*m_xBuilder, u"toolcolor"_ustr, *m_xCtlPipette)) + , m_xBtnExec(m_xBuilder->weld_button(u"replace"_ustr)) + , m_xCbx1(m_xBuilder->weld_check_button(u"cbx1"_ustr)) , m_xQSet1(new MaskSet(this)) - , m_xQSetWin1(new weld::CustomWeld(*m_xBuilder, "qset1", *m_xQSet1)) - , m_xSp1(m_xBuilder->weld_metric_spin_button("tol1", FieldUnit::PERCENT)) - , m_xLbColor1(new ColorListBox(m_xBuilder->weld_menu_button("color1"), [this]{ return GetFrameWeld(); })) - , m_xCbx2(m_xBuilder->weld_check_button("cbx2")) + , m_xQSetWin1(new weld::CustomWeld(*m_xBuilder, u"qset1"_ustr, *m_xQSet1)) + , m_xSp1(m_xBuilder->weld_metric_spin_button(u"tol1"_ustr, FieldUnit::PERCENT)) + , m_xLbColor1(new ColorListBox(m_xBuilder->weld_menu_button(u"color1"_ustr), [this]{ return GetFrameWeld(); })) + , m_xCbx2(m_xBuilder->weld_check_button(u"cbx2"_ustr)) , m_xQSet2(new MaskSet(this)) - , m_xQSetWin2(new weld::CustomWeld(*m_xBuilder, "qset2", *m_xQSet2)) - , m_xSp2(m_xBuilder->weld_metric_spin_button("tol2", FieldUnit::PERCENT)) - , m_xLbColor2(new ColorListBox(m_xBuilder->weld_menu_button("color2"), [this]{ return GetFrameWeld(); })) - , m_xCbx3(m_xBuilder->weld_check_button("cbx3")) + , m_xQSetWin2(new weld::CustomWeld(*m_xBuilder, u"qset2"_ustr, *m_xQSet2)) + , m_xSp2(m_xBuilder->weld_metric_spin_button(u"tol2"_ustr, FieldUnit::PERCENT)) + , m_xLbColor2(new ColorListBox(m_xBuilder->weld_menu_button(u"color2"_ustr), [this]{ return GetFrameWeld(); })) + , m_xCbx3(m_xBuilder->weld_check_button(u"cbx3"_ustr)) , m_xQSet3(new MaskSet(this)) - , m_xQSetWin3(new weld::CustomWeld(*m_xBuilder, "qset3", *m_xQSet3)) - , m_xSp3(m_xBuilder->weld_metric_spin_button("tol3", FieldUnit::PERCENT)) - , m_xLbColor3(new ColorListBox(m_xBuilder->weld_menu_button("color3"), [this]{ return GetFrameWeld(); })) - , m_xCbx4(m_xBuilder->weld_check_button("cbx4")) + , m_xQSetWin3(new weld::CustomWeld(*m_xBuilder, u"qset3"_ustr, *m_xQSet3)) + , m_xSp3(m_xBuilder->weld_metric_spin_button(u"tol3"_ustr, FieldUnit::PERCENT)) + , m_xLbColor3(new ColorListBox(m_xBuilder->weld_menu_button(u"color3"_ustr), [this]{ return GetFrameWeld(); })) + , m_xCbx4(m_xBuilder->weld_check_button(u"cbx4"_ustr)) , m_xQSet4(new MaskSet(this)) - , m_xQSetWin4(new weld::CustomWeld(*m_xBuilder, "qset4", *m_xQSet4)) - , m_xSp4(m_xBuilder->weld_metric_spin_button("tol4", FieldUnit::PERCENT)) - , m_xLbColor4(new ColorListBox(m_xBuilder->weld_menu_button("color4"), [this]{ return GetFrameWeld(); })) - , m_xCbxTrans(m_xBuilder->weld_check_button("cbx5")) - , m_xLbColorTrans(new ColorListBox(m_xBuilder->weld_menu_button("color5"), [this]{ return GetFrameWeld(); })) + , m_xQSetWin4(new weld::CustomWeld(*m_xBuilder, u"qset4"_ustr, *m_xQSet4)) + , m_xSp4(m_xBuilder->weld_metric_spin_button(u"tol4"_ustr, FieldUnit::PERCENT)) + , m_xLbColor4(new ColorListBox(m_xBuilder->weld_menu_button(u"color4"_ustr), [this]{ return GetFrameWeld(); })) + , m_xCbxTrans(m_xBuilder->weld_check_button(u"cbx5"_ustr)) + , m_xLbColorTrans(new ColorListBox(m_xBuilder->weld_menu_button(u"color5"_ustr), [this]{ return GetFrameWeld(); })) , m_xData(new MaskData(this, *pBindinx)) , aPipetteColor(COL_WHITE) , aSelItem(*this, *pBindinx) @@ -546,8 +546,8 @@ void SvxBmpMask::PipetteClicked() m_xQSet4->SetFormat(); } - m_xTbxPipette->set_item_active("pipette", false); - m_xData->PipetteHdl("pipette"); + m_xTbxPipette->set_item_active(u"pipette"_ustr, false); + m_xData->PipetteHdl(u"pipette"_ustr); } void SvxBmpMask::SetExecState( bool bEnable ) @@ -1030,7 +1030,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic ) bool SvxBmpMask::IsEyedropping() const { - return m_xTbxPipette->get_item_active("pipette"); + return m_xTbxPipette->get_item_active(u"pipette"_ustr); } /** Set an accessible name for the source color check boxes. Without this diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 117d6e7849c1..71ba72b032f0 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -67,7 +67,7 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow(vcl::Window* _pParent, sal_uI SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW, weld::Window* _pParent) - : SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/floatingcontour.ui", "FloatingContour") + : SfxModelessDialogController(_pBindings, pCW, _pParent, u"svx/ui/floatingcontour.ui"_ustr, u"FloatingContour"_ustr) , m_xImpl(std::make_unique<SvxSuperContourDlg>(*m_xBuilder, *m_xDialog, _pBindings)) { } @@ -204,13 +204,13 @@ SvxSuperContourDlg::SvxSuperContourDlg(weld::Builder& rBuilder, , m_rDialog(rDialog) , m_xContourWnd(new ContourWindow(&rDialog)) , m_xStbStatusColor(new StatusColor(*m_xContourWnd)) - , m_xTbx1(rBuilder.weld_toolbar("toolbar")) - , m_xMtfTolerance(rBuilder.weld_metric_spin_button("spinbutton", FieldUnit::PERCENT)) - , m_xStbStatus2(rBuilder.weld_label("statuspos")) - , m_xStbStatus3(rBuilder.weld_label("statussize")) - , m_xCancelBtn(rBuilder.weld_button("cancel")) - , m_xStbStatusColorWeld(new weld::CustomWeld(rBuilder, "statuscolor", *m_xStbStatusColor)) - , m_xContourWndWeld(new weld::CustomWeld(rBuilder, "container", *m_xContourWnd)) + , m_xTbx1(rBuilder.weld_toolbar(u"toolbar"_ustr)) + , m_xMtfTolerance(rBuilder.weld_metric_spin_button(u"spinbutton"_ustr, FieldUnit::PERCENT)) + , m_xStbStatus2(rBuilder.weld_label(u"statuspos"_ustr)) + , m_xStbStatus3(rBuilder.weld_label(u"statussize"_ustr)) + , m_xCancelBtn(rBuilder.weld_button(u"cancel"_ustr)) + , m_xStbStatusColorWeld(new weld::CustomWeld(rBuilder, u"statuscolor"_ustr, *m_xStbStatusColor)) + , m_xContourWndWeld(new weld::CustomWeld(rBuilder, u"container"_ustr, *m_xContourWnd)) { m_xCancelBtn->connect_clicked(LINK(this, SvxSuperContourDlg, CancelHdl)); @@ -241,10 +241,10 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CancelHdl, weld::Button&, void) { bool bRet = true; - if (m_xTbx1->get_item_sensitive("TBI_APPLY")) + if (m_xTbx1->get_item_sensitive(u"TBI_APPLY"_ustr)) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querysavecontchangesdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveContourChangesDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querysavecontchangesdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveContourChangesDialog"_ustr)); const short nRet = xQBox->run(); if ( nRet == RET_YES ) @@ -361,15 +361,15 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void) } else if (rId == "TBI_WORKPLACE") { - if (m_xTbx1->get_item_active("TBI_WORKPLACE")) + if (m_xTbx1->get_item_active(u"TBI_WORKPLACE"_ustr)) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querydeletecontourdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryDeleteContourDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querydeletecontourdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryDeleteContourDialog"_ustr)); if (!m_xContourWnd->IsContourChanged() || (xQBox->run() == RET_YES)) m_xContourWnd->SetWorkplaceMode( true ); else - m_xTbx1->set_item_active("TBI_WORKPLACE", false); + m_xTbx1->set_item_active(u"TBI_WORKPLACE"_ustr, false); } else m_xContourWnd->SetWorkplaceMode( false ); @@ -396,7 +396,7 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void) } else if (rId == "TBI_POLYEDIT") { - m_xContourWnd->SetPolyEditMode(m_xTbx1->get_item_active("TBI_POLYEDIT") ? SID_BEZIER_MOVE : 0); + m_xContourWnd->SetPolyEditMode(m_xTbx1->get_item_active(u"TBI_POLYEDIT"_ustr) ? SID_BEZIER_MOVE : 0); } else if (rId == "TBI_POLYMOVE") { @@ -434,19 +434,19 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void) } else if (rId == "TBI_PIPETTE") { - bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE"); + bool bPipette = m_xTbx1->get_item_active(u"TBI_PIPETTE"_ustr); if ( !bPipette ) m_xStbStatusColor->Invalidate(); else if ( bGraphicLinked ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/queryunlinkgraphicsdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryUnlinkGraphicsDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/queryunlinkgraphicsdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryUnlinkGraphicsDialog"_ustr)); if (xQBox->run() != RET_YES) { bPipette = false; - m_xTbx1->set_item_active("TBI_PIPETTE", bPipette); + m_xTbx1->set_item_active(u"TBI_PIPETTE"_ustr, bPipette); m_xStbStatusColor->Invalidate(); } } @@ -458,16 +458,16 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void) void SvxSuperContourDlg::SetActiveTool(std::u16string_view rId) { - m_xTbx1->set_item_active("TBI_SELECT", rId == u"TBI_SELECT"); - m_xTbx1->set_item_active("TBI_RECT", rId == u"TBI_RECT"); - m_xTbx1->set_item_active("TBI_CIRCLE", rId == u"TBI_CIRCLE"); - m_xTbx1->set_item_active("TBI_POLY", rId == u"TBI_POLY"); + m_xTbx1->set_item_active(u"TBI_SELECT"_ustr, rId == u"TBI_SELECT"); + m_xTbx1->set_item_active(u"TBI_RECT"_ustr, rId == u"TBI_RECT"); + m_xTbx1->set_item_active(u"TBI_CIRCLE"_ustr, rId == u"TBI_CIRCLE"); + m_xTbx1->set_item_active(u"TBI_POLY"_ustr, rId == u"TBI_POLY"); } void SvxSuperContourDlg::SetActivePoly(std::u16string_view rId) { - m_xTbx1->set_item_active("TBI_POLYMOVE", rId == u"TBI_POLYMOVE"); - m_xTbx1->set_item_active("TBI_POLYINSERT", rId == u"TBI_POLYINSERT"); + m_xTbx1->set_item_active(u"TBI_POLYMOVE"_ustr, rId == u"TBI_POLYMOVE"); + m_xTbx1->set_item_active(u"TBI_POLYINSERT"_ustr, rId == u"TBI_POLYINSERT"); } IMPL_LINK( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void ) @@ -544,31 +544,31 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void ) const SdrObject* pObj = pWnd->GetSelectedSdrObject(); const SdrView* pView = pWnd->GetSdrView(); const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; - const bool bDrawEnabled = !(bPolyEdit && m_xTbx1->get_item_active("TBI_POLYEDIT")); - const bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE"); - const bool bWorkplace = m_xTbx1->get_item_active("TBI_WORKPLACE"); + const bool bDrawEnabled = !(bPolyEdit && m_xTbx1->get_item_active(u"TBI_POLYEDIT"_ustr)); + const bool bPipette = m_xTbx1->get_item_active(u"TBI_PIPETTE"_ustr); + const bool bWorkplace = m_xTbx1->get_item_active(u"TBI_WORKPLACE"_ustr); const bool bDontHide = !( bPipette || bWorkplace ); const bool bBitmap = pWnd->GetGraphic().GetType() == GraphicType::Bitmap; - m_xTbx1->set_item_sensitive("TBI_APPLY", bDontHide && bExecState && pWnd->IsChanged()); + m_xTbx1->set_item_sensitive(u"TBI_APPLY"_ustr, bDontHide && bExecState && pWnd->IsChanged()); - m_xTbx1->set_item_sensitive("TBI_WORKPLACE", !bPipette && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_WORKPLACE"_ustr, !bPipette && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_SELECT", bDontHide && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_RECT", bDontHide && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_CIRCLE", bDontHide && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_POLY", bDontHide && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_SELECT"_ustr, bDontHide && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_RECT"_ustr, bDontHide && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_CIRCLE"_ustr, bDontHide && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_POLY"_ustr, bDontHide && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_POLYEDIT", bDontHide && bPolyEdit); - m_xTbx1->set_item_sensitive("TBI_POLYMOVE", bDontHide && !bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_POLYINSERT", bDontHide && !bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_POLYDELETE", bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible()); + m_xTbx1->set_item_sensitive(u"TBI_POLYEDIT"_ustr, bDontHide && bPolyEdit); + m_xTbx1->set_item_sensitive(u"TBI_POLYMOVE"_ustr, bDontHide && !bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_POLYINSERT"_ustr, bDontHide && !bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_POLYDELETE"_ustr, bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible()); - m_xTbx1->set_item_sensitive("TBI_AUTOCONTOUR", bDontHide && bDrawEnabled); - m_xTbx1->set_item_sensitive("TBI_PIPETTE", !bWorkplace && bDrawEnabled && bBitmap); + m_xTbx1->set_item_sensitive(u"TBI_AUTOCONTOUR"_ustr, bDontHide && bDrawEnabled); + m_xTbx1->set_item_sensitive(u"TBI_PIPETTE"_ustr, !bWorkplace && bDrawEnabled && bBitmap); - m_xTbx1->set_item_sensitive("TBI_UNDO", bDontHide && aUndoGraphic.GetType() != GraphicType::NONE); - m_xTbx1->set_item_sensitive("TBI_REDO", bDontHide && aRedoGraphic.GetType() != GraphicType::NONE); + m_xTbx1->set_item_sensitive(u"TBI_UNDO"_ustr, bDontHide && aUndoGraphic.GetType() != GraphicType::NONE); + m_xTbx1->set_item_sensitive(u"TBI_REDO"_ustr, bDontHide && aRedoGraphic.GetType() != GraphicType::NONE); if ( bPolyEdit ) { @@ -586,7 +586,7 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void ) } else { - m_xTbx1->set_item_active("TBI_POLYEDIT", false); + m_xTbx1->set_item_active(u"TBI_POLYEDIT"_ustr, false); SetActivePoly(u"TBI_POLYMOVE"); pWnd->SetPolyEditMode( 0 ); } @@ -638,8 +638,8 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) if( !aMask.IsEmpty() ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querynewcontourdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryNewContourDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, u"svx/ui/querynewcontourdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryNewContourDialog"_ustr)); bool bNewContour; @@ -658,15 +658,15 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) } } - m_xTbx1->set_item_active("TBI_PIPETTE", false); + m_xTbx1->set_item_active(u"TBI_PIPETTE"_ustr, false); rWnd.SetPipetteMode( false ); m_xStbStatusColor->Invalidate(); } IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow&, rWnd, void ) { - m_xTbx1->set_item_active("TBI_WORKPLACE", false); - m_xTbx1->set_item_active("TBI_SELECT", true); + m_xTbx1->set_item_active(u"TBI_WORKPLACE"_ustr, false); + m_xTbx1->set_item_active(u"TBI_SELECT"_ustr, true); rWnd.SetWorkplaceMode( false ); m_xContourWnd->QueueIdleUpdate(); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 9b87fe3666a7..ed0c626b59c6 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -242,15 +242,15 @@ bool SvxShowCharSet::isFavChar(std::u16string_view sTitle, std::u16string_view r void SvxShowCharSet::createContextMenu(const Point& rPosition) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/charsetmenu.ui")); - std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu("charsetmenu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), u"svx/ui/charsetmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu(u"charsetmenu"_ustr)); sal_UCS4 cChar = GetSelectCharacter(); OUString aOUStr( &cChar, 1 ); if (isFavChar(aOUStr, mxVirDev->GetFont().GetFamilyName()) || maFavCharList.size() >= 16) - xItemMenu->set_visible("add", false); + xItemMenu->set_visible(u"add"_ustr, false); else - xItemMenu->set_visible("remove", false); + xItemMenu->set_visible(u"remove"_ustr, false); ContextMenuSelect(xItemMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPosition, Size(1,1)))); GrabFocus(); diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index df1d3a8c3db6..7fd293dae9d6 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -61,7 +61,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) : - GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ), + GenericDialogController( pParent, u"svx/ui/compressgraphicdialog.ui"_ustr, u"CompressGraphicDialog"_ustr ), m_xGraphicObj ( pGraphicObj ), m_aGraphic ( pGraphicObj->GetGraphicObject().GetGraphic() ), m_aViewSize100mm ( pGraphicObj->GetLogicRect().GetSize() ), @@ -76,7 +76,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, SdrGrafOb } CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, Graphic aGraphic, Size rViewSize100mm, tools::Rectangle const & rCropRectangle, SfxBindings& rBindings ) : - GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ), + GenericDialogController( pParent, u"svx/ui/compressgraphicdialog.ui"_ustr, u"CompressGraphicDialog"_ustr ), m_xGraphicObj ( nullptr ), m_aGraphic (std::move( aGraphic )), m_aViewSize100mm ( rViewSize100mm ), @@ -114,26 +114,26 @@ void CompressGraphicsDialog::recallParameter() void CompressGraphicsDialog::Initialize() { - m_xLabelGraphicType = m_xBuilder->weld_label("label-graphic-type"); - m_xFixedText2 = m_xBuilder->weld_label("label-original-size"); - m_xFixedText3 = m_xBuilder->weld_label("label-view-size"); - m_xFixedText5 = m_xBuilder->weld_label("label-image-capacity"); - m_xFixedText6 = m_xBuilder->weld_label("label-new-capacity"); - m_xJpegCompRB = m_xBuilder->weld_radio_button("radio-jpeg"); - m_xCompressionMF = m_xBuilder->weld_spin_button("spin-compression"); - m_xCompressionSlider = m_xBuilder->weld_scale("scale-compression"); - m_xLosslessRB = m_xBuilder->weld_radio_button("radio-lossless"); - m_xQualityMF = m_xBuilder->weld_spin_button("spin-quality"); - m_xQualitySlider = m_xBuilder->weld_scale("scale-quality"); - m_xReduceResolutionCB = m_xBuilder->weld_check_button("checkbox-reduce-resolution"); - m_xMFNewWidth = m_xBuilder->weld_spin_button("spin-new-width"); - m_xMFNewHeight = m_xBuilder->weld_spin_button("spin-new-height"); - m_xResolutionLB = m_xBuilder->weld_combo_box("combo-resolution"); - m_xBtnCalculate = m_xBuilder->weld_button("calculate"); - m_xInterpolationCombo = m_xBuilder->weld_combo_box("interpolation-method-combo"); - m_xBtnOkay = m_xBuilder->weld_button("ok"); - - m_xInterpolationCombo->set_active_text("Lanczos"); + m_xLabelGraphicType = m_xBuilder->weld_label(u"label-graphic-type"_ustr); + m_xFixedText2 = m_xBuilder->weld_label(u"label-original-size"_ustr); + m_xFixedText3 = m_xBuilder->weld_label(u"label-view-size"_ustr); + m_xFixedText5 = m_xBuilder->weld_label(u"label-image-capacity"_ustr); + m_xFixedText6 = m_xBuilder->weld_label(u"label-new-capacity"_ustr); + m_xJpegCompRB = m_xBuilder->weld_radio_button(u"radio-jpeg"_ustr); + m_xCompressionMF = m_xBuilder->weld_spin_button(u"spin-compression"_ustr); + m_xCompressionSlider = m_xBuilder->weld_scale(u"scale-compression"_ustr); + m_xLosslessRB = m_xBuilder->weld_radio_button(u"radio-lossless"_ustr); + m_xQualityMF = m_xBuilder->weld_spin_button(u"spin-quality"_ustr); + m_xQualitySlider = m_xBuilder->weld_scale(u"scale-quality"_ustr); + m_xReduceResolutionCB = m_xBuilder->weld_check_button(u"checkbox-reduce-resolution"_ustr); + m_xMFNewWidth = m_xBuilder->weld_spin_button(u"spin-new-width"_ustr); + m_xMFNewHeight = m_xBuilder->weld_spin_button(u"spin-new-height"_ustr); + m_xResolutionLB = m_xBuilder->weld_combo_box(u"combo-resolution"_ustr); + m_xBtnCalculate = m_xBuilder->weld_button(u"calculate"_ustr); + m_xInterpolationCombo = m_xBuilder->weld_combo_box(u"interpolation-method-combo"_ustr); + m_xBtnOkay = m_xBuilder->weld_button(u"ok"_ustr); + + m_xInterpolationCombo->set_active_text(u"Lanczos"_ustr); m_xInterpolationCombo->connect_changed(LINK(this, CompressGraphicsDialog, NewInterpolationModifiedHdl)); @@ -206,7 +206,7 @@ void CompressGraphicsDialog::Update() aNativeSizeString = aNativeSizeString.replaceAll("$(CAPACITY)", OUString::number( m_aNativeSize / 1024 )); m_xFixedText5->set_label(aNativeSizeString); - m_xFixedText6->set_label("??"); + m_xFixedText6->set_label(u"??"_ustr); } void CompressGraphicsDialog::UpdateSensitivity(const bool bSensitive) @@ -274,12 +274,12 @@ void CompressGraphicsDialog::Compress(SvStream& aStream) GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); Sequence< PropertyValue > aFilterData{ - comphelper::makePropertyValue("Interlaced", sal_Int32(0)), - comphelper::makePropertyValue("Compression", static_cast<sal_Int32>(m_xCompressionMF->get_value())), - comphelper::makePropertyValue("Quality", static_cast<sal_Int32>(m_xQualityMF->get_value())) + comphelper::makePropertyValue(u"Interlaced"_ustr, sal_Int32(0)), + comphelper::makePropertyValue(u"Compression"_ustr, static_cast<sal_Int32>(m_xCompressionMF->get_value())), + comphelper::makePropertyValue(u"Quality"_ustr, static_cast<sal_Int32>(m_xQualityMF->get_value())) }; - OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" ); + OUString aGraphicFormatName = m_xLosslessRB->get_active() ? u"png"_ustr : u"jpg"_ustr; sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName ); rFilter.ExportGraphic( aScaledGraphic, u"none", aStream, nFilterFormat, &aFilterData ); diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 976897b6bae2..4ff35991031b 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -67,7 +67,7 @@ void ContourWindow::SetPolyPolygon(const tools::PolyPolygon& rPolyPoly) SfxItemSet aSet(pModel->GetItemPool()); aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); - aSet.Put(XFillColorItem("", TRANSCOL)); + aSet.Put(XFillColorItem(u""_ustr, TRANSCOL)); aSet.Put(XFillTransparenceItem(50) ); pPathObj->SetMergedItemSetAndBroadcast(aSet); @@ -113,7 +113,7 @@ void ContourWindow::InitSdrModel() SfxItemSet aSet( pModel->GetItemPool() ); - aSet.Put( XFillColorItem( "", TRANSCOL ) ); + aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) ); aSet.Put( XFillTransparenceItem( 50 ) ); pView->SetAttributes( aSet ); pView->SetFrameDragSingles(); diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 6df9dbd2834b..504cbe0f5256 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -293,7 +293,7 @@ void SvxTPage::ActivatePage() } SvxTPView::SvxTPView(weld::Container* pParent) - : SvxTPage(pParent, "svx/ui/redlineviewpage.ui", "RedlineViewPage") + : SvxTPage(pParent, u"svx/ui/redlineviewpage.ui"_ustr, u"RedlineViewPage"_ustr) , bEnableAccept(true) , bEnableAcceptAll(true) , bEnableReject(true) @@ -301,13 +301,13 @@ SvxTPView::SvxTPView(weld::Container* pParent) , bEnableUndo(true) , bEnableClearFormat(false) , bEnableClearFormatAll(false) - , m_xAccept(m_xBuilder->weld_button("accept")) - , m_xReject(m_xBuilder->weld_button("reject")) - , m_xAcceptAll(m_xBuilder->weld_button("acceptall")) - , m_xRejectAll(m_xBuilder->weld_button("rejectall")) - , m_xUndo(m_xBuilder->weld_button("undo")) - , m_xViewData(new SvxRedlinTable(m_xBuilder->weld_tree_view("writerchanges"), - m_xBuilder->weld_tree_view("calcchanges"))) + , m_xAccept(m_xBuilder->weld_button(u"accept"_ustr)) + , m_xReject(m_xBuilder->weld_button(u"reject"_ustr)) + , m_xAcceptAll(m_xBuilder->weld_button(u"acceptall"_ustr)) + , m_xRejectAll(m_xBuilder->weld_button(u"rejectall"_ustr)) + , m_xUndo(m_xBuilder->weld_button(u"undo"_ustr)) + , m_xViewData(new SvxRedlinTable(m_xBuilder->weld_tree_view(u"writerchanges"_ustr), + m_xBuilder->weld_tree_view(u"calcchanges"_ustr))) { Link<weld::Button&,void> aLink=LINK( this, SvxTPView, PbClickHdl); @@ -457,29 +457,29 @@ SvxTPage::SvxTPage(weld::Container* pParent, const OUString& rUIXMLDescription, } SvxTPFilter::SvxTPFilter(weld::Container* pParent) - : SvxTPage(pParent, "svx/ui/redlinefilterpage.ui", "RedlineFilterPage") + : SvxTPage(pParent, u"svx/ui/redlinefilterpage.ui"_ustr, u"RedlineFilterPage"_ustr) , bModified(false) , m_pRedlinTable(nullptr) - , m_xCbDate(m_xBuilder->weld_check_button("date")) - , m_xLbDate(m_xBuilder->weld_combo_box("datecond")) - , m_xDfDate(new SvtCalendarBox(m_xBuilder->weld_menu_button("startdate"))) - , m_xTfDate(m_xBuilder->weld_formatted_spin_button("starttime")) + , m_xCbDate(m_xBuilder->weld_check_button(u"date"_ustr)) + , m_xLbDate(m_xBuilder->weld_combo_box(u"datecond"_ustr)) + , m_xDfDate(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"startdate"_ustr))) + , m_xTfDate(m_xBuilder->weld_formatted_spin_button(u"starttime"_ustr)) , m_xTfDateFormatter(new weld::TimeFormatter(*m_xTfDate)) - , m_xIbClock(m_xBuilder->weld_button("startclock")) - , m_xFtDate2(m_xBuilder->weld_label("and")) - , m_xDfDate2(new SvtCalendarBox(m_xBuilder->weld_menu_button("enddate"))) - , m_xTfDate2(m_xBuilder->weld_formatted_spin_button("endtime")) + , m_xIbClock(m_xBuilder->weld_button(u"startclock"_ustr)) + , m_xFtDate2(m_xBuilder->weld_label(u"and"_ustr)) + , m_xDfDate2(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"enddate"_ustr))) + , m_xTfDate2(m_xBuilder->weld_formatted_spin_button(u"endtime"_ustr)) , m_xTfDate2Formatter(new weld::TimeFormatter(*m_xTfDate2)) - , m_xIbClock2(m_xBuilder->weld_button("endclock")) - , m_xCbAuthor(m_xBuilder->weld_check_button("author")) - , m_xLbAuthor(m_xBuilder->weld_combo_box("authorlist")) - , m_xCbRange(m_xBuilder->weld_check_button("range")) - , m_xEdRange(m_xBuilder->weld_entry("rangeedit")) - , m_xBtnRange(m_xBuilder->weld_button("dotdotdot")) - , m_xCbAction(m_xBuilder->weld_check_button("action")) - , m_xLbAction(m_xBuilder->weld_combo_box("actionlist")) - , m_xCbComment(m_xBuilder->weld_check_button("comment")) - , m_xEdComment(m_xBuilder->weld_entry("commentedit")) + , m_xIbClock2(m_xBuilder->weld_button(u"endclock"_ustr)) + , m_xCbAuthor(m_xBuilder->weld_check_button(u"author"_ustr)) + , m_xLbAuthor(m_xBuilder->weld_combo_box(u"authorlist"_ustr)) + , m_xCbRange(m_xBuilder->weld_check_button(u"range"_ustr)) + , m_xEdRange(m_xBuilder->weld_entry(u"rangeedit"_ustr)) + , m_xBtnRange(m_xBuilder->weld_button(u"dotdotdot"_ustr)) + , m_xCbAction(m_xBuilder->weld_check_button(u"action"_ustr)) + , m_xLbAction(m_xBuilder->weld_combo_box(u"actionlist"_ustr)) + , m_xCbComment(m_xBuilder->weld_check_button(u"comment"_ustr)) + , m_xEdComment(m_xBuilder->weld_entry(u"commentedit"_ustr)) { m_xTfDateFormatter->EnableEmptyField(false); m_xTfDate2Formatter->EnableEmptyField(false); @@ -951,16 +951,16 @@ IMPL_LINK_NOARG(SvxTPFilter, RefHandle, weld::Button&, void) } SvxAcceptChgCtr::SvxAcceptChgCtr(weld::Container* pParent) - : m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/redlinecontrol.ui")) - , m_xTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) + : m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/redlinecontrol.ui"_ustr)) + , m_xTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) { m_xTabCtrl->connect_enter_page(LINK(this, SvxAcceptChgCtr, ActivatePageHdl)); m_xTabCtrl->connect_leave_page(LINK(this, SvxAcceptChgCtr, DeactivatePageHdl)); - m_xTPFilter.reset(new SvxTPFilter(m_xTabCtrl->get_page("filter"))); - m_xTPView.reset(new SvxTPView(m_xTabCtrl->get_page("view"))); + m_xTPFilter.reset(new SvxTPFilter(m_xTabCtrl->get_page(u"filter"_ustr))); + m_xTPView.reset(new SvxTPView(m_xTabCtrl->get_page(u"view"_ustr))); m_xTPFilter->SetRedlinTable(m_xTPView->GetTableControl()); - m_xTabCtrl->set_current_page("view"); + m_xTabCtrl->set_current_page(u"view"_ustr); m_xTabCtrl->set_help_id(HID_REDLINE_CTRL_VIEW); m_xTabCtrl->show(); } @@ -973,7 +973,7 @@ SvxAcceptChgCtr::~SvxAcceptChgCtr() void SvxAcceptChgCtr::ShowFilterPage() { - m_xTabCtrl->set_current_page("filter"); + m_xTabCtrl->set_current_page(u"filter"_ustr); } IMPL_LINK(SvxAcceptChgCtr, ActivatePageHdl, const OUString&, rPage, void) diff --git a/svx/source/dialog/cuicharmap.cxx b/svx/source/dialog/cuicharmap.cxx index 8eba24f4ace0..c5f2a1b128c4 100644 --- a/svx/source/dialog/cuicharmap.cxx +++ b/svx/source/dialog/cuicharmap.cxx @@ -54,27 +54,27 @@ using namespace css; SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet, css::uno::Reference<css::frame::XFrame> xFrame) - : SfxDialogController(pParent, "cui/ui/specialcharacters.ui", "SpecialCharactersDialog") + : SfxDialogController(pParent, u"cui/ui/specialcharacters.ui"_ustr, u"SpecialCharactersDialog"_ustr) , m_xVirDev(VclPtr<VirtualDevice>::Create()) , isSearchMode(true) , m_xFrame(std::move(xFrame)) , m_aCharmapContents(*m_xBuilder, m_xVirDev, true) , m_aShowChar(m_xVirDev) - , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : m_xBuilder->weld_button("ok")) - , m_xFontText(m_xBuilder->weld_label("fontft")) - , m_xFontLB(m_xBuilder->weld_combo_box("fontlb")) - , m_xSubsetText(m_xBuilder->weld_label("subsetft")) - , m_xSubsetLB(m_xBuilder->weld_combo_box("subsetlb")) - , m_xSearchText(m_xBuilder->weld_entry("search")) - , m_xHexCodeText(m_xBuilder->weld_entry("hexvalue")) - , m_xDecimalCodeText(m_xBuilder->weld_entry("decimalvalue")) - , m_xFavouritesBtn(m_xBuilder->weld_button("favbtn")) - , m_xCharName(m_xBuilder->weld_label("charname")) - , m_xShowChar(new weld::CustomWeld(*m_xBuilder, "showchar", m_aShowChar)) - , m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev)) - , m_xShowSetArea(new weld::CustomWeld(*m_xBuilder, "showcharset", *m_xShowSet)) - , m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window("searchscroll", true), m_xVirDev)) - , m_xSearchSetArea(new weld::CustomWeld(*m_xBuilder, "searchcharset", *m_xSearchSet)) + , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button(u"insert"_ustr) : m_xBuilder->weld_button(u"ok"_ustr)) + , m_xFontText(m_xBuilder->weld_label(u"fontft"_ustr)) + , m_xFontLB(m_xBuilder->weld_combo_box(u"fontlb"_ustr)) + , m_xSubsetText(m_xBuilder->weld_label(u"subsetft"_ustr)) + , m_xSubsetLB(m_xBuilder->weld_combo_box(u"subsetlb"_ustr)) + , m_xSearchText(m_xBuilder->weld_entry(u"search"_ustr)) + , m_xHexCodeText(m_xBuilder->weld_entry(u"hexvalue"_ustr)) + , m_xDecimalCodeText(m_xBuilder->weld_entry(u"decimalvalue"_ustr)) + , m_xFavouritesBtn(m_xBuilder->weld_button(u"favbtn"_ustr)) + , m_xCharName(m_xBuilder->weld_label(u"charname"_ustr)) + , m_xShowChar(new weld::CustomWeld(*m_xBuilder, u"showchar"_ustr, m_aShowChar)) + , m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window(u"showscroll"_ustr, true), m_xVirDev)) + , m_xShowSetArea(new weld::CustomWeld(*m_xBuilder, u"showcharset"_ustr, *m_xShowSet)) + , m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window(u"searchscroll"_ustr, true), m_xVirDev)) + , m_xSearchSetArea(new weld::CustomWeld(*m_xBuilder, u"searchcharset"_ustr, *m_xSearchSet)) { m_aShowChar.SetCentered(true); m_xFontLB->make_sorted(); @@ -308,7 +308,7 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont ) { //if for some reason, like font in an old document, StarSymbol is requested and it's not available, then //try OpenSymbol instead - aTmp.SetFamilyName("OpenSymbol"); + aTmp.SetFamilyName(u"OpenSymbol"_ustr); } if (m_xFontLB->find_text(sFontFamilyName) == -1) @@ -337,10 +337,10 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph) if (m_xFrame.is()) { uno::Sequence<beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("Symbols", sGlyph), - comphelper::makePropertyValue("FontName", aFont.GetFamilyName()) + comphelper::makePropertyValue(u"Symbols"_ustr, sGlyph), + comphelper::makePropertyValue(u"FontName"_ustr, aFont.GetFamilyName()) }; - comphelper::dispatchCommand(".uno:InsertSymbol", m_xFrame, aArgs); + comphelper::dispatchCommand(u".uno:InsertSymbol"_ustr, m_xFrame, aArgs); m_aCharmapContents.updateRecentCharacterList(sGlyph, aFont.GetFamilyName()); @@ -706,7 +706,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix) SetChar(cChar); else { m_xCharName->set_label(SvxResId(RID_SVXSTR_MISSING_CHAR)); - m_aShowChar.SetText(" "); + m_aShowChar.SetText(u" "_ustr); switch(radix) { case Radix::decimal: diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index adda37b22e45..ce6640e57b9a 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -345,7 +345,7 @@ void DialControl::SetNoRotation() mpImpl->mbNoRot = true; InvalidateControl(); if (mpImpl->mpLinkField) - mpImpl->mpLinkField->set_text(""); + mpImpl->mpLinkField->set_text(u""_ustr); } } diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 6222bd2e6ca1..781a8fdf9c17 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -129,7 +129,7 @@ void Svx3DPreviewControl::Construct() XATTR_FILL_FIRST, XATTR_FILLBITMAP> aSet( mpModel->GetItemPool() ); aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) ); aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); - aSet.Put( XFillColorItem( "", COL_WHITE ) ); + aSet.Put( XFillColorItem( u""_ustr, COL_WHITE ) ); mpScene->SetMergedItemSet(aSet); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index d68a68faa4d3..5dc6a4220e0e 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -945,7 +945,7 @@ void SvxLineLB::Fill( const XDashListRef &pList ) const Size aBmpSize(aBitmap.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmap); - m_xControl->append("", pList->GetStringForUiSolidLine(), *pVD); + m_xControl->append(u""_ustr, pList->GetStringForUiSolidLine(), *pVD); } // entries for dashed lines @@ -962,7 +962,7 @@ void SvxLineLB::Fill( const XDashListRef &pList ) const Size aBmpSize(aBitmap.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmap); - m_xControl->append("", pEntry->GetName(), *pVD); + m_xControl->append(u""_ustr, pEntry->GetName(), *pVD); } else { @@ -982,7 +982,7 @@ void SvxLineLB::Append( const XDashEntry& rEntry, const BitmapEx& rBitmap ) const Size aBmpSize(rBitmap.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), rBitmap); - m_xControl->append("", rEntry.GetName(), *pVD); + m_xControl->append(u""_ustr, rEntry.GetName(), *pVD); } else { @@ -1032,7 +1032,7 @@ void SvxLineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) const Size aBmpSize(aBitmap.GetSizePixel()); pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false); pVD->DrawBitmapEx(bStart ? Point() : Point(-aBmpSize.Width() / 2, 0), aBitmap); - m_xControl->append("", pEntry->GetName(), *pVD); + m_xControl->append(u""_ustr, pEntry->GetName(), *pVD); } else m_xControl->append_text(pEntry->GetName()); @@ -1050,7 +1050,7 @@ void SvxLineEndLB::Append( const XLineEndEntry& rEntry, const BitmapEx& rBitmap const Size aBmpSize(rBitmap.GetSizePixel()); pVD->SetOutputSizePixel(Size(aBmpSize.Width() / 2, aBmpSize.Height()), false); pVD->DrawBitmapEx(Point(-aBmpSize.Width() / 2, 0), rBitmap); - m_xControl->append("", rEntry.GetName(), *pVD); + m_xControl->append(u""_ustr, rEntry.GetName(), *pVD); } else { @@ -1447,10 +1447,10 @@ void padWidthForSidebar(weld::Toolbar& rToolbar, const css::uno::Reference<css:: { // use the, filled-in by dispatcher, width of measurewidth as the width // of a "standard" column in a two column panel - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, "svx/ui/measurewidthbar.ui")); - std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar("measurewidth1")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, u"svx/ui/measurewidthbar.ui"_ustr)); + std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar(u"measurewidth1"_ustr)); ToolbarUnoDispatcher aDispatcher1(*xToolbar1, *xBuilder, rFrame); - std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar("measurewidth2")); + std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar(u"measurewidth2"_ustr)); ToolbarUnoDispatcher aDispatcher2(*xToolbar2, *xBuilder, rFrame); nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width()); eSize = rToolbar.get_icon_size(); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 46d3a60a3a49..200d1d590eb5 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -570,10 +570,10 @@ void SAL_CALL PluginProgress::reset() } SaveDialog::SaveDialog(weld::Window* pParent, RecoveryCore* pCore) - : GenericDialogController(pParent, "svx/ui/docrecoverysavedialog.ui", "DocRecoverySaveDialog") + : GenericDialogController(pParent, u"svx/ui/docrecoverysavedialog.ui"_ustr, u"DocRecoverySaveDialog"_ustr) , m_pCore(pCore) - , m_xFileListLB(m_xBuilder->weld_tree_view("filelist")) - , m_xOkBtn(m_xBuilder->weld_button("ok")) + , m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr)) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) { m_xFileListLB->set_size_request(-1, m_xFileListLB->get_height_rows(10)); @@ -590,7 +590,7 @@ SaveDialog::SaveDialog(weld::Window* pParent, RecoveryCore* pCore) for (const TURLInfo& rInfo : rURLs) { - m_xFileListLB->append("", rInfo.DisplayName, rInfo.StandardImageId); + m_xFileListLB->append(u""_ustr, rInfo.DisplayName, rInfo.StandardImageId); } } @@ -614,9 +614,9 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl, weld::Button&, void) } SaveProgressDialog::SaveProgressDialog(weld::Window* pParent, RecoveryCore* pCore) - : GenericDialogController(pParent, "svx/ui/docrecoveryprogressdialog.ui", "DocRecoveryProgressDialog") + : GenericDialogController(pParent, u"svx/ui/docrecoveryprogressdialog.ui"_ustr, u"DocRecoveryProgressDialog"_ustr) , m_pCore(pCore) - , m_xProgressBar(m_xBuilder->weld_progress_bar("progress")) + , m_xProgressBar(m_xBuilder->weld_progress_bar(u"progress"_ustr)) { m_xProgressBar->set_size_request(m_xProgressBar->get_approximate_digit_width() * 50, -1); m_xProgress = new PluginProgress(m_xProgressBar.get()); @@ -671,7 +671,7 @@ static short impl_askUserForWizardCancel(weld::Widget* pParent, TranslateId pRes } RecoveryDialog::RecoveryDialog(weld::Window* pParent, RecoveryCore* pCore) - : GenericDialogController(pParent, "svx/ui/docrecoveryrecoverdialog.ui", "DocRecoveryRecoverDialog") + : GenericDialogController(pParent, u"svx/ui/docrecoveryrecoverdialog.ui"_ustr, u"DocRecoveryRecoverDialog"_ustr) , m_aTitleRecoveryInProgress(SvxResId(RID_SVXSTR_RECOVERY_INPROGRESS)) , m_aRecoveryOnlyFinish (SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH)) , m_aRecoveryOnlyFinishDescr(SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH_DESCR)) @@ -687,11 +687,11 @@ RecoveryDialog::RecoveryDialog(weld::Window* pParent, RecoveryCore* pCore) , m_aRecovInProgrStr(SvxResId(RID_SVXSTR_RECOVINPROGR)) , m_aNotRecovYetStr(SvxResId(RID_SVXSTR_NOTRECOVYET)) , m_aWillBeDiscStr(SvxResId(RID_SVXSTR_WILLDISCARD)) - , m_xDescrFT(m_xBuilder->weld_label("desc")) - , m_xProgressBar(m_xBuilder->weld_progress_bar("progress")) - , m_xFileListLB(m_xBuilder->weld_tree_view("filelist")) - , m_xNextBtn(m_xBuilder->weld_button("next")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) + , m_xDescrFT(m_xBuilder->weld_label(u"desc"_ustr)) + , m_xProgressBar(m_xBuilder->weld_progress_bar(u"progress"_ustr)) + , m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr)) + , m_xNextBtn(m_xBuilder->weld_button(u"next"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) { const auto nWidth = m_xFileListLB->get_approximate_digit_width() * 80; m_xFileListLB->set_size_request(nWidth, m_xFileListLB->get_height_rows(10)); @@ -1128,15 +1128,15 @@ void RecoveryDialog::impl_updateItemDescription(int row, const TriState& rState) BrokenRecoveryDialog::BrokenRecoveryDialog(weld::Window* pParent, RecoveryCore* pCore, bool bBeforeRecovery) - : GenericDialogController(pParent, "svx/ui/docrecoverybrokendialog.ui", "DocRecoveryBrokenDialog") + : GenericDialogController(pParent, u"svx/ui/docrecoverybrokendialog.ui"_ustr, u"DocRecoveryBrokenDialog"_ustr) , m_pCore(pCore) , m_bBeforeRecovery(bBeforeRecovery) , m_bExecutionNeeded(false) - , m_xFileListLB(m_xBuilder->weld_tree_view("filelist")) - , m_xSaveDirED(m_xBuilder->weld_entry("savedir")) - , m_xSaveDirBtn(m_xBuilder->weld_button("change")) - , m_xOkBtn(m_xBuilder->weld_button("ok")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) + , m_xFileListLB(m_xBuilder->weld_tree_view(u"filelist"_ustr)) + , m_xSaveDirED(m_xBuilder->weld_entry(u"savedir"_ustr)) + , m_xSaveDirBtn(m_xBuilder->weld_button(u"change"_ustr)) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xSaveDirBtn->connect_clicked( LINK( this, BrokenRecoveryDialog, SaveButtonHdl ) ); m_xOkBtn->connect_clicked( LINK( this, BrokenRecoveryDialog, OkButtonHdl ) ); diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 5f9b681b026b..a91485ec916d 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -177,23 +177,23 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* _pParent) - : SfxDockingWindow(pBindinx, pCW, _pParent, "DockingFontwork", "svx/ui/dockingfontwork.ui") + : SfxDockingWindow(pBindinx, pCW, _pParent, u"DockingFontwork"_ustr, u"svx/ui/dockingfontwork.ui"_ustr) , rBindings(*pBindinx) , aInputIdle("SvxFontWorkDialog Input") , nSaveShadowX(0) , nSaveShadowY(0) , nSaveShadowAngle(450) , nSaveShadowSize (100) - , m_xTbxStyle(m_xBuilder->weld_toolbar("style")) - , m_xTbxAdjust(m_xBuilder->weld_toolbar("adjust")) - , m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM)) - , m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button("indent", FieldUnit::CM)) - , m_xTbxShadow(m_xBuilder->weld_toolbar("shadow")) - , m_xFbShadowX(m_xBuilder->weld_image("shadowx")) - , m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button("distancex", FieldUnit::CM)) - , m_xFbShadowY(m_xBuilder->weld_image("shadowy")) - , m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button("distancey", FieldUnit::CM)) - , m_xShadowColorLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), [this]{ return GetFrameWeld(); } )) + , m_xTbxStyle(m_xBuilder->weld_toolbar(u"style"_ustr)) + , m_xTbxAdjust(m_xBuilder->weld_toolbar(u"adjust"_ustr)) + , m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button(u"distance"_ustr, FieldUnit::CM)) + , m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button(u"indent"_ustr, FieldUnit::CM)) + , m_xTbxShadow(m_xBuilder->weld_toolbar(u"shadow"_ustr)) + , m_xFbShadowX(m_xBuilder->weld_image(u"shadowx"_ustr)) + , m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button(u"distancex"_ustr, FieldUnit::CM)) + , m_xFbShadowY(m_xBuilder->weld_image(u"shadowy"_ustr)) + , m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button(u"distancey"_ustr, FieldUnit::CM)) + , m_xShadowColorLB(new ColorListBox(m_xBuilder->weld_menu_button(u"color"_ustr), [this]{ return GetFrameWeld(); } )) { SetText(SvxResId(RID_SVXSTR_FONTWORK)); @@ -316,7 +316,7 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem) { if ( pItem ) { - OUString sId = "off"; + OUString sId = u"off"_ustr; switch ( pItem->GetValue() ) { @@ -331,16 +331,16 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem) // Make sure that there is always exactly one checked toolbox item. if ( pItem->GetValue() == XFormTextStyle::NONE ) { - m_xTbxStyle->set_item_active("rotate", false); - m_xTbxStyle->set_item_active("upright", false); - m_xTbxStyle->set_item_active("hori", false); - m_xTbxStyle->set_item_active("vert", false); + m_xTbxStyle->set_item_active(u"rotate"_ustr, false); + m_xTbxStyle->set_item_active(u"upright"_ustr, false); + m_xTbxStyle->set_item_active(u"hori"_ustr, false); + m_xTbxStyle->set_item_active(u"vert"_ustr, false); - m_xTbxStyle->set_item_active("off", true); + m_xTbxStyle->set_item_active(u"off"_ustr, true); } else { - m_xTbxStyle->set_item_active("off", false); + m_xTbxStyle->set_item_active(u"off"_ustr, false); m_xTbxStyle->set_item_active(sId, true); } @@ -416,7 +416,7 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem) void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem) { if ( pItem ) - m_xTbxAdjust->set_item_active("orientation", pItem->GetValue()); + m_xTbxAdjust->set_item_active(u"orientation"_ustr, pItem->GetValue()); } // Set button for contour display @@ -424,7 +424,7 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem) void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem) { if ( pItem ) - m_xTbxShadow->set_item_active("contour", !pItem->GetValue()); + m_xTbxShadow->set_item_active(u"contour"_ustr, !pItem->GetValue()); } // Set button for text border @@ -432,7 +432,7 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem) void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem) { if ( pItem ) - m_xTbxShadow->set_item_active("textcontour", pItem->GetValue()); + m_xTbxShadow->set_item_active(u"textcontour"_ustr, pItem->GetValue()); } // Set shadow buttons @@ -564,7 +564,7 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem) // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access // methods regarding to the kind of value accessed. - if (m_xTbxShadow->get_item_active("slant")) + if (m_xTbxShadow->get_item_active(u"slant"_ustr)) { // #i19251# // There is no value correction necessary at all, i think this @@ -590,7 +590,7 @@ void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem) // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access // methods regarding to the kind of value accessed. - if (m_xTbxShadow->get_item_active("slant")) + if (m_xTbxShadow->get_item_active(u"slant"_ustr)) { m_xMtrFldShadowY->set_value(pItem->GetValue(), FieldUnit::NONE); } @@ -722,7 +722,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void) } } if( eDlgUnit != m_xMtrFldShadowX->get_unit() && - m_xTbxShadow->get_item_active("vertical") ) + m_xTbxShadow->get_item_active(u"vertical"_ustr) ) { SetFieldUnit(*m_xMtrFldShadowX, eDlgUnit, true); SetFieldUnit(*m_xMtrFldShadowY, eDlgUnit, true); @@ -773,7 +773,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void) IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl, ColorListBox&, void) { - XFormTextShadowColorItem aItem( "", m_xShadowColorLB->GetSelectEntryColor() ); + XFormTextShadowColorItem aItem( u""_ustr, m_xShadowColorLB->GetSelectEntryColor() ); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, { &aItem }); } diff --git a/svx/source/dialog/gotodlg.cxx b/svx/source/dialog/gotodlg.cxx index fe4533945bde..82842ff4acc0 100644 --- a/svx/source/dialog/gotodlg.cxx +++ b/svx/source/dialog/gotodlg.cxx @@ -25,11 +25,11 @@ namespace svx { GotoPageDlg::GotoPageDlg(weld::Window* pParent, const OUString& title, const OUString& label, sal_uInt16 curPagePos, sal_uInt16 pageCnt) - : GenericDialogController(pParent, "svx/ui/gotopagedialog.ui", "GotoPageDialog") + : GenericDialogController(pParent, u"svx/ui/gotopagedialog.ui"_ustr, u"GotoPageDialog"_ustr) , mnMaxPageCnt(1) - , mxMtrPageCtrl(m_xBuilder->weld_spin_button("page")) - , mxPageNumberLbl(m_xBuilder->weld_label("page_count")) - , mxPageLbl(m_xBuilder->weld_label("page_label")) + , mxMtrPageCtrl(m_xBuilder->weld_spin_button(u"page"_ustr)) + , mxPageNumberLbl(m_xBuilder->weld_label(u"page_count"_ustr)) + , mxPageLbl(m_xBuilder->weld_label(u"page_label"_ustr)) { set_title(title); mxPageLbl->set_label(label); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index cc8758ad0422..fe91c933326b 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -121,50 +121,50 @@ SvxFooterPage::SvxFooterPage(weld::Container* pPage, weld::DialogController* pCo } SvxHFPage::SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId) - : SfxTabPage(pPage, pController, "svx/ui/headfootformatpage.ui", "HFFormatPage", &rSet) + : SfxTabPage(pPage, pController, u"svx/ui/headfootformatpage.ui"_ustr, u"HFFormatPage"_ustr, &rSet) , nId(nSetId) , mbDisableQueryBox(false) , mbEnableDrawingLayerFillStyles(false) - , m_xCntSharedBox(m_xBuilder->weld_check_button("checkSameLR")) - , m_xCntSharedFirstBox(m_xBuilder->weld_check_button("checkSameFP")) - , m_xLMLbl(m_xBuilder->weld_label("labelLeftMarg")) - , m_xLMEdit(m_xBuilder->weld_metric_spin_button("spinMargLeft", FieldUnit::CM)) - , m_xRMLbl(m_xBuilder->weld_label("labelRightMarg")) - , m_xRMEdit(m_xBuilder->weld_metric_spin_button("spinMargRight", FieldUnit::CM)) - , m_xDistFT(m_xBuilder->weld_label("labelSpacing")) - , m_xDistEdit(m_xBuilder->weld_metric_spin_button("spinSpacing", FieldUnit::CM)) - , m_xDynSpacingCB(m_xBuilder->weld_check_button("checkDynSpacing")) - , m_xHeightFT(m_xBuilder->weld_label("labelHeight")) - , m_xHeightEdit(m_xBuilder->weld_metric_spin_button("spinHeight", FieldUnit::CM)) - , m_xHeightDynBtn(m_xBuilder->weld_check_button("checkAutofit")) - , m_xBackgroundBtn(m_xBuilder->weld_button("buttonMore")) - , m_xBspWin(new weld::CustomWeld(*m_xBuilder, "drawingareaPageHF", m_aBspWin)) + , m_xCntSharedBox(m_xBuilder->weld_check_button(u"checkSameLR"_ustr)) + , m_xCntSharedFirstBox(m_xBuilder->weld_check_button(u"checkSameFP"_ustr)) + , m_xLMLbl(m_xBuilder->weld_label(u"labelLeftMarg"_ustr)) + , m_xLMEdit(m_xBuilder->weld_metric_spin_button(u"spinMargLeft"_ustr, FieldUnit::CM)) + , m_xRMLbl(m_xBuilder->weld_label(u"labelRightMarg"_ustr)) + , m_xRMEdit(m_xBuilder->weld_metric_spin_button(u"spinMargRight"_ustr, FieldUnit::CM)) + , m_xDistFT(m_xBuilder->weld_label(u"labelSpacing"_ustr)) + , m_xDistEdit(m_xBuilder->weld_metric_spin_button(u"spinSpacing"_ustr, FieldUnit::CM)) + , m_xDynSpacingCB(m_xBuilder->weld_check_button(u"checkDynSpacing"_ustr)) + , m_xHeightFT(m_xBuilder->weld_label(u"labelHeight"_ustr)) + , m_xHeightEdit(m_xBuilder->weld_metric_spin_button(u"spinHeight"_ustr, FieldUnit::CM)) + , m_xHeightDynBtn(m_xBuilder->weld_check_button(u"checkAutofit"_ustr)) + , m_xBackgroundBtn(m_xBuilder->weld_button(u"buttonMore"_ustr)) + , m_xBspWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaPageHF"_ustr, m_aBspWin)) { //swap header <-> footer in UI if (nId == SID_ATTR_PAGE_FOOTERSET) { - m_xContainer->set_help_id("svx/ui/headfootformatpage/FFormatPage"); - m_xPageLbl = m_xBuilder->weld_label("labelFooterFormat"); - m_xTurnOnBox = m_xBuilder->weld_check_button("checkFooterOn"); + m_xContainer->set_help_id(u"svx/ui/headfootformatpage/FFormatPage"_ustr); + m_xPageLbl = m_xBuilder->weld_label(u"labelFooterFormat"_ustr); + m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkFooterOn"_ustr); /* Set custom HIDs for the Footer help page (shared/01/05040400.xhp) otherwise it would display the same extended help on both the Header and Footer tabs */ - m_xCntSharedBox->set_help_id( "SVX_HID_FOOTER_CHECKSAMELR" ); - m_xCntSharedFirstBox->set_help_id( "SVX_HID_FOOTER_CHECKSAMEFP" ); - m_xLMEdit->set_help_id( "SVX_HID_FOOTER_SPINMARGLEFT" ); - m_xRMEdit->set_help_id( "SVX_HID_FOOTER_SPINMARGRIGHT" ); - m_xDistEdit->set_help_id( "SVX_HID_FOOTER_SPINSPACING" ); - m_xDynSpacingCB->set_help_id( "SVX_HID_FOOTER_CHECKDYNSPACING" ); - m_xHeightEdit->set_help_id( "SVX_HID_FOOTER_SPINHEIGHT" ); - m_xHeightDynBtn->set_help_id( "SVX_HID_FOOTER_CHECKAUTOFIT" ); - m_xBackgroundBtn->set_help_id( "SVX_HID_FOOTER_BUTTONMORE" ); + m_xCntSharedBox->set_help_id( u"SVX_HID_FOOTER_CHECKSAMELR"_ustr ); + m_xCntSharedFirstBox->set_help_id( u"SVX_HID_FOOTER_CHECKSAMEFP"_ustr ); + m_xLMEdit->set_help_id( u"SVX_HID_FOOTER_SPINMARGLEFT"_ustr ); + m_xRMEdit->set_help_id( u"SVX_HID_FOOTER_SPINMARGRIGHT"_ustr ); + m_xDistEdit->set_help_id( u"SVX_HID_FOOTER_SPINSPACING"_ustr ); + m_xDynSpacingCB->set_help_id( u"SVX_HID_FOOTER_CHECKDYNSPACING"_ustr ); + m_xHeightEdit->set_help_id( u"SVX_HID_FOOTER_SPINHEIGHT"_ustr ); + m_xHeightDynBtn->set_help_id( u"SVX_HID_FOOTER_CHECKAUTOFIT"_ustr ); + m_xBackgroundBtn->set_help_id( u"SVX_HID_FOOTER_BUTTONMORE"_ustr ); } else //Header { - m_xContainer->set_help_id("svx/ui/headfootformatpage/HFormatPage"); - m_xPageLbl = m_xBuilder->weld_label("labelHeaderFormat"); - m_xTurnOnBox = m_xBuilder->weld_check_button("checkHeaderOn"); + m_xContainer->set_help_id(u"svx/ui/headfootformatpage/HFormatPage"_ustr); + m_xPageLbl = m_xBuilder->weld_label(u"labelHeaderFormat"_ustr); + m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkHeaderOn"_ustr); } m_xTurnOnBox->show(); m_xPageLbl->show(); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 1efe3c8f4f69..170ff2c90543 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -100,28 +100,28 @@ void SvxIMapDlgChildWindow::UpdateIMapDlg( const Graphic& rGraphic, const ImageM } SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Window* _pParent) - : SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/imapdialog.ui", "ImapDialog") + : SfxModelessDialogController(_pBindings, pCW, _pParent, u"svx/ui/imapdialog.ui"_ustr, u"ImapDialog"_ustr) , pCheckObj(nullptr) , aIMapItem(*this, *_pBindings) , m_xIMapWnd(new IMapWindow(_pBindings->GetActiveFrame(), m_xDialog.get())) - , m_xTbxIMapDlg1(m_xBuilder->weld_toolbar("toolbar")) - , m_xFtURL(m_xBuilder->weld_label("urlft")) - , m_xURLBox(new SvtURLBox(m_xBuilder->weld_combo_box("url"))) - , m_xFtText(m_xBuilder->weld_label("textft")) - , m_xEdtText(m_xBuilder->weld_entry("text")) - , m_xFtTarget(m_xBuilder->weld_label("targetft")) - , m_xCbbTarget(m_xBuilder->weld_combo_box("target")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) - , m_xStbStatus1(m_xBuilder->weld_label("statusurl")) - , m_xStbStatus2(m_xBuilder->weld_label("statuspos")) - , m_xStbStatus3(m_xBuilder->weld_label("statussize")) - , m_xIMapWndWeld(new weld::CustomWeld(*m_xBuilder, "container", *m_xIMapWnd)) + , m_xTbxIMapDlg1(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) + , m_xFtURL(m_xBuilder->weld_label(u"urlft"_ustr)) + , m_xURLBox(new SvtURLBox(m_xBuilder->weld_combo_box(u"url"_ustr))) + , m_xFtText(m_xBuilder->weld_label(u"textft"_ustr)) + , m_xEdtText(m_xBuilder->weld_entry(u"text"_ustr)) + , m_xFtTarget(m_xBuilder->weld_label(u"targetft"_ustr)) + , m_xCbbTarget(m_xBuilder->weld_combo_box(u"target"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xStbStatus1(m_xBuilder->weld_label(u"statusurl"_ustr)) + , m_xStbStatus2(m_xBuilder->weld_label(u"statuspos"_ustr)) + , m_xStbStatus3(m_xBuilder->weld_label(u"statussize"_ustr)) + , m_xIMapWndWeld(new weld::CustomWeld(*m_xBuilder, u"container"_ustr, *m_xIMapWnd)) { - m_xTbxIMapDlg1->insert_separator(4, "sep1"); - m_xTbxIMapDlg1->insert_separator(10, "sep2"); - m_xTbxIMapDlg1->insert_separator(15, "sep3"); - m_xTbxIMapDlg1->insert_separator(18, "sel4"); + m_xTbxIMapDlg1->insert_separator(4, u"sep1"_ustr); + m_xTbxIMapDlg1->insert_separator(10, u"sep2"_ustr); + m_xTbxIMapDlg1->insert_separator(15, u"sep3"_ustr); + m_xTbxIMapDlg1->insert_separator(18, u"sel4"_ustr); //lock this down so it doesn't jump around in size //as entries are added later on @@ -148,12 +148,12 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Windo m_xCbbTarget->connect_focus_out( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) ); m_xTbxIMapDlg1->connect_clicked( LINK( this, SvxIMapDlg, TbxClickHdl ) ); - OUString sSelect("TBI_SELECT"); + OUString sSelect(u"TBI_SELECT"_ustr); m_xTbxIMapDlg1->set_item_active(sSelect, true); TbxClickHdl(sSelect); m_xStbStatus1->set_size_request(120, -1); - const int nWidth = m_xStbStatus1->get_pixel_size(" 9999,99 cm / 9999,99 cm ").Width(); + const int nWidth = m_xStbStatus1->get_pixel_size(u" 9999,99 cm / 9999,99 cm "_ustr).Width(); m_xStbStatus2->set_size_request(nWidth, -1); m_xStbStatus3->set_size_request(nWidth, -1); @@ -167,9 +167,9 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Windo pOwnData->aIdle.SetInvokeHandler( LINK( this, SvxIMapDlg, UpdateHdl ) ); - m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", false); - m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", false ); - m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", false ); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, false); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, false ); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, false ); m_xCancelBtn->connect_clicked(LINK(this, SvxIMapDlg, CancelHdl)); } @@ -184,10 +184,10 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void) { bool bRet = true; - if ( m_xTbxIMapDlg1->get_item_sensitive("TBI_APPLY") ) + if ( m_xTbxIMapDlg1->get_item_sensitive(u"TBI_APPLY"_ustr) ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querymodifyimagemapchangesdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryModifyImageMapChangesDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querymodifyimagemapchangesdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QueryModifyImageMapChangesDialog"_ustr)); const tools::Long nRet = xQBox->run(); if( nRet == RET_YES ) @@ -202,8 +202,8 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void) } else if( m_xIMapWnd->IsChanged() ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querysaveimagemapchangesdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveImageMapChangesDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querysaveimagemapchangesdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveImageMapChangesDialog"_ustr)); const tools::Long nRet = xQBox->run(); if( nRet == RET_YES ) @@ -468,28 +468,28 @@ bool SvxIMapDlg::DoSave() void SvxIMapDlg::SetActiveTool(std::u16string_view rId) { - m_xTbxIMapDlg1->set_item_active("TBI_SELECT", rId == u"TBI_SELECT"); - m_xTbxIMapDlg1->set_item_active("TBI_RECT", rId == u"TBI_RECT"); - m_xTbxIMapDlg1->set_item_active("TBI_CIRCLE", rId == u"TBI_CIRCLE"); - m_xTbxIMapDlg1->set_item_active("TBI_POLY", rId == u"TBI_POLY"); - m_xTbxIMapDlg1->set_item_active("TBI_FREEPOLY", rId == u"TBI_FREEPOLY"); + m_xTbxIMapDlg1->set_item_active(u"TBI_SELECT"_ustr, rId == u"TBI_SELECT"); + m_xTbxIMapDlg1->set_item_active(u"TBI_RECT"_ustr, rId == u"TBI_RECT"); + m_xTbxIMapDlg1->set_item_active(u"TBI_CIRCLE"_ustr, rId == u"TBI_CIRCLE"); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLY"_ustr, rId == u"TBI_POLY"); + m_xTbxIMapDlg1->set_item_active(u"TBI_FREEPOLY"_ustr, rId == u"TBI_FREEPOLY"); - m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", rId == u"TBI_POLYINSERT"); - m_xTbxIMapDlg1->set_item_active("TBI_POLYDELETE", false); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, rId == u"TBI_POLYINSERT"); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYDELETE"_ustr, false); bool bMove = rId == u"TBI_POLYMOVE" || ( rId == u"TBI_POLYEDIT" - && !m_xTbxIMapDlg1->get_item_active("TBI_POLYINSERT") - && !m_xTbxIMapDlg1->get_item_active("TBI_POLYDELETE") ); + && !m_xTbxIMapDlg1->get_item_active(u"TBI_POLYINSERT"_ustr) + && !m_xTbxIMapDlg1->get_item_active(u"TBI_POLYDELETE"_ustr) ); - m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", bMove ); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, bMove ); bool bEditMode = ( rId == u"TBI_POLYEDIT" ) || ( rId == u"TBI_POLYMOVE") || ( rId == u"TBI_POLYINSERT") || ( rId == u"TBI_POLYDELETE" ); - m_xTbxIMapDlg1->set_item_active("TBI_POLYEDIT", bEditMode); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYEDIT"_ustr, bEditMode); } IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void ) @@ -512,10 +512,10 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void ) if ( !rInfo.bOneMarked ) { - m_xTbxIMapDlg1->set_item_active("TBI_ACTIVE", false); - m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", false); - m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", false); - m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", false); + m_xTbxIMapDlg1->set_item_active(u"TBI_ACTIVE"_ustr, false); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, false); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, false); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, false); m_xStbStatus1->set_label(OUString()); m_xFtURL->set_sensitive(false); @@ -525,15 +525,15 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void ) m_xFtTarget->set_sensitive(false); m_xCbbTarget->set_sensitive(false); - m_xURLBox->set_entry_text( "" ); - m_xEdtText->set_text( "" ); + m_xURLBox->set_entry_text( u""_ustr ); + m_xEdtText->set_text( u""_ustr ); } else { - m_xTbxIMapDlg1->set_item_sensitive("TBI_ACTIVE", true); - m_xTbxIMapDlg1->set_item_active("TBI_ACTIVE", !rInfo.bActivated ); - m_xTbxIMapDlg1->set_item_sensitive("TBI_MACRO", true); - m_xTbxIMapDlg1->set_item_sensitive("TBI_PROPERTY", true); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_ACTIVE"_ustr, true); + m_xTbxIMapDlg1->set_item_active(u"TBI_ACTIVE"_ustr, !rInfo.bActivated ); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_MACRO"_ustr, true); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_PROPERTY"_ustr, true); m_xFtURL->set_sensitive(true); m_xURLBox->set_sensitive(true); @@ -638,8 +638,8 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl, Timer *, void) { if (m_xIMapWnd->IsChanged()) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querysaveimagemapchangesdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveImageMapChangesDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"svx/ui/querysaveimagemapchangesdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"QuerySaveImageMapChangesDialog"_ustr)); if (xQBox->run() == RET_YES) { DoSave(); @@ -652,7 +652,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl, Timer *, void) pCheckObj = pOwnData->pUpdateEditingObject; // After changes => default selection - m_xTbxIMapDlg1->set_item_active("TBI_SELECT", true); + m_xTbxIMapDlg1->set_item_active(u"TBI_SELECT"_ustr, true); m_xIMapWnd->SetEditMode( true ); } @@ -669,37 +669,37 @@ IMPL_LINK( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void ) const SdrModel* pModel = pWnd->GetSdrModel(); const SdrView* pView = pWnd->GetSdrView(); const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; - const bool bDrawEnabled = !( bPolyEdit && m_xTbxIMapDlg1->get_item_active("TBI_POLYEDIT") ); + const bool bDrawEnabled = !( bPolyEdit && m_xTbxIMapDlg1->get_item_active(u"TBI_POLYEDIT"_ustr) ); - m_xTbxIMapDlg1->set_item_sensitive("TBI_APPLY", pOwnData->bExecState && pWnd->IsChanged() ); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_APPLY"_ustr, pOwnData->bExecState && pWnd->IsChanged() ); - m_xTbxIMapDlg1->set_item_sensitive("TBI_SELECT", bDrawEnabled); - m_xTbxIMapDlg1->set_item_sensitive("TBI_RECT", bDrawEnabled); - m_xTbxIMapDlg1->set_item_sensitive("TBI_CIRCLE", bDrawEnabled); - m_xTbxIMapDlg1->set_item_sensitive("TBI_POLY", bDrawEnabled); - m_xTbxIMapDlg1->set_item_sensitive("TBI_FREEPOLY", bDrawEnabled); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_SELECT"_ustr, bDrawEnabled); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_RECT"_ustr, bDrawEnabled); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_CIRCLE"_ustr, bDrawEnabled); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_POLY"_ustr, bDrawEnabled); + m_xTbxIMapDlg1->set_item_sensitive(u"TBI_FREEPOLY"_ustr, bDrawEnabled); // BezierEditor State - m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYEDIT", bPolyEdit ); - m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYMOVE", !bDrawEnabled ); - m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYINSERT", !bDrawEnabled ); - m_xTbxIMapDlg1->set_item_sensitive( "TBI_POLYDELETE", !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYEDIT"_ustr, bPolyEdit ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYMOVE"_ustr, !bDrawEnabled ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYINSERT"_ustr, !bDrawEnabled ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_POLYDELETE"_ustr, !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() ); // Undo/Redo - m_xTbxIMapDlg1->set_item_sensitive( "TBI_UNDO", pModel->HasUndoActions() ); - m_xTbxIMapDlg1->set_item_sensitive( "TBI_REDO", pModel->HasRedoActions() ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_UNDO"_ustr, pModel->HasUndoActions() ); + m_xTbxIMapDlg1->set_item_sensitive( u"TBI_REDO"_ustr, pModel->HasRedoActions() ); if ( bPolyEdit ) { switch( pWnd->GetPolyEditMode() ) { case SID_BEZIER_MOVE: - m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", true); - m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", false); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, true); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, false); break; case SID_BEZIER_INSERT: - m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", true); - m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", false); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYINSERT"_ustr, true); + m_xTbxIMapDlg1->set_item_active(u"TBI_POLYMOVE"_ustr, false); break; default: break; @@ -707,9 +707,9 @@ IMPL_LINK( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void ) } else { - m_xTbxIMapDlg1->set_item_active( "TBI_POLYEDIT", false ); - m_xTbxIMapDlg1->set_item_active( "TBI_POLYMOVE", true); - m_xTbxIMapDlg1->set_item_active( "TBI_POLYINSERT", false ); + m_xTbxIMapDlg1->set_item_active( u"TBI_POLYEDIT"_ustr, false ); + m_xTbxIMapDlg1->set_item_active( u"TBI_POLYMOVE"_ustr, true); + m_xTbxIMapDlg1->set_item_active( u"TBI_POLYINSERT"_ustr, false ); pWnd->SetPolyEditMode( 0 ); } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 4c401c42d712..b7fec33f9735 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -78,7 +78,7 @@ IMapWindow::IMapWindow(const Reference< XFrame >& rxDocumentFrame, weld::Dialog* : GraphCtrl(pDialog) , mxDocumentFrame(rxDocumentFrame) { - pIMapPool = new SfxItemPool("IMapItemPool"); + pIMapPool = new SfxItemPool(u"IMapItemPool"_ustr); pIMapPool->registerItemInfoPackage(getItemInfoPackageIMapWindow()); } @@ -282,17 +282,17 @@ rtl::Reference<SdrObject> IMapWindow::CreateObj( const IMapObject* pIMapObj ) SfxItemSet aSet( pModel->GetItemPool() ); aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); - aSet.Put( XFillColorItem( "", TRANSCOL ) ); + aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) ); if ( !pIMapObj->IsActive() ) { aSet.Put( XFillTransparenceItem( 100 ) ); - aSet.Put( XLineColorItem( "", COL_RED ) ); + aSet.Put( XLineColorItem( u""_ustr, COL_RED ) ); } else { aSet.Put( XFillTransparenceItem( 50 ) ); - aSet.Put( XLineColorItem( "", COL_BLACK ) ); + aSet.Put( XLineColorItem( u""_ustr, COL_BLACK ) ); } pSdrObj->SetMergedItemSetAndBroadcast(aSet); @@ -310,7 +310,7 @@ void IMapWindow::InitSdrModel() SfxItemSet aSet( pModel->GetItemPool() ); - aSet.Put( XFillColorItem( "", TRANSCOL ) ); + aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) ); aSet.Put( XFillTransparenceItem( 50 ) ); pView->SetAttributes( aSet ); pView->SetFrameDragSingles(); @@ -496,20 +496,20 @@ bool IMapWindow::Command(const CommandEvent& rCEvt) { if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/imapmenu.ui")); - mxPopupMenu = xBuilder->weld_menu("menu"); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), u"svx/ui/imapmenu.ui"_ustr)); + mxPopupMenu = xBuilder->weld_menu(u"menu"_ustr); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); const size_t nMarked = rMarkList.GetMarkCount(); - mxPopupMenu->set_sensitive("url", false); - mxPopupMenu->set_sensitive("active", false); - mxPopupMenu->set_sensitive("macro", false); - mxPopupMenu->set_sensitive("selectall", pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount()); + mxPopupMenu->set_sensitive(u"url"_ustr, false); + mxPopupMenu->set_sensitive(u"active"_ustr, false); + mxPopupMenu->set_sensitive(u"macro"_ustr, false); + mxPopupMenu->set_sensitive(u"selectall"_ustr, pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount()); if ( !nMarked ) { - mxPopupMenu->set_sensitive("arrange", false); - mxPopupMenu->set_sensitive("delete", false); + mxPopupMenu->set_sensitive(u"arrange"_ustr, false); + mxPopupMenu->set_sensitive(u"delete"_ustr, false); } else { @@ -517,14 +517,14 @@ bool IMapWindow::Command(const CommandEvent& rCEvt) { SdrObject* pSdrObj = GetSelectedSdrObject(); - mxPopupMenu->set_sensitive("url", true); - mxPopupMenu->set_sensitive("active", true); - mxPopupMenu->set_sensitive("macro", true); - mxPopupMenu->set_active("active", GetIMapObj(pSdrObj)->IsActive()); + mxPopupMenu->set_sensitive(u"url"_ustr, true); + mxPopupMenu->set_sensitive(u"active"_ustr, true); + mxPopupMenu->set_sensitive(u"macro"_ustr, true); + mxPopupMenu->set_active(u"active"_ustr, GetIMapObj(pSdrObj)->IsActive()); } - mxPopupMenu->set_sensitive("arrange", true); - mxPopupMenu->set_sensitive("delete", true); + mxPopupMenu->set_sensitive(u"arrange"_ustr, true); + mxPopupMenu->set_sensitive(u"delete"_ustr, true); } MenuSelectHdl(mxPopupMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); @@ -563,7 +563,7 @@ sal_Int8 IMapWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) if (mxDropTargetHelper->IsDropFormatSupported(SotClipboardFormatId::NETSCAPE_BOOKMARK)) { - INetBookmark aBookMark( "", "" ); + INetBookmark aBookMark( u""_ustr, u""_ustr ); SdrObject* pSdrObj = GetHitSdrObj( rEvt.maPosPixel ); if( pSdrObj && TransferableDataHelper( rEvt.maDropEvent.Transferable ).GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aBookMark ) ) @@ -619,17 +619,17 @@ void IMapWindow::SetCurrentObjState( bool bActive ) GetIMapObj( pObj )->SetActive( bActive ); - aSet.Put( XFillColorItem( "", TRANSCOL ) ); + aSet.Put( XFillColorItem( u""_ustr, TRANSCOL ) ); if ( !bActive ) { aSet.Put( XFillTransparenceItem( 100 ) ); - aSet.Put( XLineColorItem( "", COL_RED ) ); + aSet.Put( XLineColorItem( u""_ustr, COL_RED ) ); } else { aSet.Put( XFillTransparenceItem( 50 ) ); - aSet.Put( XLineColorItem( "", COL_BLACK ) ); + aSet.Put( XLineColorItem( u""_ustr, COL_BLACK ) ); } pView->SetAttributes( aSet ); @@ -677,8 +677,8 @@ void IMapWindow::DoMacroAssign() aSet(*pIMapPool); SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); - aNamesItem.AddEvent( "MouseOver", "", SvMacroItemId::OnMouseOver ); - aNamesItem.AddEvent( "MouseOut", "", SvMacroItemId::OnMouseOut ); + aNamesItem.AddEvent( u"MouseOver"_ustr, u""_ustr, SvMacroItemId::OnMouseOver ); + aNamesItem.AddEvent( u"MouseOut"_ustr, u""_ustr, SvMacroItemId::OnMouseOut ); aSet.Put( aNamesItem ); SvxMacroItem aMacroItem(SID_ATTR_MACROITEM); diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 477e4047e828..9b837f4c2b03 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -325,7 +325,7 @@ void SvxLanguageBox::SetLanguageList(SvxLanguageListFlags nLangList, bool bHasLa } if (bAddSeparator) - m_xControl->append_separator(""); + m_xControl->append_separator(u""_ustr); bool bAddAvailable = (!(nLangList & SvxLanguageListFlags::ONLY_KNOWN) && ((nLangList & SvxLanguageListFlags::ALL) || @@ -423,7 +423,7 @@ weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const LanguageType nLangType, sal { int nAt = find_id( nLang ); if (nAt != -1) - return weld::ComboBoxEntry(""); + return weld::ComboBoxEntry(u""_ustr); } OUString aStrEntry = (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll) diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx index 852c92af1089..438a9da77571 100644 --- a/svx/source/dialog/linkwarn.cxx +++ b/svx/source/dialog/linkwarn.cxx @@ -22,8 +22,9 @@ #include <officecfg/Office/Common.hxx> SvxLinkWarningDialog::SvxLinkWarningDialog(weld::Widget* pParent, const OUString& _rFileName) - : MessageDialogController(pParent, "svx/ui/linkwarndialog.ui", "LinkWarnDialog", "ask") - , m_xWarningOnBox(m_xBuilder->weld_check_button("ask")) + : MessageDialogController(pParent, u"svx/ui/linkwarndialog.ui"_ustr, u"LinkWarnDialog"_ustr, + u"ask"_ustr) + , m_xWarningOnBox(m_xBuilder->weld_check_button(u"ask"_ustr)) { // replace filename OUString sInfoText = m_xDialog->get_primary_text(); diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 109ea534ecc7..2a3a2df6b82b 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -101,43 +101,43 @@ bool SvxGridItem::GetPresentation // TabPage Screen Settings SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) - : SfxTabPage(pPage, pController, "svx/ui/optgridpage.ui", "OptGridPage", &rCoreSet) + : SfxTabPage(pPage, pController, u"svx/ui/optgridpage.ui"_ustr, u"OptGridPage"_ustr, &rCoreSet) , bAttrModified(false) , m_Emode(WRITER_MODE) - , m_xCbxUseGridsnap(m_xBuilder->weld_check_button("usegridsnap")) - , m_xCbxUseGridsnapImg(m_xBuilder->weld_widget("lockusegridsnap")) - , m_xCbxGridVisible(m_xBuilder->weld_check_button("gridvisible")) - , m_xCbxGridVisibleImg(m_xBuilder->weld_widget("lockgridvisible")) - , m_xMtrFldDrawX(m_xBuilder->weld_metric_spin_button("mtrflddrawx", FieldUnit::CM)) - , m_xMtrFldDrawXImg(m_xBuilder->weld_widget("lockmtrflddrawx")) - , m_xMtrFldDrawY(m_xBuilder->weld_metric_spin_button("mtrflddrawy", FieldUnit::CM)) - , m_xMtrFldDrawYImg(m_xBuilder->weld_widget("lockmtrflddrawy")) - , m_xNumFldDivisionX(m_xBuilder->weld_spin_button("numflddivisionx")) - , m_xNumFldDivisionXImg(m_xBuilder->weld_widget("locknumflddivisionx")) - , m_xNumFldDivisionY(m_xBuilder->weld_spin_button("numflddivisiony")) - , m_xNumFldDivisionYImg(m_xBuilder->weld_widget("locknumflddivisiony")) - , m_xCbxSynchronize(m_xBuilder->weld_check_button("synchronize")) - , m_xCbxSynchronizeImg(m_xBuilder->weld_widget("locksynchronize")) - , m_xSnapFrames(m_xBuilder->weld_widget("snapframes")) - , m_xCbxSnapHelplines(m_xBuilder->weld_check_button("snaphelplines")) - , m_xCbxSnapHelplinesImg(m_xBuilder->weld_widget("locksnaphelplines")) - , m_xCbxSnapBorder(m_xBuilder->weld_check_button("snapborder")) - , m_xCbxSnapBorderImg(m_xBuilder->weld_widget("locksnapborder")) - , m_xCbxSnapFrame(m_xBuilder->weld_check_button("snapframe")) - , m_xCbxSnapFrameImg(m_xBuilder->weld_widget("locksnapframe")) - , m_xCbxSnapPoints(m_xBuilder->weld_check_button("snappoints")) - , m_xCbxSnapPointsImg(m_xBuilder->weld_widget("locksnappoints")) - , m_xMtrFldSnapArea(m_xBuilder->weld_metric_spin_button("mtrfldsnaparea", FieldUnit::PIXEL)) - , m_xMtrFldSnapAreaImg(m_xBuilder->weld_widget("lockmtrfldsnaparea")) - , m_xCbxOrtho(m_xBuilder->weld_check_button("ortho")) - , m_xCbxOrthoImg(m_xBuilder->weld_widget("lockortho")) - , m_xCbxBigOrtho(m_xBuilder->weld_check_button("bigortho")) - , m_xCbxBigOrthoImg(m_xBuilder->weld_widget("lockbigortho")) - , m_xCbxRotate(m_xBuilder->weld_check_button("rotate")) - , m_xCbxRotateImg(m_xBuilder->weld_widget("lockrotate")) - , m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button("mtrfldangle", FieldUnit::DEGREE)) - , m_xMtrFldBezAngle(m_xBuilder->weld_metric_spin_button("mtrfldbezangle", FieldUnit::DEGREE)) - , m_xMtrFldBezAngleImg(m_xBuilder->weld_widget("lockmtrfldbezangle")) + , m_xCbxUseGridsnap(m_xBuilder->weld_check_button(u"usegridsnap"_ustr)) + , m_xCbxUseGridsnapImg(m_xBuilder->weld_widget(u"lockusegridsnap"_ustr)) + , m_xCbxGridVisible(m_xBuilder->weld_check_button(u"gridvisible"_ustr)) + , m_xCbxGridVisibleImg(m_xBuilder->weld_widget(u"lockgridvisible"_ustr)) + , m_xMtrFldDrawX(m_xBuilder->weld_metric_spin_button(u"mtrflddrawx"_ustr, FieldUnit::CM)) + , m_xMtrFldDrawXImg(m_xBuilder->weld_widget(u"lockmtrflddrawx"_ustr)) + , m_xMtrFldDrawY(m_xBuilder->weld_metric_spin_button(u"mtrflddrawy"_ustr, FieldUnit::CM)) + , m_xMtrFldDrawYImg(m_xBuilder->weld_widget(u"lockmtrflddrawy"_ustr)) + , m_xNumFldDivisionX(m_xBuilder->weld_spin_button(u"numflddivisionx"_ustr)) + , m_xNumFldDivisionXImg(m_xBuilder->weld_widget(u"locknumflddivisionx"_ustr)) + , m_xNumFldDivisionY(m_xBuilder->weld_spin_button(u"numflddivisiony"_ustr)) + , m_xNumFldDivisionYImg(m_xBuilder->weld_widget(u"locknumflddivisiony"_ustr)) + , m_xCbxSynchronize(m_xBuilder->weld_check_button(u"synchronize"_ustr)) + , m_xCbxSynchronizeImg(m_xBuilder->weld_widget(u"locksynchronize"_ustr)) + , m_xSnapFrames(m_xBuilder->weld_widget(u"snapframes"_ustr)) + , m_xCbxSnapHelplines(m_xBuilder->weld_check_button(u"snaphelplines"_ustr)) + , m_xCbxSnapHelplinesImg(m_xBuilder->weld_widget(u"locksnaphelplines"_ustr)) + , m_xCbxSnapBorder(m_xBuilder->weld_check_button(u"snapborder"_ustr)) + , m_xCbxSnapBorderImg(m_xBuilder->weld_widget(u"locksnapborder"_ustr)) + , m_xCbxSnapFrame(m_xBuilder->weld_check_button(u"snapframe"_ustr)) + , m_xCbxSnapFrameImg(m_xBuilder->weld_widget(u"locksnapframe"_ustr)) + , m_xCbxSnapPoints(m_xBuilder->weld_check_button(u"snappoints"_ustr)) + , m_xCbxSnapPointsImg(m_xBuilder->weld_widget(u"locksnappoints"_ustr)) + , m_xMtrFldSnapArea(m_xBuilder->weld_metric_spin_button(u"mtrfldsnaparea"_ustr, FieldUnit::PIXEL)) + , m_xMtrFldSnapAreaImg(m_xBuilder->weld_widget(u"lockmtrfldsnaparea"_ustr)) + , m_xCbxOrtho(m_xBuilder->weld_check_button(u"ortho"_ustr)) + , m_xCbxOrthoImg(m_xBuilder->weld_widget(u"lockortho"_ustr)) + , m_xCbxBigOrtho(m_xBuilder->weld_check_button(u"bigortho"_ustr)) + , m_xCbxBigOrthoImg(m_xBuilder->weld_widget(u"lockbigortho"_ustr)) + , m_xCbxRotate(m_xBuilder->weld_check_button(u"rotate"_ustr)) + , m_xCbxRotateImg(m_xBuilder->weld_widget(u"lockrotate"_ustr)) + , m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button(u"mtrfldangle"_ustr, FieldUnit::DEGREE)) + , m_xMtrFldBezAngle(m_xBuilder->weld_metric_spin_button(u"mtrfldbezangle"_ustr, FieldUnit::DEGREE)) + , m_xMtrFldBezAngleImg(m_xBuilder->weld_widget(u"lockmtrfldbezangle"_ustr)) { // This page requires exchange Support SetExchangeSupport(); @@ -205,8 +205,8 @@ OUString SvxGridTabPage::GetAllStrings() { OUString sAllStrings; OUString labels[] - = { "label1", "label2", "flddrawx", "flddrawy", "label6", "label7", "label3", - "divisionx", "label4", "divisiony", "label5", "label8", "label9" }; + = { u"label1"_ustr, u"label2"_ustr, u"flddrawx"_ustr, u"flddrawy"_ustr, u"label6"_ustr, u"label7"_ustr, u"label3"_ustr, + u"divisionx"_ustr, u"label4"_ustr, u"divisiony"_ustr, u"label5"_ustr, u"label8"_ustr, u"label9"_ustr }; for (const auto& label : labels) { @@ -215,8 +215,8 @@ OUString SvxGridTabPage::GetAllStrings() } OUString checkButton[] - = { "usegridsnap", "gridvisible", "synchronize", "snaphelplines", "snapborder", - "snapframe", "snappoints", "ortho", "bigortho", "rotate" }; + = { u"usegridsnap"_ustr, u"gridvisible"_ustr, u"synchronize"_ustr, u"snaphelplines"_ustr, u"snapborder"_ustr, + u"snapframe"_ustr, u"snappoints"_ustr, u"ortho"_ustr, u"bigortho"_ustr, u"rotate"_ustr }; for (const auto& check : checkButton) { diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index fe44562ff230..1002a1ca21b6 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -227,7 +227,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO Size aDrawSize(0,aRect.GetHeight() / 6); aFont.SetFontSize(aDrawSize); rRenderContext.SetFont(aFont); - OUString sText("ABC"); + OUString sText(u"ABC"_ustr); Point aMove(1, rRenderContext.GetTextHeight()); sal_Unicode cArrow = 0x2193; tools::Long nAWidth = rRenderContext.GetTextWidth(sText.copy(0,1)); diff --git a/svx/source/dialog/pagenumberlistbox.cxx b/svx/source/dialog/pagenumberlistbox.cxx index 1b53e1d26350..fba4d0bcac3e 100644 --- a/svx/source/dialog/pagenumberlistbox.cxx +++ b/svx/source/dialog/pagenumberlistbox.cxx @@ -320,7 +320,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, // and in Impress' "Bullets and Numbering" dialog //#i5153# painting gray or black rectangles as 'normal' numbering text - tools::Long nWidth = pVDev->GetTextWidth("Preview"); + tools::Long nWidth = pVDev->GetTextWidth(u"Preview"_ustr); tools::Long nTextHeight = pVDev->GetTextHeight(); tools::Long nRectHeight = nTextHeight * 2 / 3; tools::Long nTopOffset = nTextHeight - nRectHeight; diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index cb7793c3de96..46778d69d4cb 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -33,8 +33,8 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button&, void) VclMessageType::Warning, VclButtonsType::Ok, m_aRepeatPasswdErrStr)); xBox->run(); - m_xNewPasswdED->set_text(""); - m_xRepeatPasswdED->set_text(""); + m_xNewPasswdED->set_text(u""_ustr); + m_xRepeatPasswdED->set_text(u""_ustr); m_xNewPasswdED->grab_focus(); bOK = false; } @@ -45,7 +45,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button&, void) VclMessageType::Warning, VclButtonsType::Ok, m_aOldPasswdErrStr)); xBox->run(); - m_xOldPasswdED->set_text(""); + m_xOldPasswdED->set_text(u""_ustr); m_xOldPasswdED->grab_focus(); bOK = false; } @@ -61,15 +61,15 @@ IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl, weld::Entry&, void) } SvxPasswordDialog::SvxPasswordDialog(weld::Window* pParent, bool bDisableOldPassword) - : SfxDialogController(pParent, "svx/ui/passwd.ui", "PasswordDialog") + : SfxDialogController(pParent, u"svx/ui/passwd.ui"_ustr, u"PasswordDialog"_ustr) , m_aOldPasswdErrStr(SvxResId(RID_SVXSTR_ERR_OLD_PASSWD)) , m_aRepeatPasswdErrStr(SvxResId(RID_SVXSTR_ERR_REPEAT_PASSWD )) - , m_xOldFL(m_xBuilder->weld_label("oldpass")) - , m_xOldPasswdFT(m_xBuilder->weld_label("oldpassL")) - , m_xOldPasswdED(m_xBuilder->weld_entry("oldpassEntry")) - , m_xNewPasswdED(m_xBuilder->weld_entry("newpassEntry")) - , m_xRepeatPasswdED(m_xBuilder->weld_entry("confirmpassEntry")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xOldFL(m_xBuilder->weld_label(u"oldpass"_ustr)) + , m_xOldPasswdFT(m_xBuilder->weld_label(u"oldpassL"_ustr)) + , m_xOldPasswdED(m_xBuilder->weld_entry(u"oldpassEntry"_ustr)) + , m_xNewPasswdED(m_xBuilder->weld_entry(u"newpassEntry"_ustr)) + , m_xRepeatPasswdED(m_xBuilder->weld_entry(u"confirmpassEntry"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { m_xOKBtn->connect_clicked(LINK(this, SvxPasswordDialog, ButtonHdl)); m_xRepeatPasswdED->connect_changed(LINK(this, SvxPasswordDialog, EditModifyHdl)); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 83cfe3052c05..e28fdb71d49e 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -186,33 +186,33 @@ void SvxRubyData_Impl::AssertOneEntry() } SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Window* pParent) - : SfxModelessDialogController(pBind, pCW, pParent, "svx/ui/asianphoneticguidedialog.ui", - "AsianPhoneticGuideDialog") + : SfxModelessDialogController(pBind, pCW, pParent, u"svx/ui/asianphoneticguidedialog.ui"_ustr, + u"AsianPhoneticGuideDialog"_ustr) , nLastPos(0) , nCurrentEdit(0) , bModified(false) , pBindings(pBind) , m_pImpl(new SvxRubyData_Impl) - , m_xLeft1ED(m_xBuilder->weld_entry("Left1ED")) - , m_xRight1ED(m_xBuilder->weld_entry("Right1ED")) - , m_xLeft2ED(m_xBuilder->weld_entry("Left2ED")) - , m_xRight2ED(m_xBuilder->weld_entry("Right2ED")) - , m_xLeft3ED(m_xBuilder->weld_entry("Left3ED")) - , m_xRight3ED(m_xBuilder->weld_entry("Right3ED")) - , m_xLeft4ED(m_xBuilder->weld_entry("Left4ED")) - , m_xRight4ED(m_xBuilder->weld_entry("Right4ED")) - , m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow", true)) - , m_xAdjustLB(m_xBuilder->weld_combo_box("adjustlb")) - , m_xPositionLB(m_xBuilder->weld_combo_box("positionlb")) - , m_xCharStyleFT(m_xBuilder->weld_label("styleft")) - , m_xCharStyleLB(m_xBuilder->weld_combo_box("stylelb")) - , m_xStylistPB(m_xBuilder->weld_button("styles")) - , m_xApplyPB(m_xBuilder->weld_button("ok")) - , m_xClosePB(m_xBuilder->weld_button("close")) + , m_xLeft1ED(m_xBuilder->weld_entry(u"Left1ED"_ustr)) + , m_xRight1ED(m_xBuilder->weld_entry(u"Right1ED"_ustr)) + , m_xLeft2ED(m_xBuilder->weld_entry(u"Left2ED"_ustr)) + , m_xRight2ED(m_xBuilder->weld_entry(u"Right2ED"_ustr)) + , m_xLeft3ED(m_xBuilder->weld_entry(u"Left3ED"_ustr)) + , m_xRight3ED(m_xBuilder->weld_entry(u"Right3ED"_ustr)) + , m_xLeft4ED(m_xBuilder->weld_entry(u"Left4ED"_ustr)) + , m_xRight4ED(m_xBuilder->weld_entry(u"Right4ED"_ustr)) + , m_xScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true)) + , m_xAdjustLB(m_xBuilder->weld_combo_box(u"adjustlb"_ustr)) + , m_xPositionLB(m_xBuilder->weld_combo_box(u"positionlb"_ustr)) + , m_xCharStyleFT(m_xBuilder->weld_label(u"styleft"_ustr)) + , m_xCharStyleLB(m_xBuilder->weld_combo_box(u"stylelb"_ustr)) + , m_xStylistPB(m_xBuilder->weld_button(u"styles"_ustr)) + , m_xApplyPB(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xClosePB(m_xBuilder->weld_button(u"close"_ustr)) , m_xContentArea(m_xDialog->weld_content_area()) - , m_xGrid(m_xBuilder->weld_widget("grid")) + , m_xGrid(m_xBuilder->weld_widget(u"grid"_ustr)) , m_xPreviewWin(new RubyPreview) - , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", *m_xPreviewWin)) + , m_xPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xPreviewWin)) { m_xCharStyleLB->make_sorted(); m_xPreviewWin->setRubyDialog(this); @@ -301,13 +301,13 @@ void SvxRubyDialog::Activate() try { Reference<XNameAccess> xFam = xSupplier->getStyleFamilies(); - Any aChar = xFam->getByName("CharacterStyles"); + Any aChar = xFam->getByName(u"CharacterStyles"_ustr); Reference<XNameContainer> xChar; aChar >>= xChar; Reference<XIndexAccess> xCharIdx(xChar, UNO_QUERY); if (xCharIdx.is()) { - OUString sUIName("DisplayName"); + OUString sUIName(u"DisplayName"_ustr); for (sal_Int32 nStyle = 0; nStyle < xCharIdx->getCount(); nStyle++) { Any aStyle = xCharIdx->getByIndex(nStyle); @@ -796,7 +796,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang break; case RubyAdjust_INDENT_BLOCK: { - tools::Long nCharWidth = rRenderContext.GetTextWidth("X"); + tools::Long nCharWidth = rRenderContext.GetTextWidth(u"X"_ustr); if (nOutTextWidth < (nRightEnd - nLeftStart - nCharWidth)) { nCharWidth /= 2; diff --git a/svx/source/dialog/signaturelinehelper.cxx b/svx/source/dialog/signaturelinehelper.cxx index 2c055e84db82..f2f8259237d2 100644 --- a/svx/source/dialog/signaturelinehelper.cxx +++ b/svx/source/dialog/signaturelinehelper.cxx @@ -120,7 +120,7 @@ uno::Reference<graphic::XGraphic> importSVG(std::u16string_view rSVG) = graphic::GraphicProvider::create(xContext); uno::Sequence<beans::PropertyValue> aMediaProperties{ comphelper::makePropertyValue( - "InputStream", xInputStream) }; + u"InputStream"_ustr, xInputStream) }; uno::Reference<graphic::XGraphic> xGraphic(xProvider->queryGraphic(aMediaProperties)); return xGraphic; } @@ -144,12 +144,14 @@ void setShapeCertificate(const SdrView* pView, // Remember the selected certificate. uno::Reference<drawing::XShape> xShape = pSignatureLine->getUnoShape(); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - comphelper::SequenceAsHashMap aMap(xShapeProps->getPropertyValue("InteropGrabBag")); - aMap["SignatureCertificate"] <<= xCertificate; - xShapeProps->setPropertyValue("InteropGrabBag", uno::Any(aMap.getAsConstPropertyValueList())); + comphelper::SequenceAsHashMap aMap(xShapeProps->getPropertyValue(u"InteropGrabBag"_ustr)); + aMap[u"SignatureCertificate"_ustr] <<= xCertificate; + xShapeProps->setPropertyValue(u"InteropGrabBag"_ustr, + uno::Any(aMap.getAsConstPropertyValueList())); // Read svg and replace placeholder texts. - OUString aSvgImage(svx::SignatureLineHelper::getSignatureImage("signature-line-draw.svg")); + OUString aSvgImage( + svx::SignatureLineHelper::getSignatureImage(u"signature-line-draw.svg"_ustr)); aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", SvxResId(RID_SVXSTR_SIGNATURELINE_DSIGNED_BY)); OUString aSignerName = svx::SignatureLineHelper::getSignerName(xCertificate); aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName); @@ -158,7 +160,7 @@ void setShapeCertificate(const SdrView* pView, aSvgImage = aSvgImage.replaceAll("[DATE]", aDate); uno::Reference<graphic::XGraphic> xGraphic = svx::SignatureLineHelper::importSVG(aSvgImage); - xShapeProps->setPropertyValue("Graphic", uno::Any(xGraphic)); + xShapeProps->setPropertyValue(u"Graphic"_ustr, uno::Any(xGraphic)); } } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 363d6a4e7146..bb66ecde8343 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -243,8 +243,8 @@ void SearchAttrItemList::Remove(size_t nPos) SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind) : SfxModelessDialogController(&rBind, pChildWin, pParent, - IsMobile() ? OUString("svx/ui/findreplacedialog-mobile.ui") : OUString("svx/ui/findreplacedialog.ui"), - "FindReplaceDialog") + IsMobile() ? u"svx/ui/findreplacedialog-mobile.ui"_ustr : u"svx/ui/findreplacedialog.ui"_ustr, + u"FindReplaceDialog"_ustr) , rBindings(rBind) , m_aPresentIdle("Bring SvxSearchDialog to Foreground") , bWriter(false) @@ -257,55 +257,55 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi , nModifyFlag(ModifyFlags::NONE) , pReplaceList(new SearchAttrItemList) , nTransliterationFlags(TransliterationFlags::NONE) - , m_xSearchFrame(m_xBuilder->weld_frame("searchframe")) - , m_xSearchLB(m_xBuilder->weld_combo_box("searchterm")) - , m_xSearchTmplLB(m_xBuilder->weld_combo_box("searchlist")) - , m_xSearchAttrText(m_xBuilder->weld_label("searchdesc")) - , m_xSearchLabel(m_xBuilder->weld_label("searchlabel")) - , m_xSearchIcon(m_xBuilder->weld_image("searchicon")) - , m_xSearchBox(m_xBuilder->weld_box("searchbox")) - , m_xReplaceFrame(m_xBuilder->weld_frame("replaceframe")) - , m_xReplaceLB(m_xBuilder->weld_combo_box("replaceterm")) - , m_xReplaceTmplLB(m_xBuilder->weld_combo_box("replacelist")) - , m_xReplaceAttrText(m_xBuilder->weld_label("replacedesc")) - , m_xSearchBtn(m_xBuilder->weld_button("search")) - , m_xBackSearchBtn(m_xBuilder->weld_button("backsearch")) - , m_xSearchAllBtn(m_xBuilder->weld_button("searchall")) - , m_xReplaceBtn(m_xBuilder->weld_button("replace")) - , m_xReplaceAllBtn(m_xBuilder->weld_button("replaceall")) - , m_xComponentFrame(m_xBuilder->weld_frame("componentframe")) - , m_xSearchComponent1PB(m_xBuilder->weld_button("component1")) - , m_xSearchComponent2PB(m_xBuilder->weld_button("component2")) - , m_xMatchCaseCB(m_xBuilder->weld_check_button("matchcase")) - , m_xSearchFormattedCB(m_xBuilder->weld_check_button("searchformatted")) - , m_xWordBtn(m_xBuilder->weld_check_button("wholewords")) - , m_xCloseBtn(m_xBuilder->weld_button("close")) - , m_xHelpBtn(m_xBuilder->weld_button("help")) - , m_xIncludeDiacritics(m_xBuilder->weld_check_button("includediacritics")) - , m_xIncludeKashida(m_xBuilder->weld_check_button("includekashida")) - , m_xOtherOptionsExpander(m_xBuilder->weld_expander("OptionsExpander")) - , m_xSelectionBtn(m_xBuilder->weld_check_button("selection")) - , m_xRegExpBtn(m_xBuilder->weld_check_button("regexp")) - , m_xWildcardBtn(m_xBuilder->weld_check_button("wildcard")) - , m_xSimilarityBox(m_xBuilder->weld_check_button("similarity")) - , m_xSimilarityBtn(m_xBuilder->weld_button("similaritybtn")) - , m_xLayoutBtn(m_xBuilder->weld_check_button("layout")) - , m_xNotesBtn(m_xBuilder->weld_check_button("notes")) - , m_xJapMatchFullHalfWidthCB(m_xBuilder->weld_check_button("matchcharwidth")) - , m_xJapOptionsCB(m_xBuilder->weld_check_button("soundslike")) - , m_xReplaceBackwardsCB(m_xBuilder->weld_check_button("replace_backwards")) - , m_xJapOptionsBtn(m_xBuilder->weld_button("soundslikebtn")) - , m_xAttributeBtn(m_xBuilder->weld_button("attributes")) - , m_xFormatBtn(m_xBuilder->weld_button("format")) - , m_xNoFormatBtn(m_xBuilder->weld_button("noformat")) - , m_xCalcGrid(m_xBuilder->weld_widget("calcgrid")) - , m_xCalcSearchInFT(m_xBuilder->weld_label("searchinlabel")) - , m_xCalcSearchInLB(m_xBuilder->weld_combo_box("calcsearchin")) - , m_xCalcSearchDirFT(m_xBuilder->weld_label("searchdir")) - , m_xRowsBtn(m_xBuilder->weld_radio_button("rows")) - , m_xColumnsBtn(m_xBuilder->weld_radio_button("cols")) - , m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets")) - , m_xCalcStrFT(m_xBuilder->weld_label("entirecells")) + , m_xSearchFrame(m_xBuilder->weld_frame(u"searchframe"_ustr)) + , m_xSearchLB(m_xBuilder->weld_combo_box(u"searchterm"_ustr)) + , m_xSearchTmplLB(m_xBuilder->weld_combo_box(u"searchlist"_ustr)) + , m_xSearchAttrText(m_xBuilder->weld_label(u"searchdesc"_ustr)) + , m_xSearchLabel(m_xBuilder->weld_label(u"searchlabel"_ustr)) + , m_xSearchIcon(m_xBuilder->weld_image(u"searchicon"_ustr)) + , m_xSearchBox(m_xBuilder->weld_box(u"searchbox"_ustr)) + , m_xReplaceFrame(m_xBuilder->weld_frame(u"replaceframe"_ustr)) + , m_xReplaceLB(m_xBuilder->weld_combo_box(u"replaceterm"_ustr)) + , m_xReplaceTmplLB(m_xBuilder->weld_combo_box(u"replacelist"_ustr)) + , m_xReplaceAttrText(m_xBuilder->weld_label(u"replacedesc"_ustr)) + , m_xSearchBtn(m_xBuilder->weld_button(u"search"_ustr)) + , m_xBackSearchBtn(m_xBuilder->weld_button(u"backsearch"_ustr)) + , m_xSearchAllBtn(m_xBuilder->weld_button(u"searchall"_ustr)) + , m_xReplaceBtn(m_xBuilder->weld_button(u"replace"_ustr)) + , m_xReplaceAllBtn(m_xBuilder->weld_button(u"replaceall"_ustr)) + , m_xComponentFrame(m_xBuilder->weld_frame(u"componentframe"_ustr)) + , m_xSearchComponent1PB(m_xBuilder->weld_button(u"component1"_ustr)) + , m_xSearchComponent2PB(m_xBuilder->weld_button(u"component2"_ustr)) + , m_xMatchCaseCB(m_xBuilder->weld_check_button(u"matchcase"_ustr)) + , m_xSearchFormattedCB(m_xBuilder->weld_check_button(u"searchformatted"_ustr)) + , m_xWordBtn(m_xBuilder->weld_check_button(u"wholewords"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_button(u"close"_ustr)) + , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr)) + , m_xIncludeDiacritics(m_xBuilder->weld_check_button(u"includediacritics"_ustr)) + , m_xIncludeKashida(m_xBuilder->weld_check_button(u"includekashida"_ustr)) + , m_xOtherOptionsExpander(m_xBuilder->weld_expander(u"OptionsExpander"_ustr)) + , m_xSelectionBtn(m_xBuilder->weld_check_button(u"selection"_ustr)) + , m_xRegExpBtn(m_xBuilder->weld_check_button(u"regexp"_ustr)) + , m_xWildcardBtn(m_xBuilder->weld_check_button(u"wildcard"_ustr)) + , m_xSimilarityBox(m_xBuilder->weld_check_button(u"similarity"_ustr)) + , m_xSimilarityBtn(m_xBuilder->weld_button(u"similaritybtn"_ustr)) + , m_xLayoutBtn(m_xBuilder->weld_check_button(u"layout"_ustr)) + , m_xNotesBtn(m_xBuilder->weld_check_button(u"notes"_ustr)) + , m_xJapMatchFullHalfWidthCB(m_xBuilder->weld_check_button(u"matchcharwidth"_ustr)) + , m_xJapOptionsCB(m_xBuilder->weld_check_button(u"soundslike"_ustr)) + , m_xReplaceBackwardsCB(m_xBuilder->weld_check_button(u"replace_backwards"_ustr)) + , m_xJapOptionsBtn(m_xBuilder->weld_button(u"soundslikebtn"_ustr)) + , m_xAttributeBtn(m_xBuilder->weld_button(u"attributes"_ustr)) + , m_xFormatBtn(m_xBuilder->weld_button(u"format"_ustr)) + , m_xNoFormatBtn(m_xBuilder->weld_button(u"noformat"_ustr)) + , m_xCalcGrid(m_xBuilder->weld_widget(u"calcgrid"_ustr)) + , m_xCalcSearchInFT(m_xBuilder->weld_label(u"searchinlabel"_ustr)) + , m_xCalcSearchInLB(m_xBuilder->weld_combo_box(u"calcsearchin"_ustr)) + , m_xCalcSearchDirFT(m_xBuilder->weld_label(u"searchdir"_ustr)) + , m_xRowsBtn(m_xBuilder->weld_radio_button(u"rows"_ustr)) + , m_xColumnsBtn(m_xBuilder->weld_radio_button(u"cols"_ustr)) + , m_xAllSheetsCB(m_xBuilder->weld_check_button(u"allsheets"_ustr)) + , m_xCalcStrFT(m_xBuilder->weld_label(u"entirecells"_ustr)) { if (comphelper::LibreOfficeKit::isActive()) { @@ -320,7 +320,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi m_xSearchAttrText->hide(); m_xSearchLabel->set_font_color(Color(0x00, 0x47, 0x85)); - this->SetSearchLabel(""); // hide the message but keep the box height + this->SetSearchLabel(u""_ustr); // hide the message but keep the box height m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here m_xReplaceTmplLB->make_sorted(); @@ -454,7 +454,7 @@ void SvxSearchDialog::Construct_Impl() bool bSearchComponent2 = false; if(xDispatchProv.is()) { - OUString sTarget("_self"); + OUString sTarget(u"_self"_ustr); pImpl->xCommand1Dispatch = xDispatchProv->queryDispatch(pImpl->aCommand1URL, sTarget, 0); if (pImpl->xCommand1Dispatch.is()) bSearchComponent1 = true; @@ -471,22 +471,22 @@ void SvxSearchDialog::Construct_Impl() uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider = configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() ); uno::Sequence< uno::Any > aArgs { - Any(OUString( "/org.openoffice.Office.Common/SearchOptions/")) }; + Any(u"/org.openoffice.Office.Common/SearchOptions/"_ustr) }; uno::Reference< uno::XInterface > xIFace = xConfigurationProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgs); uno::Reference< container::XNameAccess> xDirectAccess(xIFace, uno::UNO_QUERY); if(xDirectAccess.is()) { OUString sTemp; - uno::Any aRet = xDirectAccess->getByName("ComponentSearchGroupLabel"); + uno::Any aRet = xDirectAccess->getByName(u"ComponentSearchGroupLabel"_ustr); aRet >>= sTemp; m_xComponentFrame->set_label(sTemp); - aRet = xDirectAccess->getByName("ComponentSearchCommandLabel1"); + aRet = xDirectAccess->getByName(u"ComponentSearchCommandLabel1"_ustr); aRet >>= sTemp; m_xSearchComponent1PB->set_label( sTemp ); - aRet = xDirectAccess->getByName("ComponentSearchCommandLabel2"); + aRet = xDirectAccess->getByName(u"ComponentSearchCommandLabel2"_ustr); aRet >>= sTemp; m_xSearchComponent2PB->set_label( sTemp ); } @@ -2039,7 +2039,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, weld::Button&, void) if ( bSearch ) { pSearchList->Clear(); - m_xSearchAttrText->set_label( "" ); + m_xSearchAttrText->set_label( u""_ustr ); if (m_xSearchAttrText->get_visible()) { m_xSearchAttrText->hide(); @@ -2049,7 +2049,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, weld::Button&, void) else { pReplaceList->Clear(); - m_xReplaceAttrText->set_label( "" ); + m_xReplaceAttrText->set_label( u""_ustr ); if (m_xReplaceAttrText->get_visible()) { m_xReplaceAttrText->hide(); @@ -2211,7 +2211,7 @@ void SvxSearchDialog::SetModifyFlag_Impl( const weld::Widget* pCtrl ) nModifyFlag |= ModifyFlags::Search; m_xSearchLB->set_entry_message_type(weld::EntryMessageType::Normal); if (!SvxSearchDialogWrapper::GetSearchLabel().isEmpty()) - SvxSearchDialogWrapper::SetSearchLabel(""); + SvxSearchDialogWrapper::SetSearchLabel(u""_ustr); } else if ( m_xReplaceLB.get() == pCtrl ) nModifyFlag |= ModifyFlags::Replace; @@ -2355,9 +2355,9 @@ static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& rViewFr css::uno::Reference< css::beans::XPropertySet > xPropSet( rViewFrame.GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; css::uno::Reference< css::ui::XUIElement > xUIElement = - xLayoutManager->getElement("private:resource/toolbar/findbar"); + xLayoutManager->getElement(u"private:resource/toolbar/findbar"_ustr); if (!xUIElement.is()) return; css::uno::Reference< css::awt::XWindow > xWindow( @@ -2387,11 +2387,11 @@ OUString SvxSearchDialogWrapper::GetSearchLabel() css::uno::Reference< css::beans::XPropertySet > xPropSet( pViewFrame->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; if (!xLayoutManager.is()) return OUString(); css::uno::Reference< css::ui::XUIElement > xUIElement = - xLayoutManager->getElement("private:resource/toolbar/findbar"); + xLayoutManager->getElement(u"private:resource/toolbar/findbar"_ustr); if (!xUIElement.is()) return OUString(); css::uno::Reference< css::awt::XWindow > xWindow( diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 11ac2c6a2755..442256081e5b 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -51,7 +51,7 @@ static vcl::Font& lcl_GetDefaultBulletFont() { static vcl::Font aDefBulletFont = []() { - static vcl::Font tmp("OpenSymbol", "", Size(0, 14)); + static vcl::Font tmp(u"OpenSymbol"_ustr, u""_ustr, Size(0, 14)); tmp.SetCharSet( RTL_TEXTENCODING_SYMBOL ); tmp.SetFamily( FAMILY_DONTKNOW ); tmp.SetPitch( PITCH_DONTKNOW ); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 17c4edaa930d..d1824a25d469 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -538,7 +538,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) if (aSelection.eType == RulerType::DontKnow) { - SetQuickHelpText(""); + SetQuickHelpText(u""_ustr); return; } @@ -624,7 +624,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) } default: { - SetQuickHelpText(""); + SetQuickHelpText(u""_ustr); break; } } @@ -3313,8 +3313,8 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) tools::Rectangle aRect(rCommandEvent.GetMousePosPixel(), Size(1, 1)); weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect); - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/rulermenu.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"svx/ui/rulermenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if ( !mpTabs.empty() && diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 7adda3da17fa..0df0ffdc2549 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -113,13 +113,13 @@ void WeldEditView::makeEditEngine() vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont()); pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, + u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO)); pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, + u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK)); pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, + u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL)); pItemPool->SetUserDefaultItem( @@ -829,7 +829,10 @@ public: m_xTextHelper->RemoveEventListener(rListener); } - virtual OUString SAL_CALL getImplementationName() override { return "WeldEditAccessible"; } + virtual OUString SAL_CALL getImplementationName() override + { + return u"WeldEditAccessible"_ustr; + } virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override { @@ -838,8 +841,9 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "css::accessibility::Accessible", "css::accessibility::AccessibleComponent", - "css::accessibility::AccessibleContext" }; + return { u"css::accessibility::Accessible"_ustr, + u"css::accessibility::AccessibleComponent"_ustr, + u"css::accessibility::AccessibleContext"_ustr }; } }; @@ -1705,12 +1709,12 @@ public: virtual StringMap get_state() override { StringMap aMap = WindowUIObject::get_state(); - aMap["Text"] = mpEditView->GetText(); + aMap[u"Text"_ustr] = mpEditView->GetText(); return aMap; } private: - virtual OUString get_name() const override { return "WeldEditViewUIObject"; } + virtual OUString get_name() const override { return u"WeldEditViewUIObject"_ustr; } }; } diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 82b4056b4039..06dccc7536f1 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -86,110 +86,110 @@ namespace { Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent) : SfxDockingWindow(pInBindings, pCW, pParent, - "Docking3DEffects", "svx/ui/docking3deffects.ui") - - , m_xBtnGeo(m_xBuilder->weld_toggle_button("geometry")) - , m_xBtnRepresentation(m_xBuilder->weld_toggle_button("representation")) - , m_xBtnLight(m_xBuilder->weld_toggle_button("light")) - , m_xBtnTexture(m_xBuilder->weld_toggle_button("texture")) - , m_xBtnMaterial(m_xBuilder->weld_toggle_button("material")) - , m_xBtnUpdate(m_xBuilder->weld_toggle_button("update")) - , m_xBtnAssign(m_xBuilder->weld_button("assign")) - - , m_xFLGeometrie(m_xBuilder->weld_container("geoframe")) - , m_xFtPercentDiagonal(m_xBuilder->weld_label("diagonalft")) - , m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button("diagonal", FieldUnit::PERCENT)) - , m_xFtBackscale(m_xBuilder->weld_label("scaleddepthft")) - , m_xMtrBackscale(m_xBuilder->weld_metric_spin_button("scaleddepth", FieldUnit::PERCENT)) - , m_xFtEndAngle(m_xBuilder->weld_label("angleft")) - , m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE)) - , m_xFtDepth(m_xBuilder->weld_label("depthft")) - , m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", FieldUnit::CM)) - - , m_xFLSegments(m_xBuilder->weld_container("segmentsframe")) - , m_xNumHorizontal(m_xBuilder->weld_spin_button("hori")) - , m_xNumVertical(m_xBuilder->weld_spin_button("veri")) - - , m_xFLNormals(m_xBuilder->weld_container("normals")) - , m_xBtnNormalsObj(m_xBuilder->weld_toggle_button("objspecific")) - , m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button("flat")) - , m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button("spherical")) - , m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button("invertnormals")) - , m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button("doublesidedillum")) - , m_xBtnDoubleSided(m_xBuilder->weld_toggle_button("doublesided")) - - , m_xFLRepresentation(m_xBuilder->weld_container("shadingframe")) - , m_xLbShademode(m_xBuilder->weld_combo_box("mode")) - - , m_xFLShadow(m_xBuilder->weld_container("shadowframe")) - , m_xBtnShadow3d(m_xBuilder->weld_toggle_button("shadow")) - , m_xFtSlant(m_xBuilder->weld_label("slantft")) - , m_xMtrSlant(m_xBuilder->weld_metric_spin_button("slant", FieldUnit::DEGREE)) - - , m_xFLCamera(m_xBuilder->weld_container("cameraframe")) - , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM)) - , m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button("focal", FieldUnit::CM)) - - , m_xFLLight(m_xBuilder->weld_container("illumframe")) - , m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button("light1"))) - , m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button("light2"))) - , m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button("light3"))) - , m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button("light4"))) - , m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button("light5"))) - , m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button("light6"))) - , m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button("light7"))) - , m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button("light8"))) - , m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor1"), [this]{ return GetFrameWeld(); })) - , m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor2"), [this]{ return GetFrameWeld(); })) - , m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor3"), [this]{ return GetFrameWeld(); })) - , m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor4"), [this]{ return GetFrameWeld(); })) - , m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor5"), [this]{ return GetFrameWeld(); })) - , m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor6"), [this]{ return GetFrameWeld(); })) - , m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor7"), [this]{ return GetFrameWeld(); })) - , m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor8"), [this]{ return GetFrameWeld(); })) - , m_xBtnLightColor(m_xBuilder->weld_button("colorbutton1")) - , m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button("ambientcolor"), [this]{ return GetFrameWeld(); })) - , m_xBtnAmbientColor(m_xBuilder->weld_button("colorbutton2")) - - , m_xFLTexture(m_xBuilder->weld_container("textureframe")) - , m_xBtnTexLuminance(m_xBuilder->weld_toggle_button("textype")) - , m_xBtnTexColor(m_xBuilder->weld_toggle_button("texcolor")) - , m_xBtnTexReplace(m_xBuilder->weld_toggle_button("texreplace")) - , m_xBtnTexModulate(m_xBuilder->weld_toggle_button("texmodulate")) - , m_xBtnTexObjectX(m_xBuilder->weld_toggle_button("texobjx")) - , m_xBtnTexParallelX(m_xBuilder->weld_toggle_button("texparallelx")) - , m_xBtnTexCircleX(m_xBuilder->weld_toggle_button("texcirclex")) - , m_xBtnTexObjectY(m_xBuilder->weld_toggle_button("texobjy")) - , m_xBtnTexParallelY(m_xBuilder->weld_toggle_button("texparallely")) - , m_xBtnTexCircleY(m_xBuilder->weld_toggle_button("texcircley")) - , m_xBtnTexFilter(m_xBuilder->weld_toggle_button("texfilter")) - - , m_xFLMaterial(m_xBuilder->weld_container("materialframe")) - , m_xLbMatFavorites(m_xBuilder->weld_combo_box("favorites")) - , m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button("objcolor"), [this]{ return GetFrameWeld(); })) - , m_xBtnMatColor(m_xBuilder->weld_button("colorbutton3")) - , m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button("illumcolor"), [this]{ return GetFrameWeld(); })) - , m_xBtnEmissionColor(m_xBuilder->weld_button("colorbutton4")) - - , m_xFLMatSpecular(m_xBuilder->weld_container("specframe")) - , m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button("speccolor"), [this]{ return GetFrameWeld(); })) - , m_xBtnSpecularColor(m_xBuilder->weld_button("colorbutton5")) - , m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button("intensity", FieldUnit::PERCENT)) + u"Docking3DEffects"_ustr, u"svx/ui/docking3deffects.ui"_ustr) + + , m_xBtnGeo(m_xBuilder->weld_toggle_button(u"geometry"_ustr)) + , m_xBtnRepresentation(m_xBuilder->weld_toggle_button(u"representation"_ustr)) + , m_xBtnLight(m_xBuilder->weld_toggle_button(u"light"_ustr)) + , m_xBtnTexture(m_xBuilder->weld_toggle_button(u"texture"_ustr)) + , m_xBtnMaterial(m_xBuilder->weld_toggle_button(u"material"_ustr)) + , m_xBtnUpdate(m_xBuilder->weld_toggle_button(u"update"_ustr)) + , m_xBtnAssign(m_xBuilder->weld_button(u"assign"_ustr)) + + , m_xFLGeometrie(m_xBuilder->weld_container(u"geoframe"_ustr)) + , m_xFtPercentDiagonal(m_xBuilder->weld_label(u"diagonalft"_ustr)) + , m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button(u"diagonal"_ustr, FieldUnit::PERCENT)) + , m_xFtBackscale(m_xBuilder->weld_label(u"scaleddepthft"_ustr)) + , m_xMtrBackscale(m_xBuilder->weld_metric_spin_button(u"scaleddepth"_ustr, FieldUnit::PERCENT)) + , m_xFtEndAngle(m_xBuilder->weld_label(u"angleft"_ustr)) + , m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button(u"angle"_ustr, FieldUnit::DEGREE)) + , m_xFtDepth(m_xBuilder->weld_label(u"depthft"_ustr)) + , m_xMtrDepth(m_xBuilder->weld_metric_spin_button(u"depth"_ustr, FieldUnit::CM)) + + , m_xFLSegments(m_xBuilder->weld_container(u"segmentsframe"_ustr)) + , m_xNumHorizontal(m_xBuilder->weld_spin_button(u"hori"_ustr)) + , m_xNumVertical(m_xBuilder->weld_spin_button(u"veri"_ustr)) + + , m_xFLNormals(m_xBuilder->weld_container(u"normals"_ustr)) + , m_xBtnNormalsObj(m_xBuilder->weld_toggle_button(u"objspecific"_ustr)) + , m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button(u"flat"_ustr)) + , m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button(u"spherical"_ustr)) + , m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button(u"invertnormals"_ustr)) + , m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button(u"doublesidedillum"_ustr)) + , m_xBtnDoubleSided(m_xBuilder->weld_toggle_button(u"doublesided"_ustr)) + + , m_xFLRepresentation(m_xBuilder->weld_container(u"shadingframe"_ustr)) + , m_xLbShademode(m_xBuilder->weld_combo_box(u"mode"_ustr)) + + , m_xFLShadow(m_xBuilder->weld_container(u"shadowframe"_ustr)) + , m_xBtnShadow3d(m_xBuilder->weld_toggle_button(u"shadow"_ustr)) + , m_xFtSlant(m_xBuilder->weld_label(u"slantft"_ustr)) + , m_xMtrSlant(m_xBuilder->weld_metric_spin_button(u"slant"_ustr, FieldUnit::DEGREE)) + + , m_xFLCamera(m_xBuilder->weld_container(u"cameraframe"_ustr)) + , m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distance"_ustr, FieldUnit::CM)) + , m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button(u"focal"_ustr, FieldUnit::CM)) + + , m_xFLLight(m_xBuilder->weld_container(u"illumframe"_ustr)) + , m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button(u"light1"_ustr))) + , m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button(u"light2"_ustr))) + , m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button(u"light3"_ustr))) + , m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button(u"light4"_ustr))) + , m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button(u"light5"_ustr))) + , m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button(u"light6"_ustr))) + , m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button(u"light7"_ustr))) + , m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button(u"light8"_ustr))) + , m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor1"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor2"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor3"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor4"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor5"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor6"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor7"_ustr), [this]{ return GetFrameWeld(); })) + , m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button(u"lightcolor8"_ustr), [this]{ return GetFrameWeld(); })) + , m_xBtnLightColor(m_xBuilder->weld_button(u"colorbutton1"_ustr)) + , m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button(u"ambientcolor"_ustr), [this]{ return GetFrameWeld(); })) + , m_xBtnAmbientColor(m_xBuilder->weld_button(u"colorbutton2"_ustr)) + + , m_xFLTexture(m_xBuilder->weld_container(u"textureframe"_ustr)) + , m_xBtnTexLuminance(m_xBuilder->weld_toggle_button(u"textype"_ustr)) + , m_xBtnTexColor(m_xBuilder->weld_toggle_button(u"texcolor"_ustr)) + , m_xBtnTexReplace(m_xBuilder->weld_toggle_button(u"texreplace"_ustr)) + , m_xBtnTexModulate(m_xBuilder->weld_toggle_button(u"texmodulate"_ustr)) + , m_xBtnTexObjectX(m_xBuilder->weld_toggle_button(u"texobjx"_ustr)) + , m_xBtnTexParallelX(m_xBuilder->weld_toggle_button(u"texparallelx"_ustr)) + , m_xBtnTexCircleX(m_xBuilder->weld_toggle_button(u"texcirclex"_ustr)) + , m_xBtnTexObjectY(m_xBuilder->weld_toggle_button(u"texobjy"_ustr)) + , m_xBtnTexParallelY(m_xBuilder->weld_toggle_button(u"texparallely"_ustr)) + , m_xBtnTexCircleY(m_xBuilder->weld_toggle_button(u"texcircley"_ustr)) + , m_xBtnTexFilter(m_xBuilder->weld_toggle_button(u"texfilter"_ustr)) + + , m_xFLMaterial(m_xBuilder->weld_container(u"materialframe"_ustr)) + , m_xLbMatFavorites(m_xBuilder->weld_combo_box(u"favorites"_ustr)) + , m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button(u"objcolor"_ustr), [this]{ return GetFrameWeld(); })) + , m_xBtnMatColor(m_xBuilder->weld_button(u"colorbutton3"_ustr)) + , m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button(u"illumcolor"_ustr), [this]{ return GetFrameWeld(); })) + , m_xBtnEmissionColor(m_xBuilder->weld_button(u"colorbutton4"_ustr)) + + , m_xFLMatSpecular(m_xBuilder->weld_container(u"specframe"_ustr)) + , m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button(u"speccolor"_ustr), [this]{ return GetFrameWeld(); })) + , m_xBtnSpecularColor(m_xBuilder->weld_button(u"colorbutton5"_ustr)) + , m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button(u"intensity"_ustr, FieldUnit::PERCENT)) , m_xCtlPreview(new Svx3DPreviewControl) - , m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlPreview)) + , m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xCtlPreview)) - , m_xLightPreviewGrid(m_xBuilder->weld_container("lightpreviewgrid")) - , m_xHoriScale(m_xBuilder->weld_scale("horiscale")) - , m_xVertScale(m_xBuilder->weld_scale("vertscale")) - , m_xBtn_Corner(m_xBuilder->weld_button("corner")) + , m_xLightPreviewGrid(m_xBuilder->weld_container(u"lightpreviewgrid"_ustr)) + , m_xHoriScale(m_xBuilder->weld_scale(u"horiscale"_ustr)) + , m_xVertScale(m_xBuilder->weld_scale(u"vertscale"_ustr)) + , m_xBtn_Corner(m_xBuilder->weld_button(u"corner"_ustr)) , m_xLightPreview(new Svx3DLightControl) - , m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, "lightpreview", *m_xLightPreview)) + , m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, u"lightpreview"_ustr, *m_xLightPreview)) , m_xCtlLightPreview(new SvxLightCtl3D(*m_xLightPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner)) // TODO might be other body widget as arg 1 - , m_xBtnConvertTo3D(m_xBuilder->weld_button("to3d")) - , m_xBtnLatheObject(m_xBuilder->weld_button("tolathe")) - , m_xBtnPerspective(m_xBuilder->weld_toggle_button("perspective")) + , m_xBtnConvertTo3D(m_xBuilder->weld_button(u"to3d"_ustr)) + , m_xBtnLatheObject(m_xBuilder->weld_button(u"tolathe"_ustr)) + , m_xBtnPerspective(m_xBuilder->weld_toggle_button(u"perspective"_ustr)) , bUpdate(false) , eViewType(ViewType3D::Geo) @@ -521,40 +521,40 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) m_xMtrDepth->set_sensitive( !bCube && !bSphere ); if( bCube ) { - m_xNumHorizontal->set_text(""); - m_xNumVertical->set_text(""); + m_xNumHorizontal->set_text(u""_ustr); + m_xNumVertical->set_text(u""_ustr); } if( bCube || bSphere ) { - m_xMtrPercentDiagonal->set_text(""); - m_xMtrBackscale->set_text(""); - m_xMtrDepth->set_text(""); + m_xMtrPercentDiagonal->set_text(u""_ustr); + m_xMtrBackscale->set_text(u""_ustr); + m_xMtrDepth->set_text(u""_ustr); } // There is a final angle only for Lathe objects. m_xFtEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere ); m_xMtrEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere ); if( bExtrude || bCube || bSphere ) - m_xMtrEndAngle->set_text(""); + m_xMtrEndAngle->set_text(u""_ustr); } else { // Geometry - m_xNumHorizontal->set_text(""); - m_xNumVertical->set_text(""); + m_xNumHorizontal->set_text(u""_ustr); + m_xNumVertical->set_text(u""_ustr); m_xFLSegments->set_sensitive( false ); m_xFtEndAngle->set_sensitive( false ); m_xMtrEndAngle->set_sensitive( false ); - m_xMtrEndAngle->set_text(""); + m_xMtrEndAngle->set_text(u""_ustr); m_xFtDepth->set_sensitive( false ); m_xMtrDepth->set_sensitive( false ); - m_xMtrDepth->set_text(""); + m_xMtrDepth->set_text(u""_ustr); // Representation m_xFLShadow->set_sensitive(false); - m_xMtrDistance->set_text(""); - m_xMtrFocalLength->set_text(""); + m_xMtrDistance->set_text(u""_ustr); + m_xMtrFocalLength->set_text(u""_ustr); m_xFLCamera->set_sensitive( false ); //Lower Range @@ -593,7 +593,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xNumHorizontal->get_text().isEmpty() ) { - m_xNumHorizontal->set_text(""); + m_xNumHorizontal->set_text(u""_ustr); bUpdate = true; } } @@ -618,7 +618,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xNumVertical->get_text().isEmpty() ) { - m_xNumVertical->set_text(""); + m_xNumVertical->set_text(u""_ustr); bUpdate = true; } } @@ -647,7 +647,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrDepth->get_text().isEmpty() ) { - m_xMtrDepth->set_text(""); + m_xMtrDepth->set_text(u""_ustr); bUpdate = true; } } @@ -694,7 +694,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrPercentDiagonal->get_text().isEmpty() ) { - m_xMtrPercentDiagonal->set_text(""); + m_xMtrPercentDiagonal->set_text(u""_ustr); bUpdate = true; } } @@ -719,7 +719,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrBackscale->get_text().isEmpty() ) { - m_xMtrBackscale->set_text(""); + m_xMtrBackscale->set_text(u""_ustr); bUpdate = true; } } @@ -742,7 +742,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrEndAngle->get_text().isEmpty() ) { - m_xMtrEndAngle->set_text(""); + m_xMtrEndAngle->set_text(u""_ustr); bUpdate = true; } } @@ -881,7 +881,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrSlant->get_text().isEmpty() ) { - m_xMtrSlant->set_text(""); + m_xMtrSlant->set_text(u""_ustr); bUpdate = true; } } @@ -905,7 +905,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrDepth->get_text().isEmpty() ) { - m_xMtrDepth->set_text(""); + m_xMtrDepth->set_text(u""_ustr); bUpdate = true; } } @@ -929,7 +929,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrFocalLength->get_text().isEmpty() ) { - m_xMtrFocalLength->set_text(""); + m_xMtrFocalLength->set_text(u""_ustr); bUpdate = true; } } @@ -1559,7 +1559,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) { if( !m_xMtrMatSpecularIntensity->get_text().isEmpty() ) { - m_xMtrMatSpecularIntensity->set_text(""); + m_xMtrMatSpecularIntensity->set_text(u""_ustr); bUpdate = true; } } @@ -2122,7 +2122,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if (!m_xLbMatColor->IsNoSelection()) { aColor = m_xLbMatColor->GetSelectEntryColor(); - rAttrs.Put( XFillColorItem( "", aColor) ); + rAttrs.Put( XFillColorItem( u""_ustr, aColor) ); } else { diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index 8b2c869fd611..d2b71656b0c3 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -106,7 +106,7 @@ namespace svx try { Reference< XTablesSupplier > xSupTab; - _rxForm->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab; + _rxForm->getPropertyValue(u"SingleSelectQueryComposer"_ustr) >>= xSupTab; if(xSupTab.is()) { @@ -145,7 +145,7 @@ namespace svx static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { - s_nFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.ColumnDescriptorTransfer\""); + s_nFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.ColumnDescriptorTransfer\""_ustr); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; @@ -575,7 +575,7 @@ namespace svx static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { - s_nFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.MultipleColumnDescriptorTransfer\""); + s_nFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.MultipleColumnDescriptorTransfer\""_ustr); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx index 0f0f97c0ba70..dcce809dfc07 100644 --- a/svx/source/fmcomp/dbaobjectex.cxx +++ b/svx/source/fmcomp/dbaobjectex.cxx @@ -58,12 +58,12 @@ namespace svx static SotClipboardFormatId s_nFormFormat = static_cast<SotClipboardFormatId>(-1); if ( _bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nFormFormat ) { - s_nFormFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.FormComponentDescriptorTransfer\""); + s_nFormFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.FormComponentDescriptorTransfer\""_ustr); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); } else if ( !_bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nReportFormat) { - s_nReportFormat = SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"dbaccess.ReportComponentDescriptorTransfer\""); + s_nReportFormat = SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"dbaccess.ReportComponentDescriptorTransfer\""_ustr); OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nReportFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); } return _bExtractForm ? s_nFormFormat : s_nReportFormat; @@ -78,7 +78,7 @@ namespace svx Reference<XPropertySet> xProp; m_aDescriptor[DataAccessDescriptorProperty::Component] >>= xProp; if ( xProp.is() ) - xProp->getPropertyValue("IsForm") >>= bForm; + xProp->getPropertyValue(u"IsForm"_ustr) >>= bForm; } catch(const Exception&) {} diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index e77ad64aa714..3613615174e8 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -306,7 +306,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) // not interested in any results Reference< XPropertySet > xStatProps(xStatement,UNO_QUERY); - xStatProps->setPropertyValue("MaxRows", Any(sal_Int32(0))); + xStatProps->setPropertyValue(u"MaxRows"_ustr, Any(sal_Int32(0))); xResultSet = xStatement->executeQuery(); Reference< XColumnsSupplier > xSupplyCols(xResultSet, UNO_QUERY); @@ -487,7 +487,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) if ( ::comphelper::hasProperty(FM_PROP_ISCURRENCY, xField) && ::comphelper::getBOOL(xField->getPropertyValue(FM_PROP_ISCURRENCY))) { - aPossibleTypes.insert(aPossibleTypes.begin(), FM_COL_CURRENCYFIELD); + aPossibleTypes.insert(aPossibleTypes.begin(), u"" FM_COL_CURRENCYFIELD ""_ustr); aImgResId.insert(aImgResId.begin(), RID_SVXBMP_CURRENCYFIELD); aStrResId.insert(aStrResId.begin(), RID_STR_PROPTITLE_CURRENCYFIELD); } @@ -505,8 +505,8 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) OUString sPreferredType = aPossibleTypes[0]; if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.size() > 1)) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/colsmenu.ui")); - std::unique_ptr<weld::Menu> xTypeMenu(xBuilder->weld_menu("insertmenu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/colsmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xTypeMenu(xBuilder->weld_menu(u"insertmenu"_ustr)); int nMenuPos = 0; std::vector<OUString>::const_iterator iter; @@ -678,16 +678,16 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM if (bDesignMode) { int nMenuPos = 0; - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_TEXTFIELD, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_CHECKBOX, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_COMBOBOX, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_LISTBOX, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_DATEFIELD, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_TIMEFIELD, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_NUMERICFIELD, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_CURRENCYFIELD, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_PATTERNFIELD, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD); - InsertMenuItem(rInsertMenu, nMenuPos++, FM_COL_FORMATTEDFIELD, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_TEXTFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_CHECKBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_COMBOBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_LISTBOX ""_ustr, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_DATEFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_TIMEFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_NUMERICFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_CURRENCYFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_PATTERNFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD); + InsertMenuItem(rInsertMenu, nMenuPos++, u"" FM_COL_FORMATTEDFIELD ""_ustr, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD); } if (xCols.is() && nColId) @@ -712,43 +712,43 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM { int nMenuPos = 0; if (nColType != TYPE_TEXTFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_TEXTFIELD"1", SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_TEXTFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_EDIT), RID_SVXBMP_EDITBOX); if (nColType != TYPE_CHECKBOX) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_CHECKBOX"1", SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_CHECKBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_CHECKBOX), RID_SVXBMP_CHECKBOX); if (nColType != TYPE_COMBOBOX) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_COMBOBOX"1", SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_COMBOBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_COMBOBOX), RID_SVXBMP_COMBOBOX); if (nColType != TYPE_LISTBOX) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_LISTBOX"1", SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_LISTBOX"1"_ustr, SvxResId(RID_STR_PROPTITLE_LISTBOX), RID_SVXBMP_LISTBOX); if (nColType != TYPE_DATEFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_DATEFIELD"1", SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_DATEFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_DATEFIELD), RID_SVXBMP_DATEFIELD); if (nColType != TYPE_TIMEFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_TIMEFIELD"1", SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_TIMEFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_TIMEFIELD), RID_SVXBMP_TIMEFIELD); if (nColType != TYPE_NUMERICFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_NUMERICFIELD"1", SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_NUMERICFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_NUMERICFIELD), RID_SVXBMP_NUMERICFIELD); if (nColType != TYPE_CURRENCYFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_CURRENCYFIELD"1", SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_CURRENCYFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_CURRENCYFIELD), RID_SVXBMP_CURRENCYFIELD); if (nColType != TYPE_PATTERNFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_PATTERNFIELD"1", SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_PATTERNFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_PATTERNFIELD), RID_SVXBMP_PATTERNFIELD); if (nColType != TYPE_FORMATTEDFIELD) - InsertMenuItem(rChangeMenu, nMenuPos++, FM_COL_FORMATTEDFIELD"1", SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD); + InsertMenuItem(rChangeMenu, nMenuPos++, u"" FM_COL_FORMATTEDFIELD"1"_ustr, SvxResId(RID_STR_PROPTITLE_FORMATTED), RID_SVXBMP_FORMATTEDFIELD); } - rMenu.set_visible("change", bDesignMode && bMarked && xCols.is()); - rMenu.set_sensitive("change", bDesignMode && bMarked && xCols.is()); + rMenu.set_visible(u"change"_ustr, bDesignMode && bMarked && xCols.is()); + rMenu.set_sensitive(u"change"_ustr, bDesignMode && bMarked && xCols.is()); } else { - rMenu.set_visible("change", false); - rMenu.set_sensitive("change", false); + rMenu.set_visible(u"change"_ustr, false); + rMenu.set_sensitive(u"change"_ustr, false); } - rMenu.set_visible("insert", bDesignMode && xCols.is()); - rMenu.set_sensitive("insert", bDesignMode && xCols.is()); - rMenu.set_visible("delete", bDesignMode && bMarked && xCols.is()); - rMenu.set_sensitive("delete", bDesignMode && bMarked && xCols.is()); - rMenu.set_visible("column", bDesignMode && bMarked && xCols.is()); - rMenu.set_sensitive("column", bDesignMode && bMarked && xCols.is()); + rMenu.set_visible(u"insert"_ustr, bDesignMode && xCols.is()); + rMenu.set_sensitive(u"insert"_ustr, bDesignMode && xCols.is()); + rMenu.set_visible(u"delete"_ustr, bDesignMode && bMarked && xCols.is()); + rMenu.set_sensitive(u"delete"_ustr, bDesignMode && bMarked && xCols.is()); + rMenu.set_visible(u"column"_ustr, bDesignMode && bMarked && xCols.is()); + rMenu.set_sensitive(u"column"_ustr, bDesignMode && bMarked && xCols.is()); sal_uInt16 nHiddenCols = 0; if (xCols.is()) @@ -778,17 +778,17 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM } } } - rShowMenu.set_visible("more", xCols.is() && (nHiddenCols > 16)); - rMenu.set_visible("show", xCols.is() && (nHiddenCols > 0)); - rMenu.set_sensitive("show", xCols.is() && (nHiddenCols > 0)); + rShowMenu.set_visible(u"more"_ustr, xCols.is() && (nHiddenCols > 16)); + rMenu.set_visible(u"show"_ustr, xCols.is() && (nHiddenCols > 0)); + rMenu.set_sensitive(u"show"_ustr, xCols.is() && (nHiddenCols > 0)); // allow the 'hide column' item ? bool bAllowHide = bMarked; // a column is marked bAllowHide = bAllowHide || (!bDesignMode && (nPos != sal_uInt16(-1))); // OR we are in alive mode and have hit a column bAllowHide = bAllowHide && xCols.is(); // AND we have a column container bAllowHide = bAllowHide && (xCols->getCount()-nHiddenCols > 1); // AND there are at least two visible columns - rMenu.set_visible("hide", bAllowHide); - rMenu.set_sensitive("hide", bAllowHide); + rMenu.set_visible(u"hide"_ustr, bAllowHide); + rMenu.set_sensitive(u"hide"_ustr, bAllowHide); if (!bMarked) return; @@ -803,7 +803,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM if (eState >= SfxItemState::DEFAULT && pItem != nullptr) { bool bChecked = pItem && pItem->GetValue(); - rMenu.set_active("column", bChecked); + rMenu.set_active(u"column"_ustr, bChecked); } } } @@ -837,7 +837,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const weld::M } else if (rExecutionResult == "column") { - eInspectorAction = rMenu.get_active("column") ? eOpenInspector : eCloseInspector; + eInspectorAction = rMenu.get_active(u"column"_ustr) ? eOpenInspector : eCloseInspector; } else if (rExecutionResult.startsWith(FM_COL_TEXTFIELD)) { @@ -1007,11 +1007,11 @@ void FmGridHeader::triggerColumnContextMenu( const ::Point& _rPreferredPos ) sal_uInt16 nColId = GetItemId( _rPreferredPos ); // the menu - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/colsmenu.ui")); - std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); - std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu("insertmenu")); - std::unique_ptr<weld::Menu> xChangeMenu(xBuilder->weld_menu("changemenu")); - std::unique_ptr<weld::Menu> xShowMenu(xBuilder->weld_menu("showmenu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/colsmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr)); + std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu(u"insertmenu"_ustr)); + std::unique_ptr<weld::Menu> xChangeMenu(xBuilder->weld_menu(u"changemenu"_ustr)); + std::unique_ptr<weld::Menu> xShowMenu(xBuilder->weld_menu(u"showmenu"_ustr)); // let derivatives modify the menu PreExecuteColumnContextMenu(nColId, *xContextMenu, *xInsertMenu, *xChangeMenu, *xShowMenu); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index c15d67a57ee6..5c9b79f50a75 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -377,12 +377,12 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const OUString& ServiceName) OUString SAL_CALL FmXGridControl::getImplementationName() { - return "com.sun.star.form.FmXGridControl"; + return u"com.sun.star.form.FmXGridControl"_ustr; } css::uno::Sequence<OUString> SAL_CALL FmXGridControl::getSupportedServiceNames() { - return { FM_SUN_CONTROL_GRIDCONTROL, "com.sun.star.awt.UnoControl" }; + return { FM_SUN_CONTROL_GRIDCONTROL, u"com.sun.star.awt.UnoControl"_ustr }; } @@ -402,7 +402,7 @@ void SAL_CALL FmXGridControl::dispose() OUString FmXGridControl::GetComponentServiceName() const { - return "DBGrid"; + return u"DBGrid"_ustr; } @@ -1037,7 +1037,7 @@ void FmXGridPeer::columnChanged() FmXGridPeer::FmXGridPeer(const Reference< XComponentContext >& _rxContext) :m_xContext(_rxContext) - ,m_aMode("DataMode") + ,m_aMode(u"DataMode"_ustr) ,m_nCursorListening(0) ,m_bInterceptingDispatch(false) { @@ -2370,8 +2370,8 @@ css::uno::Sequence<OUString> FmXGridPeer::getSupportedModes() { static css::uno::Sequence<OUString> const aModes { - "DataMode", - "FilterMode" + u"DataMode"_ustr, + u"FilterMode"_ustr }; return aModes; } diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 83862229388b..31128317f9cc 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2964,7 +2964,7 @@ bool DbFilterField::commitControl() m_rColumn.GetField(), OUString(), aAppLocale, - ".", + u"."_ustr, getParseContext()); m_aText = aPreparedText; } @@ -3052,7 +3052,7 @@ void DbFilterField::Update() Reference<XPropertySet> xFormProp(xForm,UNO_QUERY); Reference< XTablesSupplier > xSupTab; - xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab; + xFormProp->getPropertyValue(u"SingleSelectQueryComposer"_ustr) >>= xSupTab; Reference< XConnection > xConnection(getConnection(xForm)); if (!xSupTab.is()) diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index dd66423e3298..e6e3f8b40bc2 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -303,16 +303,16 @@ void NavigationBar::PositionDataSource(sal_Int32 nRecord) } NavigationBar::NavigationBar(vcl::Window* pParent) - : InterimItemWindow(pParent, "svx/ui/navigationbar.ui", "NavigationBar") - , m_xRecordText(m_xBuilder->weld_label("recordtext")) - , m_xAbsolute(new NavigationBar::AbsolutePos(m_xBuilder->weld_entry("entry-noframe"), this)) - , m_xRecordOf(m_xBuilder->weld_label("recordof")) - , m_xRecordCount(m_xBuilder->weld_label("recordcount")) - , m_xFirstBtn(m_xBuilder->weld_button("first")) - , m_xPrevBtn(m_xBuilder->weld_button("prev")) - , m_xNextBtn(m_xBuilder->weld_button("next")) - , m_xLastBtn(m_xBuilder->weld_button("last")) - , m_xNewBtn(m_xBuilder->weld_button("new")) + : InterimItemWindow(pParent, u"svx/ui/navigationbar.ui"_ustr, u"NavigationBar"_ustr) + , m_xRecordText(m_xBuilder->weld_label(u"recordtext"_ustr)) + , m_xAbsolute(new NavigationBar::AbsolutePos(m_xBuilder->weld_entry(u"entry-noframe"_ustr), this)) + , m_xRecordOf(m_xBuilder->weld_label(u"recordof"_ustr)) + , m_xRecordCount(m_xBuilder->weld_label(u"recordcount"_ustr)) + , m_xFirstBtn(m_xBuilder->weld_button(u"first"_ustr)) + , m_xPrevBtn(m_xBuilder->weld_button(u"prev"_ustr)) + , m_xNextBtn(m_xBuilder->weld_button(u"next"_ustr)) + , m_xLastBtn(m_xBuilder->weld_button(u"last"_ustr)) + , m_xNewBtn(m_xBuilder->weld_button(u"new"_ustr)) , m_xPrevRepeater(std::make_shared<weld::ButtonPressRepeater>(*m_xPrevBtn, LINK(this,NavigationBar,OnClick))) , m_xNextRepeater(std::make_shared<weld::ButtonPressRepeater>(*m_xNextBtn, LINK(this,NavigationBar,OnClick))) , m_nCurrentPos(-1) @@ -1195,7 +1195,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, DbGridCo // retrieve the datebase of the Numberformatter try { - xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue(u"NullDate"_ustr) >>= m_aNullDate; } catch(Exception&) { @@ -2406,8 +2406,8 @@ void DbGridControl::PreExecuteRowContextMenu(weld::Menu& rMenu) // if only a blank row is selected then do not delete bDelete = bDelete && !((m_nOptions & DbGridControlOptions::Insert) && GetSelectRowCount() == 1 && IsRowSelected(GetRowCount() - 1)); - rMenu.set_visible("delete", bDelete); - rMenu.set_visible("save", IsModified()); + rMenu.set_visible(u"delete"_ustr, bDelete); + rMenu.set_visible(u"save"_ustr, IsModified()); // the undo is more difficult bool bCanUndo = IsModified(); @@ -2416,7 +2416,7 @@ void DbGridControl::PreExecuteRowContextMenu(weld::Menu& rMenu) nState = m_aMasterStateProvider.Call(DbGridControlNavigationBarState::Undo); bCanUndo &= ( 0 != nState ); - rMenu.set_visible("undo", bCanUndo); + rMenu.set_visible(u"undo"_ustr, bCanUndo); } void DbGridControl::PostExecuteRowContextMenu(const OUString& rExecutionResult) @@ -2523,8 +2523,8 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId) void DbGridControl::executeRowContextMenu(const Point& _rPreferredPos) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/rowsmenu.ui")); - std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/rowsmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr)); tools::Rectangle aRect(_rPreferredPos, Size(1,1)); weld::Window* pParent = weld::GetPopupParent(*this, aRect); @@ -2570,8 +2570,8 @@ void DbGridControl::Command(const CommandEvent& rEvt) { ::tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1)); weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect); - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/cellmenu.ui")); - std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"svx/ui/cellmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr)); if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty()) copyCellText(nRow, nColId); } diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx index 86bc1bbf46b9..34b5e9d636fb 100644 --- a/svx/source/fmcomp/xmlexchg.cxx +++ b/svx/source/fmcomp/xmlexchg.cxx @@ -42,7 +42,7 @@ namespace svx const SotClipboardFormatId nFormatId = SotExchange::GetFormat( _rFlavor ); if ( SotClipboardFormatId::XFORMS == nFormatId ) { - return SetString("XForms-Transferable"); + return SetString(u"XForms-Transferable"_ustr); } return false; } diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index d231bfb3cd52..30724801c5a9 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -148,7 +148,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const OS ONeutralParseContext::ONeutralParseContext() : OSystemParseContext(false) { - std::locale aLocale = Translate::Create("svx", LanguageTag("en-US")); + std::locale aLocale = Translate::Create("svx", LanguageTag(u"en-US"_ustr)); for (size_t i = 0; i < SAL_N_ELEMENTS(RID_RSC_SQL_INTERNATIONAL); ++i) m_aLocalizedKeywords.push_back(Translate::get(RID_RSC_SQL_INTERNATIONAL[i], aLocale)); } diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx index 99d1e73fe762..f85e8dbe6de2 100644 --- a/svx/source/form/dataaccessdescriptor.cxx +++ b/svx/source/form/dataaccessdescriptor.cxx @@ -158,20 +158,20 @@ namespace svx // the properties we know static MapString2PropertyEntry s_aProperties { - { OUString("ActiveConnection"), DataAccessDescriptorProperty::Connection, }, - { OUString("BookmarkSelection"), DataAccessDescriptorProperty::BookmarkSelection, }, - { OUString("Column"), DataAccessDescriptorProperty::ColumnObject, }, - { OUString("ColumnName"), DataAccessDescriptorProperty::ColumnName, }, - { OUString("Command"), DataAccessDescriptorProperty::Command, }, - { OUString("CommandType"), DataAccessDescriptorProperty::CommandType, }, - { OUString("Component"), DataAccessDescriptorProperty::Component, }, - { OUString("ConnectionResource"), DataAccessDescriptorProperty::ConnectionResource, }, - { OUString("Cursor"), DataAccessDescriptorProperty::Cursor, }, - { OUString("DataSourceName"), DataAccessDescriptorProperty::DataSource, }, - { OUString("DatabaseLocation"), DataAccessDescriptorProperty::DatabaseLocation, }, - { OUString("EscapeProcessing"), DataAccessDescriptorProperty::EscapeProcessing, }, - { OUString("Filter"), DataAccessDescriptorProperty::Filter, }, - { OUString("Selection"), DataAccessDescriptorProperty::Selection, } + { u"ActiveConnection"_ustr, DataAccessDescriptorProperty::Connection, }, + { u"BookmarkSelection"_ustr, DataAccessDescriptorProperty::BookmarkSelection, }, + { u"Column"_ustr, DataAccessDescriptorProperty::ColumnObject, }, + { u"ColumnName"_ustr, DataAccessDescriptorProperty::ColumnName, }, + { u"Command"_ustr, DataAccessDescriptorProperty::Command, }, + { u"CommandType"_ustr, DataAccessDescriptorProperty::CommandType, }, + { u"Component"_ustr, DataAccessDescriptorProperty::Component, }, + { u"ConnectionResource"_ustr, DataAccessDescriptorProperty::ConnectionResource, }, + { u"Cursor"_ustr, DataAccessDescriptorProperty::Cursor, }, + { u"DataSourceName"_ustr, DataAccessDescriptorProperty::DataSource, }, + { u"DatabaseLocation"_ustr, DataAccessDescriptorProperty::DatabaseLocation, }, + { u"EscapeProcessing"_ustr, DataAccessDescriptorProperty::EscapeProcessing, }, + { u"Filter"_ustr, DataAccessDescriptorProperty::Filter, }, + { u"Selection"_ustr, DataAccessDescriptorProperty::Selection, } }; return s_aProperties; diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index 9637a09d79a4..dfe71dc68634 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -139,26 +139,26 @@ namespace svx ::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext( m_xContext, - "/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument" + u"/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument"_ustr ) ); OUString sDatabaseFilter; OSL_VERIFY( aConfig.getNodeValue( "ooSetupFactoryActualFilter" ) >>= sDatabaseFilter ); // get the type this filter is responsible for Reference< XNameAccess > xFilterFactory( - m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", m_xContext), + m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.document.FilterFactory"_ustr, m_xContext), UNO_QUERY_THROW ); ::comphelper::NamedValueCollection aFilterProperties( xFilterFactory->getByName( sDatabaseFilter ) ); - OUString sDocumentType = aFilterProperties.getOrDefault( "Type", OUString() ); + OUString sDocumentType = aFilterProperties.getOrDefault( u"Type"_ustr, OUString() ); // get the extension(s) for this type Reference< XNameAccess > xTypeDetection( - m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", m_xContext), + m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.document.TypeDetection"_ustr, m_xContext), UNO_QUERY_THROW ); ::comphelper::NamedValueCollection aTypeProperties( xTypeDetection->getByName( sDocumentType ) ); - m_aFilterExtensions = aTypeProperties.getOrDefault( "Extensions", m_aFilterExtensions ); - m_sFilterUIName = aTypeProperties.getOrDefault( "UIName", m_sFilterUIName ); + m_aFilterExtensions = aTypeProperties.getOrDefault( u"Extensions"_ustr, m_aFilterExtensions ); + m_sFilterUIName = aTypeProperties.getOrDefault( u"UIName"_ustr, m_sFilterUIName ); } catch( const Exception& ) { @@ -170,7 +170,7 @@ namespace svx "DatabaseLocationInputController_Impl::impl_initFilterProperties_nothrow: unable to determine the file extension(s)!" ); if ( !m_aFilterExtensions.hasElements() ) { - m_aFilterExtensions = { "*.odb" }; + m_aFilterExtensions = { u"*.odb"_ustr }; } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 04234870769d..a3543bd73d00 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -146,28 +146,28 @@ namespace svxform ItemSelectHdl(*m_xItemList); } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xItemList.get(), "svx/ui/formdatamenu.ui")); - m_xMenu = xBuilder->weld_menu("menu"); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xItemList.get(), u"svx/ui/formdatamenu.ui"_ustr)); + m_xMenu = xBuilder->weld_menu(u"menu"_ustr); m_aRemovedMenuEntries.clear(); if (DGTInstance == m_eGroup) - m_aRemovedMenuEntries.insert("additem"); + m_aRemovedMenuEntries.insert(u"additem"_ustr); else { - m_aRemovedMenuEntries.insert("addelement"); - m_aRemovedMenuEntries.insert("addattribute"); + m_aRemovedMenuEntries.insert(u"addelement"_ustr); + m_aRemovedMenuEntries.insert(u"addattribute"_ustr); if (DGTSubmission == m_eGroup) { - m_xMenu->set_label("additem", SvxResId(RID_STR_DATANAV_ADD_SUBMISSION)); - m_xMenu->set_label("edit", SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION)); - m_xMenu->set_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION)); + m_xMenu->set_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_SUBMISSION)); + m_xMenu->set_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION)); + m_xMenu->set_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION)); } else { - m_xMenu->set_label("additem", SvxResId(RID_STR_DATANAV_ADD_BINDING)); - m_xMenu->set_label("edit", SvxResId(RID_STR_DATANAV_EDIT_BINDING)); - m_xMenu->set_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_BINDING)); + m_xMenu->set_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_BINDING)); + m_xMenu->set_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_BINDING)); + m_xMenu->set_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_BINDING)); } } for (const auto& rRemove : m_aRemovedMenuEntries) @@ -199,10 +199,10 @@ namespace svxform } XFormsPage::XFormsPage(weld::Container* pPage, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup) - : BuilderPage(pPage, nullptr, "svx/ui/xformspage.ui", "XFormsPage") + : BuilderPage(pPage, nullptr, u"svx/ui/xformspage.ui"_ustr, u"XFormsPage"_ustr) , m_pParent(pPage) - , m_xToolBox(m_xBuilder->weld_toolbar("toolbar")) - , m_xItemList(m_xBuilder->weld_tree_view("items")) + , m_xToolBox(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) + , m_xItemList(m_xBuilder->weld_tree_view(u"items"_ustr)) , m_xScratchIter(m_xItemList->make_iterator()) , m_aDropHelper(*m_xItemList) , m_pNaviWin(_pNaviWin) @@ -213,23 +213,23 @@ namespace svxform m_xItemList->set_show_expanders(DGTInstance == m_eGroup || DGTSubmission == m_eGroup); if ( DGTInstance == m_eGroup ) - m_xToolBox->set_item_visible("additem", false); + m_xToolBox->set_item_visible(u"additem"_ustr, false); else { - m_xToolBox->set_item_visible("addelement", false); - m_xToolBox->set_item_visible("addattribute", false); + m_xToolBox->set_item_visible(u"addelement"_ustr, false); + m_xToolBox->set_item_visible(u"addattribute"_ustr, false); if ( DGTSubmission == m_eGroup ) { - m_xToolBox->set_item_label("additem", SvxResId(RID_STR_DATANAV_ADD_SUBMISSION)); - m_xToolBox->set_item_label("edit", SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION)); - m_xToolBox->set_item_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION)); + m_xToolBox->set_item_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_SUBMISSION)); + m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION)); + m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION)); } else { - m_xToolBox->set_item_label("additem", SvxResId(RID_STR_DATANAV_ADD_BINDING)); - m_xToolBox->set_item_label("edit", SvxResId(RID_STR_DATANAV_EDIT_BINDING)); - m_xToolBox->set_item_label("delete", SvxResId(RID_STR_DATANAV_REMOVE_BINDING)); + m_xToolBox->set_item_label(u"additem"_ustr, SvxResId(RID_STR_DATANAV_ADD_BINDING)); + m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(RID_STR_DATANAV_EDIT_BINDING)); + m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(RID_STR_DATANAV_REMOVE_BINDING)); } } @@ -1239,19 +1239,19 @@ namespace svxform else if ( m_eGroup != DGTInstance ) bEnableAdd = true; - m_xToolBox->set_item_sensitive("additem", bEnableAdd); - m_xToolBox->set_item_sensitive("addelement", bEnableAdd); - m_xToolBox->set_item_sensitive("addattribute", bEnableAdd); - m_xToolBox->set_item_sensitive("edit", bEnableEdit); - m_xToolBox->set_item_sensitive("delete", bEnableRemove); + m_xToolBox->set_item_sensitive(u"additem"_ustr, bEnableAdd); + m_xToolBox->set_item_sensitive(u"addelement"_ustr, bEnableAdd); + m_xToolBox->set_item_sensitive(u"addattribute"_ustr, bEnableAdd); + m_xToolBox->set_item_sensitive(u"edit"_ustr, bEnableEdit); + m_xToolBox->set_item_sensitive(u"delete"_ustr, bEnableRemove); if (m_xMenu) { - SetMenuEntrySensitive("additem", bEnableAdd); - SetMenuEntrySensitive("addelement", bEnableAdd); - SetMenuEntrySensitive("addattribute", bEnableAdd); - SetMenuEntrySensitive("edit", bEnableEdit); - SetMenuEntrySensitive("delete", bEnableRemove); + SetMenuEntrySensitive(u"additem"_ustr, bEnableAdd); + SetMenuEntrySensitive(u"addelement"_ustr, bEnableAdd); + SetMenuEntrySensitive(u"addattribute"_ustr, bEnableAdd); + SetMenuEntrySensitive(u"edit"_ustr, bEnableEdit); + SetMenuEntrySensitive(u"delete"_ustr, bEnableRemove); } if ( DGTInstance != m_eGroup ) return; @@ -1278,21 +1278,21 @@ namespace svxform } } } - m_xToolBox->set_item_label("edit", SvxResId(pResId1)); - m_xToolBox->set_item_label("delete", SvxResId(pResId2)); + m_xToolBox->set_item_label(u"edit"_ustr, SvxResId(pResId1)); + m_xToolBox->set_item_label(u"delete"_ustr, SvxResId(pResId2)); if (m_xMenu) { - m_xMenu->set_label("edit", SvxResId( pResId1 ) ); - m_xMenu->set_label("delete", SvxResId( pResId2 ) ); + m_xMenu->set_label(u"edit"_ustr, SvxResId( pResId1 ) ); + m_xMenu->set_label(u"delete"_ustr, SvxResId( pResId2 ) ); } } DataNavigatorWindow::DataNavigatorWindow(vcl::Window* pParent, weld::Builder& rBuilder, SfxBindings const * pBindings) : m_xParent(pParent) - , m_xModelsBox(rBuilder.weld_combo_box("modelslist")) - , m_xModelBtn(rBuilder.weld_menu_button("modelsbutton")) - , m_xTabCtrl(rBuilder.weld_notebook("tabcontrol")) - , m_xInstanceBtn(rBuilder.weld_menu_button("instances")) + , m_xModelsBox(rBuilder.weld_combo_box(u"modelslist"_ustr)) + , m_xModelBtn(rBuilder.weld_menu_button(u"modelsbutton"_ustr)) + , m_xTabCtrl(rBuilder.weld_notebook(u"tabcontrol"_ustr)) + , m_xInstanceBtn(rBuilder.weld_menu_button(u"instances"_ustr)) , m_nLastSelectedPos(-1) , m_bShowDetails(false) , m_bIsNotifyDisabled(false) @@ -1312,7 +1312,7 @@ namespace svxform m_aUpdateTimer.SetInvokeHandler( LINK( this, DataNavigatorWindow, UpdateHdl ) ); // init tabcontrol - OUString sPageId("instance"); + OUString sPageId(u"instance"_ustr); SvtViewOptions aViewOpt( EViewType::TabDialog, CFGNAME_DATANAVIGATOR ); if ( aViewOpt.Exists() ) { @@ -1322,7 +1322,7 @@ namespace svxform aViewOpt.GetUserItem(CFGNAME_SHOWDETAILS) >>= m_bShowDetails; } - m_xInstanceBtn->set_item_active("instancesdetails", m_bShowDetails); + m_xInstanceBtn->set_item_active(u"instancesdetails"_ustr, m_bShowDetails); m_xTabCtrl->set_current_page(sPageId); ActivatePageHdl(sPageId); @@ -1436,7 +1436,7 @@ namespace svxform xUIHelper->newModel( m_xFrameModel, sNewName ), UNO_SET_THROW ); Reference< XPropertySet > xModelProps( xNewModel, UNO_QUERY_THROW ); - xModelProps->setPropertyValue("ExternalData", Any( !bDocumentData ) ); + xModelProps->setPropertyValue(u"ExternalData"_ustr, Any( !bDocumentData ) ); m_xModelsBox->append_text(sNewName); m_xModelsBox->set_active(m_xModelsBox->get_count() - 1); @@ -1463,7 +1463,7 @@ namespace svxform Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW ); Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW ); bool bExternalData = false; - OSL_VERIFY( xModelProps->getPropertyValue( "ExternalData" ) >>= bExternalData ); + OSL_VERIFY( xModelProps->getPropertyValue( u"ExternalData"_ustr ) >>= bExternalData ); bDocumentData = !bExternalData; } catch( const Exception& ) @@ -1482,7 +1482,7 @@ namespace svxform Reference< css::xforms::XFormsSupplier > xFormsSupp( m_xFrameModel, UNO_QUERY_THROW ); Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW ); Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW ); - xModelProps->setPropertyValue( "ExternalData", Any( !bDocumentData ) ); + xModelProps->setPropertyValue( u"ExternalData"_ustr, Any( !bDocumentData ) ); bIsDocModified = true; } catch( const Exception& ) @@ -1650,7 +1650,7 @@ namespace svxform TOOLS_WARN_EXCEPTION( "svx.form", "DataNavigatorWindow::MenuSelectHdl()" ); } m_xTabCtrl->remove_page(sIdent); - m_xTabCtrl->set_current_page("instance"); + m_xTabCtrl->set_current_page(u"instance"_ustr); ModelSelectHdl( nullptr ); bIsDocModified = true; } @@ -1660,7 +1660,7 @@ namespace svxform else if (rIdent == "instancesdetails") { m_bShowDetails = !m_bShowDetails; - m_xInstanceBtn->set_item_active("instancesdetails", m_bShowDetails); + m_xInstanceBtn->set_item_active(u"instancesdetails"_ustr, m_bShowDetails); ModelSelectHdl(m_xModelsBox.get()); } else @@ -1685,15 +1685,15 @@ namespace svxform { OUString sIdent(m_xTabCtrl->get_current_page_ident()); bool bIsInstPage = (IsAdditionalPage(sIdent) || sIdent == "instance"); - m_xInstanceBtn->set_item_sensitive( "instancesedit", bIsInstPage ); - m_xInstanceBtn->set_item_sensitive( "instancesremove", + m_xInstanceBtn->set_item_sensitive( u"instancesedit"_ustr, bIsInstPage ); + m_xInstanceBtn->set_item_sensitive( u"instancesremove"_ustr, bIsInstPage && m_xTabCtrl->get_n_pages() > MIN_PAGE_COUNT ); - m_xInstanceBtn->set_item_sensitive( "instancesdetails", bIsInstPage ); + m_xInstanceBtn->set_item_sensitive( u"instancesdetails"_ustr, bIsInstPage ); } else if (m_xModelBtn.get() == &rBtn) { // we need at least one model! - m_xModelBtn->set_item_sensitive("modelsremove", m_xModelsBox->get_count() > 1 ); + m_xModelBtn->set_item_sensitive(u"modelsremove"_ustr, m_xModelsBox->get_count() > 1 ); } else { @@ -2023,7 +2023,7 @@ namespace svxform } DataNavigator::DataNavigator(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent) - : SfxDockingWindow(_pBindings, _pMgr, _pParent, "DataNavigator", "svx/ui/datanavigator.ui") + : SfxDockingWindow(_pBindings, _pMgr, _pParent, u"DataNavigator"_ustr, u"svx/ui/datanavigator.ui"_ustr) , SfxControllerItem(SID_FM_DATANAVIGATOR_CONTROL, *_pBindings) , m_xDataWin(new DataNavigatorWindow(this, *m_xBuilder, _pBindings)) { @@ -2088,7 +2088,7 @@ namespace svxform AddDataItemDialog::AddDataItemDialog(weld::Window* pParent, ItemNode* _pNode, const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper) - : GenericDialogController(pParent, "svx/ui/adddataitemdialog.ui", "AddDataItemDialog") + : GenericDialogController(pParent, u"svx/ui/adddataitemdialog.ui"_ustr, u"AddDataItemDialog"_ustr) , m_xUIHelper(_rUIHelper) , m_pItemNode(_pNode) , m_eItemType(DITNone) @@ -2096,25 +2096,25 @@ namespace svxform , m_sFL_Attribute(SvxResId(RID_STR_ATTRIBUTE)) , m_sFL_Binding(SvxResId(RID_STR_BINDING)) , m_sFT_BindingExp(SvxResId(RID_STR_BINDING_EXPR)) - , m_xItemFrame(m_xBuilder->weld_frame("itemframe")) - , m_xNameFT(m_xBuilder->weld_label("nameft")) - , m_xNameED(m_xBuilder->weld_entry("name")) - , m_xDefaultFT(m_xBuilder->weld_label("valueft")) - , m_xDefaultED(m_xBuilder->weld_entry("value")) - , m_xDefaultBtn(m_xBuilder->weld_button("browse")) - , m_xSettingsFrame(m_xBuilder->weld_widget("settingsframe")) - , m_xDataTypeLB(m_xBuilder->weld_combo_box("datatype")) - , m_xRequiredCB(m_xBuilder->weld_check_button("required")) - , m_xRequiredBtn(m_xBuilder->weld_button("requiredcond")) - , m_xRelevantCB(m_xBuilder->weld_check_button("relevant")) - , m_xRelevantBtn(m_xBuilder->weld_button("relevantcond")) - , m_xConstraintCB(m_xBuilder->weld_check_button("constraint")) - , m_xConstraintBtn(m_xBuilder->weld_button("constraintcond")) - , m_xReadonlyCB(m_xBuilder->weld_check_button("readonly")) - , m_xReadonlyBtn(m_xBuilder->weld_button("readonlycond")) - , m_xCalculateCB(m_xBuilder->weld_check_button("calculate")) - , m_xCalculateBtn(m_xBuilder->weld_button("calculatecond")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xItemFrame(m_xBuilder->weld_frame(u"itemframe"_ustr)) + , m_xNameFT(m_xBuilder->weld_label(u"nameft"_ustr)) + , m_xNameED(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xDefaultFT(m_xBuilder->weld_label(u"valueft"_ustr)) + , m_xDefaultED(m_xBuilder->weld_entry(u"value"_ustr)) + , m_xDefaultBtn(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xSettingsFrame(m_xBuilder->weld_widget(u"settingsframe"_ustr)) + , m_xDataTypeLB(m_xBuilder->weld_combo_box(u"datatype"_ustr)) + , m_xRequiredCB(m_xBuilder->weld_check_button(u"required"_ustr)) + , m_xRequiredBtn(m_xBuilder->weld_button(u"requiredcond"_ustr)) + , m_xRelevantCB(m_xBuilder->weld_check_button(u"relevant"_ustr)) + , m_xRelevantBtn(m_xBuilder->weld_button(u"relevantcond"_ustr)) + , m_xConstraintCB(m_xBuilder->weld_check_button(u"constraint"_ustr)) + , m_xConstraintBtn(m_xBuilder->weld_button(u"constraintcond"_ustr)) + , m_xReadonlyCB(m_xBuilder->weld_check_button(u"readonly"_ustr)) + , m_xReadonlyBtn(m_xBuilder->weld_button(u"readonlycond"_ustr)) + , m_xCalculateCB(m_xBuilder->weld_check_button(u"calculate"_ustr)) + , m_xCalculateBtn(m_xBuilder->weld_button(u"calculatecond"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { InitDialog(); InitFromNode(); @@ -2553,14 +2553,14 @@ namespace svxform AddConditionDialog::AddConditionDialog(weld::Window* pParent, OUString _aPropertyName, const Reference< XPropertySet >& _rPropSet) - : GenericDialogController(pParent, "svx/ui/addconditiondialog.ui", "AddConditionDialog") + : GenericDialogController(pParent, u"svx/ui/addconditiondialog.ui"_ustr, u"AddConditionDialog"_ustr) , m_aResultIdle("svx AddConditionDialog m_aResultIdle") , m_sPropertyName(std::move(_aPropertyName)) , m_xBinding(_rPropSet) - , m_xConditionED(m_xBuilder->weld_text_view("condition")) - , m_xResultWin(m_xBuilder->weld_text_view("result")) - , m_xEditNamespacesBtn(m_xBuilder->weld_button("edit")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xConditionED(m_xBuilder->weld_text_view(u"condition"_ustr)) + , m_xResultWin(m_xBuilder->weld_text_view(u"result"_ustr)) + , m_xEditNamespacesBtn(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { DBG_ASSERT( m_xBinding.is(), "AddConditionDialog::Ctor(): no Binding" ); @@ -2661,14 +2661,14 @@ namespace svxform } NamespaceItemDialog::NamespaceItemDialog(AddConditionDialog* pCondDlg, Reference<XNameContainer>& rContainer) - : GenericDialogController(pCondDlg->getDialog(), "svx/ui/namespacedialog.ui", "NamespaceDialog") + : GenericDialogController(pCondDlg->getDialog(), u"svx/ui/namespacedialog.ui"_ustr, u"NamespaceDialog"_ustr) , m_pConditionDlg(pCondDlg) , m_rNamespaces(rContainer) - , m_xNamespacesList(m_xBuilder->weld_tree_view("namespaces")) - , m_xAddNamespaceBtn(m_xBuilder->weld_button("add")) - , m_xEditNamespaceBtn(m_xBuilder->weld_button("edit")) - , m_xDeleteNamespaceBtn(m_xBuilder->weld_button("delete")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xNamespacesList(m_xBuilder->weld_tree_view(u"namespaces"_ustr)) + , m_xAddNamespaceBtn(m_xBuilder->weld_button(u"add"_ustr)) + , m_xEditNamespaceBtn(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xDeleteNamespaceBtn(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { m_xNamespacesList->set_size_request(m_xNamespacesList->get_approximate_digit_width() * 80, m_xNamespacesList->get_height_rows(8)); @@ -2803,12 +2803,12 @@ namespace svxform } ManageNamespaceDialog::ManageNamespaceDialog(weld::Window* pParent, AddConditionDialog* pCondDlg, bool bIsEdit) - : GenericDialogController(pParent, "svx/ui/addnamespacedialog.ui", "AddNamespaceDialog") + : GenericDialogController(pParent, u"svx/ui/addnamespacedialog.ui"_ustr, u"AddNamespaceDialog"_ustr) , m_pConditionDlg(pCondDlg) - , m_xPrefixED(m_xBuilder->weld_entry("prefix")) - , m_xUrlED(m_xBuilder->weld_entry("url")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) + , m_xPrefixED(m_xBuilder->weld_entry(u"prefix"_ustr)) + , m_xUrlED(m_xBuilder->weld_entry(u"url"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) { if (bIsEdit) m_xDialog->set_title(m_xAltTitle->get_label()); @@ -2848,17 +2848,17 @@ namespace svxform AddSubmissionDialog::AddSubmissionDialog( weld::Window* pParent, ItemNode* _pNode, const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper) - : GenericDialogController(pParent, "svx/ui/addsubmissiondialog.ui", "AddSubmissionDialog") + : GenericDialogController(pParent, u"svx/ui/addsubmissiondialog.ui"_ustr, u"AddSubmissionDialog"_ustr) , m_pItemNode(_pNode) , m_xUIHelper(_rUIHelper) - , m_xNameED(m_xBuilder->weld_entry("name")) - , m_xActionED(m_xBuilder->weld_entry("action")) - , m_xMethodLB(m_xBuilder->weld_combo_box("method")) - , m_xRefED(m_xBuilder->weld_entry("expression")) - , m_xRefBtn(m_xBuilder->weld_button("browse")) - , m_xBindLB(m_xBuilder->weld_combo_box("binding")) - , m_xReplaceLB(m_xBuilder->weld_combo_box("replace")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xNameED(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xActionED(m_xBuilder->weld_entry(u"action"_ustr)) + , m_xMethodLB(m_xBuilder->weld_combo_box(u"method"_ustr)) + , m_xRefED(m_xBuilder->weld_entry(u"expression"_ustr)) + , m_xRefBtn(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xBindLB(m_xBuilder->weld_combo_box(u"binding"_ustr)) + , m_xReplaceLB(m_xBuilder->weld_combo_box(u"replace"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { FillAllBoxes(); @@ -3064,10 +3064,10 @@ namespace svxform } AddModelDialog::AddModelDialog(weld::Window* pParent, bool bIsEdit) - : GenericDialogController(pParent, "svx/ui/addmodeldialog.ui", "AddModelDialog") - , m_xNameED(m_xBuilder->weld_entry("name")) - , m_xModifyCB(m_xBuilder->weld_check_button("modify")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) + : GenericDialogController(pParent, u"svx/ui/addmodeldialog.ui"_ustr, u"AddModelDialog"_ustr) + , m_xNameED(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xModifyCB(m_xBuilder->weld_check_button(u"modify"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) { if (bIsEdit) m_xDialog->set_title(m_xAltTitle->get_label()); @@ -3078,12 +3078,12 @@ namespace svxform } AddInstanceDialog::AddInstanceDialog(weld::Window* pParent, bool _bEdit) - : GenericDialogController(pParent, "svx/ui/addinstancedialog.ui", "AddInstanceDialog") - , m_xNameED(m_xBuilder->weld_entry("name")) - , m_xURLED(new SvtURLBox(m_xBuilder->weld_combo_box("url"))) - , m_xFilePickerBtn(m_xBuilder->weld_button("browse")) - , m_xLinkInstanceCB(m_xBuilder->weld_check_button("link")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) + : GenericDialogController(pParent, u"svx/ui/addinstancedialog.ui"_ustr, u"AddInstanceDialog"_ustr) + , m_xNameED(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xURLED(new SvtURLBox(m_xBuilder->weld_combo_box(u"url"_ustr))) + , m_xFilePickerBtn(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xLinkInstanceCB(m_xBuilder->weld_check_button(u"link"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) { if (_bEdit) m_xDialog->set_title(m_xAltTitle->get_label()); @@ -3107,8 +3107,8 @@ namespace svxform aDlg.SetContext(sfx2::FileDialogHelper::FormsAddInstance); aDlg.AddFilter( m_sAllFilterName, FILEDIALOG_FILTER_ALL ); - OUString sFilterName( "XML" ); - aDlg.AddFilter( sFilterName, "*.xml" ); + OUString sFilterName( u"XML"_ustr ); + aDlg.AddFilter( sFilterName, u"*.xml"_ustr ); aDlg.SetCurrentFilter( sFilterName ); if (aDlg.Execute() == ERRCODE_NONE) @@ -3116,8 +3116,8 @@ namespace svxform } LinkedInstanceWarningBox::LinkedInstanceWarningBox(weld::Widget* pParent) - : MessageDialogController(pParent, "svx/ui/formlinkwarndialog.ui", - "FormLinkWarnDialog") + : MessageDialogController(pParent, u"svx/ui/formlinkwarndialog.ui"_ustr, + u"FormLinkWarnDialog"_ustr) { } diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index c890d84abad2..722deefaca35 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -99,7 +99,7 @@ void OFilterItemExchange::AddSupportedFormats() SotClipboardFormatId OFilterItemExchange::getFormatId() { static SotClipboardFormatId s_nFormat = - SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"form.FilterControlExchange\""); + SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"form.FilterControlExchange\""_ustr); DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OFilterExchangeHelper::getFormatId: bad exchange id!"); return s_nFormat; } @@ -796,7 +796,7 @@ bool FmFilterModel::ValidateText(FmFilterItem const * pItem, OUString& rText, OU OUString aPreparedText; Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pParseNode->parseNodeToPredicateStr( - aPreparedText, xConnection, xFormatter, xField, OUString(), aAppLocale, ".", getParseContext() ); + aPreparedText, xConnection, xFormatter, xField, OUString(), aAppLocale, u"."_ustr, getParseContext() ); rText = aPreparedText; return true; } @@ -1495,15 +1495,15 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool) aSelectList.clear(); } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "svx/ui/filtermenu.ui")); - std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), u"svx/ui/filtermenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr)); // every condition could be deleted except the first one if it's the only one bool bNoDelete = false; if (aSelectList.empty()) { bNoDelete = true; - xContextMenu->remove("delete"); + xContextMenu->remove(u"delete"_ustr); } FmFilterData* pFilterEntry = weld::fromId<FmFilterData*>(m_xTreeView->get_id(*xClicked)); @@ -1519,9 +1519,9 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool) if (!bEdit) { - xContextMenu->remove("edit"); - xContextMenu->remove("isnull"); - xContextMenu->remove("isnotnull"); + xContextMenu->remove(u"edit"_ustr); + xContextMenu->remove(u"isnull"_ustr); + xContextMenu->remove(u"isnotnull"_ustr); } OUString sIdent = xContextMenu->popup_at_rect(m_xTreeView.get(), tools::Rectangle(aWhere, ::Size(1, 1))); @@ -1532,7 +1532,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool) else if (sIdent == "isnull") { OUString aErrorMsg; - OUString aText = "IS NULL"; + OUString aText = u"IS NULL"_ustr; assert(pFilterItem && "if item is null this menu entry was removed and unavailable"); m_pModel->ValidateText(pFilterItem, aText, aErrorMsg); m_pModel->SetTextForItem(pFilterItem, aText); @@ -1540,7 +1540,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool) else if (sIdent == "isnotnull") { OUString aErrorMsg; - OUString aText = "IS NOT NULL"; + OUString aText = u"IS NOT NULL"_ustr; assert(pFilterItem && "if item is null this menu entry was removed and unavailable"); m_pModel->ValidateText(pFilterItem, aText, aErrorMsg); @@ -1723,9 +1723,9 @@ void FmFilterNavigator::DeleteSelection() FmFilterNavigatorWin::FmFilterNavigatorWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent) - : SfxDockingWindow(_pBindings, _pMgr, _pParent, "FilterNavigator", "svx/ui/filternavigator.ui") + : SfxDockingWindow(_pBindings, _pMgr, _pParent, u"FilterNavigator"_ustr, u"svx/ui/filternavigator.ui"_ustr) , SfxControllerItem( SID_FM_FILTER_NAVIGATOR_CONTROL, *_pBindings ) - , m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view("treeview"))) + , m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view(u"treeview"_ustr))) { SetHelpId( HID_FILTER_NAVIGATOR_WIN ); diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index e30f90cf5ecf..f39e2c71adc0 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -171,13 +171,13 @@ static OUString GetUIHeadlineName(sal_Int16 nClassId, const Any& aUnoObj) FmPropBrw::FmPropBrw(const Reference< XComponentContext >& _xORB, SfxBindings* _pBindings, SfxChildWindow* _pMgr, weld::Window* _pParent, const SfxChildWinInfo* _pInfo) - : SfxModelessDialogController(_pBindings, _pMgr, _pParent, "svx/ui/formpropertydialog.ui", "FormPropertyDialog") + : SfxModelessDialogController(_pBindings, _pMgr, _pParent, u"svx/ui/formpropertydialog.ui"_ustr, u"FormPropertyDialog"_ustr) , SfxControllerItem(SID_FM_PROPERTY_CONTROL, *_pBindings) , m_bInitialStateChange(true) , m_pParent(_pParent) , m_nAsyncGetFocusId(nullptr) - , m_xDialogBox(m_xBuilder->weld_box("dialog-vbox1")) - , m_xContainer(m_xBuilder->weld_container("container")) + , m_xDialogBox(m_xBuilder->weld_box(u"dialog-vbox1"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"container"_ustr)) , m_xORB(_xORB) { m_xContainer->set_size_request(m_xContainer->get_approximate_digit_width() * 72, m_xContainer->get_text_height() * 20); @@ -190,7 +190,7 @@ FmPropBrw::FmPropBrw(const Reference< XComponentContext >& _xORB, SfxBindings* _ // transport the container area of this dialog to be the container window of the frame css::uno::Reference<css::awt::XWindow> xFrameContainerWindow(new weld::TransportAsXWindow(m_xContainer.get())); m_xMeAsFrame->initialize(xFrameContainerWindow); - m_xMeAsFrame->setName("form property browser"); + m_xMeAsFrame->setName(u"form property browser"_ustr); } catch (const Exception&) { @@ -220,10 +220,10 @@ FmPropBrw::~FmPropBrw() Reference<XNameContainer> xName(m_xInspectorContext,uno::UNO_QUERY); if ( xName.is() ) { - const OUString pProps[] = { OUString( "ContextDocument" ) - , OUString( "DialogParentWindow" ) - , OUString( "ControlContext" ) - , OUString( "ControlShapeAccess" ) }; + const OUString pProps[] = { u"ContextDocument"_ustr + , u"DialogParentWindow"_ustr + , u"ControlContext"_ustr + , u"ControlShapeAccess"_ustr }; for (const auto & i : pProps) xName->removeByName( i ); } @@ -405,7 +405,7 @@ namespace ::utl::OConfigurationTreeRoot aConfiguration( ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext, - "/org.openoffice.Office.Common/Forms/PropertyBrowser/" ) ); + u"/org.openoffice.Office.Common/Forms/PropertyBrowser/"_ustr ) ); bool bEnabled = false; OSL_VERIFY( aConfiguration.getNodeValue( "DirectHelp" ) >>= bEnabled ); @@ -451,10 +451,10 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell ) // a ComponentContext for the ::cppu::ContextEntry_Init aHandlerContextInfo[] = { - ::cppu::ContextEntry_Init( "ContextDocument", Any( xDocument ) ), - ::cppu::ContextEntry_Init( "DialogParentWindow", Any( xParentWindow ) ), - ::cppu::ContextEntry_Init( "ControlContext", Any( xControlContext ) ), - ::cppu::ContextEntry_Init( "ControlShapeAccess", Any( xControlMap ) ) + ::cppu::ContextEntry_Init( u"ContextDocument"_ustr, Any( xDocument ) ), + ::cppu::ContextEntry_Init( u"DialogParentWindow"_ustr, Any( xParentWindow ) ), + ::cppu::ContextEntry_Init( u"ControlContext"_ustr, Any( xControlContext ) ), + ::cppu::ContextEntry_Init( u"ControlShapeAccess"_ustr, Any( xControlMap ) ) }; m_xInspectorContext.set( ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index bdc3539320b8..9038c71a1827 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -104,20 +104,20 @@ namespace svxform Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY ); if ( xDocumentSI.is() ) { - if ( xDocumentSI->supportsService("com.sun.star.text.TextDocument") - || xDocumentSI->supportsService("com.sun.star.text.WebDocument") + if ( xDocumentSI->supportsService(u"com.sun.star.text.TextDocument"_ustr) + || xDocumentSI->supportsService(u"com.sun.star.text.WebDocument"_ustr) ) { _rFamilyName = "ParagraphStyles"; _rStyleName = "Standard"; } - else if ( xDocumentSI->supportsService("com.sun.star.sheet.SpreadsheetDocument") ) + else if ( xDocumentSI->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr) ) { _rFamilyName = "CellStyles"; _rStyleName = "Default"; } - else if ( xDocumentSI->supportsService("com.sun.star.drawing.DrawingDocument") - || xDocumentSI->supportsService("com.sun.star.presentation.PresentationDocument") + else if ( xDocumentSI->supportsService(u"com.sun.star.drawing.DrawingDocument"_ustr) + || xDocumentSI->supportsService(u"com.sun.star.presentation.PresentationDocument"_ustr) ) { _rFamilyName = "graphics"; @@ -185,7 +185,7 @@ namespace svxform // retrieve a default font for this locale, and set it at the control vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), GetDefaultFontFlags::OnlyOne ); FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); - _rxModel->setPropertyValue("FontDescriptor", Any( aFontDesc ) + _rxModel->setPropertyValue(u"FontDescriptor"_ustr, Any( aFontDesc ) ); } catch( const Exception& ) @@ -208,7 +208,7 @@ namespace svxform // the names of the family, and the style - depends on the document type we live in OUString sFamilyName, sStyleName; if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies, sFamilyName, sStyleName ) ) - throw RuntimeException("unknown document type!"); + throw RuntimeException(u"unknown document type!"_ustr); // the concrete style Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); @@ -236,7 +236,7 @@ namespace svxform // let's see what the configuration says about the visual effect OConfigurationNode aConfig = getLayoutSettings( _eDocType ); - Any aVisualEffect = aConfig.getNodeValue( OUString( "VisualEffect" ) ); + Any aVisualEffect = aConfig.getNodeValue( u"VisualEffect"_ustr ); if ( aVisualEffect.hasValue() ) { OUString sVisualEffect; @@ -287,7 +287,7 @@ namespace svxform bool ControlLayouter::useDynamicBorderColor( DocumentType _eDocType ) { OConfigurationNode aConfig = getLayoutSettings( _eDocType ); - Any aDynamicBorderColor = aConfig.getNodeValue( OUString( "DynamicBorderColors" ) ); + Any aDynamicBorderColor = aConfig.getNodeValue( u"DynamicBorderColors"_ustr ); bool bDynamicBorderColor = false; OSL_VERIFY( aDynamicBorderColor >>= bDynamicBorderColor ); return bDynamicBorderColor; @@ -299,7 +299,7 @@ namespace svxform if ( _eDocType == eUnknownDocumentType ) return false; OConfigurationNode aConfig = getLayoutSettings( _eDocType ); - Any aUseRefDevice = aConfig.getNodeValue( OUString( "UseDocumentTextMetrics" ) ); + Any aUseRefDevice = aConfig.getNodeValue( u"UseDocumentTextMetrics"_ustr ); bool bUseRefDevice = false; OSL_VERIFY( aUseRefDevice >>= bUseRefDevice ); return bUseRefDevice; diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index 2746015e1c03..9694b57ab1ba 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -283,7 +283,7 @@ namespace svxform SotClipboardFormatId OControlExchange::getControlPathFormatId() { static SotClipboardFormatId s_nFormat = - SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\""); + SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\""_ustr); DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getControlPathFormatId: bad exchange id!"); return s_nFormat; } @@ -291,7 +291,7 @@ namespace svxform SotClipboardFormatId OControlExchange::getHiddenControlModelsFormatId() { static SotClipboardFormatId s_nFormat = - SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\""); + SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\""_ustr); DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getHiddenControlModelsFormatId: bad exchange id!"); return s_nFormat; } @@ -300,7 +300,7 @@ namespace svxform SotClipboardFormatId OControlExchange::getFieldExchangeFormatId() { static SotClipboardFormatId s_nFormat = - SotExchange::RegisterFormatName("application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\""); + SotExchange::RegisterFormatName(u"application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\""_ustr); DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getFieldExchangeFormatId: bad exchange id!"); return s_nFormat; } diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 53827917d9ea..1efbac251654 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -439,9 +439,9 @@ namespace svxform NavigatorFrame::NavigatorFrame( SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent ) - : SfxDockingWindow(_pBindings, _pMgr, _pParent, "FormNavigator", "svx/ui/formnavigator.ui") + : SfxDockingWindow(_pBindings, _pMgr, _pParent, u"FormNavigator"_ustr, u"svx/ui/formnavigator.ui"_ustr) , SfxControllerItem( SID_FM_FMEXPLORER_CONTROL, *_pBindings ) - , m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view("treeview"))) + , m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view(u"treeview"_ustr))) { SetHelpId( HID_FORM_NAVIGATOR_WIN ); diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 8e0844e6a87f..0e9850914685 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -62,7 +62,7 @@ FmFormObj::FmFormObj( } FmFormObj::FmFormObj(SdrModel& rSdrModel) -: SdrUnoObj(rSdrModel, "") +: SdrUnoObj(rSdrModel, u""_ustr) ,m_nPos(-1) ,m_pLastKnownRefDevice(nullptr) { @@ -521,7 +521,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > { // create and insert (into the destination) a copy of the form xCurrentDestForm.set( - ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.form.component.DataForm"), + ::comphelper::getProcessServiceFactory()->createInstance(u"com.sun.star.form.component.DataForm"_ustr), UNO_QUERY_THROW ); ::comphelper::copyProperties( xCurrentSourceForm, xCurrentDestForm ); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 3275841b7fd2..eb6414e8e7de 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -104,7 +104,7 @@ namespace size_t lhsCount = FormComponentInfo::childCount( _components.first ); size_t rhsCount = FormComponentInfo::childCount( _components.second ); if ( lhsCount != rhsCount ) - throw RuntimeException( "Found inconsistent form component hierarchies (1)!" ); + throw RuntimeException( u"Found inconsistent form component hierarchies (1)!"_ustr ); return lhsCount; } @@ -132,7 +132,7 @@ namespace Reference< XControlModel > lhsControlModel( _component.first, UNO_QUERY ); Reference< XControlModel > rhsControlModel( _component.second, UNO_QUERY ); if ( lhsControlModel.is() != rhsControlModel.is() ) - throw RuntimeException( "Found inconsistent form component hierarchies (2)!" ); + throw RuntimeException( u"Found inconsistent form component hierarchies (2)!"_ustr ); if ( lhsControlModel.is() ) m_rControlModelMap[ lhsControlModel ] = rhsControlModel; diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index dd01ddf842bc..cf567083b6a0 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -825,7 +825,7 @@ namespace svxform { Reference< XControl > xControl( aEvent.Source, UNO_QUERY_THROW ); Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY_THROW ); - aCaller = xProps->getPropertyValue("Name"); + aCaller = xProps->getPropertyValue(u"Name"_ustr); } catch( Exception& ) {} } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index fdffd2deeddd..10616b67d3d0 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -170,7 +170,7 @@ FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView ) ,m_bHasForms(false) { SetPool( &SfxGetpApp()->GetPool() ); - SetName( "Form" ); + SetName( u"Form"_ustr ); SetView(m_pFormView); } @@ -225,8 +225,8 @@ bool FmFormShell::PrepareClose(bool bUI) SfxViewShell* pShell = GetViewShell(); vcl::Window* pShellWnd = pShell ? pShell->GetWindow() : nullptr; weld::Widget* pFrameWeld = pShellWnd ? pShellWnd->GetFrameWeld() : nullptr; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pFrameWeld, "svx/ui/savemodifieddialog.ui")); - std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog("SaveModifiedDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pFrameWeld, u"svx/ui/savemodifieddialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog(u"SaveModifiedDialog"_ustr)); switch (xQry->run()) { case RET_YES: @@ -713,7 +713,7 @@ void FmFormShell::Execute(SfxRequest &rReq) } if ( nRecord != -1 ) - rController->execute( nSlot, "Position", Any( nRecord ) ); + rController->execute( nSlot, u"Position"_ustr, Any( nRecord ) ); rReq.Done(); } break; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index a6332fa7749a..86798c8a85c7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -605,7 +605,7 @@ FmXFormShell_Base_Disambiguation::FmXFormShell_Base_Disambiguation( ::osl::Mutex FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) :FmXFormShell_BASE(m_aMutex) - ,FmXFormShell_CFGBASE("Office.Common/Misc", ConfigItemMode::NONE) + ,FmXFormShell_CFGBASE(u"Office.Common/Misc"_ustr, ConfigItemMode::NONE) ,m_aMarkTimer("svx::FmXFormShell m_aMarkTimer") ,m_eNavigate( NavigationBarMode_NONE ) ,m_nInvalidationEvent( nullptr ) @@ -641,7 +641,7 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) // cache the current configuration settings we're interested in implAdjustConfigCache_Lock(); // and register for changes on this settings - Sequence< OUString > aNames { "FormControlPilotsEnabled" }; + Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr }; EnableNotification(aNames); } @@ -1579,7 +1579,7 @@ bool FmXFormShell::GetY2KState_Lock(sal_uInt16& n) { try { - Any aVal( xSet->getPropertyValue("TwoDigitDateStart") ); + Any aVal( xSet->getPropertyValue(u"TwoDigitDateStart"_ustr) ); aVal >>= n; return true; } @@ -1610,7 +1610,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n) { try { - xSet->setPropertyValue("TwoDigitDateStart", Any(sal_uInt16(n))); + xSet->setPropertyValue(u"TwoDigitDateStart"_ustr, Any(sal_uInt16(n))); } catch(Exception&) { @@ -1649,7 +1649,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n) { try { - xSet->setPropertyValue("TwoDigitDateStart", Any(sal_uInt16(n))); + xSet->setPropertyValue(u"TwoDigitDateStart"_ustr, Any(sal_uInt16(n))); } catch(Exception&) { @@ -2908,7 +2908,7 @@ void FmXFormShell::startFiltering_Lock() { Reference< XModeSelector> xModeSelector(rpController, UNO_QUERY); if (xModeSelector.is()) - xModeSelector->setMode( "FilterMode" ); + xModeSelector->setMode( u"FilterMode"_ustr ); } } @@ -3008,7 +3008,7 @@ void FmXFormShell::stopFiltering_Lock(bool bSave) Reference< XModeSelector> xModeSelector(rController, UNO_QUERY); if (xModeSelector.is()) - xModeSelector->setMode( "DataMode" ); + xModeSelector->setMode( u"DataMode"_ustr ); } if (bSave) // execute the filter { @@ -3104,7 +3104,7 @@ void FmXFormShell::CreateExternalView_Lock() // load the component for external form views if (!bAlreadyExistent) { - OUString sFrameName("_beamer"); + OUString sFrameName(u"_beamer"_ustr); URL aWantToDispatch; aWantToDispatch.Complete = FMURL_COMPONENT_FORMGRIDVIEW; @@ -3396,7 +3396,7 @@ void FmXFormShell::CreateExternalView_Lock() // column type : listbox pDispatchArgs->Name = FMARG_ADDCOL_COLUMNTYPE; - pDispatchArgs->Value <<= OUString(FM_COL_LISTBOX); + pDispatchArgs->Value <<= u"" FM_COL_LISTBOX ""_ustr; // pDispatchArgs->Value <<= (OUString)FM_COL_LISTBOX; ++pDispatchArgs; @@ -3466,7 +3466,7 @@ void FmXFormShell::implAdjustConfigCache_Lock() return; // get (cache) the wizard usage flag - Sequence< OUString > aNames { "FormControlPilotsEnabled" }; + Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr }; Sequence< Any > aFlags = GetProperties(aNames); if (1 == aFlags.getLength()) m_bUseWizards = ::cppu::any2bool(aFlags[0]); @@ -3496,7 +3496,7 @@ void FmXFormShell::SetWizardUsing_Lock(bool _bUseThem) { m_bUseWizards = _bUseThem; - Sequence< OUString > aNames { "FormControlPilotsEnabled" }; + Sequence< OUString > aNames { u"FormControlPilotsEnabled"_ustr }; Sequence< Any > aValues{ Any(m_bUseWizards) }; PutProperties(aNames, aValues); } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 6bdd7a6c8f29..d3d7c23e38a6 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -175,8 +175,8 @@ OUString CheckBoxWrapper::getCurrentText() const { switch (static_cast<TriState>(m_xBox->getState())) { - case TRISTATE_FALSE: return "0"; - case TRISTATE_TRUE: return "1"; + case TRISTATE_FALSE: return u"0"_ustr; + case TRISTATE_TRUE: return u"1"_ustr; default: break; } return OUString(); diff --git a/svx/source/form/fmtextcontroldialogs.cxx b/svx/source/form/fmtextcontroldialogs.cxx index cc1d511aa627..70e044db2d70 100644 --- a/svx/source/form/fmtextcontroldialogs.cxx +++ b/svx/source/form/fmtextcontroldialogs.cxx @@ -32,12 +32,12 @@ namespace svx { TextControlCharAttribDialog::TextControlCharAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, SvxFontListItem aFontList) - : SfxTabDialogController(pParent, "svx/ui/textcontrolchardialog.ui", "TextControlCharacterPropertiesDialog", &rCoreSet) + : SfxTabDialogController(pParent, u"svx/ui/textcontrolchardialog.ui"_ustr, u"TextControlCharacterPropertiesDialog"_ustr, &rCoreSet) , m_aFontList(std::move(aFontList)) { - AddTabPage("font", RID_SVXPAGE_CHAR_NAME); - AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("position", RID_SVXPAGE_CHAR_POSITION); + AddTabPage(u"font"_ustr, RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"fonteffects"_ustr, RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"position"_ustr, RID_SVXPAGE_CHAR_POSITION); } void TextControlCharAttribDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) @@ -62,17 +62,17 @@ namespace svx } TextControlParaAttribDialog::TextControlParaAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) - : SfxTabDialogController(pParent, "svx/ui/textcontrolparadialog.ui", "TextControlParagraphPropertiesDialog", &rCoreSet) + : SfxTabDialogController(pParent, u"svx/ui/textcontrolparadialog.ui"_ustr, u"TextControlParagraphPropertiesDialog"_ustr, &rCoreSet) { - AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); - AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH); + AddTabPage(u"labelTP_PARA_STD"_ustr, RID_SVXPAGE_STD_PARAGRAPH); + AddTabPage(u"labelTP_PARA_ALIGN"_ustr, RID_SVXPAGE_ALIGN_PARAGRAPH); if( SvtCJKOptions::IsAsianTypographyEnabled() ) - AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"labelTP_PARA_ASIAN"_ustr, RID_SVXPAGE_PARA_ASIAN); else - RemoveTabPage("labelTP_PARA_ASIAN"); + RemoveTabPage(u"labelTP_PARA_ASIAN"_ustr); - AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); + AddTabPage(u"labelTP_TABULATOR"_ustr, RID_SVXPAGE_TABULATOR); } } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 7c2029e00ae2..e8f8dc8de195 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -496,7 +496,7 @@ namespace svx Reference< XPropertySetInfo > xPSI; if ( xModelProps.is() ) xPSI = xModelProps->getPropertySetInfo(); - OUString sRichTextPropertyName = "RichText"; + OUString sRichTextPropertyName = u"RichText"_ustr; if ( xPSI.is() && xPSI->hasPropertyByName( sRichTextPropertyName ) ) { OSL_VERIFY( xModelProps->getPropertyValue( sRichTextPropertyName ) >>= bIsRichText ); @@ -687,7 +687,7 @@ namespace svx DBG_ASSERT( pBoolItem, "FmTextControlShell::executeAttributeDialog: no bool item?!" ); if ( pBoolItem ) { - aArgs = { comphelper::makePropertyValue("Enable", + aArgs = { comphelper::makePropertyValue(u"Enable"_ustr, pBoolItem->GetValue()) }; } } @@ -1297,7 +1297,7 @@ namespace svx void FmTextControlShell::contextMenuRequested() { - m_rBindings.GetDispatcher()->ExecutePopup( "formrichtext" ); + m_rBindings.GetDispatcher()->ExecutePopup( u"formrichtext"_ustr ); } diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 43084beb60ef..7dae4e7b6d38 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -84,7 +84,7 @@ void displayException(const Any& _rExcept, const css::uno::Reference<css::awt::X try { - Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), "", rParent, _rExcept); + Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), u""_ustr, rParent, _rExcept); xErrorDialog->execute(); } catch(const Exception&) diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 956d4a06e43e..b7bf173dba29 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -119,13 +119,13 @@ private: comphelper::getProcessComponentContext()); Reference< XScriptListener > const xScriptListener( context->getServiceManager()->createInstanceWithContext( - "ooo.vba.EventListener", context), + u"ooo.vba.EventListener"_ustr, context), UNO_QUERY_THROW); Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW ); // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell(); ENSURE_OR_THROW( xObjectShell.is(), "no object shell!" ); - xListenerProps->setPropertyValue("Model", Any( xObjectShell->GetModel() ) ); + xListenerProps->setPropertyValue(u"Model"_ustr, Any( xObjectShell->GetModel() ) ); m_vbaListener = xScriptListener; } diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 9e66ade17078..2a07073d66b9 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -103,7 +103,7 @@ void FmFormView::Init() if ( const SfxUnoAnyItem *pItem = pObjShell->GetMedium()->GetItemSet().GetItemIfSet( SID_COMPONENTDATA, false ) ) { ::comphelper::NamedValueCollection aComponentData( pItem->GetValue() ); - bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode ); + bInitDesignMode = aComponentData.getOrDefault( u"ApplyFormDesignMode"_ustr, bInitDesignMode ); } } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 846544445563..fed5613c7d81 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1053,8 +1053,8 @@ IMPL_LINK_NOARG( FmXFormView, OnStartControlWizard, void*, void ) { // build the argument list ::comphelper::NamedValueCollection aWizardArgs; - aWizardArgs.put("ObjectModel", m_xLastCreatedControlModel); - aWizardArgs.put("ParentWindow", GetParentWindow()); + aWizardArgs.put(u"ObjectModel"_ustr, m_xLastCreatedControlModel); + aWizardArgs.put(u"ParentWindow"_ustr, GetParentWindow()); // create the wizard object Reference< XExecutableDialog > xWizard; @@ -1402,7 +1402,7 @@ rtl::Reference<SdrObject> FmXFormView::implCreateXFormsControl( const svx::OXFor rtl::Reference<SdrUnoObj> pLabel; rtl::Reference<SdrUnoObj> pControl; if ( !createControlLabelPair( *pOutDev, 0, 0, nullptr, xNumberFormats, nOBJID, sLabelPostfix, - pLabel, pControl, nullptr, "", "", -1 ) + pLabel, pControl, nullptr, u""_ustr, u""_ustr, -1 ) ) { return nullptr; diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 540c4e80e7de..1b32f7e8f396 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -194,7 +194,7 @@ namespace svxform if ( !sDataSourceName.isEmpty() ) xDsProperties.set(getDataSource( sDataSourceName, _rContext ), css::uno::UNO_QUERY); if ( xDsProperties.is() ) - xDsProperties->getPropertyValue("Info") >>= aInfo; + xDsProperties->getPropertyValue(u"Info"_ustr) >>= aInfo; } catch( const Exception& ) { @@ -377,7 +377,7 @@ namespace svxform switch ( nClassId ) { case FormComponentType::SCROLLBAR: - _rxControlModel->setPropertyValue("LiveScroll", Any( true ) ); + _rxControlModel->setPropertyValue(u"LiveScroll"_ustr, Any( true ) ); [[fallthrough]]; case FormComponentType::SPINBUTTON: { @@ -417,7 +417,7 @@ namespace svxform case FormComponentType::CHECKBOX: case FormComponentType::FIXEDTEXT: { - OUString sVertAlignPropertyName( "VerticalAlign" ); + OUString sVertAlignPropertyName( u"VerticalAlign"_ustr ); if ( xPSI->hasPropertyByName( sVertAlignPropertyName ) ) _rxControlModel->setPropertyValue( sVertAlignPropertyName, Any( VerticalAlignment_MIDDLE ) ); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 993cb8ffada6..fa45f354ed12 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -454,7 +454,7 @@ public: { } - virtual OUString GetComponentServiceName() const override {return "Edit";} + virtual OUString GetComponentServiceName() const override {return u"Edit"_ustr;} virtual void SAL_CALL createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) override; protected: @@ -534,7 +534,7 @@ FormController::FormController(const Reference< css::uno::XComponentContext > & ,m_aFilterListeners(m_aMutex) ,m_aTabActivationIdle("svx FormController m_aTabActivationIdle") ,m_aFeatureInvalidationTimer("svx FormController m_aFeatureInvalidationTimer") - ,m_aMode( OUString( "DataMode" ) ) + ,m_aMode( u"DataMode"_ustr ) ,m_aLoadEvent( LINK( this, FormController, OnLoad ) ) ,m_aToggleEvent( LINK( this, FormController, OnToggleAutoFields ) ) ,m_aActivationEvent( LINK( this, FormController, OnActivated ) ) @@ -649,14 +649,14 @@ sal_Bool SAL_CALL FormController::supportsService(const OUString& ServiceName) OUString SAL_CALL FormController::getImplementationName() { - return "org.openoffice.comp.svx.FormController"; + return u"org.openoffice.comp.svx.FormController"_ustr; } Sequence< OUString> SAL_CALL FormController::getSupportedServiceNames() { // service names which are supported only, but cannot be used to created an // instance at a service factory - Sequence<OUString> aNonCreatableServiceNames { "com.sun.star.form.FormControllerDispatcher" }; + Sequence<OUString> aNonCreatableServiceNames { u"com.sun.star.form.FormControllerDispatcher"_ustr }; // services which can be used to created an instance at a service factory Sequence< OUString > aCreatableServiceNames( getSupportedServiceNames_Static() ); @@ -682,8 +682,8 @@ Sequence< OUString> const & FormController::getSupportedServiceNames_Static() { static Sequence< OUString> const aServices { - "com.sun.star.form.runtime.FormController", - "com.sun.star.awt.control.TabController" + u"com.sun.star.form.runtime.FormController"_ustr, + u"com.sun.star.awt.control.TabController"_ustr }; return aServices; } @@ -2972,7 +2972,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) { Reference< XMultiServiceFactory > xFactory( xConnection, UNO_QUERY_THROW ); m_xComposer.set( - xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), + xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY_THROW ); Reference< XPropertySet > xSet( xForm, UNO_QUERY ); @@ -3041,7 +3041,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) xQueryColumns->getByName(rRefValue.Name) >>= xSet; // get the RealName - xSet->getPropertyValue("RealName") >>= aRealName; + xSet->getPropertyValue(u"RealName"_ustr) >>= aRealName; // compare the condition field name and the RealName if (aCompare(aRealName, rRefValue.Name)) @@ -3054,7 +3054,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) for (sal_Int32 n = 0, nCount = xColumnsByIndex->getCount(); n < nCount; n++) { xColumnsByIndex->getByIndex(n) >>= xSet; - xSet->getPropertyValue("RealName") >>= aRealName; + xSet->getPropertyValue(u"RealName"_ustr) >>= aRealName; if (aCompare(aRealName, rRefValue.Name)) { // get the column by its alias @@ -3200,7 +3200,7 @@ void FormController::startFiltering() Reference< XModeSelector > xSelector(xControl, UNO_QUERY); if (xSelector.is()) { - xSelector->setMode( "FilterMode" ); + xSelector->setMode( u"FilterMode"_ustr ); // listening for new controls of the selector Reference< XContainer > xContainer(xSelector, UNO_QUERY); @@ -3326,7 +3326,7 @@ void FormController::stopFiltering() Reference< XModeSelector > xSelector(xControl, UNO_QUERY); if (xSelector.is()) { - xSelector->setMode( "DataMode" ); + xSelector->setMode( u"DataMode"_ustr ); // listening for new controls of the selector Reference< XContainer > xContainer(xSelector, UNO_QUERY); @@ -3421,8 +3421,8 @@ Sequence< OUString > SAL_CALL FormController::getSupportedModes() static Sequence< OUString > const aModes { - "DataMode", - "FilterMode" + u"DataMode"_ustr, + u"FilterMode"_ustr }; return aModes; } @@ -3561,7 +3561,7 @@ namespace return true; Reference< XPropertySet > xDataSourceSettings( - xDataSource->getPropertyValue("Settings"), + xDataSource->getPropertyValue(u"Settings"_ustr), UNO_QUERY_THROW ); bool bShouldValidate = true; diff --git a/svx/source/form/formtoolbars.cxx b/svx/source/form/formtoolbars.cxx index a848ba95522f..52d5eb789e18 100644 --- a/svx/source/form/formtoolbars.cxx +++ b/svx/source/form/formtoolbars.cxx @@ -39,7 +39,7 @@ namespace svxform // the layout manager Reference< XPropertySet > xFrameProps( _rxFrame, UNO_QUERY ); if ( xFrameProps.is() ) - xFrameProps->getPropertyValue("LayoutManager") >>= m_xLayouter; + xFrameProps->getPropertyValue(u"LayoutManager"_ustr) >>= m_xLayouter; } @@ -83,7 +83,7 @@ namespace svxform OSL_ENSURE( _nSlotId == SID_FM_FORM_DESIGN_TOOLS , "FormToolboxes::getToolboxResourceName: unsupported slot!" ); - return "private:resource/toolbar/formdesign"; + return u"private:resource/toolbar/formdesign"_ustr; } diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx index 91d9f99c0ce9..ca68e0c426fd 100644 --- a/svx/source/form/labelitemwindow.cxx +++ b/svx/source/form/labelitemwindow.cxx @@ -10,10 +10,10 @@ #include <svx/labelitemwindow.hxx> LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel) - : InterimItemWindow(pParent, "svx/ui/labelbox.ui", "LabelBox") - , m_xBox(m_xBuilder->weld_box("LabelBox")) - , m_xLabel(m_xBuilder->weld_label("label")) - , m_xImage(m_xBuilder->weld_image("image")) + : InterimItemWindow(pParent, u"svx/ui/labelbox.ui"_ustr, u"LabelBox"_ustr) + , m_xBox(m_xBuilder->weld_box(u"LabelBox"_ustr)) + , m_xLabel(m_xBuilder->weld_label(u"label"_ustr)) + , m_xImage(m_xBuilder->weld_image(u"image"_ustr)) { InitControlBase(m_xLabel.get()); diff --git a/svx/source/form/legacyformcontroller.cxx b/svx/source/form/legacyformcontroller.cxx index 94b2ae9834f0..a78a0c740b62 100644 --- a/svx/source/form/legacyformcontroller.cxx +++ b/svx/source/form/legacyformcontroller.cxx @@ -177,7 +177,7 @@ namespace svxform OUString SAL_CALL LegacyFormController::getImplementationName( ) { - return "org.openoffice.comp.svx.LegacyFormController"; + return u"org.openoffice.comp.svx.LegacyFormController"_ustr; } sal_Bool SAL_CALL LegacyFormController::supportsService( const OUString& _serviceName ) @@ -187,7 +187,7 @@ namespace svxform Sequence< OUString > SAL_CALL LegacyFormController::getSupportedServiceNames( ) { - return { "com.sun.star.form.FormController", "com.sun.star.awt.control.TabController" }; + return { u"com.sun.star.form.FormController"_ustr, u"com.sun.star.awt.control.TabController"_ustr }; } } diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 9b5cc553182a..5f8a6e9d1132 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -359,43 +359,43 @@ namespace svxform FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : nullptr; if( pFormShell && pFormModel ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "svx/ui/formnavimenu.ui")); - std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); - std::unique_ptr<weld::Menu> xSubMenuNew(xBuilder->weld_menu("submenu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), u"svx/ui/formnavimenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr)); + std::unique_ptr<weld::Menu> xSubMenuNew(xBuilder->weld_menu(u"submenu"_ustr)); // menu 'New' only exists, if only the root or only one form is selected bool bShowNew = bSingleSelection && (m_nFormsSelected || m_bRootSelected); if (!bShowNew) - xContextMenu->remove("new"); + xContextMenu->remove(u"new"_ustr); // 'New'\'Form' under the same terms bool bShowForm = bSingleSelection && (m_nFormsSelected || m_bRootSelected); if (bShowForm) - xSubMenuNew->append("form", SvxResId(RID_STR_FORM), RID_SVXBMP_FORM); + xSubMenuNew->append(u"form"_ustr, SvxResId(RID_STR_FORM), RID_SVXBMP_FORM); // 'New'\'hidden...', if exactly one form is selected bool bShowHidden = bSingleSelection && m_nFormsSelected; if (bShowHidden) - xSubMenuNew->append("hidden", SvxResId(RID_STR_HIDDEN), RID_SVXBMP_HIDDEN); + xSubMenuNew->append(u"hidden"_ustr, SvxResId(RID_STR_HIDDEN), RID_SVXBMP_HIDDEN); // 'Delete': everything which is not root can be removed if (m_bRootSelected) - xContextMenu->remove("delete"); + xContextMenu->remove(u"delete"_ustr); // 'Cut', 'Copy' and 'Paste' bool bShowCut = !m_bRootSelected && implAllowExchange(DND_ACTION_MOVE); if (!bShowCut) - xContextMenu->remove("cut"); + xContextMenu->remove(u"cut"_ustr); bool bShowCopy = !m_bRootSelected && implAllowExchange(DND_ACTION_COPY); if (!bShowCopy) - xContextMenu->remove("copy"); + xContextMenu->remove(u"copy"_ustr); if (!implAcceptPaste()) - xContextMenu->remove("paste"); + xContextMenu->remove(u"paste"_ustr); // TabDialog, if exactly one form bool bShowTabOrder = bSingleSelection && m_nFormsSelected; if (!bShowTabOrder) - xContextMenu->remove("taborder"); + xContextMenu->remove(u"taborder"_ustr); bool bShowProps = true; // in XML forms, we don't allow for the properties of a form @@ -412,22 +412,22 @@ namespace svxform (m_nControlsSelected && !m_nFormsSelected) || (!m_nControlsSelected && m_nFormsSelected); if (!bShowProps) - xContextMenu->remove("props"); + xContextMenu->remove(u"props"_ustr); // rename, if one element and no root bool bShowRename = bSingleSelection && !m_bRootSelected; if (!bShowRename) - xContextMenu->remove("rename"); + xContextMenu->remove(u"rename"_ustr); if (!m_bRootSelected) { // Readonly-entry is only for root - xContextMenu->remove("designmode"); + xContextMenu->remove(u"designmode"_ustr); // the same for automatic control focus - xContextMenu->remove("controlfocus"); + xContextMenu->remove(u"controlfocus"_ustr); } - std::unique_ptr<weld::Menu> xConversionMenu(xBuilder->weld_menu("changemenu")); + std::unique_ptr<weld::Menu> xConversionMenu(xBuilder->weld_menu(u"changemenu"_ustr)); // ConvertTo-Slots are enabled, if one control is selected // the corresponding slot is disabled if (!m_bRootSelected && !m_nFormsSelected && (m_nControlsSelected == 1)) @@ -443,13 +443,13 @@ namespace svxform pFormShell->GetImpl()->checkControlConversionSlotsForCurrentSelection_Lock(*xConversionMenu); } else - xContextMenu->remove("change"); + xContextMenu->remove(u"change"_ustr); if (m_bRootSelected) { // set OpenReadOnly - xContextMenu->set_active("designmode", pFormModel->GetOpenInDesignMode()); - xContextMenu->set_active("controlfocus", pFormModel->GetAutoControlFocus()); + xContextMenu->set_active(u"designmode"_ustr, pFormModel->GetOpenInDesignMode()); + xContextMenu->set_active(u"controlfocus"_ustr, pFormModel->GetAutoControlFocus()); } OUString sIdent = xContextMenu->popup_at_rect(m_xTreeView.get(), tools::Rectangle(ptWhere, ::Size(1, 1))); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 4c534ef7c35b..62163accfd8b 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -110,10 +110,10 @@ IMPL_LINK(FmFieldWin, DragBeginHdl, bool&, rUnsetDragIcon, bool) } FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, weld::Window* _pParent) - : SfxModelessDialogController(_pBindings, _pMgr, _pParent, "svx/ui/formfielddialog.ui", "FormFieldDialog") + : SfxModelessDialogController(_pBindings, _pMgr, _pParent, u"svx/ui/formfielddialog.ui"_ustr, u"FormFieldDialog"_ustr) , SfxControllerItem(SID_FM_FIELDS_CONTROL, *_pBindings) , comphelper::OPropertyChangeListener2() - , m_xListBox(m_xBuilder->weld_tree_view("treeview")) + , m_xListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr)) , m_nObjectType(0) { m_xDialog->set_help_id(HID_FIELD_SEL_WIN); diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 96f05670d35d..9e23caa8d2c1 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -49,8 +49,8 @@ void SvxFmAbsRecWin::PositionFired(sal_Int64 nRecord) Any a; aPositionParam.QueryValue( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("Position", a) }; - m_pController->Dispatch( ".uno:AbsoluteRecord", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"Position"_ustr, a) }; + m_pController->Dispatch( u".uno:AbsoluteRecord"_ustr, aArgs ); m_pController->updateStatus(); } @@ -156,7 +156,7 @@ SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal() VclPtr<InterimItemWindow> SvxFmTbxCtlRecTotal::CreateItemWindow( vcl::Window* pParent ) { m_xFixedText.reset(VclPtr<LabelItemWindow>::Create(pParent, "123456")); - m_xFixedText->set_label(""); + m_xFixedText->set_label(u""_ustr); m_xFixedText->Show(); diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx index 6c8d6ef35ab5..5601c051bb7d 100644 --- a/svx/source/form/xfm_addcondition.cxx +++ b/svx/source/form/xfm_addcondition.cxx @@ -51,20 +51,20 @@ namespace svxform Sequence< OUString > OAddConditionDialog_GetSupportedServiceNames() { - return { "com.sun.star.xforms.ui.dialogs.AddCondition" }; + return { u"com.sun.star.xforms.ui.dialogs.AddCondition"_ustr }; } OUString OAddConditionDialog_GetImplementationName() { - return "org.openoffice.comp.svx.OAddConditionDialog"; + return u"org.openoffice.comp.svx.OAddConditionDialog"_ustr; } OAddConditionDialog::OAddConditionDialog( const Reference< XComponentContext >& _rxORB ) :OAddConditionDialogBase( _rxORB ) { registerProperty( - "Binding", + u"Binding"_ustr, PROPERTY_ID_BINDING, PropertyAttribute::TRANSIENT, &m_xBinding, @@ -72,7 +72,7 @@ namespace svxform ); registerProperty( - "FacetName", + u"FacetName"_ustr, PROPERTY_ID_FACET_NAME, PropertyAttribute::TRANSIENT, &m_sFacetName, @@ -80,7 +80,7 @@ namespace svxform ); registerProperty( - "ConditionValue", + u"ConditionValue"_ustr, PROPERTY_ID_CONDITION_VALUE, PropertyAttribute::TRANSIENT, &m_sConditionValue, @@ -88,7 +88,7 @@ namespace svxform ); registerProperty( - "FormModel", + u"FormModel"_ustr, PROPERTY_ID_FORM_MODEL, PropertyAttribute::TRANSIENT, &m_xWorkModel, diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 9a073954f1d4..40595b894bcd 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -25,7 +25,7 @@ namespace svx::sidebar { GalleryControl::GalleryControl(weld::Widget* pParent) - : PanelLayout(pParent, "GalleryPanel", "svx/ui/sidebargallery.ui") + : PanelLayout(pParent, u"GalleryPanel"_ustr, u"svx/ui/sidebargallery.ui"_ustr) , mpGallery(Gallery::GetGalleryInstance()) , mxBrowser1(new GalleryBrowser1( *m_xBuilder, diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 18c2dae8e39a..ec18025b9b01 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -122,9 +122,9 @@ GalleryBrowser1::GalleryBrowser1( Gallery* pGallery)//, //std::function<void ()> aThemeSelectionHandler) : - mxNewTheme(rBuilder.weld_button("insert")), - mxThemes(rBuilder.weld_tree_view("themelist")), - mxMoreGalleries(rBuilder.weld_button("btnMoreGalleries")), + mxNewTheme(rBuilder.weld_button(u"insert"_ustr)), + mxThemes(rBuilder.weld_tree_view(u"themelist"_ustr)), + mxMoreGalleries(rBuilder.weld_button(u"btnMoreGalleries"_ustr)), mpGallery ( pGallery ), mpExchangeData ( new ExchangeData ), aImgNormal ( RID_SVXBMP_THEME_NORMAL ), @@ -132,15 +132,15 @@ GalleryBrowser1::GalleryBrowser1( aImgReadOnly ( RID_SVXBMP_THEME_READONLY ) //maThemeSelectionHandler(std::move(aThemeSelectionHandler)) , mpCurTheme(nullptr) - , mxIconView(new GalleryIconView(this, rBuilder.weld_scrolled_window("galleryscroll", true))) - , mxIconViewWin(new weld::CustomWeld(rBuilder, "gallery", *mxIconView)) - , mxListView(rBuilder.weld_tree_view("gallerylist")) - , mxPreview(new GalleryPreview(this, rBuilder.weld_scrolled_window("previewscroll"))) - , mxPreviewWin(new weld::CustomWeld(rBuilder, "preview", *mxPreview)) - , mxIconButton(rBuilder.weld_toggle_button("icon")) - , mxListButton(rBuilder.weld_toggle_button("list")) - , mxSearchField(rBuilder.weld_entry("search")) - , mxInfoBar(rBuilder.weld_label("label")) + , mxIconView(new GalleryIconView(this, rBuilder.weld_scrolled_window(u"galleryscroll"_ustr, true))) + , mxIconViewWin(new weld::CustomWeld(rBuilder, u"gallery"_ustr, *mxIconView)) + , mxListView(rBuilder.weld_tree_view(u"gallerylist"_ustr)) + , mxPreview(new GalleryPreview(this, rBuilder.weld_scrolled_window(u"previewscroll"_ustr))) + , mxPreviewWin(new weld::CustomWeld(rBuilder, u"preview"_ustr, *mxPreview)) + , mxIconButton(rBuilder.weld_toggle_button(u"icon"_ustr)) + , mxListButton(rBuilder.weld_toggle_button(u"list"_ustr)) + , mxSearchField(rBuilder.weld_entry(u"search"_ustr)) + , mxInfoBar(rBuilder.weld_label(u"label"_ustr)) , maPreviewSize(28, 28) , mnCurActionPos ( 0xffffffff ) , meMode ( GALLERYBROWSERMODE_NONE ) @@ -174,7 +174,7 @@ GalleryBrowser1::GalleryBrowser1( m_xTransformer.set( m_xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.util.URLTransformer", m_xContext ), + u"com.sun.star.util.URLTransformer"_ustr, m_xContext ), css::uno::UNO_QUERY ); mxIconButton->connect_toggled( LINK( this, GalleryBrowser1, SelectTbxHdl ) ); @@ -220,7 +220,7 @@ void GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ) else pImage = &aImgNormal; - mxThemes->append("", pEntry->GetThemeName(), *pImage); + mxThemes->append(u""_ustr, pEntry->GetThemeName(), *pImage); } void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData ) @@ -369,8 +369,8 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) } else if (rIdent == u"delete") { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(mxThemes.get(), "svx/ui/querydeletethemedialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryDeleteThemeDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(mxThemes.get(), u"svx/ui/querydeletethemedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"QueryDeleteThemeDialog"_ustr)); if (xQuery->run() == RET_YES) mpGallery->RemoveTheme( mxThemes->get_selected_text() ); } @@ -492,9 +492,9 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) IMPL_STATIC_LINK_NOARG( GalleryBrowser1, OnMoreGalleriesClick, weld::Button&, void) { css::uno::Sequence<css::beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("AdditionsTag", OUString("Gallery")) + comphelper::makePropertyValue(u"AdditionsTag"_ustr, u"Gallery"_ustr) }; - comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); + comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); } IMPL_LINK(GalleryBrowser1, KeyInputHdl1, const KeyEvent&, rKEvt, bool) @@ -572,14 +572,14 @@ IMPL_LINK(GalleryBrowser1, PopupMenuHdl1, const CommandEvent&, rCEvt, bool) if (aExecVector.empty()) return true; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(mxThemes.get(), "svx/ui/gallerymenu1.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(mxThemes.get(), u"svx/ui/gallerymenu1.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); - xMenu->set_visible("update", std::find( aExecVector.begin(), aExecVector.end(), "update" ) != aExecVector.end()); - xMenu->set_visible("rename", std::find( aExecVector.begin(), aExecVector.end(), "rename" ) != aExecVector.end()); - xMenu->set_visible("delete", std::find( aExecVector.begin(), aExecVector.end(), "delete" ) != aExecVector.end()); - xMenu->set_visible("assign", std::find( aExecVector.begin(), aExecVector.end(), "assign" ) != aExecVector.end()); - xMenu->set_visible("properties", std::find( aExecVector.begin(), aExecVector.end(), "properties" ) != aExecVector.end()); + xMenu->set_visible(u"update"_ustr, std::find( aExecVector.begin(), aExecVector.end(), "update" ) != aExecVector.end()); + xMenu->set_visible(u"rename"_ustr, std::find( aExecVector.begin(), aExecVector.end(), "rename" ) != aExecVector.end()); + xMenu->set_visible(u"delete"_ustr, std::find( aExecVector.begin(), aExecVector.end(), "delete" ) != aExecVector.end()); + xMenu->set_visible(u"assign"_ustr, std::find( aExecVector.begin(), aExecVector.end(), "assign" ) != aExecVector.end()); + xMenu->set_visible(u"properties"_ustr, std::find( aExecVector.begin(), aExecVector.end(), "properties" ) != aExecVector.end()); OUString sCommand(xMenu->popup_at_rect(mxThemes.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); ImplExecute(sCommand); @@ -1030,7 +1030,7 @@ void GalleryBrowser1::ImplUpdateViews( sal_uInt16 nSelectionId ) if (aFoundIter->maThemeName == aThemeName) { mxIconView->InsertItem(aFoundIter->mnIdInTheme + 1); // skip reserved id 0 - mxListView->append(OUString::number(aFoundIter->mnIdInTheme),""); // create on-demand in VisRowsScrolledHdl + mxListView->append(OUString::number(aFoundIter->mnIdInTheme),u""_ustr); // create on-demand in VisRowsScrolledHdl if (inserted == nAlwaysUpToDate) // fill in the first block UpdateRows(false); @@ -1276,7 +1276,7 @@ void GalleryBrowser1::DispatchAdd( m_xTransformer->parseStrict( aURL ); xDispatch = xDispatchProvider->queryDispatch( aURL, - "_self", + u"_self"_ustr, css::frame::FrameSearchFlag::SELF ); } @@ -1353,8 +1353,8 @@ void GalleryBrowser1::Execute(std::u16string_view rIdent) { if (!mpCurTheme->IsReadOnly()) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetViewWindow(), "svx/ui/querydeleteobjectdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryDeleteObjectDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetViewWindow(), u"svx/ui/querydeleteobjectdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"QueryDeleteObjectDialog"_ustr)); if (xQuery->run() == RET_YES) { mpCurTheme->RemoveObject( mnCurActionPos ); @@ -1575,23 +1575,23 @@ GalleryThemePopup::GalleryThemePopup( : mpTheme( pTheme ) , mnObjectPos( nObjectPos ) , mbPreview( bPreview ) - , mxBuilder(Application::CreateBuilder(pParent, "svx/ui/gallerymenu2.ui")) - , mxPopupMenu(mxBuilder->weld_menu("menu")) - , mxBackgroundPopup(mxBuilder->weld_menu("backgroundmenu")) + , mxBuilder(Application::CreateBuilder(pParent, u"svx/ui/gallerymenu2.ui"_ustr)) + , mxPopupMenu(mxBuilder->weld_menu(u"menu"_ustr)) + , mxBackgroundPopup(mxBuilder->weld_menu(u"backgroundmenu"_ustr)) , mpBrowser( pBrowser ) { // SID_GALLERY_ENABLE_ADDCOPY m_aCommandInfo.emplace( SID_GALLERY_ENABLE_ADDCOPY, - CommandInfo( ".uno:GalleryEnableAddCopy" )); + CommandInfo( u".uno:GalleryEnableAddCopy"_ustr )); // SID_GALLERY_BG_BRUSH m_aCommandInfo.emplace( SID_GALLERY_BG_BRUSH, - CommandInfo( ".uno:BackgroundImage" )); + CommandInfo( u".uno:BackgroundImage"_ustr )); // SID_GALLERY_FORMATS m_aCommandInfo.emplace( SID_GALLERY_FORMATS, - CommandInfo( ".uno:InsertGalleryPic" )); + CommandInfo( u".uno:InsertGalleryPic"_ustr )); } @@ -1603,7 +1603,7 @@ void SAL_CALL GalleryThemePopup::statusChanged( { if ( !rEvent.IsEnabled ) { - mxPopupMenu->set_visible("add", false); + mxPopupMenu->set_visible(u"add"_ustr, false); } } else if ( rURL == ".uno:BackgroundImage" ) @@ -1662,27 +1662,27 @@ void GalleryThemePopup::ExecutePopup(weld::Widget* pParent, const ::Point &rPos) const_cast< GalleryTheme* >( mpTheme )->GetURL( mnObjectPos, aURL ); const bool bValidURL = ( aURL.GetProtocol() != INetProtocol::NotValid ); - mxPopupMenu->set_visible("add", bValidURL && SgaObjKind::Sound != eObjKind); + mxPopupMenu->set_visible(u"add"_ustr, bValidURL && SgaObjKind::Sound != eObjKind); - mxPopupMenu->set_visible("preview", bValidURL); - mxPopupMenu->set_active("preview", mbPreview); + mxPopupMenu->set_visible(u"preview"_ustr, bValidURL); + mxPopupMenu->set_active(u"preview"_ustr, mbPreview); if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() ) { - mxPopupMenu->set_visible("delete", false); - mxPopupMenu->set_visible("title", false); + mxPopupMenu->set_visible(u"delete"_ustr, false); + mxPopupMenu->set_visible(u"title"_ustr, false); if (mpTheme->IsReadOnly()) - mxPopupMenu->set_visible("paste", false); + mxPopupMenu->set_visible(u"paste"_ustr, false); if (!mpTheme->GetObjectCount()) - mxPopupMenu->set_visible("copy", false); + mxPopupMenu->set_visible(u"copy"_ustr, false); } else { - mxPopupMenu->set_visible("delete", !mbPreview); - mxPopupMenu->set_visible("title", true); - mxPopupMenu->set_visible("copy", true); - mxPopupMenu->set_visible("paste", true); + mxPopupMenu->set_visible(u"delete"_ustr, !mbPreview); + mxPopupMenu->set_visible(u"title"_ustr, true); + mxPopupMenu->set_visible(u"copy"_ustr, true); + mxPopupMenu->set_visible(u"paste"_ustr, true); } // update status @@ -1702,7 +1702,7 @@ void GalleryThemePopup::ExecutePopup(weld::Widget* pParent, const ::Point &rPos) { rCmdInfo.Dispatch = xDispatchProvider->queryDispatch( rCmdInfo.URL, - "_self", + u"_self"_ustr, css::frame::FrameSearchFlag::SELF ); } @@ -1717,9 +1717,9 @@ void GalleryThemePopup::ExecutePopup(weld::Widget* pParent, const ::Point &rPos) } if( !mxBackgroundPopup->n_children() || ( eObjKind == SgaObjKind::SvDraw ) || ( eObjKind == SgaObjKind::Sound ) ) - mxPopupMenu->set_visible("background", false); + mxPopupMenu->set_visible(u"background"_ustr, false); else - mxPopupMenu->set_visible("background", true); + mxPopupMenu->set_visible(u"background"_ustr, true); MenuSelectHdl(mxPopupMenu->popup_at_rect(pParent, tools::Rectangle(rPos, Size(1,1)))); } @@ -1752,12 +1752,12 @@ void GalleryThemePopup::BackgroundMenuSelectHdl(sal_uInt16 nPos) OUString aFilterName( mpBrowser->GetFilterName() ); css::uno::Sequence< css::beans::PropertyValue > aArgs{ - comphelper::makePropertyValue("Background.Transparent", sal_Int32( 0 )), // 0 - 100 - comphelper::makePropertyValue("Background.BackColor", sal_Int32( - 1 )), - comphelper::makePropertyValue("Background.URL", aURL), - comphelper::makePropertyValue("Background.Filtername", aFilterName), // FIXME name should be FilterName - comphelper::makePropertyValue("Background.Position", css::style::GraphicLocation_TILED), - comphelper::makePropertyValue("Position", nPos) + comphelper::makePropertyValue(u"Background.Transparent"_ustr, sal_Int32( 0 )), // 0 - 100 + comphelper::makePropertyValue(u"Background.BackColor"_ustr, sal_Int32( - 1 )), + comphelper::makePropertyValue(u"Background.URL"_ustr, aURL), + comphelper::makePropertyValue(u"Background.Filtername"_ustr, aFilterName), // FIXME name should be FilterName + comphelper::makePropertyValue(u"Background.Position"_ustr, css::style::GraphicLocation_TILED), + comphelper::makePropertyValue(u"Position"_ustr, nPos) }; const CommandInfoMap::const_iterator it = m_aCommandInfo.find( SID_GALLERY_BG_BRUSH ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index b753dbfac069..4e33db6d8267 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -209,7 +209,7 @@ void GalleryPreview::PreviewMedia( const INetURLObject& rURL ) } if (pFloater) - pFloater->setURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "", true ); + pFloater->setURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), u""_ustr, true ); #else (void) rURL; #endif @@ -231,7 +231,7 @@ bool DialogGalleryPreview::SetGraphic( const INetURLObject& _aURL ) bool bRet = true; Graphic aGraphic; #if HAVE_FEATURE_AVMEDIA - if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) ) + if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), u""_ustr ) ) { aGraphic = BitmapEx(RID_SVXBMP_GALLERY_MEDIA); } diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index e5ef7dceeb0d..899c606f0962 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -297,7 +297,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO uno::Reference< ucb::XCommandEnvironment > xEnv; ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() ); - uno::Sequence<OUString> aProps { "Url" }; + uno::Sequence<OUString> aProps { u"Url"_ustr }; uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); diff --git a/svx/source/gallery2/galleryfilestorage.cxx b/svx/source/gallery2/galleryfilestorage.cxx index 73f6492c1268..12aa9d42f7c9 100644 --- a/svx/source/gallery2/galleryfilestorage.cxx +++ b/svx/source/gallery2/galleryfilestorage.cxx @@ -147,7 +147,7 @@ void GalleryFileStorage::insertObject(const SgaObject& rObj, GalleryObject* pFou } } else if (rObj.GetTitle() == "__<empty>__") - const_cast<SgaObject&>(rObj).SetTitle(""); + const_cast<SgaObject&>(rObj).SetTitle(u""_ustr); implWriteSgaObject(rObj, nInsertPos, &aNewEntry); pFoundEntry->nOffset = aNewEntry.nOffset; @@ -651,11 +651,11 @@ void GalleryFileStorage::insertFileOrDirURL(const INetURLObject& rFileOrDirURL, comphelper::getProcessComponentContext()); bool bFolder = false; - aCnt.getPropertyValue("IsFolder") >>= bFolder; + aCnt.getPropertyValue(u"IsFolder"_ustr) >>= bFolder; if (bFolder) { - uno::Sequence<OUString> aProps{ "Url" }; + uno::Sequence<OUString> aProps{ u"Url"_ustr }; uno::Reference<sdbc::XResultSet> xResultSet( aCnt.createCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY)); uno::Reference<ucb::XContentAccess> xContentAccess(xResultSet, uno::UNO_QUERY); @@ -800,7 +800,7 @@ DateTime GalleryFileStorage::getModificationDate() const util::DateTime aDateTimeModified; DateTime aDateTime(DateTime::EMPTY); - aCnt.getPropertyValue("DateModified") >>= aDateTimeModified; + aCnt.getPropertyValue(u"DateModified"_ustr) >>= aDateTimeModified; ::utl::typeConvert(aDateTimeModified, aDateTime); return aDateTime; diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 3eacf5691819..4d3ef2d5a619 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -209,7 +209,7 @@ bool FileExists( const INetURLObject& rURL ) ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); OUString aTitle; - aCnt.getPropertyValue("Title") >>= aTitle; + aCnt.getPropertyValue(u"Title"_ustr) >>= aTitle; bRet = ( !aTitle.isEmpty() ); } catch( const ucb::ContentCreationException& ) @@ -238,11 +238,11 @@ bool CreateDir( const INetURLObject& rURL ) INetURLObject aParentURL( rURL ); aParentURL.removeSegment(); ::ucbhelper::Content aParent( aParentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() ); - uno::Sequence< OUString > aProps{ "Title" }; + uno::Sequence< OUString > aProps{ u"Title"_ustr }; uno::Sequence< uno::Any > aValues{ uno::Any(rURL.GetLastName()) }; ::ucbhelper::Content aContent( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() ); - bRet = aParent.insertNewContent( "application/vnd.sun.staroffice.fsys-folder", aProps, aValues, aContent ); + bRet = aParent.insertNewContent( u"application/vnd.sun.staroffice.fsys-folder"_ustr, aProps, aValues, aContent ); } catch( const ucb::ContentCreationException& ) { @@ -266,7 +266,7 @@ bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) { ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aDestPath.executeCommand( "transfer", + aDestPath.executeCommand( u"transfer"_ustr, uno::Any( ucb::TransferInfo( false, rSrcURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), rDstURL.GetLastName(), ucb::NameClash::OVERWRITE ) ) ); bRet = true; @@ -293,7 +293,7 @@ bool KillFile( const INetURLObject& rURL ) try { ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aCnt.executeCommand( "delete", uno::Any( true ) ); + aCnt.executeCommand( u"delete"_ustr, uno::Any( true ) ); } catch( const ucb::ContentCreationException& ) { @@ -318,7 +318,7 @@ GalleryProgress::GalleryProgress( const GraphicFilter* pFilter ) uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); - uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance( "com.sun.star.awt.XProgressMonitor" ), + uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance( u"com.sun.star.awt.XProgressMonitor"_ustr ), uno::UNO_QUERY ); if ( !xMonitor.is() ) @@ -338,7 +338,7 @@ GalleryProgress::GalleryProgress( const GraphicFilter* pFilter ) else aProgressText = "Gallery"; - xMonitor->addText( "Gallery", aProgressText, false ) ; + xMonitor->addText( u"Gallery"_ustr, aProgressText, false ) ; mxProgressBar->setRange( 0, GALLERY_PROGRESS_RANGE ); } @@ -396,7 +396,7 @@ void GalleryTransferable::InitData( bool bLazy ) if( !mxModelStream ) { - mxModelStream = SotTempStream::Create( "" ); + mxModelStream = SotTempStream::Create( u""_ustr ); mxModelStream->SetBufferSize( 16348 ); if (!mpTheme || !mpTheme->GetModelStream(mnObjectPos, *mxModelStream)) diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 2c11af446b17..d8ad812331ba 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -240,7 +240,7 @@ void SgaObject::SetTitle( const OUString& rTitle ) SvStream& WriteSgaObject( SvStream& rOut, const SgaObject& rObj ) { - rObj.WriteData( rOut, "" ); + rObj.WriteData( rOut, u""_ustr ); return rOut; } @@ -405,7 +405,7 @@ SgaObjectSvDraw::SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject SvxGalleryDrawModel::SvxGalleryDrawModel() : mpFormModel( nullptr ) { - mxDoc = SfxObjectShell::CreateObjectByFactoryName( "sdraw" ); + mxDoc = SfxObjectShell::CreateObjectByFactoryName( u"sdraw"_ustr ); if( !mxDoc.Is() ) return; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 2194fdd4d4a6..9e23f59b5d5f 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -510,7 +510,7 @@ bool GalleryTheme::InsertURL(const INetURLObject& rURL, sal_uInt32 nInsertPos) pNewObj.reset(new SgaObjectBmp( aGraphic, rURL )); } #if HAVE_FEATURE_AVMEDIA - else if( ::avmedia::MediaWindow::isMediaURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO?*/ ) ) + else if( ::avmedia::MediaWindow::isMediaURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), u""_ustr/*TODO?*/ ) ) pNewObj.reset(new SgaObjectSound( rURL )); #endif if( pNewObj && InsertObject( *pNewObj, nInsertPos ) ) diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index 99a5fda35534..3ad6b93f03d6 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -157,7 +157,7 @@ void GalApp::Init() OUString baseBinDir = fileName.copy( 0, lastSlash ); OUString installPrefix = baseBinDir + "/../.."; - OUString envVar( "OOO_INSTALL_PREFIX"); + OUString envVar( u"OOO_INSTALL_PREFIX"_ustr); osl_setEnvironment(envVar.pData, installPrefix.pData); } SAL_INFO("svx", "OOO_INSTALL_PREFIX=" << getenv( "OOO_INSTALL_PREFIX" ) ); @@ -254,7 +254,7 @@ int GalApp::Main() SfxApplication::GetOrCreate(); OUString aPath, aDestDir; - OUString aName( "Default name" ); + OUString aName( u"Default name"_ustr ); std::vector<INetURLObject> aFiles; for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); ++i ) diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx index 88176083ec53..5d720260e03c 100644 --- a/svx/source/items/numinf.cxx +++ b/svx/source/items/numinf.cxx @@ -26,7 +26,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SfxPoolItem ( nId ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::Undefined ), - aStringVal ( "" ), + aStringVal ( u""_ustr ), nDoubleVal ( 0 ) { } @@ -48,7 +48,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SfxPoolItem ( nId ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::Number ), - aStringVal ( "" ), + aStringVal ( u""_ustr ), nDoubleVal ( rVal ) { } diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index 0659d195de67..b49ff207f8a9 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -45,7 +45,7 @@ SvxClipBoardControl::SvxClipBoardControl( SfxToolBoxControl( nSlotId, nId, rTbx ), bDisabled( false ) { - addStatusListener( ".uno:ClipboardFormatItems"); + addStatusListener( u".uno:ClipboardFormatItems"_ustr); ToolBox& rBox = GetToolBox(); rBox.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rBox.GetItemBits( nId ) ); rBox.Invalidate(); @@ -59,8 +59,8 @@ void SvxClipBoardControl::CreatePopupWindow() { if ( pClipboardFmtItem ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "svx/ui/clipboardmenu.ui")); - std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/clipboardmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"menu"_ustr)); sal_uInt16 nCount = pClipboardFmtItem->Count(); for (sal_uInt16 i = 0; i < nCount; ++i) @@ -86,8 +86,8 @@ void SvxClipBoardControl::CreatePopupWindow() Any a; aItem.QueryValue( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("SelectedFormat", a) }; - Dispatch( ".uno:ClipboardFormatItems", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"SelectedFormat"_ustr, a) }; + Dispatch( u".uno:ClipboardFormatItems"_ustr, aArgs ); } diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx index 3c336ddbe281..93ab777b96a7 100644 --- a/svx/source/mnuctrls/smarttagmenu.cxx +++ b/svx/source/mnuctrls/smarttagmenu.cxx @@ -230,12 +230,12 @@ bool SmartTagMenuController::MenuSelect(sal_uInt16 nMyId) OUString SmartTagMenuController::getImplementationName() { - return "com.sun.star.comp.svx.SmartTagMenuController"; + return u"com.sun.star.comp.svx.SmartTagMenuController"_ustr; } css::uno::Sequence< OUString > SmartTagMenuController::getSupportedServiceNames() { - return { "com.sun.star.frame.PopupMenuController" }; + return { u"com.sun.star.frame.PopupMenuController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 322c343ae9d8..3ce64bddb366 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1097,8 +1097,8 @@ namespace sdr::contact { // tdf#150886 for calc/writer/impress make forms ignore the platform theme Reference<XPropertySet> xModelProperties(xControlModel, UNO_QUERY); Reference<XPropertySetInfo> xInfo = xModelProperties ? xModelProperties->getPropertySetInfo() : nullptr; - if (xInfo && xInfo->hasPropertyByName("StandardTheme")) - xModelProperties->setPropertyValue("StandardTheme", Any(!_rUnoObject.getSdrModelFromSdrObject().AreControlsThemed())); + if (xInfo && xInfo->hasPropertyByName(u"StandardTheme"_ustr)) + xModelProperties->setPropertyValue(u"StandardTheme"_ustr, Any(!_rUnoObject.getSdrModelFromSdrObject().AreControlsThemed())); // knit the model and the control _out_rControl.setModel( xControlModel ); @@ -1290,7 +1290,7 @@ namespace sdr::contact { try { Reference< XPropertySet > xModelProperties( pUnoObject->GetUnoControlModel(), UNO_QUERY_THROW ); - OSL_VERIFY( xModelProperties->getPropertyValue( "Printable" ) >>= bIsPrintable ); + OSL_VERIFY( xModelProperties->getPropertyValue( u"Printable"_ustr ) >>= bIsPrintable ); } catch( const Exception& ) { diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 374e2d7c1d4a..7edd853cf03b 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -139,7 +139,7 @@ namespace sdr::overlay // Set Property 'ReducedDisplayQuality' to true to allow simpler interaction // visualisations. Note: Currently will use reduced quality for 3d scene soft renderer uno::Sequence< beans::PropertyValue > xProperties{ - comphelper::makePropertyValue("ReducedDisplayQuality", true) + comphelper::makePropertyValue(u"ReducedDisplayQuality"_ustr, true) }; maViewInformation2D = drawinglayer::geometry::createViewInformation2D(xProperties); } diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 7906b49f5e82..363b5e005ce8 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -48,7 +48,7 @@ namespace { try { - const uno::Any aNumber(xSet->getPropertyValue("Number")); + const uno::Any aNumber(xSet->getPropertyValue(u"Number"_ustr)); aNumber >>= nRetval; } catch(const uno::Exception&) diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx index 7641b6e9df02..999c03979ccf 100644 --- a/svx/source/sidebar/EmptyPanel.cxx +++ b/svx/source/sidebar/EmptyPanel.cxx @@ -22,7 +22,7 @@ namespace svx::sidebar { EmptyPanel::EmptyPanel(weld::Widget* pParent) - : PanelLayout(pParent, "EmptyPanel", "svx/ui/sidebarempty.ui") + : PanelLayout(pParent, u"EmptyPanel"_ustr, u"svx/ui/sidebarempty.ui"_ustr) { } diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index f55575d1ab97..6d1bd1cc8c60 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -77,13 +77,13 @@ public: const ::css::uno::Sequence<css::beans::PropertyValue>& rArguments) override; OUString SAL_CALL getImplementationName() override - { return "org.apache.openoffice.comp.svx.sidebar.PanelFactory"; } + { return u"org.apache.openoffice.comp.svx.sidebar.PanelFactory"_ustr; } sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override - { return {"com.sun.star.ui.UIElementFactory"}; } + { return {u"com.sun.star.ui.UIElementFactory"_ustr}; } }; PanelFactory::PanelFactory() @@ -95,10 +95,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( const ::css::uno::Sequence<css::beans::PropertyValue>& rArguments) { const ::comphelper::NamedValueCollection aArguments (rArguments); - Reference<frame::XFrame> xFrame (aArguments.getOrDefault("Frame", Reference<frame::XFrame>())); - Reference<awt::XWindow> xParentWindow (aArguments.getOrDefault("ParentWindow", Reference<awt::XWindow>())); - Reference<ui::XSidebar> xSidebar (aArguments.getOrDefault("Sidebar", Reference<ui::XSidebar>())); - const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0))); + Reference<frame::XFrame> xFrame (aArguments.getOrDefault(u"Frame"_ustr, Reference<frame::XFrame>())); + Reference<awt::XWindow> xParentWindow (aArguments.getOrDefault(u"ParentWindow"_ustr, Reference<awt::XWindow>())); + Reference<ui::XSidebar> xSidebar (aArguments.getOrDefault(u"Sidebar"_ustr, Reference<ui::XSidebar>())); + const sal_uInt64 nBindingsValue (aArguments.getOrDefault(u"SfxBindings"_ustr, sal_uInt64(0))); SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue); weld::Widget* pParent(nullptr); @@ -107,15 +107,15 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( if (!pParent) throw RuntimeException( - "PanelFactory::createUIElement called without ParentWindow", + u"PanelFactory::createUIElement called without ParentWindow"_ustr, nullptr); if ( ! xFrame.is()) throw RuntimeException( - "PanelFactory::createUIElement called without Frame", + u"PanelFactory::createUIElement called without Frame"_ustr, nullptr); if (pBindings == nullptr) throw RuntimeException( - "PanelFactory::createUIElement called without SfxBindings", + u"PanelFactory::createUIElement called without SfxBindings"_ustr, nullptr); std::unique_ptr<PanelLayout> xControl; diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index 1a5c02909c02..cea00234659a 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -73,11 +73,11 @@ std::unique_ptr<PanelLayout> AreaPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to AreaPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to AreaPropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to AreaPropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to AreaPropertyPanel::Create"_ustr, nullptr, 1); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to AreaPropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to AreaPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<AreaPropertyPanel>(pParent, rxFrame, pBindings); } diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 9e9c5b882e52..1b8774b62ff8 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -65,28 +65,28 @@ const sal_Int32 AreaPropertyPanelBase::DEFAULT_BORDER = 0; AreaPropertyPanelBase::AreaPropertyPanelBase( weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) - : PanelLayout(pParent, "AreaPropertyPanel", "svx/ui/sidebararea.ui"), + : PanelLayout(pParent, u"AreaPropertyPanel"_ustr, u"svx/ui/sidebararea.ui"_ustr), mxFrame(rxFrame), meLastXFS(static_cast<sal_uInt16>(-1)), mnLastPosHatch(0), mnLastPosBitmap(0), mnLastPosPattern(0), mnLastTransSolid(50), - mxColorTextFT(m_xBuilder->weld_label("filllabel")), - mxLbFillType(m_xBuilder->weld_combo_box("fillstylearea")), - mxLbFillAttr(m_xBuilder->weld_combo_box("fillattrhb")), - mxLbFillGradFrom(new ColorListBox(m_xBuilder->weld_menu_button("fillgrad1"), [this]{ return GetFrameWeld(); })), - mxLbFillGradTo(new ColorListBox(m_xBuilder->weld_menu_button("fillgrad2"), [this]{ return GetFrameWeld(); })), - mxToolBoxColor(m_xBuilder->weld_toolbar("selectcolor")), + mxColorTextFT(m_xBuilder->weld_label(u"filllabel"_ustr)), + mxLbFillType(m_xBuilder->weld_combo_box(u"fillstylearea"_ustr)), + mxLbFillAttr(m_xBuilder->weld_combo_box(u"fillattrhb"_ustr)), + mxLbFillGradFrom(new ColorListBox(m_xBuilder->weld_menu_button(u"fillgrad1"_ustr), [this]{ return GetFrameWeld(); })), + mxLbFillGradTo(new ColorListBox(m_xBuilder->weld_menu_button(u"fillgrad2"_ustr), [this]{ return GetFrameWeld(); })), + mxToolBoxColor(m_xBuilder->weld_toolbar(u"selectcolor"_ustr)), mxColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxColor, *m_xBuilder, rxFrame)), - mxTrspTextFT(m_xBuilder->weld_label("transparencylabel")), - mxLBTransType(m_xBuilder->weld_combo_box("transtype")), - mxMTRTransparent(m_xBuilder->weld_metric_spin_button("settransparency", FieldUnit::PERCENT)), - mxSldTransparent(m_xBuilder->weld_scale("transparencyslider")), - mxBTNGradient(m_xBuilder->weld_toolbar("selectgradient")), - mxMTRAngle(m_xBuilder->weld_metric_spin_button("gradangle", FieldUnit::DEGREE)), - mxGradientStyle(m_xBuilder->weld_combo_box("gradientstyle")), - mxBmpImport(m_xBuilder->weld_button("bmpimport")), + mxTrspTextFT(m_xBuilder->weld_label(u"transparencylabel"_ustr)), + mxLBTransType(m_xBuilder->weld_combo_box(u"transtype"_ustr)), + mxMTRTransparent(m_xBuilder->weld_metric_spin_button(u"settransparency"_ustr, FieldUnit::PERCENT)), + mxSldTransparent(m_xBuilder->weld_scale(u"transparencyslider"_ustr)), + mxBTNGradient(m_xBuilder->weld_toolbar(u"selectgradient"_ustr)), + mxMTRAngle(m_xBuilder->weld_metric_spin_button(u"gradangle"_ustr, FieldUnit::DEGREE)), + mxGradientStyle(m_xBuilder->weld_combo_box(u"gradientstyle"_ustr)), + mxBmpImport(m_xBuilder->weld_button(u"bmpimport"_ustr)), maImgAxial(BMP_AXIAL), maImgElli(BMP_ELLI), maImgQuad(BMP_QUAD), @@ -192,7 +192,7 @@ void AreaPropertyPanelBase::SetTransparency(sal_uInt16 nVal) IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, weld::Button&, void) { - SvxOpenGraphicDialog aDlg("Import", GetFrameWeld()); + SvxOpenGraphicDialog aDlg(u"Import"_ustr, GetFrameWeld()); aDlg.EnableLink(false); if( aDlg.Execute() != ERRCODE_NONE ) return; @@ -445,7 +445,7 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel) if (bUpdateModel) { const Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO; - const XFillColorItem aXFillColorItem("", aColor); + const XFillColorItem aXFillColorItem(u""_ustr, aColor); // #i122676# change FillStyle and Color in one call XFillStyleItem aXFillStyleItem(drawing::FillStyle_SOLID); diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx index 680cf2cfc4ee..4b5ed0eda076 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx @@ -25,18 +25,18 @@ namespace svx::sidebar { AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(const css::uno::Reference<css::frame::XFrame>& rFrame, AreaPropertyPanelBase& rPanel, weld::Widget* pParent) - : WeldToolbarPopup(rFrame, pParent, "svx/ui/floatingareastyle.ui", "FloatingAreaStyle") + : WeldToolbarPopup(rFrame, pParent, u"svx/ui/floatingareastyle.ui"_ustr, u"FloatingAreaStyle"_ustr) , mrAreaPropertyPanel(rPanel) - , mxCenterGrid(m_xBuilder->weld_widget("centergrid")) - , mxAngleGrid(m_xBuilder->weld_widget("anglegrid")) - , mxMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button("centerx", FieldUnit::PERCENT)) - , mxMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button("centery", FieldUnit::PERCENT)) - , mxMtrTrgrAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE)) - , mxBtnLeft45(m_xBuilder->weld_toolbar("lefttoolbox")) - , mxBtnRight45(m_xBuilder->weld_toolbar("righttoolbox")) - , mxMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button("start", FieldUnit::PERCENT)) - , mxMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("end", FieldUnit::PERCENT)) - , mxMtrTrgrBorder(m_xBuilder->weld_metric_spin_button("border", FieldUnit::PERCENT)) + , mxCenterGrid(m_xBuilder->weld_widget(u"centergrid"_ustr)) + , mxAngleGrid(m_xBuilder->weld_widget(u"anglegrid"_ustr)) + , mxMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button(u"centerx"_ustr, FieldUnit::PERCENT)) + , mxMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button(u"centery"_ustr, FieldUnit::PERCENT)) + , mxMtrTrgrAngle(m_xBuilder->weld_metric_spin_button(u"angle"_ustr, FieldUnit::DEGREE)) + , mxBtnLeft45(m_xBuilder->weld_toolbar(u"lefttoolbox"_ustr)) + , mxBtnRight45(m_xBuilder->weld_toolbar(u"righttoolbox"_ustr)) + , mxMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button(u"start"_ustr, FieldUnit::PERCENT)) + , mxMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button(u"end"_ustr, FieldUnit::PERCENT)) + , mxMtrTrgrBorder(m_xBuilder->weld_metric_spin_button(u"border"_ustr, FieldUnit::PERCENT)) { Link<weld::MetricSpinButton&,void> aLink = LINK(this, AreaTransparencyGradientPopup, ModifiedTrgrHdl_Impl); mxMtrTrgrCenterX->connect_value_changed(aLink); diff --git a/svx/source/sidebar/effect/EffectPropertyPanel.cxx b/svx/source/sidebar/effect/EffectPropertyPanel.cxx index f6be6ddaff49..0b991f18f2ca 100644 --- a/svx/source/sidebar/effect/EffectPropertyPanel.cxx +++ b/svx/source/sidebar/effect/EffectPropertyPanel.cxx @@ -23,20 +23,21 @@ namespace svx::sidebar { EffectPropertyPanel::EffectPropertyPanel(weld::Widget* pParent, SfxBindings* pBindings) - : PanelLayout(pParent, "EffectPropertyPanel", "svx/ui/sidebareffect.ui") + : PanelLayout(pParent, u"EffectPropertyPanel"_ustr, u"svx/ui/sidebareffect.ui"_ustr) , maGlowColorController(SID_ATTR_GLOW_COLOR, *pBindings, *this) , maGlowRadiusController(SID_ATTR_GLOW_RADIUS, *pBindings, *this) , maGlowTransparencyController(SID_ATTR_GLOW_TRANSPARENCY, *pBindings, *this) - , mxFTTransparency(m_xBuilder->weld_label("transparency")) + , mxFTTransparency(m_xBuilder->weld_label(u"transparency"_ustr)) , maSoftEdgeRadiusController(SID_ATTR_SOFTEDGE_RADIUS, *pBindings, *this) , mpBindings(pBindings) - , mxGlowRadius(m_xBuilder->weld_metric_spin_button("LB_GLOW_RADIUS", FieldUnit::POINT)) - , mxLBGlowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_GLOW_COLOR"), + , mxGlowRadius(m_xBuilder->weld_metric_spin_button(u"LB_GLOW_RADIUS"_ustr, FieldUnit::POINT)) + , mxLBGlowColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_GLOW_COLOR"_ustr), [this] { return GetFrameWeld(); })) , mxGlowTransparency( - m_xBuilder->weld_metric_spin_button("LB_GLOW_TRANSPARENCY", FieldUnit::PERCENT)) - , mxFTColor(m_xBuilder->weld_label("glowcolorlabel")) - , mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", FieldUnit::POINT)) + m_xBuilder->weld_metric_spin_button(u"LB_GLOW_TRANSPARENCY"_ustr, FieldUnit::PERCENT)) + , mxFTColor(m_xBuilder->weld_label(u"glowcolorlabel"_ustr)) + , mxSoftEdgeRadius( + m_xBuilder->weld_metric_spin_button(u"SB_SOFTEDGE_RADIUS"_ustr, FieldUnit::POINT)) { Initialize(); } @@ -163,10 +164,10 @@ std::unique_ptr<PanelLayout> EffectPropertyPanel::Create(weld::Widget* pParent, { if (pParent == nullptr) throw css::lang::IllegalArgumentException( - "no parent Window given to EffectPropertyPanel::Create", nullptr, 0); + u"no parent Window given to EffectPropertyPanel::Create"_ustr, nullptr, 0); if (pBindings == nullptr) throw css::lang::IllegalArgumentException( - "no SfxBindings given to EffectPropertyPanel::Create", nullptr, 2); + u"no SfxBindings given to EffectPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<EffectPropertyPanel>(pParent, pBindings); } diff --git a/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx index 972141b7b0fb..2ffc3be06cf9 100644 --- a/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx +++ b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx @@ -32,12 +32,12 @@ namespace sidebar { FontworkPropertyPanel::FontworkPropertyPanel(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) - : PanelLayout(pParent, "FontworkPropertyPanel", "svx/ui/sidebarfontwork.ui") - , m_pToolbar(m_xBuilder->weld_toolbar("fontwork-toolbox")) + : PanelLayout(pParent, u"FontworkPropertyPanel"_ustr, u"svx/ui/sidebarfontwork.ui"_ustr) + , m_pToolbar(m_xBuilder->weld_toolbar(u"fontwork-toolbox"_ustr)) , m_xToolbar(new ToolbarUnoDispatcher(*m_pToolbar, *m_xBuilder, rxFrame)) { if (comphelper::LibreOfficeKit::isActive()) - m_pToolbar->set_item_visible(".uno:ExtrusionToggle", false); + m_pToolbar->set_item_visible(u".uno:ExtrusionToggle"_ustr, false); } std::unique_ptr<PanelLayout> @@ -46,10 +46,10 @@ FontworkPropertyPanel::Create(weld::Widget* pParent, { if (pParent == nullptr) throw lang::IllegalArgumentException( - "no parent Window given to FontworkPropertyPanel::Create", nullptr, 0); + u"no parent Window given to FontworkPropertyPanel::Create"_ustr, nullptr, 0); if (!rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to FontworkPropertyPanel::Create", - nullptr, 1); + throw lang::IllegalArgumentException( + u"no XFrame given to FontworkPropertyPanel::Create"_ustr, nullptr, 1); return std::make_unique<FontworkPropertyPanel>(pParent, rxFrame); } diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 11a3130d466b..d5a6f9840052 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -39,7 +39,7 @@ namespace svx::sidebar { GraphicPropertyPanel::GraphicPropertyPanel( weld::Widget* pParent, SfxBindings* pBindings) -: PanelLayout(pParent, "GraphicPropertyPanel", "svx/ui/sidebargraphic.ui"), +: PanelLayout(pParent, u"GraphicPropertyPanel"_ustr, u"svx/ui/sidebargraphic.ui"_ustr), maBrightControl(SID_ATTR_GRAF_LUMINANCE, *pBindings, *this), maContrastControl(SID_ATTR_GRAF_CONTRAST, *pBindings, *this), maTransparenceControl(SID_ATTR_GRAF_TRANSPARENCE, *pBindings, *this), @@ -49,10 +49,10 @@ GraphicPropertyPanel::GraphicPropertyPanel( maGammaControl(SID_ATTR_GRAF_GAMMA, *pBindings, *this), maModeControl(SID_ATTR_GRAF_MODE, *pBindings, *this), mpBindings(pBindings), - mxMtrBrightness(m_xBuilder->weld_metric_spin_button("setbrightness", FieldUnit::PERCENT)), - mxMtrContrast(m_xBuilder->weld_metric_spin_button("setcontrast", FieldUnit::PERCENT)), - mxLBColorMode(m_xBuilder->weld_combo_box("setcolormode")), - mxMtrTrans(m_xBuilder->weld_metric_spin_button("setgraphtransparency", FieldUnit::PERCENT)) + mxMtrBrightness(m_xBuilder->weld_metric_spin_button(u"setbrightness"_ustr, FieldUnit::PERCENT)), + mxMtrContrast(m_xBuilder->weld_metric_spin_button(u"setcontrast"_ustr, FieldUnit::PERCENT)), + mxLBColorMode(m_xBuilder->weld_combo_box(u"setcolormode"_ustr)), + mxMtrTrans(m_xBuilder->weld_metric_spin_button(u"setgraphtransparency"_ustr, FieldUnit::PERCENT)) { mxLBColorMode->set_size_request(mxLBColorMode->get_preferred_size().Width(), -1); Initialize(); @@ -128,9 +128,9 @@ std::unique_ptr<PanelLayout> GraphicPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to GraphicPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to GraphicPropertyPanel::Create"_ustr, nullptr, 0); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to GraphicPropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to GraphicPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<GraphicPropertyPanel>(pParent, pBindings); } diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx index 813dfc371092..4cb05d63d49f 100644 --- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx +++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx @@ -37,14 +37,14 @@ namespace svx::sidebar std::unique_ptr<PanelLayout> InspectorTextPanel::Create(weld::Widget* pParent) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to InspectorTextPanel::Create", - nullptr, 0); + throw lang::IllegalArgumentException( + u"no parent Window given to InspectorTextPanel::Create"_ustr, nullptr, 0); return std::make_unique<InspectorTextPanel>(pParent); } InspectorTextPanel::InspectorTextPanel(weld::Widget* pParent) - : PanelLayout(pParent, "InspectorTextPanel", "svx/ui/inspectortextpanel.ui") - , mpListBoxStyles(m_xBuilder->weld_tree_view("listbox_fonts")) + : PanelLayout(pParent, u"InspectorTextPanel"_ustr, u"svx/ui/inspectortextpanel.ui"_ustr) + , mpListBoxStyles(m_xBuilder->weld_tree_view(u"listbox_fonts"_ustr)) { mpListBoxStyles->set_size_request(MinimumPanelWidth, -1); float fWidth = mpListBoxStyles->get_approximate_digit_width(); @@ -116,7 +116,7 @@ static void FillBox_Impl(weld::TreeView& rListBoxStyles, const TreeNode& rCurren else { // Necessary, without this the selection line will be truncated. - rListBoxStyles.set_text(*pResult, "", 1); + rListBoxStyles.set_text(*pResult, u""_ustr, 1); } for (const TreeNode& rChildNode : rCurrent.children) diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 53b4e0b325d7..c51040242a94 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -61,11 +61,11 @@ std::unique_ptr<PanelLayout> LinePropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to LinePropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to LinePropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to LinePropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to LinePropertyPanel::Create"_ustr, nullptr, 1); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to LinePropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to LinePropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<LinePropertyPanel>(pParent, rxFrame, pBindings); } diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index c68cbe3d8673..afbc03983cef 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -57,7 +57,7 @@ namespace { SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const ToolbarUnoDispatcher& rToolBoxColor) { - css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineStyle"); + css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(u".uno:XLineStyle"_ustr); SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get()); return pToolBoxLineStyleControl; } @@ -67,18 +67,18 @@ namespace LinePropertyPanelBase::LinePropertyPanelBase( weld::Widget* pParent, const uno::Reference<css::frame::XFrame>& rxFrame) -: PanelLayout(pParent, "LinePropertyPanel", "svx/ui/sidebarline.ui"), - mxTBColor(m_xBuilder->weld_toolbar("color")), +: PanelLayout(pParent, u"LinePropertyPanel"_ustr, u"svx/ui/sidebarline.ui"_ustr), + mxTBColor(m_xBuilder->weld_toolbar(u"color"_ustr)), mxColorDispatch(new ToolbarUnoDispatcher(*mxTBColor, *m_xBuilder, rxFrame)), - mxLineStyleTB(m_xBuilder->weld_toolbar("linestyle")), + mxLineStyleTB(m_xBuilder->weld_toolbar(u"linestyle"_ustr)), mxLineStyleDispatch(new ToolbarUnoDispatcher(*mxLineStyleTB, *m_xBuilder, rxFrame)), mnWidthCoreValue(0), - mxFTWidth(m_xBuilder->weld_label("widthlabel")), - mxTBWidth(m_xBuilder->weld_toolbar("width")), - mxFTTransparency(m_xBuilder->weld_label("translabel")), - mxMFTransparent(m_xBuilder->weld_metric_spin_button("linetransparency", FieldUnit::PERCENT)), - mxArrowHeadStyleFT(m_xBuilder->weld_label("arrowlabel")), - mxArrowHeadStyleTB(m_xBuilder->weld_toolbar("arrowheadstyle")), + mxFTWidth(m_xBuilder->weld_label(u"widthlabel"_ustr)), + mxTBWidth(m_xBuilder->weld_toolbar(u"width"_ustr)), + mxFTTransparency(m_xBuilder->weld_label(u"translabel"_ustr)), + mxMFTransparent(m_xBuilder->weld_metric_spin_button(u"linetransparency"_ustr, FieldUnit::PERCENT)), + mxArrowHeadStyleFT(m_xBuilder->weld_label(u"arrowlabel"_ustr)), + mxArrowHeadStyleTB(m_xBuilder->weld_toolbar(u"arrowheadstyle"_ustr)), mxArrowHeadStyleDispatch(new ToolbarUnoDispatcher(*mxArrowHeadStyleTB, *m_xBuilder, rxFrame)), mxLineWidthPopup(new LineWidthPopup(mxTBWidth.get(), *this)), mxLineStyleNoneChange(new LineStyleNoneChange(*this)), @@ -256,10 +256,10 @@ void LinePropertyPanelBase::SetWidth(tools::Long nWidth) void LinePropertyPanelBase::ActivateControls() { - mxArrowHeadStyleTB->set_item_sensitive(".uno:LineEndStyle", !mbNoneLineStyle); + mxArrowHeadStyleTB->set_item_sensitive(u".uno:LineEndStyle"_ustr, !mbNoneLineStyle); mxArrowHeadStyleFT->set_visible(mbArrowSupported); - mxArrowHeadStyleTB->set_item_visible(".uno:LineEndStyle", mbArrowSupported); + mxArrowHeadStyleTB->set_item_visible(u".uno:LineEndStyle"_ustr, mbArrowSupported); } void LinePropertyPanelBase::setMapUnit(MapUnit eMapUnit) diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 347bb2a3bb8d..bce334b6dc93 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -32,7 +32,8 @@ namespace svx::sidebar { LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent) - : WeldToolbarPopup(nullptr, pParent, "svx/ui/floatinglineproperty.ui", "FloatingLineProperty") + : WeldToolbarPopup(nullptr, pParent, u"svx/ui/floatinglineproperty.ui"_ustr, + u"FloatingLineProperty"_ustr) , m_rParent(rParent) , m_sPt(SvxResId(RID_SVXSTR_PT)) , m_eMapUnit(MapUnit::MapTwip) @@ -41,9 +42,9 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa , m_nCustomWidth(0) , m_aIMGCus(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM) , m_aIMGCusGray(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY) - , m_xMFWidth(m_xBuilder->weld_metric_spin_button("spin", FieldUnit::POINT)) + , m_xMFWidth(m_xBuilder->weld_metric_spin_button(u"spin"_ustr, FieldUnit::POINT)) , m_xVSWidth(new LineWidthValueSet()) - , m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, "lineset", *m_xVSWidth)) + , m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, u"lineset"_ustr, *m_xVSWidth)) { m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -153,7 +154,7 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit m_bVSFocus = true; m_xVSWidth->SetSelItem(0); m_eMapUnit = eMapUnit; - SvtViewOptions aWinOpt(EViewType::Window, "PopupPanel_LineWidth"); + SvtViewOptions aWinOpt(EViewType::Window, u"PopupPanel_LineWidth"_ustr); if (aWinOpt.Exists()) { css::uno::Sequence<css::beans::NamedValue> aSeq = aWinOpt.GetUserData(); @@ -186,7 +187,7 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit } else { - m_xMFWidth->set_text(""); + m_xMFWidth->set_text(u""_ustr); } OUString strCurrValue = m_xMFWidth->get_text(); diff --git a/svx/source/sidebar/lists/ListsPropertyPanel.cxx b/svx/source/sidebar/lists/ListsPropertyPanel.cxx index 58badf67964d..51342043847d 100644 --- a/svx/source/sidebar/lists/ListsPropertyPanel.cxx +++ b/svx/source/sidebar/lists/ListsPropertyPanel.cxx @@ -29,10 +29,10 @@ ListsPropertyPanel::Create(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ListsPropertyPanel::Create", - nullptr, 0); + throw lang::IllegalArgumentException( + u"no parent Window given to ListsPropertyPanel::Create"_ustr, nullptr, 0); if (!rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ListsPropertyPanel::Create", + throw lang::IllegalArgumentException(u"no XFrame given to ListsPropertyPanel::Create"_ustr, nullptr, 1); return std::make_unique<ListsPropertyPanel>(pParent, rxFrame); @@ -40,10 +40,10 @@ ListsPropertyPanel::Create(weld::Widget* pParent, ListsPropertyPanel::ListsPropertyPanel(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) - : PanelLayout(pParent, "ListsPropertyPanel", "svx/ui/sidebarlists.ui") - , mxTBxNumBullet(m_xBuilder->weld_toolbar("numberbullet")) + : PanelLayout(pParent, u"ListsPropertyPanel"_ustr, u"svx/ui/sidebarlists.ui"_ustr) + , mxTBxNumBullet(m_xBuilder->weld_toolbar(u"numberbullet"_ustr)) , mxNumBulletDispatcher(new ToolbarUnoDispatcher(*mxTBxNumBullet, *m_xBuilder, rxFrame)) - , mxTBxOutline(m_xBuilder->weld_toolbar("outline")) + , mxTBxOutline(m_xBuilder->weld_toolbar(u"outline"_ustr)) , mxOutlineDispatcher(new ToolbarUnoDispatcher(*mxTBxOutline, *m_xBuilder, rxFrame)) { } diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx b/svx/source/sidebar/media/MediaPlaybackPanel.cxx index 53c9190b832e..d66805326ac2 100644 --- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx +++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx @@ -32,17 +32,17 @@ namespace svx::sidebar { MediaPlaybackPanel::MediaPlaybackPanel ( weld::Widget* pParent, SfxBindings* pBindings) - : PanelLayout(pParent, "MediaPlaybackPanel", "svx/ui/mediaplayback.ui"), + : PanelLayout(pParent, u"MediaPlaybackPanel"_ustr, u"svx/ui/mediaplayback.ui"_ustr), maMediaController(SID_AVMEDIA_TOOLBOX, *pBindings, *this), maIdle("MediaPlaybackPanel"), mpBindings(pBindings) { - mxTimeEdit = m_xBuilder->weld_entry("timeedit"); - mxPlayToolBox = m_xBuilder->weld_toolbar("playtoolbox"); - mxMuteToolBox = m_xBuilder->weld_toolbar("mutetoolbox"); - mxTimeSlider = m_xBuilder->weld_scale("timeslider"); - mxVolumeSlider = m_xBuilder->weld_scale("volumeslider"); - mxZoomListBox = m_xBuilder->weld_combo_box("zoombox"); + mxTimeEdit = m_xBuilder->weld_entry(u"timeedit"_ustr); + mxPlayToolBox = m_xBuilder->weld_toolbar(u"playtoolbox"_ustr); + mxMuteToolBox = m_xBuilder->weld_toolbar(u"mutetoolbox"_ustr); + mxTimeSlider = m_xBuilder->weld_scale(u"timeslider"_ustr); + mxVolumeSlider = m_xBuilder->weld_scale(u"volumeslider"_ustr); + mxZoomListBox = m_xBuilder->weld_combo_box(u"zoombox"_ustr); Initialize(); } @@ -52,9 +52,9 @@ std::unique_ptr<PanelLayout> MediaPlaybackPanel::Create( SfxBindings* pBindings) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to MediaPlaybackPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to MediaPlaybackPanel::Create"_ustr, nullptr, 0); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to MediaPlaybackPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to MediaPlaybackPanel::Create"_ustr, nullptr, 2); return std::make_unique<MediaPlaybackPanel>(pParent, pBindings); } @@ -157,11 +157,11 @@ IMPL_LINK( MediaPlaybackPanel, PlayToolBoxSelectHdl, const OUString&, rId, void) } else if (rId == "mute") { - aItem.setMute( mxMuteToolBox->get_item_active("mute") ); + aItem.setMute( mxMuteToolBox->get_item_active(u"mute"_ustr) ); } else if (rId == "loop") { - aItem.setLoop( mxPlayToolBox->get_item_active("loop") ); + aItem.setLoop( mxPlayToolBox->get_item_active(u"loop"_ustr) ); } if(aItem.getMaskSet() != AVMediaSetMask::NONE) diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 26e26c8a3152..ed88addb88b2 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -65,7 +65,7 @@ vcl::Font& lcl_GetDefaultBulletFont() { static vcl::Font aDefBulletFont = []() { - static vcl::Font tmp("OpenSymbol", "", Size(0, 14)); + static vcl::Font tmp(u"OpenSymbol"_ustr, u""_ustr, Size(0, 14)); tmp.SetCharSet( RTL_TEXTENCODING_SYMBOL ); tmp.SetFamily( FAMILY_DONTKNOW ); tmp.SetPitch( PITCH_DONTKNOW ); diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 0cf38cb93837..035cd256567b 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -56,17 +56,17 @@ using namespace svx; ParaLineSpacingControl::ParaLineSpacingControl(SvxLineSpacingToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/paralinespacingcontrol.ui", "ParaLineSpacingControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/paralinespacingcontrol.ui"_ustr, u"ParaLineSpacingControl"_ustr) , mxControl(pControl) , meLNSpaceUnit(MapUnit::Map100thMM) - , mxSpacing1Button(m_xBuilder->weld_button("spacing_1")) - , mxSpacing115Button(m_xBuilder->weld_button("spacing_115")) - , mxSpacing15Button(m_xBuilder->weld_button("spacing_15")) - , mxSpacing2Button(m_xBuilder->weld_button("spacing_2")) - , mxLineDist(m_xBuilder->weld_combo_box("line_dist")) - , mxLineDistLabel(m_xBuilder->weld_label("value_label")) - , mxLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("percent_box", FieldUnit::PERCENT)) - , mxLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button("metric_box", FieldUnit::CM)) + , mxSpacing1Button(m_xBuilder->weld_button(u"spacing_1"_ustr)) + , mxSpacing115Button(m_xBuilder->weld_button(u"spacing_115"_ustr)) + , mxSpacing15Button(m_xBuilder->weld_button(u"spacing_15"_ustr)) + , mxSpacing2Button(m_xBuilder->weld_button(u"spacing_2"_ustr)) + , mxLineDist(m_xBuilder->weld_combo_box(u"line_dist"_ustr)) + , mxLineDistLabel(m_xBuilder->weld_label(u"value_label"_ustr)) + , mxLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button(u"percent_box"_ustr, FieldUnit::PERCENT)) + , mxLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button(u"metric_box"_ustr, FieldUnit::CM)) , mpActLineDistFld(mxLineDistAtPercentBox.get()) { Link<weld::Button&,void> aLink = LINK(this, ParaLineSpacingControl, PredefinedValuesHandler); @@ -215,14 +215,14 @@ void ParaLineSpacingControl::Initialize() mxLineDist->set_sensitive(false); mxLineDistLabel->set_sensitive(false); mpActLineDistFld->set_sensitive(false); - mpActLineDistFld->set_text(""); + mpActLineDistFld->set_text(u""_ustr); } else // !bItemStateSet || eState == SfxItemState::INVALID || eState == SfxItemState::UNKNOWN { mxLineDistLabel->set_sensitive(false); mpActLineDistFld->set_sensitive(false); - mpActLineDistFld->set_text(""); + mpActLineDistFld->set_text(u""_ustr); mxLineDist->set_active(-1); } @@ -245,7 +245,7 @@ void ParaLineSpacingControl::UpdateMetricFields() mxLineDistLabel->set_sensitive(false); mpActLineDistFld->show(); mpActLineDistFld->set_sensitive(false); - mpActLineDistFld->set_text(""); + mpActLineDistFld->set_text(u""_ustr); break; case LLINESPACE_DURCH: diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx index c6476185a6ee..341af91d28e5 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx @@ -81,12 +81,12 @@ VclPtr<vcl::Window> SvxLineSpacingToolBoxControl::createVclPopupWindow(vcl::Wind OUString SvxLineSpacingToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.LineSpacingToolBoxControl"; + return u"com.sun.star.comp.svx.LineSpacingToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxLineSpacingToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 8e88bdc2c656..c6f6b90d5bec 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -52,11 +52,11 @@ std::unique_ptr<PanelLayout> ParaPropertyPanel::Create ( const css::uno::Reference<css::ui::XSidebar>& rxSidebar) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ParaPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ParaPropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ParaPropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to ParaPropertyPanel::Create"_ustr, nullptr, 1); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to ParaPropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to ParaPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<ParaPropertyPanel>(pParent, rxFrame, pBindings, rxSidebar); } @@ -314,9 +314,9 @@ void ParaPropertyPanel::StateChangedIndentImpl( SfxItemState eState, const SfxPo } else if (eState != SfxItemState::DISABLED ) { - mxLeftIndent->set_text(""); - mxRightIndent->set_text(""); - mxFLineIndent->set_text(""); + mxLeftIndent->set_text(u""_ustr); + mxRightIndent->set_text(u""_ustr); + mxFLineIndent->set_text(u""_ustr); } limitMetricWidths(); @@ -351,8 +351,8 @@ void ParaPropertyPanel::StateChangedULImpl( SfxItemState eState, const SfxPoolIt } else if (eState != SfxItemState::DISABLED ) { - mxTopDist->set_text(""); - mxBottomDist->set_text(""); + mxTopDist->set_text(u""_ustr); + mxBottomDist->set_text(u""_ustr); } limitMetricWidths(); } @@ -390,31 +390,31 @@ ParaPropertyPanel::ParaPropertyPanel(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, css::uno::Reference<css::ui::XSidebar> xSidebar) - : PanelLayout(pParent, "ParaPropertyPanel", "svx/ui/sidebarparagraph.ui"), + : PanelLayout(pParent, u"ParaPropertyPanel"_ustr, u"svx/ui/sidebarparagraph.ui"_ustr), //Alignment - mxTBxHorzAlign(m_xBuilder->weld_toolbar("horizontalalignment")), + mxTBxHorzAlign(m_xBuilder->weld_toolbar(u"horizontalalignment"_ustr)), mxHorzAlignDispatch(new ToolbarUnoDispatcher(*mxTBxHorzAlign, *m_xBuilder, rxFrame)), - mxTBxVertAlign(m_xBuilder->weld_toolbar("verticalalignment")), + mxTBxVertAlign(m_xBuilder->weld_toolbar(u"verticalalignment"_ustr)), mxVertAlignDispatch(new ToolbarUnoDispatcher(*mxTBxVertAlign, *m_xBuilder, rxFrame)), //NumBullet&Backcolor - mxTBxNumBullet(m_xBuilder->weld_toolbar("numberbullet")), + mxTBxNumBullet(m_xBuilder->weld_toolbar(u"numberbullet"_ustr)), mxNumBulletDispatch(new ToolbarUnoDispatcher(*mxTBxNumBullet, *m_xBuilder, rxFrame)), - mxTBxBackColor(m_xBuilder->weld_toolbar("backgroundcolor")), + mxTBxBackColor(m_xBuilder->weld_toolbar(u"backgroundcolor"_ustr)), mxBackColorDispatch(new ToolbarUnoDispatcher(*mxTBxBackColor, *m_xBuilder, rxFrame)), - mxTBxWriteDirection(m_xBuilder->weld_toolbar("writedirection")), + mxTBxWriteDirection(m_xBuilder->weld_toolbar(u"writedirection"_ustr)), mxWriteDirectionDispatch(new ToolbarUnoDispatcher(*mxTBxWriteDirection, *m_xBuilder, rxFrame)), - mxTBxParaSpacing(m_xBuilder->weld_toolbar("paraspacing")), + mxTBxParaSpacing(m_xBuilder->weld_toolbar(u"paraspacing"_ustr)), mxParaSpacingDispatch(new ToolbarUnoDispatcher(*mxTBxParaSpacing, *m_xBuilder, rxFrame)), - mxTBxLineSpacing(m_xBuilder->weld_toolbar("linespacing")), + mxTBxLineSpacing(m_xBuilder->weld_toolbar(u"linespacing"_ustr)), mxLineSpacingDispatch(new ToolbarUnoDispatcher(*mxTBxLineSpacing, *m_xBuilder, rxFrame)), - mxTBxIndent(m_xBuilder->weld_toolbar("indent")), + mxTBxIndent(m_xBuilder->weld_toolbar(u"indent"_ustr)), mxIndentDispatch(new ToolbarUnoDispatcher(*mxTBxIndent, *m_xBuilder, rxFrame)), //Paragraph spacing - mxTopDist(m_xBuilder->weld_metric_spin_button("aboveparaspacing", FieldUnit::CM)), - mxBottomDist(m_xBuilder->weld_metric_spin_button("belowparaspacing", FieldUnit::CM)), - mxLeftIndent(m_xBuilder->weld_metric_spin_button("beforetextindent", FieldUnit::CM)), - mxRightIndent(m_xBuilder->weld_metric_spin_button("aftertextindent", FieldUnit::CM)), - mxFLineIndent(m_xBuilder->weld_metric_spin_button("firstlineindent", FieldUnit::CM)), + mxTopDist(m_xBuilder->weld_metric_spin_button(u"aboveparaspacing"_ustr, FieldUnit::CM)), + mxBottomDist(m_xBuilder->weld_metric_spin_button(u"belowparaspacing"_ustr, FieldUnit::CM)), + mxLeftIndent(m_xBuilder->weld_metric_spin_button(u"beforetextindent"_ustr, FieldUnit::CM)), + mxRightIndent(m_xBuilder->weld_metric_spin_button(u"aftertextindent"_ustr, FieldUnit::CM)), + mxFLineIndent(m_xBuilder->weld_metric_spin_button(u"firstlineindent"_ustr, FieldUnit::CM)), maTxtLeft (0), maUpper (0), maLower (0), diff --git a/svx/source/sidebar/paragraph/ParaSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx index 5b4c40969847..528a73cb239c 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx @@ -45,7 +45,7 @@ SFX_IMPL_TOOLBOX_CONTROL(ParaFirstLineSpacingControl, SvxLRSpaceItem); ParaULSpacingControl::ParaULSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx) : SfxToolBoxControl(nSlotId, nId, rTbx) { - addStatusListener(".uno:MetricUnit"); + addStatusListener(u".uno:MetricUnit"_ustr); } ParaULSpacingControl::~ParaULSpacingControl() @@ -115,7 +115,7 @@ VclPtr<InterimItemWindow> ParaBelowSpacingControl::CreateItemWindow(vcl::Window* ParaLRSpacingControl::ParaLRSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx) : SfxToolBoxControl(nSlotId, nId, rTbx) { - addStatusListener(".uno:MetricUnit"); + addStatusListener(u".uno:MetricUnit"_ustr); } ParaLRSpacingControl::~ParaLRSpacingControl() diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index ac8749b3b332..8952f91a0f5f 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -37,13 +37,13 @@ using namespace svx; // ParaULSpacingWindow ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent) - : InterimItemWindow(pParent, "svx/ui/paraulspacing.ui", "ParaULSpacingWindow") + : InterimItemWindow(pParent, u"svx/ui/paraulspacing.ui"_ustr, u"ParaULSpacingWindow"_ustr) , m_eUnit(MapUnit::MapTwip) { - m_xAboveSpacing.emplace(m_xBuilder->weld_metric_spin_button("aboveparaspacing", FieldUnit::CM)); - m_xBelowSpacing.emplace(m_xBuilder->weld_metric_spin_button("belowparaspacing", FieldUnit::CM)); - m_xAboveContainer = m_xBuilder->weld_container("above"); - m_xBelowContainer = m_xBuilder->weld_container("below"); + m_xAboveSpacing.emplace(m_xBuilder->weld_metric_spin_button(u"aboveparaspacing"_ustr, FieldUnit::CM)); + m_xBelowSpacing.emplace(m_xBuilder->weld_metric_spin_button(u"belowparaspacing"_ustr, FieldUnit::CM)); + m_xAboveContainer = m_xBuilder->weld_container(u"above"_ustr); + m_xBelowContainer = m_xBuilder->weld_container(u"below"_ustr); Link<weld::MetricSpinButton&,void> aLink = LINK(this, ParaULSpacingWindow, ModifySpacingHdl); m_xAboveSpacing->connect_value_changed(aLink); @@ -133,15 +133,15 @@ ParaBelowSpacingWindow::ParaBelowSpacingWindow(vcl::Window* pParent) // ParaLRSpacingWindow ParaLRSpacingWindow::ParaLRSpacingWindow(vcl::Window* pParent) - : InterimItemWindow(pParent, "svx/ui/paralrspacing.ui", "ParaLRSpacingWindow") + : InterimItemWindow(pParent, u"svx/ui/paralrspacing.ui"_ustr, u"ParaLRSpacingWindow"_ustr) , m_eUnit(MapUnit::MapTwip) { - m_xBeforeSpacing.emplace(m_xBuilder->weld_metric_spin_button("beforetextindent", FieldUnit::CM)); - m_xAfterSpacing.emplace(m_xBuilder->weld_metric_spin_button("aftertextindent", FieldUnit::CM)); - m_xFLSpacing.emplace(m_xBuilder->weld_metric_spin_button("firstlineindent", FieldUnit::CM)); - m_xBeforeContainer = m_xBuilder->weld_container("before"); - m_xAfterContainer = m_xBuilder->weld_container("after"); - m_xFirstLineContainer = m_xBuilder->weld_container("firstline"); + m_xBeforeSpacing.emplace(m_xBuilder->weld_metric_spin_button(u"beforetextindent"_ustr, FieldUnit::CM)); + m_xAfterSpacing.emplace(m_xBuilder->weld_metric_spin_button(u"aftertextindent"_ustr, FieldUnit::CM)); + m_xFLSpacing.emplace(m_xBuilder->weld_metric_spin_button(u"firstlineindent"_ustr, FieldUnit::CM)); + m_xBeforeContainer = m_xBuilder->weld_container(u"before"_ustr); + m_xAfterContainer = m_xBuilder->weld_container(u"after"_ustr); + m_xFirstLineContainer = m_xBuilder->weld_container(u"firstline"_ustr); Link<weld::MetricSpinButton&,void> aLink = LINK(this, ParaLRSpacingWindow, ModifySpacingHdl); m_xBeforeSpacing->connect_value_changed(aLink); @@ -267,9 +267,9 @@ void ParaLRSpacingWindow::SetValue(SfxItemState eState, const SfxPoolItem* pStat } else { - m_xBeforeSpacing->set_text(""); - m_xAfterSpacing->set_text(""); - m_xFLSpacing->set_text(""); + m_xBeforeSpacing->set_text(u""_ustr); + m_xAfterSpacing->set_text(u""_ustr); + m_xFLSpacing->set_text(u""_ustr); } } diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 5d0fa038d478..def1f363b9f7 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -62,37 +62,37 @@ PosSizePropertyPanel::PosSizePropertyPanel( const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, css::uno::Reference<css::ui::XSidebar> xSidebar) -: PanelLayout(pParent, "PosSizePropertyPanel", "svx/ui/sidebarpossize.ui"), +: PanelLayout(pParent, u"PosSizePropertyPanel"_ustr, u"svx/ui/sidebarpossize.ui"_ustr), m_aRatioTop(ConnectorType::Top), m_aRatioBottom(ConnectorType::Bottom), - mxFtPosX(m_xBuilder->weld_label("horizontallabel")), - mxMtrPosX(m_xBuilder->weld_metric_spin_button("horizontalpos", FieldUnit::CM)), - mxFtPosY(m_xBuilder->weld_label("verticallabel")), - mxMtrPosY(m_xBuilder->weld_metric_spin_button("verticalpos", FieldUnit::CM)), - mxFtWidth(m_xBuilder->weld_label("widthlabel")), - mxMtrWidth(m_xBuilder->weld_metric_spin_button("selectwidth", FieldUnit::CM)), - mxFtHeight(m_xBuilder->weld_label("heightlabel")), - mxMtrHeight(m_xBuilder->weld_metric_spin_button("selectheight", FieldUnit::CM)) - , mxCbxScale(m_xBuilder->weld_check_button("ratio")) - , m_xCbxScaleImg(m_xBuilder->weld_image("imRatio")) - , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, "daRatioTop", m_aRatioTop)) - , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, "daRatioBottom", m_aRatioBottom)) - , mxFtAngle(m_xBuilder->weld_label("rotationlabel")) - , mxMtrAngle(m_xBuilder->weld_metric_spin_button("rotation", FieldUnit::DEGREE)), + mxFtPosX(m_xBuilder->weld_label(u"horizontallabel"_ustr)), + mxMtrPosX(m_xBuilder->weld_metric_spin_button(u"horizontalpos"_ustr, FieldUnit::CM)), + mxFtPosY(m_xBuilder->weld_label(u"verticallabel"_ustr)), + mxMtrPosY(m_xBuilder->weld_metric_spin_button(u"verticalpos"_ustr, FieldUnit::CM)), + mxFtWidth(m_xBuilder->weld_label(u"widthlabel"_ustr)), + mxMtrWidth(m_xBuilder->weld_metric_spin_button(u"selectwidth"_ustr, FieldUnit::CM)), + mxFtHeight(m_xBuilder->weld_label(u"heightlabel"_ustr)), + mxMtrHeight(m_xBuilder->weld_metric_spin_button(u"selectheight"_ustr, FieldUnit::CM)) + , mxCbxScale(m_xBuilder->weld_check_button(u"ratio"_ustr)) + , m_xCbxScaleImg(m_xBuilder->weld_image(u"imRatio"_ustr)) + , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, u"daRatioTop"_ustr, m_aRatioTop)) + , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, u"daRatioBottom"_ustr, m_aRatioBottom)) + , mxFtAngle(m_xBuilder->weld_label(u"rotationlabel"_ustr)) + , mxMtrAngle(m_xBuilder->weld_metric_spin_button(u"rotation"_ustr, FieldUnit::DEGREE)), mxCtrlDial(new DialControl), - mxDial(new weld::CustomWeld(*m_xBuilder, "orientationcontrol", *mxCtrlDial)), - mxFtFlip(m_xBuilder->weld_label("fliplabel")), - mxFlipTbx(m_xBuilder->weld_toolbar("selectrotationtype")), + mxDial(new weld::CustomWeld(*m_xBuilder, u"orientationcontrol"_ustr, *mxCtrlDial)), + mxFtFlip(m_xBuilder->weld_label(u"fliplabel"_ustr)), + mxFlipTbx(m_xBuilder->weld_toolbar(u"selectrotationtype"_ustr)), mxFlipDispatch(new ToolbarUnoDispatcher(*mxFlipTbx, *m_xBuilder, rxFrame)), - mxArrangeTbx(m_xBuilder->weld_toolbar("arrangetoolbar")), + mxArrangeTbx(m_xBuilder->weld_toolbar(u"arrangetoolbar"_ustr)), mxArrangeDispatch(new ToolbarUnoDispatcher(*mxArrangeTbx, *m_xBuilder, rxFrame)), - mxArrangeTbx2(m_xBuilder->weld_toolbar("arrangetoolbar2")), + mxArrangeTbx2(m_xBuilder->weld_toolbar(u"arrangetoolbar2"_ustr)), mxArrangeDispatch2(new ToolbarUnoDispatcher(*mxArrangeTbx2, *m_xBuilder, rxFrame)), - mxAlignTbx(m_xBuilder->weld_toolbar("aligntoolbar")), + mxAlignTbx(m_xBuilder->weld_toolbar(u"aligntoolbar"_ustr)), mxAlignDispatch(new ToolbarUnoDispatcher(*mxAlignTbx, *m_xBuilder, rxFrame)), - mxAlignTbx2(m_xBuilder->weld_toolbar("aligntoolbar2")), + mxAlignTbx2(m_xBuilder->weld_toolbar(u"aligntoolbar2"_ustr)), mxAlignDispatch2(new ToolbarUnoDispatcher(*mxAlignTbx2, *m_xBuilder, rxFrame)), - mxBtnEditOLEObject(m_xBuilder->weld_button("btnEditObject")), + mxBtnEditOLEObject(m_xBuilder->weld_button(u"btnEditObject"_ustr)), mpView(nullptr), mlOldWidth(1), mlOldHeight(1), @@ -271,11 +271,11 @@ std::unique_ptr<PanelLayout> PosSizePropertyPanel::Create ( const css::uno::Reference<css::ui::XSidebar>& rxSidebar) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to PosSizePropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to PosSizePropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to PosSizePropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to PosSizePropertyPanel::Create"_ustr, nullptr, 1); if (pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to PosSizePropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to PosSizePropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<PosSizePropertyPanel>(pParent, rxFrame, pBindings, rxSidebar); } @@ -456,7 +456,7 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ClickAutoHdl, weld::Toggleable&, void ) } // mxCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog - SvtViewOptions aPageOpt(EViewType::TabPage, "cui/ui/possizetabpage/PositionAndSize"); + SvtViewOptions aPageOpt(EViewType::TabPage, u"cui/ui/possizetabpage/PositionAndSize"_ustr); aPageOpt.SetUserItem( USERITEM_NAME, css::uno::Any( OUString::number( int(mxCbxScale->get_active()) ) ) ); } @@ -543,7 +543,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } } - mxMtrWidth->set_text( "" ); + mxMtrWidth->set_text( u""_ustr ); break; case SID_ATTR_TRANSFORM_HEIGHT: @@ -563,7 +563,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } } - mxMtrHeight->set_text( ""); + mxMtrHeight->set_text( u""_ustr); break; case SID_ATTR_TRANSFORM_POS_X: @@ -582,7 +582,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } } - mxMtrPosX->set_text( "" ); + mxMtrPosX->set_text( u""_ustr ); break; case SID_ATTR_TRANSFORM_POS_Y: @@ -601,7 +601,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } } - mxMtrPosY->set_text( "" ); + mxMtrPosY->set_text( u""_ustr ); break; case SID_ATTR_TRANSFORM_ROT_X: @@ -702,7 +702,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } } - mxMtrAngle->set_text( "" ); + mxMtrAngle->set_text( u""_ustr ); mxCtrlDial->SetRotation( 0_deg100 ); break; @@ -787,7 +787,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( DisableControls(); // mxCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog - SvtViewOptions aPageOpt(EViewType::TabPage, "cui/ui/possizetabpage/PositionAndSize"); + SvtViewOptions aPageOpt(EViewType::TabPage, u"cui/ui/possizetabpage/PositionAndSize"_ustr); OUString sUserData; css::uno::Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME ); OUString aTemp; diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index 36b0d780d9a5..d106133a9dd8 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -32,7 +32,7 @@ namespace svx::sidebar { ShadowPropertyPanel::ShadowPropertyPanel( weld::Widget* pParent, SfxBindings* pBindings) -: PanelLayout(pParent, "ShadowPropertyPanel", "svx/ui/sidebarshadow.ui"), +: PanelLayout(pParent, u"ShadowPropertyPanel"_ustr, u"svx/ui/sidebarshadow.ui"_ustr), maShadowController(SID_ATTR_FILL_SHADOW, *pBindings, *this), maShadowTransController(SID_ATTR_SHADOW_TRANSPARENCE, *pBindings, *this), maShadowBlurController(SID_ATTR_SHADOW_BLUR, *pBindings, *this), @@ -43,18 +43,18 @@ ShadowPropertyPanel::ShadowPropertyPanel( nX(0), nY(0), nXY(0), - mxShowShadow(m_xBuilder->weld_check_button("SHOW_SHADOW")), - mxShadowDistance(m_xBuilder->weld_metric_spin_button("LB_DISTANCE", FieldUnit::POINT)), - mxLBShadowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_SHADOW_COLOR"), [this]{ return GetFrameWeld(); })), - mxShadowAngle(m_xBuilder->weld_combo_box("LB_ANGLE")), - mxFTAngle(m_xBuilder->weld_label("angle")), - mxFTDistance(m_xBuilder->weld_label("distance")), - mxFTTransparency(m_xBuilder->weld_label("transparency_label")), - mxFTBlur(m_xBuilder->weld_label("blur_label")), - mxFTColor(m_xBuilder->weld_label("shadowcolorlabel")), - mxShadowTransSlider(m_xBuilder->weld_scale("transparency_slider")), - mxShadowTransMetric(m_xBuilder->weld_metric_spin_button("FIELD_TRANSPARENCY", FieldUnit::PERCENT)), - mxShadowBlurMetric(m_xBuilder->weld_metric_spin_button("LB_SHADOW_BLUR", FieldUnit::POINT)) + mxShowShadow(m_xBuilder->weld_check_button(u"SHOW_SHADOW"_ustr)), + mxShadowDistance(m_xBuilder->weld_metric_spin_button(u"LB_DISTANCE"_ustr, FieldUnit::POINT)), + mxLBShadowColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_SHADOW_COLOR"_ustr), [this]{ return GetFrameWeld(); })), + mxShadowAngle(m_xBuilder->weld_combo_box(u"LB_ANGLE"_ustr)), + mxFTAngle(m_xBuilder->weld_label(u"angle"_ustr)), + mxFTDistance(m_xBuilder->weld_label(u"distance"_ustr)), + mxFTTransparency(m_xBuilder->weld_label(u"transparency_label"_ustr)), + mxFTBlur(m_xBuilder->weld_label(u"blur_label"_ustr)), + mxFTColor(m_xBuilder->weld_label(u"shadowcolorlabel"_ustr)), + mxShadowTransSlider(m_xBuilder->weld_scale(u"transparency_slider"_ustr)), + mxShadowTransMetric(m_xBuilder->weld_metric_spin_button(u"FIELD_TRANSPARENCY"_ustr, FieldUnit::PERCENT)), + mxShadowBlurMetric(m_xBuilder->weld_metric_spin_button(u"LB_SHADOW_BLUR"_ustr, FieldUnit::POINT)) { Initialize(); } @@ -352,9 +352,9 @@ std::unique_ptr<PanelLayout> ShadowPropertyPanel::Create ( SfxBindings* pBindings) { if(pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ShadowPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ShadowPropertyPanel::Create"_ustr, nullptr, 0); if(pBindings == nullptr) - throw lang::IllegalArgumentException("no SfxBindings given to ShadowPropertyPanel::Create", nullptr, 2); + throw lang::IllegalArgumentException(u"no SfxBindings given to ShadowPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<ShadowPropertyPanel>(pParent, pBindings); } diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 1b62cdedbaf7..46cf453ef2ea 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -30,27 +30,27 @@ namespace svx::sidebar { DefaultShapesPanel::DefaultShapesPanel ( weld::Widget* pParent, css::uno::Reference<css::frame::XFrame> xFrame) - : PanelLayout(pParent, "DefaultShapesPanel", "svx/ui/defaultshapespanel.ui") + : PanelLayout(pParent, u"DefaultShapesPanel"_ustr, u"svx/ui/defaultshapespanel.ui"_ustr) , mxLineArrowSet(new ValueSet(nullptr)) - , mxLineArrowSetWin(new weld::CustomWeld(*m_xBuilder, "LinesArrows", *mxLineArrowSet)) + , mxLineArrowSetWin(new weld::CustomWeld(*m_xBuilder, u"LinesArrows"_ustr, *mxLineArrowSet)) , mxCurveSet(new ValueSet(nullptr)) - , mxCurveSetWin(new weld::CustomWeld(*m_xBuilder, "Curves", *mxCurveSet)) + , mxCurveSetWin(new weld::CustomWeld(*m_xBuilder, u"Curves"_ustr, *mxCurveSet)) , mxConnectorSet(new ValueSet(nullptr)) - , mxConnectorSetWin(new weld::CustomWeld(*m_xBuilder, "Connectors", *mxConnectorSet)) + , mxConnectorSetWin(new weld::CustomWeld(*m_xBuilder, u"Connectors"_ustr, *mxConnectorSet)) , mxBasicShapeSet(new ValueSet(nullptr)) - , mxBasicShapeSetWin(new weld::CustomWeld(*m_xBuilder, "BasicShapes", *mxBasicShapeSet)) + , mxBasicShapeSetWin(new weld::CustomWeld(*m_xBuilder, u"BasicShapes"_ustr, *mxBasicShapeSet)) , mxSymbolShapeSet(new ValueSet(nullptr)) - , mxSymbolShapeSetWin(new weld::CustomWeld(*m_xBuilder, "SymbolShapes", *mxSymbolShapeSet)) + , mxSymbolShapeSetWin(new weld::CustomWeld(*m_xBuilder, u"SymbolShapes"_ustr, *mxSymbolShapeSet)) , mxBlockArrowSet(new ValueSet(nullptr)) - , mxBlockArrowSetWin(new weld::CustomWeld(*m_xBuilder, "BlockArrows", *mxBlockArrowSet)) + , mxBlockArrowSetWin(new weld::CustomWeld(*m_xBuilder, u"BlockArrows"_ustr, *mxBlockArrowSet)) , mxFlowchartSet(new ValueSet(nullptr)) - , mxFlowchartSetWin(new weld::CustomWeld(*m_xBuilder, "Flowcharts", *mxFlowchartSet)) + , mxFlowchartSetWin(new weld::CustomWeld(*m_xBuilder, u"Flowcharts"_ustr, *mxFlowchartSet)) , mxCalloutSet(new ValueSet(nullptr)) - , mxCalloutSetWin(new weld::CustomWeld(*m_xBuilder, "Callouts", *mxCalloutSet)) + , mxCalloutSetWin(new weld::CustomWeld(*m_xBuilder, u"Callouts"_ustr, *mxCalloutSet)) , mxStarSet(new ValueSet(nullptr)) - , mxStarSetWin(new weld::CustomWeld(*m_xBuilder, "Stars", *mxStarSet)) + , mxStarSetWin(new weld::CustomWeld(*m_xBuilder, u"Stars"_ustr, *mxStarSet)) , mx3DObjectSet(new ValueSet(nullptr)) - , mx3DObjectSetWin(new weld::CustomWeld(*m_xBuilder, "3DObjects", *mx3DObjectSet)) + , mx3DObjectSetWin(new weld::CustomWeld(*m_xBuilder, u"3DObjects"_ustr, *mx3DObjectSet)) , mxFrame(std::move(xFrame)) { Initialize(); @@ -63,9 +63,9 @@ std::unique_ptr<PanelLayout> DefaultShapesPanel::Create( const Reference< XFrame >& rxFrame) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to DefaultShapesPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to DefaultShapesPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to DefaultShapesPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to DefaultShapesPanel::Create"_ustr, nullptr, 1); return std::make_unique<DefaultShapesPanel>(pParent, rxFrame); } diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.cxx b/svx/source/sidebar/styles/StylesPropertyPanel.cxx index 4e6b2235d104..174db6565359 100644 --- a/svx/source/sidebar/styles/StylesPropertyPanel.cxx +++ b/svx/source/sidebar/styles/StylesPropertyPanel.cxx @@ -22,18 +22,18 @@ std::unique_ptr<PanelLayout> StylesPropertyPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to StylesPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to StylesPropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to StylesPropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to StylesPropertyPanel::Create"_ustr, nullptr, 1); return std::make_unique<StylesPropertyPanel>(pParent, rxFrame); } StylesPropertyPanel::StylesPropertyPanel(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) - : PanelLayout(pParent, "SidebarStylesPanel", "svx/ui/sidebarstylespanel.ui") - , m_xFontStyle(m_xBuilder->weld_toolbar("fontstyletoolbox")) + : PanelLayout(pParent, u"SidebarStylesPanel"_ustr, u"svx/ui/sidebarstylespanel.ui"_ustr) + , m_xFontStyle(m_xBuilder->weld_toolbar(u"fontstyletoolbox"_ustr)) , m_xFontStyleDispatch(new ToolbarUnoDispatcher(*m_xFontStyle, *m_xBuilder, rxFrame)) - , m_xStyle(m_xBuilder->weld_toolbar("style")) + , m_xStyle(m_xBuilder->weld_toolbar(u"style"_ustr)) , m_xStyleDispatch(new ToolbarUnoDispatcher(*m_xStyle, *m_xBuilder, rxFrame)) { } diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 866f2edbeebe..afe12502a4e0 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -40,16 +40,16 @@ namespace svx { TextCharacterSpacingControl::TextCharacterSpacingControl(TextCharacterSpacingPopup* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/textcharacterspacingcontrol.ui", "TextCharacterSpacingControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/textcharacterspacingcontrol.ui"_ustr, u"TextCharacterSpacingControl"_ustr) , mnCustomKern(0) , mnLastCus(SPACING_NOCUSTOM) - , mxEditKerning(m_xBuilder->weld_metric_spin_button("kerning", FieldUnit::POINT)) - , mxTight(m_xBuilder->weld_button("tight")) - , mxVeryTight(m_xBuilder->weld_button("very_tight")) - , mxNormal(m_xBuilder->weld_button("normal")) - , mxLoose(m_xBuilder->weld_button("loose")) - , mxVeryLoose(m_xBuilder->weld_button("very_loose")) - , mxLastCustom(m_xBuilder->weld_button("last_custom")) + , mxEditKerning(m_xBuilder->weld_metric_spin_button(u"kerning"_ustr, FieldUnit::POINT)) + , mxTight(m_xBuilder->weld_button(u"tight"_ustr)) + , mxVeryTight(m_xBuilder->weld_button(u"very_tight"_ustr)) + , mxNormal(m_xBuilder->weld_button(u"normal"_ustr)) + , mxLoose(m_xBuilder->weld_button(u"loose"_ustr)) + , mxVeryLoose(m_xBuilder->weld_button(u"very_loose"_ustr)) + , mxLastCustom(m_xBuilder->weld_button(u"last_custom"_ustr)) , mxControl(pControl) { mxEditKerning->connect_value_changed(LINK(this, TextCharacterSpacingControl, KerningModifyHdl)); @@ -100,7 +100,7 @@ TextCharacterSpacingControl::~TextCharacterSpacingControl() { SvtViewOptions aWinOpt(EViewType::Window, SIDEBAR_SPACING_GLOBAL_VALUE); css::uno::Sequence<css::beans::NamedValue> aSeq - { { "Spacing", css::uno::Any(OUString::number(mnCustomKern)) } }; + { { u"Spacing"_ustr, css::uno::Any(OUString::number(mnCustomKern)) } }; aWinOpt.SetUserData(aSeq); } } diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index 62a1a6e36962..5ed612c79efc 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -64,12 +64,12 @@ VclPtr<vcl::Window> TextCharacterSpacingPopup::createVclPopupWindow(vcl::Window* OUString TextCharacterSpacingPopup::getImplementationName() { - return "com.sun.star.comp.svx.CharacterSpacingToolBoxControl"; + return u"com.sun.star.comp.svx.CharacterSpacingToolBoxControl"_ustr; } css::uno::Sequence<OUString> TextCharacterSpacingPopup::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 5b4e907cd86b..db5d565e3aca 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -32,34 +32,34 @@ std::unique_ptr<PanelLayout> TextPropertyPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to TextPropertyPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to TextPropertyPanel::Create"_ustr, nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to TextPropertyPanel::Create", nullptr, 1); + throw lang::IllegalArgumentException(u"no XFrame given to TextPropertyPanel::Create"_ustr, nullptr, 1); return std::make_unique<TextPropertyPanel>(pParent, rxFrame); } TextPropertyPanel::TextPropertyPanel(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) - : PanelLayout(pParent, "SidebarTextPanel", "svx/ui/sidebartextpanel.ui") - , mxFont(m_xBuilder->weld_toolbar("font")) + : PanelLayout(pParent, u"SidebarTextPanel"_ustr, u"svx/ui/sidebartextpanel.ui"_ustr) + , mxFont(m_xBuilder->weld_toolbar(u"font"_ustr)) , mxFontDispatch(new ToolbarUnoDispatcher(*mxFont, *m_xBuilder, rxFrame)) - , mxFontHeight(m_xBuilder->weld_toolbar("fontheight")) + , mxFontHeight(m_xBuilder->weld_toolbar(u"fontheight"_ustr)) , mxFontHeightDispatch(new ToolbarUnoDispatcher(*mxFontHeight, *m_xBuilder, rxFrame)) - , mxFontEffects(m_xBuilder->weld_toolbar("fonteffects")) + , mxFontEffects(m_xBuilder->weld_toolbar(u"fonteffects"_ustr)) , mxFontEffectsDispatch(new ToolbarUnoDispatcher(*mxFontEffects, *m_xBuilder, rxFrame)) - , mxFontAdjust(m_xBuilder->weld_toolbar("fontadjust")) + , mxFontAdjust(m_xBuilder->weld_toolbar(u"fontadjust"_ustr)) , mxFontAdjustDispatch(new ToolbarUnoDispatcher(*mxFontAdjust, *m_xBuilder, rxFrame)) - , mxToolBoxFontColor(m_xBuilder->weld_toolbar("colorbar")) + , mxToolBoxFontColor(m_xBuilder->weld_toolbar(u"colorbar"_ustr)) , mxToolBoxFontColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxFontColor, *m_xBuilder, rxFrame)) - , mxToolBoxBackgroundColor(m_xBuilder->weld_toolbar("colorbar_background")) + , mxToolBoxBackgroundColor(m_xBuilder->weld_toolbar(u"colorbar_background"_ustr)) , mxToolBoxBackgroundColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxBackgroundColor, *m_xBuilder, rxFrame)) - , mxResetBar(m_xBuilder->weld_toolbar("resetattr")) + , mxResetBar(m_xBuilder->weld_toolbar(u"resetattr"_ustr)) , mxResetBarDispatch(new ToolbarUnoDispatcher(*mxResetBar, *m_xBuilder, rxFrame)) - , mxDefaultBar(m_xBuilder->weld_toolbar("defaultattr")) + , mxDefaultBar(m_xBuilder->weld_toolbar(u"defaultattr"_ustr)) , mxDefaultBarDispatch(new ToolbarUnoDispatcher(*mxDefaultBar, *m_xBuilder, rxFrame)) - , mxPositionBar(m_xBuilder->weld_toolbar("position")) + , mxPositionBar(m_xBuilder->weld_toolbar(u"position"_ustr)) , mxPositionBarDispatch(new ToolbarUnoDispatcher(*mxPositionBar, *m_xBuilder, rxFrame)) - , mxSpacingBar(m_xBuilder->weld_toolbar("spacingbar")) + , mxSpacingBar(m_xBuilder->weld_toolbar(u"spacingbar"_ustr)) , mxSpacingBarDispatch(new ToolbarUnoDispatcher(*mxSpacingBar, *m_xBuilder, rxFrame)) { bool isMobilePhone = false; diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx index 34c22b94286b..42457cc7ba6b 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.cxx +++ b/svx/source/sidebar/text/TextUnderlineControl.cxx @@ -29,19 +29,19 @@ namespace svx { TextUnderlineControl::TextUnderlineControl(TextUnderlinePopup* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/textunderlinecontrol.ui", "TextUnderlineControl") - , mxNone(m_xBuilder->weld_button("none")) - , mxSingle(m_xBuilder->weld_button("single")) - , mxDouble(m_xBuilder->weld_button("double")) - , mxBold(m_xBuilder->weld_button("bold")) - , mxDot(m_xBuilder->weld_button("dot")) - , mxDotBold(m_xBuilder->weld_button("dotbold")) - , mxDash(m_xBuilder->weld_button("dash")) - , mxDashLong(m_xBuilder->weld_button("dashlong")) - , mxDashDot(m_xBuilder->weld_button("dashdot")) - , mxDashDotDot(m_xBuilder->weld_button("dashdotdot")) - , mxWave(m_xBuilder->weld_button("wave")) - , mxMoreOptions(m_xBuilder->weld_button("moreoptions")) + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/textunderlinecontrol.ui"_ustr, u"TextUnderlineControl"_ustr) + , mxNone(m_xBuilder->weld_button(u"none"_ustr)) + , mxSingle(m_xBuilder->weld_button(u"single"_ustr)) + , mxDouble(m_xBuilder->weld_button(u"double"_ustr)) + , mxBold(m_xBuilder->weld_button(u"bold"_ustr)) + , mxDot(m_xBuilder->weld_button(u"dot"_ustr)) + , mxDotBold(m_xBuilder->weld_button(u"dotbold"_ustr)) + , mxDash(m_xBuilder->weld_button(u"dash"_ustr)) + , mxDashLong(m_xBuilder->weld_button(u"dashlong"_ustr)) + , mxDashDot(m_xBuilder->weld_button(u"dashdot"_ustr)) + , mxDashDotDot(m_xBuilder->weld_button(u"dashdotdot"_ustr)) + , mxWave(m_xBuilder->weld_button(u"wave"_ustr)) + , mxMoreOptions(m_xBuilder->weld_button(u"moreoptions"_ustr)) , mxControl(pControl) { mxMoreOptions->set_help_id(HID_UNDERLINE_BTN); diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index befa2b80dcc3..96276893bd41 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -64,12 +64,12 @@ VclPtr<vcl::Window> TextUnderlinePopup::createVclPopupWindow(vcl::Window* pParen OUString TextUnderlinePopup::getImplementationName() { - return "com.sun.star.comp.svx.UnderlineToolBoxControl"; + return u"com.sun.star.comp.svx.UnderlineToolBoxControl"_ustr; } css::uno::Sequence<OUString> TextUnderlinePopup::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.cxx b/svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.cxx index 0d9916b5a9d4..97b7b5c0c861 100644 --- a/svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.cxx +++ b/svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.cxx @@ -42,10 +42,12 @@ MapUnit GetUnit(const SfxBindings* pBindings, sal_uInt16 nWhich) namespace svx::sidebar { TextColumnsPropertyPanel::TextColumnsPropertyPanel(weld::Widget* pParent, SfxBindings* pBindings) - : PanelLayout(pParent, "TextColumnsPropertyPanel", "svx/ui/sidebartextcolumnspanel.ui") + : PanelLayout(pParent, u"TextColumnsPropertyPanel"_ustr, + u"svx/ui/sidebartextcolumnspanel.ui"_ustr) , mpBindings(pBindings) - , m_xColumnsNumber(m_xBuilder->weld_spin_button("FLD_COL_NUMBER")) - , m_xColumnsSpacing(m_xBuilder->weld_metric_spin_button("MTR_FLD_COL_SPACING", FieldUnit::CM)) + , m_xColumnsNumber(m_xBuilder->weld_spin_button(u"FLD_COL_NUMBER"_ustr)) + , m_xColumnsSpacing( + m_xBuilder->weld_metric_spin_button(u"MTR_FLD_COL_SPACING"_ustr, FieldUnit::CM)) , maColumnsNumberController(SID_ATTR_TEXTCOLUMNS_NUMBER, *pBindings, *this) , maColumnsSpacingController(SID_ATTR_TEXTCOLUMNS_SPACING, *pBindings, *this) { @@ -107,10 +109,10 @@ std::unique_ptr<PanelLayout> TextColumnsPropertyPanel::Create(weld::Widget* pPar { if (pParent == nullptr) throw css::lang::IllegalArgumentException( - "no parent Window given to TextColumnsPropertyPanel::Create", nullptr, 0); + u"no parent Window given to TextColumnsPropertyPanel::Create"_ustr, nullptr, 0); if (pBindings == nullptr) throw css::lang::IllegalArgumentException( - "no SfxBindings given to TextColumnsPropertyPanel::Create", nullptr, 2); + u"no SfxBindings given to TextColumnsPropertyPanel::Create"_ustr, nullptr, 2); return std::make_unique<TextColumnsPropertyPanel>(pParent, pBindings); } diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index f62af603dfaf..084311205109 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -214,7 +214,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags, try { - mxConfigurationSettings->setPropertyValue( "RecognizeSmartTags", aEnabled ); + mxConfigurationSettings->setPropertyValue( u"RecognizeSmartTags"_ustr, aEnabled ); bCommit = true; } catch ( css::uno::Exception& ) @@ -230,7 +230,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags, try { - mxConfigurationSettings->setPropertyValue( "ExcludedSmartTagTypes", aNewTypes ); + mxConfigurationSettings->setPropertyValue( u"ExcludedSmartTagTypes"_ustr, aNewTypes ); bCommit = true; } catch ( css::uno::Exception& ) @@ -316,7 +316,7 @@ void SmartTagMgr::LoadLibraries() Reference< container::XContentEnumerationAccess > rContent( mxContext->getServiceManager(), UNO_QUERY_THROW ); // load recognizers: No recognizers -> nothing to do. - Reference < container::XEnumeration > rEnum = rContent->createContentEnumeration( "com.sun.star.smarttags.SmartTagRecognizer"); + Reference < container::XEnumeration > rEnum = rContent->createContentEnumeration( u"com.sun.star.smarttags.SmartTagRecognizer"_ustr); if ( !rEnum.is() || !rEnum->hasMoreElements() ) return; @@ -343,7 +343,7 @@ void SmartTagMgr::LoadLibraries() } // load actions: No actions -> nothing to do. - rEnum = rContent->createContentEnumeration( "com.sun.star.smarttags.SmartTagAction"); + rEnum = rContent->createContentEnumeration( u"com.sun.star.smarttags.SmartTagAction"_ustr); if ( !rEnum.is() ) return; @@ -386,7 +386,7 @@ void SmartTagMgr::PrepareConfiguration( std::u16string_view rConfigurationGroupN try { xConfigurationAccess = xConfProv->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", aArguments ); + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArguments ); } catch ( uno::Exception& ) { @@ -398,7 +398,7 @@ void SmartTagMgr::PrepareConfiguration( std::u16string_view rConfigurationGroupN try { xConfigurationAccess = xConfProv->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArguments ); + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArguments ); } catch ( uno::Exception& ) { @@ -421,7 +421,7 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize ) { maDisabledSmartTagTypes.clear(); - Any aAny = mxConfigurationSettings->getPropertyValue( "ExcludedSmartTagTypes" ); + Any aAny = mxConfigurationSettings->getPropertyValue( u"ExcludedSmartTagTypes"_ustr ); Sequence< OUString > aValues; aAny >>= aValues; @@ -431,7 +431,7 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize ) if ( bRecognize ) { - Any aAny = mxConfigurationSettings->getPropertyValue( "RecognizeSmartTags" ); + Any aAny = mxConfigurationSettings->getPropertyValue( u"RecognizeSmartTags"_ustr ); bool bValue = true; aAny >>= bValue; diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index 3ad0fdc1e4a1..f4bb87e622d3 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -45,7 +45,7 @@ void SvxInsertStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16 , Sfx const SfxPoolItem* pState ) { if ( SfxItemState::DEFAULT != eState ) - GetStatusBar().SetItemText( GetId(), "" ); + GetStatusBar().SetItemText( GetId(), u""_ustr ); else { DBG_ASSERT( dynamic_cast<const SfxBoolItem*>( pState) != nullptr, "invalid item type" ); @@ -67,7 +67,7 @@ void SvxInsertStatusBarControl::Paint( const UserDrawEvent& ) void SvxInsertStatusBarControl::DrawItemText_Impl() { - OUString aText = ""; + OUString aText = u""_ustr; // tdf#107918 on macOS without an Insert key it's hard to figure out how to switch modes // so we show both Insert and Overwrite #ifdef MACOSX diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index d658175260a2..98f18bcc747f 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -152,7 +152,7 @@ void SvxModifyControl::Click() return; Sequence<PropertyValue> aArgs; - execute(".uno:Save", aArgs); + execute(u".uno:Save"_ustr, aArgs); } diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 6de95543914f..28db3adefb20 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -140,28 +140,28 @@ OUString FunctionPopup_Impl::function_to_id(sal_uInt16 nFunc) switch (nFunc) { case PSZ_FUNC_AVG: - return "avg"; + return u"avg"_ustr; case PSZ_FUNC_COUNT2: - return "counta"; + return u"counta"_ustr; case PSZ_FUNC_COUNT: - return "count"; + return u"count"_ustr; case PSZ_FUNC_MAX: - return "max"; + return u"max"_ustr; case PSZ_FUNC_MIN: - return "min"; + return u"min"_ustr; case PSZ_FUNC_SUM: - return "sum"; + return u"sum"_ustr; case PSZ_FUNC_SELECTION_COUNT: - return "selection"; + return u"selection"_ustr; case PSZ_FUNC_NONE: - return "none"; + return u"none"_ustr; } return {}; } FunctionPopup_Impl::FunctionPopup_Impl(sal_uInt32 nCheckEncoded) - : m_xBuilder(Application::CreateBuilder(nullptr, "svx/ui/functionmenu.ui")) - , m_xMenu(m_xBuilder->weld_menu("menu")) + : m_xBuilder(Application::CreateBuilder(nullptr, u"svx/ui/functionmenu.ui"_ustr)) + , m_xMenu(m_xBuilder->weld_menu(u"menu"_ustr)) , m_nSelected(nCheckEncoded) { for ( sal_uInt16 nCheck = 1; nCheck < 32; ++nCheck ) @@ -235,9 +235,9 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( sal_uInt16 _nSlotId, pImpl->aPosImage = Image(StockImage::Yes, RID_SVXBMP_POSITION); pImpl->aSizeImage = Image(StockImage::Yes, RID_SVXBMP_SIZE); - addStatusListener( STR_POSITION); // SID_ATTR_POSITION - addStatusListener( STR_TABLECELL); // SID_TABLE_CELL - addStatusListener( STR_FUNC); // SID_PSZ_FUNCTION + addStatusListener( u"" STR_POSITION ""_ustr); // SID_ATTR_POSITION + addStatusListener( u"" STR_TABLECELL ""_ustr); // SID_TABLE_CELL + addStatusListener( u"" STR_FUNC ""_ustr); // SID_PSZ_FUNCTION ImplUpdateItemText(); } @@ -273,13 +273,13 @@ void SvxPosSizeStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16 nSID { // Because the combi-controller, always sets the current Id as HelpId // first clean the cached HelpText - GetStatusBar().SetHelpText( GetId(), "" ); + GetStatusBar().SetHelpText( GetId(), u""_ustr ); switch ( nSID ) { - case SID_ATTR_POSITION : GetStatusBar().SetHelpId( GetId(), STR_POSITION ); break; - case SID_TABLE_CELL: GetStatusBar().SetHelpId( GetId(), STR_TABLECELL ); break; - case SID_PSZ_FUNCTION: GetStatusBar().SetHelpId( GetId(), STR_FUNC ); break; + case SID_ATTR_POSITION : GetStatusBar().SetHelpId( GetId(), u"" STR_POSITION ""_ustr ); break; + case SID_TABLE_CELL: GetStatusBar().SetHelpId( GetId(), u"" STR_TABLECELL ""_ustr ); break; + case SID_PSZ_FUNCTION: GetStatusBar().SetHelpId( GetId(), u"" STR_FUNC ""_ustr ); break; default: break; } @@ -414,8 +414,8 @@ void SvxPosSizeStatusBarControl::Command( const CommandEvent& rCEvt ) SfxUInt32Item aItem( SID_PSZ_FUNCTION, nSelect ); aItem.QueryValue( a ); css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue( - "StatusBarFunc", a) }; - execute( ".uno:StatusBarFunc", aArgs ); + u"StatusBarFunc"_ustr, a) }; + execute( u".uno:StatusBarFunc"_ustr, aArgs ); } } } diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 50bc47f3a4df..344f7692fb24 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -84,17 +84,17 @@ OUString SelectionTypePopup::state_to_id(sal_uInt16 nState) switch (nState) { default: // fall through - case 0: return "standard"; - case 1: return "extending"; - case 2: return "adding"; - case 3: return "block"; + case 0: return u"standard"_ustr; + case 1: return u"extending"_ustr; + case 2: return u"adding"_ustr; + case 3: return u"block"_ustr; } } SelectionTypePopup::SelectionTypePopup(weld::Window* pPopupParent, sal_uInt16 nCurrent) : m_pPopupParent(pPopupParent) - , m_xBuilder(Application::CreateBuilder(m_pPopupParent, "svx/ui/selectionmenu.ui")) - , m_xMenu(m_xBuilder->weld_menu("menu")) + , m_xBuilder(Application::CreateBuilder(m_pPopupParent, u"svx/ui/selectionmenu.ui"_ustr)) + , m_xMenu(m_xBuilder->weld_menu(u"menu"_ustr)) { m_xMenu->set_active(state_to_id(nCurrent), true); } @@ -144,9 +144,9 @@ bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt ) css::uno::Reference< css::lang::XServiceInfo > xServices( xModel, css::uno::UNO_QUERY ); if ( xServices.is() ) { - bool bSpecModeCalc = xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument"); + bool bSpecModeCalc = xServices->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr); if (bSpecModeCalc) - aPop.HideSelectionType("block"); + aPop.HideSelectionType(u"block"_ustr); } OUString sIdent = aPop.popup_at_rect(aRect); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 0a26128d940f..ee08326c1bf1 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -84,7 +84,7 @@ void XmlSecStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16, SfxItem GetStatusBar().SetItemData( GetId(), nullptr ); // necessary ? - GetStatusBar().SetItemText( GetId(), "" ); // necessary ? + GetStatusBar().SetItemText( GetId(), u""_ustr ); // necessary ? TranslateId pResId = RID_SVXSTR_XMLSEC_NO_SIG; if ( mpImpl->mnState == SignatureState::OK ) @@ -105,8 +105,8 @@ void XmlSecStatusBarControl::Command( const CommandEvent& rCEvt ) { tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1)); weld::Window* pPopupParent = weld::GetPopupParent(GetStatusBar(), aRect); - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/xmlsecstatmenu.ui")); - std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"svx/ui/xmlsecstatmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu(u"menu"_ustr)); if (!xPopMenu->popup_at_rect(pPopupParent, aRect).isEmpty()) { css::uno::Any a; diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 9a86cc8ffb73..7b27f689619c 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -69,24 +69,24 @@ private: ZoomPopup_Impl::ZoomPopup_Impl(weld::Window* pPopupParent, sal_uInt16 nZ, SvxZoomEnableFlags nValueSet) : m_pPopupParent(pPopupParent) - , m_xBuilder(Application::CreateBuilder(m_pPopupParent, "svx/ui/zoommenu.ui")) - , m_xMenu(m_xBuilder->weld_menu("menu")) + , m_xBuilder(Application::CreateBuilder(m_pPopupParent, u"svx/ui/zoommenu.ui"_ustr)) + , m_xMenu(m_xBuilder->weld_menu(u"menu"_ustr)) , nZoom(nZ) { if ( !(SvxZoomEnableFlags::N50 & nValueSet) ) - m_xMenu->set_sensitive("50", false); + m_xMenu->set_sensitive(u"50"_ustr, false); if ( !(SvxZoomEnableFlags::N100 & nValueSet) ) - m_xMenu->set_sensitive("100", false); + m_xMenu->set_sensitive(u"100"_ustr, false); if ( !(SvxZoomEnableFlags::N150 & nValueSet) ) - m_xMenu->set_sensitive("150", false); + m_xMenu->set_sensitive(u"150"_ustr, false); if ( !(SvxZoomEnableFlags::N200 & nValueSet) ) - m_xMenu->set_sensitive("200", false); + m_xMenu->set_sensitive(u"200"_ustr, false); if ( !(SvxZoomEnableFlags::OPTIMAL & nValueSet) ) - m_xMenu->set_sensitive("optimal", false); + m_xMenu->set_sensitive(u"optimal"_ustr, false); if ( !(SvxZoomEnableFlags::WHOLEPAGE & nValueSet) ) - m_xMenu->set_sensitive("page", false); + m_xMenu->set_sensitive(u"page"_ustr, false); if ( !(SvxZoomEnableFlags::PAGEWIDTH & nValueSet) ) - m_xMenu->set_sensitive("width", false); + m_xMenu->set_sensitive(u"width"_ustr, false); } sal_uInt16 ZoomPopup_Impl::GetZoom(std::u16string_view ident) const @@ -126,7 +126,7 @@ void SvxZoomStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16, SfxIte { if( SfxItemState::DEFAULT != eState ) { - GetStatusBar().SetItemText( GetId(), "" ); + GetStatusBar().SetItemText( GetId(), u""_ustr ); nValueSet = SvxZoomEnableFlags::NONE; } else if ( auto pItem = dynamic_cast< const SfxUInt16Item* >(pState) ) diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 475f1da245bf..389c4d314310 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -164,7 +164,7 @@ void SvxZoomSliderControl::StateChangedAtStatusBarControl( sal_uInt16 /*nSID*/, { if (SfxItemState::DEFAULT != eState || SfxItemState::DISABLED == eState) { - GetStatusBar().SetItemText( GetId(), "" ); + GetStatusBar().SetItemText( GetId(), u""_ustr ); mxImpl->mbValuesSet = false; } else @@ -364,7 +364,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) GetStatusBar().SetQuickHelpText(GetId(), SvxResId(RID_SVXSTR_ZOOM_IN)); else // don't hide the slider and its handle with a tooltip during zooming - GetStatusBar().SetQuickHelpText(GetId(), ""); + GetStatusBar().SetQuickHelpText(GetId(), u""_ustr); return true; } @@ -384,7 +384,7 @@ void SvxZoomSliderControl::repaintAndExecute() css::uno::Any any; aZoomSliderItem.QueryValue(any); - css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue("ZoomSlider", + css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue(u"ZoomSlider"_ustr, any) }; execute(aArgs); } diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 7c3c6d972329..92b4973cbcca 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -36,7 +36,7 @@ ColorSets& ColorSets::get() void ColorSets::init() { { - model::ColorSet aColorSet("LibreOffice"); + model::ColorSet aColorSet(u"LibreOffice"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0x000000); @@ -52,7 +52,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Rainbow"); + model::ColorSet aColorSet(u"Rainbow"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0x1C1C1C); @@ -68,7 +68,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Beach"); + model::ColorSet aColorSet(u"Beach"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0xFFBF00); @@ -84,7 +84,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Sunset"); + model::ColorSet aColorSet(u"Sunset"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0x492300); @@ -100,7 +100,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Ocean"); + model::ColorSet aColorSet(u"Ocean"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0x2A6099); @@ -116,7 +116,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Forest"); + model::ColorSet aColorSet(u"Forest"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x000000); aColorSet.add(model::ThemeColorType::Light1, 0xFFFFFF); aColorSet.add(model::ThemeColorType::Dark2, 0x000000); @@ -132,7 +132,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { - model::ColorSet aColorSet("Breeze"); + model::ColorSet aColorSet(u"Breeze"_ustr); aColorSet.add(model::ThemeColorType::Dark1, 0x232629); aColorSet.add(model::ThemeColorType::Light1, 0xFCFCFC); aColorSet.add(model::ThemeColorType::Dark2, 0x31363B); diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx index 8e17f43f16a3..77ee2b06c0cb 100644 --- a/svx/source/svdraw/charthelper.cxx +++ b/svx/source/svdraw/charthelper.cxx @@ -39,7 +39,7 @@ void ChartHelper::updateChart( const uno::Reference< ::frame::XModel >& rXModel try { const uno::Reference< lang::XMultiServiceFactory > xChartFact(rXModel, uno::UNO_QUERY_THROW); - const uno::Reference< util::XUpdatable2 > xChartView(xChartFact->createInstance("com.sun.star.chart2.ChartView"), uno::UNO_QUERY_THROW); + const uno::Reference< util::XUpdatable2 > xChartView(xChartFact->createInstance(u"com.sun.star.chart2.ChartView"_ustr), uno::UNO_QUERY_THROW); xChartView->updateHard(); } @@ -119,9 +119,9 @@ void ChartHelper::AdaptDefaultsForChart( if (uno::Reference< beans::XPropertySet > xPageProp = xChartDoc->getPageBackground()) { // set background to transparent (none) - xPageProp->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_NONE)); + xPageProp->setPropertyValue(u"FillStyle"_ustr, uno::Any(drawing::FillStyle_NONE)); // set no border - xPageProp->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_NONE)); + xPageProp->setPropertyValue(u"LineStyle"_ustr, uno::Any(drawing::LineStyle_NONE)); } } catch( const uno::Exception & ) diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index f45ab9276981..01fa11cd9b8c 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -97,8 +97,8 @@ uno::Reference<awt::XControlContainer> const & SdrPageWindow::GetControlContaine { // Printer and VirtualDevice, or rather: no OutDev uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - const_cast< SdrPageWindow* >( this )->mpImpl->mxControlContainer.set(xFactory->createInstance("com.sun.star.awt.UnoControlContainer"), uno::UNO_QUERY); - uno::Reference< awt::XControlModel > xModel(xFactory->createInstance("com.sun.star.awt.UnoControlContainerModel"), uno::UNO_QUERY); + const_cast< SdrPageWindow* >( this )->mpImpl->mxControlContainer.set(xFactory->createInstance(u"com.sun.star.awt.UnoControlContainer"_ustr), uno::UNO_QUERY); + uno::Reference< awt::XControlModel > xModel(xFactory->createInstance(u"com.sun.star.awt.UnoControlContainerModel"_ustr), uno::UNO_QUERY); uno::Reference< awt::XControl > xControl(mpImpl->mxControlContainer, uno::UNO_QUERY); if (xControl.is()) xControl->setModel(xModel); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 914503304bad..1ae7e7eedcab 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -265,7 +265,7 @@ static ItemInfoPackage& getItemInfoPackageSdr() { SDRATTR_XMLATTRIBUTES, new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES ), 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, { SDRATTR_TEXT_USEFIXEDCELLHEIGHT, new SdrTextFixedCellHeightItem, 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_TEXT_WORDWRAP, new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true), 0, SFX_ITEMINFOFLAG_NONE }, - { SDRATTR_TEXT_CHAINNEXTNAME, new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, ""), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_TEXT_CHAINNEXTNAME, new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, u""_ustr), 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_TEXT_CLIPVERTOVERFLOW, new SdrOnOffItem(SDRATTR_TEXT_CLIPVERTOVERFLOW, false), 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_EDGEKIND, new SdrEdgeKindItem, 0, SFX_ITEMINFOFLAG_NONE }, @@ -412,8 +412,8 @@ static ItemInfoPackage& getItemInfoPackageSdr() { SDRATTR_3DSCENE_SHADOW_SLANT, new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0), 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_3DSCENE_SHADE_MODE, new Svx3DShadeModeItem, 0, SFX_ITEMINFOFLAG_NONE }, - { SDRATTR_CUSTOMSHAPE_ENGINE, new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, ""), 0, SFX_ITEMINFOFLAG_NONE }, - { SDRATTR_CUSTOMSHAPE_DATA, new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, ""), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CUSTOMSHAPE_ENGINE, new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, u""_ustr), 0, SFX_ITEMINFOFLAG_NONE }, + { SDRATTR_CUSTOMSHAPE_DATA, new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, u""_ustr), 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_CUSTOMSHAPE_GEOMETRY, new SdrCustomShapeGeometryItem, 0, SFX_ITEMINFOFLAG_NONE }, { SDRATTR_TABLE_BORDER, nullptr, SID_ATTR_BORDER_OUTER, SFX_ITEMINFOFLAG_NONE }, @@ -484,7 +484,7 @@ static ItemInfoPackage& getItemInfoPackageSdr() } SdrItemPool::SdrItemPool(SfxItemPool* _pMaster) -: SfxItemPool("SdrItemPool") +: SfxItemPool(u"SdrItemPool"_ustr) { // registerItemInfoPackage(getItemInfoPackageXOutdev()); registerItemInfoPackage(getItemInfoPackageSdr()); @@ -1738,10 +1738,10 @@ const OUString & SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos) { static std::array<OUString, 4> aMeasureTextHPosItem { - "automatic", - "left outside", - "inside (centered)", - "right outside" + u"automatic"_ustr, + u"left outside"_ustr, + u"inside (centered)"_ustr, + u"right outside"_ustr }; assert(nPos < aMeasureTextHPosItem.size() && "wrong pos!"); return aMeasureTextHPosItem[nPos]; @@ -1836,7 +1836,7 @@ sal_uInt16 SdrMeasureUnitItem::GetValueCount() const { return 14; } OUString SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos) { if(static_cast<FieldUnit>(nPos) == FieldUnit::NONE) - return "default"; + return u"default"_ustr; else return SdrFormatter::GetUnitStr(static_cast<FieldUnit>(nPos)); } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index f912f6c5b9e4..3128a68cbb9e 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -998,8 +998,8 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser css::uno::Reference<lang::XServiceInfo> xServices(GetModel().getUnoModel(), css::uno::UNO_QUERY); - if (xServices.is() && (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") || - xServices->supportsService("com.sun.star.text.TextDocument"))) + if (xServices.is() && (xServices->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr) || + xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr))) { const bool bUndo(IsUndoEnabled()); GetModel().EnableUndo(false); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 2c6d31d5f37a..13e0cd53f9da 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1080,7 +1080,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) { std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, VclMessageType::Info, VclButtonsType::Ok, - "SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.")); + u"SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."_ustr)); xInfoBox->run(); } } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 4b50b63f87ca..7a288ae86ded 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1250,7 +1250,7 @@ void SdrEditView::CombineMarkedTextObjects() // if the last paragraph does not end in paragraph-end punctuation (ignoring whitespace), // assume this text should be added to the end of the last paragraph, instead of starting a new paragraph. const sal_Int32 nPara = rDrawOutliner.GetParagraphCount(); - const OUString sLastPara = nPara ? rDrawOutliner.GetText( rDrawOutliner.GetParagraph( nPara - 1 ) ) : ""; + const OUString sLastPara = nPara ? rDrawOutliner.GetText( rDrawOutliner.GetParagraph( nPara - 1 ) ) : u""_ustr; sal_Int32 n = sLastPara.getLength(); while ( n && unicode::isWhiteSpace( sLastPara[--n] ) ) ; @@ -1294,7 +1294,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) // Undo-String will be set later if( bUndo ) - BegUndo("", "", bNoPolyPoly ? SdrRepeatFunc::CombineOnePoly : SdrRepeatFunc::CombinePolyPoly); + BegUndo(u""_ustr, u""_ustr, bNoPolyPoly ? SdrRepeatFunc::CombineOnePoly : SdrRepeatFunc::CombinePolyPoly); // #105899# First, guarantee that all objects are converted to polyobjects, // especially for SdrGrafObj with bitmap filling this is necessary to not @@ -1731,7 +1731,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines) if( bUndo ) { // comment is constructed later - BegUndo("", "", bMakeLines ? SdrRepeatFunc::DismantleLines : SdrRepeatFunc::DismantlePolys); + BegUndo(u""_ustr, u""_ustr, bMakeLines ? SdrRepeatFunc::DismantleLines : SdrRepeatFunc::DismantlePolys); } SdrObjList* pOL0=nullptr; @@ -1886,7 +1886,7 @@ void SdrEditView::UnGroupMarked() const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo("", "", SdrRepeatFunc::Ungroup); + BegUndo(u""_ustr, u""_ustr, SdrRepeatFunc::Ungroup); size_t nCount=0; OUString aName1; @@ -2112,7 +2112,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo("", "", SdrRepeatFunc::ImportMtf); + BegUndo(u""_ustr, u""_ustr, SdrRepeatFunc::ImportMtf); SortMarkedObjects(); SdrMarkList aForTheDescription; diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c03ae253d6c6..928d235b2296 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2418,9 +2418,9 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) { std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog( nullptr, VclMessageType::Info, VclButtonsType::Ok, - "SdrObjEditView::SetAttributes(): Setting EE_FEATURE items " + u"SdrObjEditView::SetAttributes(): Setting EE_FEATURE items " "at the SdrView does not make sense! It only leads to " - "overhead and unreadable documents.")); + "overhead and unreadable documents."_ustr)); xInfoBox->run(); } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 993b2e26dd57..73296e97a1f3 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -673,48 +673,48 @@ OUString appendMarkerName(BitmapMarkerKind eKindOfMarker) switch(eKindOfMarker) { case BitmapMarkerKind::Rect_7x7: - return "rect7"; + return u"rect7"_ustr; case BitmapMarkerKind::Rect_9x9: - return "rect9"; + return u"rect9"_ustr; case BitmapMarkerKind::Rect_11x11: - return "rect11"; + return u"rect11"_ustr; case BitmapMarkerKind::Rect_13x13: - return "rect13"; + return u"rect13"_ustr; case BitmapMarkerKind::Circ_7x7: case BitmapMarkerKind::Customshape_7x7: - return "circ7"; + return u"circ7"_ustr; case BitmapMarkerKind::Circ_9x9: case BitmapMarkerKind::Customshape_9x9: - return "circ9"; + return u"circ9"_ustr; case BitmapMarkerKind::Circ_11x11: case BitmapMarkerKind::Customshape_11x11: - return "circ11"; + return u"circ11"_ustr; case BitmapMarkerKind::Elli_7x9: - return "elli7x9"; + return u"elli7x9"_ustr; case BitmapMarkerKind::Elli_9x11: - return "elli9x11"; + return u"elli9x11"_ustr; case BitmapMarkerKind::Elli_9x7: - return "elli9x7"; + return u"elli9x7"_ustr; case BitmapMarkerKind::Elli_11x9: - return "elli11x9"; + return u"elli11x9"_ustr; case BitmapMarkerKind::RectPlus_7x7: - return "rectplus7"; + return u"rectplus7"_ustr; case BitmapMarkerKind::RectPlus_9x9: - return "rectplus9"; + return u"rectplus9"_ustr; case BitmapMarkerKind::RectPlus_11x11: - return "rectplus11"; + return u"rectplus11"_ustr; case BitmapMarkerKind::Crosshair: - return "cross"; + return u"cross"_ustr; case BitmapMarkerKind::Anchor: case BitmapMarkerKind::AnchorTR: - return "anchor"; + return u"anchor"_ustr; case BitmapMarkerKind::AnchorPressed: case BitmapMarkerKind::AnchorPressedTR: - return "anchor-pressed"; + return u"anchor-pressed"_ustr; case BitmapMarkerKind::Glue: - return "glue-selected"; + return u"glue-selected"_ustr; case BitmapMarkerKind::Glue_Deselected: - return "glue-unselected"; + return u"glue-unselected"_ustr; default: break; } @@ -726,17 +726,17 @@ OUString appendMarkerColor(BitmapColorIndex eIndex) switch(eIndex) { case BitmapColorIndex::LightGreen: - return "1"; + return u"1"_ustr; case BitmapColorIndex::Cyan: - return "2"; + return u"2"_ustr; case BitmapColorIndex::LightCyan: - return "3"; + return u"3"_ustr; case BitmapColorIndex::Red: - return "4"; + return u"4"_ustr; case BitmapColorIndex::LightRed: - return "5"; + return u"5"_ustr; case BitmapColorIndex::Yellow: - return "6"; + return u"6"_ustr; default: break; } @@ -751,7 +751,7 @@ BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, BitmapColorIndex eIndex) OUString sMarkerName = appendMarkerName(eKindOfMarker); if (!sMarkerName.isEmpty()) { - OUString sMarkerPrefix("svx/res/marker-"); + OUString sMarkerPrefix(u"svx/res/marker-"_ustr); BitmapEx aBitmapEx; if (eKindOfMarker == BitmapMarkerKind::Crosshair diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index c48ff9641e55..db1ea1042a2d 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -101,14 +101,14 @@ bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent): m_pParent(pNewParent), m_pModel(nullptr), - maControlLayerName("controls") + maControlLayerName(u"controls"_ustr) { } SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin): m_pParent(nullptr), m_pModel(nullptr), - maControlLayerName("controls") + maControlLayerName(u"controls"_ustr) { *this = rSrcLayerAdmin; } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index f429953dc28a..835689a00726 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -98,7 +98,7 @@ struct SdrModelImpl , mbLegacyFontwork(false) , mbConnectorUseSnapRect(false) , mbIgnoreBreakAfterMultilineField(false) - , mpTheme(new model::Theme("Office")) + , mpTheme(new model::Theme(u"Office"_ustr)) {} void initTheme() @@ -392,7 +392,7 @@ void SdrModel::BegUndo() ViewShellId nViewShellId(-1); if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); - mpImpl->mpUndoManager->EnterListAction("","",0,nViewShellId); + mpImpl->mpUndoManager->EnterListAction(u""_ustr,u""_ustr,0,nViewShellId); m_nUndoLevel++; } else if( IsUndoEnabled() ) @@ -416,7 +416,7 @@ void SdrModel::BegUndo(const OUString& rComment) ViewShellId nViewShellId(-1); if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); - mpImpl->mpUndoManager->EnterListAction( rComment, "", 0, nViewShellId ); + mpImpl->mpUndoManager->EnterListAction( rComment, u""_ustr, 0, nViewShellId ); m_nUndoLevel++; } else if( IsUndoEnabled() ) @@ -441,7 +441,7 @@ void SdrModel::BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrR ViewShellId nViewShellId(-1); if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); - mpImpl->mpUndoManager->EnterListAction( aComment,"",0,nViewShellId ); + mpImpl->mpUndoManager->EnterListAction( aComment,u""_ustr,0,nViewShellId ); m_nUndoLevel++; } else if( IsUndoEnabled() ) @@ -565,11 +565,11 @@ bool SdrModel::IsUndoEnabled() const void SdrModel::ImpCreateTables(bool bDisablePropertyFiles) { // use standard path for initial construction - const OUString aTablePath(!bDisablePropertyFiles ? SvtPathOptions().GetPalettePath() : ""); + const OUString aTablePath(!bDisablePropertyFiles ? SvtPathOptions().GetPalettePath() : u""_ustr); for( auto i : o3tl::enumrange<XPropertyListType>() ) { - maProperties[i] = XPropertyList::CreatePropertyList(i, aTablePath, ""/*TODO?*/ ); + maProperties[i] = XPropertyList::CreatePropertyList(i, aTablePath, u""_ustr/*TODO?*/ ); } } @@ -943,29 +943,29 @@ OUString SdrModel::GetUnitString(FieldUnit eUnit) case FieldUnit::CUSTOM : return OUString(); case FieldUnit::MM_100TH: - return OUString{"/100mm"}; + return u"/100mm"_ustr; case FieldUnit::MM : - return OUString{"mm"}; + return u"mm"_ustr; case FieldUnit::CM : - return OUString{"cm"}; + return u"cm"_ustr; case FieldUnit::M : - return OUString{"m"}; + return u"m"_ustr; case FieldUnit::KM : - return OUString{"km"}; + return u"km"_ustr; case FieldUnit::TWIP : - return OUString{"twip"}; + return u"twip"_ustr; case FieldUnit::POINT : - return OUString{"pt"}; + return u"pt"_ustr; case FieldUnit::PICA : - return OUString{"pica"}; + return u"pica"_ustr; case FieldUnit::INCH : - return OUString{"\""}; + return u"\""_ustr; case FieldUnit::FOOT : - return OUString{"ft"}; + return u"ft"_ustr; case FieldUnit::MILE : - return OUString{"mile(s)"}; + return u"mile(s)"_ustr; case FieldUnit::PERCENT: - return OUString{"%"}; + return u"%"_ustr; } } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 0f952aae08bd..a3bb40589849 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -177,7 +177,7 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape ) { OUString sShapeType; const SdrCustomShapeGeometryItem& rGeometryItem( rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" ); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"Type"_ustr ); if ( pAny && ( *pAny >>= sShapeType ) ) eRetValue = EnhancedCustomShapeTypeNames::Get( sShapeType ); } @@ -471,7 +471,7 @@ bool SdrObjCustomShape::IsMirroredX() const { bool bMirroredX = false; const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "MirroredX" ); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"MirroredX"_ustr ); if ( pAny ) *pAny >>= bMirroredX; return bMirroredX; @@ -480,7 +480,7 @@ bool SdrObjCustomShape::IsMirroredY() const { bool bMirroredY = false; const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "MirroredY" ); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"MirroredY"_ustr ); if ( pAny ) *pAny >>= bMirroredY; return bMirroredY; @@ -1121,7 +1121,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons OUString sShapeType; const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const uno::Any *pAny = rGeometryItem.GetPropertyValueByName( "Type" ); + const uno::Any *pAny = rGeometryItem.GetPropertyValueByName( u"Type"_ustr ); if ( pAny ) *pAny >>= sShapeType; @@ -1133,7 +1133,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons { case DefaultType::Viewbox : { - const uno::Any* pViewBox = rGeometryItem.GetPropertyValueByName( "ViewBox" ); + const uno::Any* pViewBox = rGeometryItem.GetPropertyValueByName( u"ViewBox"_ustr ); awt::Rectangle aViewBox; if (pViewBox && (*pViewBox >>= aViewBox) && pDefCustomShape) { @@ -1146,7 +1146,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Path : { - pAny = rGeometryItem.GetPropertyValueByName( sPath, "Coordinates" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"Coordinates"_ustr ); if (pAny && pDefCustomShape && !pDefCustomShape->pVertices.empty()) { uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqCoordinates1; @@ -1171,7 +1171,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Gluepoints : { - pAny = rGeometryItem.GetPropertyValueByName( sPath, "GluePoints" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"GluePoints"_ustr ); if (pAny && pDefCustomShape && !pDefCustomShape->pGluePoints.empty()) { uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqGluePoints1; @@ -1197,7 +1197,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Segments : { // Path/Segments - pAny = rGeometryItem.GetPropertyValueByName( sPath, "Segments" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"Segments"_ustr ); if ( pAny ) { uno::Sequence<drawing::EnhancedCustomShapeSegment> seqSegments1; @@ -1241,7 +1241,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::StretchX : { - pAny = rGeometryItem.GetPropertyValueByName( sPath, "StretchX" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"StretchX"_ustr ); if ( pAny && pDefCustomShape ) { sal_Int32 nStretchX = 0; @@ -1258,7 +1258,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::StretchY : { - pAny = rGeometryItem.GetPropertyValueByName( sPath, "StretchY" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"StretchY"_ustr ); if ( pAny && pDefCustomShape ) { sal_Int32 nStretchY = 0; @@ -1275,7 +1275,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Equations : { - pAny = rGeometryItem.GetPropertyValueByName( "Equations" ); + pAny = rGeometryItem.GetPropertyValueByName( u"Equations"_ustr ); if (pAny && pDefCustomShape && !pDefCustomShape->pCalculation.empty()) { uno::Sequence<OUString> seqEquations1; @@ -1302,7 +1302,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::TextFrames : { - pAny = rGeometryItem.GetPropertyValueByName( sPath, "TextFrames" ); + pAny = rGeometryItem.GetPropertyValueByName( sPath, u"TextFrames"_ustr ); if (pAny && pDefCustomShape && !pDefCustomShape->pTextRect.empty()) { uno::Sequence<drawing::EnhancedCustomShapeTextFrame> seqTextFrames1; @@ -2917,7 +2917,7 @@ void SdrObjCustomShape::SaveGeoData(SdrObjGeoData& rGeo) const rAGeo.bMirroredX = IsMirroredX(); rAGeo.bMirroredY = IsMirroredY(); - const uno::Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ).GetPropertyValueByName( "AdjustmentValues" ); + const uno::Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ).GetPropertyValueByName( u"AdjustmentValues"_ustr ); if ( pAny ) *pAny >>= rAGeo.aAdjustmentSeq; } @@ -3263,7 +3263,7 @@ OUString SdrObjCustomShape::GetCustomShapeName() const { OUString sShapeType; const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" ); + const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"Type"_ustr ); if ( pAny && ( *pAny >>= sShapeType ) ) sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType ); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 43bc417163cf..b5cd832c096b 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2800,10 +2800,10 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& switch ( eUserCall ) { case SdrUserCallType::Resize: - notifyShapePropertyChange( "Size" ); + notifyShapePropertyChange( u"Size"_ustr ); [[fallthrough]]; // RESIZE might also imply a change of the position case SdrUserCallType::MoveOnly: - notifyShapePropertyChange( "Position" ); + notifyShapePropertyChange( u"Position"_ustr ); break; default: // not interested in diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index bfe9b7d5eedb..1e09eccab766 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -546,7 +546,7 @@ void SdrGrafObj::ReleaseGraphicLink() aFilterName.clear(); auto aGraphic = mpGraphicObject->GetGraphic(); - aGraphic.setOriginURL(""); + aGraphic.setOriginURL(u""_ustr); SetGraphic(aGraphic); } diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 242bded04171..4e13258adaff 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -584,7 +584,7 @@ void SdrMeasureObj::UndirtyText() const { rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SdrMeasureFieldKind::Rotate90Blanks), EE_FEATURE_FIELD), ESelection(0,0)); rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SdrMeasureFieldKind::Value), EE_FEATURE_FIELD),ESelection(0,1)); - rOutliner.QuickInsertText(" ", ESelection(0,2)); + rOutliner.QuickInsertText(u" "_ustr, ESelection(0,2)); rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SdrMeasureFieldKind::Unit), EE_FEATURE_FIELD),ESelection(0,3)); rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SdrMeasureFieldKind::Rotate90Blanks), EE_FEATURE_FIELD),ESelection(0,4)); diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 0bb5ae213c4a..3fa44393f222 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -252,7 +252,7 @@ void SdrMediaObj::setURL(const OUString& rURL, const OUString& rReferer) { ::avmedia::MediaItem aURLItem; #if HAVE_FEATURE_AVMEDIA - aURLItem.setURL( rURL, "", rReferer ); + aURLItem.setURL( rURL, u""_ustr, rReferer ); #else (void) rURL; (void) rReferer; @@ -330,7 +330,7 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream { m_xImpl->m_pTempFile = std::make_shared<::avmedia::MediaTempFile>(tempFileURL); m_xImpl->m_MediaProperties.setURL( - m_xImpl->m_LastFailedPkgURL, tempFileURL, ""); + m_xImpl->m_LastFailedPkgURL, tempFileURL, u""_ustr); } m_xImpl->m_LastFailedPkgURL.clear(); // once only #endif @@ -418,12 +418,12 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper { m_xImpl->m_pTempFile = std::make_shared<::avmedia::MediaTempFile>(tempFileURL); - m_xImpl->m_MediaProperties.setURL(url, tempFileURL, ""); + m_xImpl->m_MediaProperties.setURL(url, tempFileURL, u""_ustr); } else // this case is for Clone via operator= { m_xImpl->m_pTempFile.reset(); - m_xImpl->m_MediaProperties.setURL("", "", ""); + m_xImpl->m_MediaProperties.setURL(u""_ustr, u""_ustr, u""_ustr); // UGLY: oox import also gets here, because unlike ODF // getDocumentStorage() is not the imported file... m_xImpl->m_LastFailedPkgURL = url; @@ -432,13 +432,13 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper else { m_xImpl->m_MediaProperties.setURL(url, - rNewProperties.getTempURL(), ""); + rNewProperties.getTempURL(), u""_ustr); } } else { m_xImpl->m_pTempFile.reset(); - m_xImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer()); + m_xImpl->m_MediaProperties.setURL(url, u""_ustr, rNewProperties.getReferer()); } bBroadcastChanged = true; } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index bd7db1a62c06..e53e62142ef9 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -423,7 +423,7 @@ uno::Reference< css::frame::XLayoutManager > SAL_CALL SdrLightEmbeddedClient_Imp uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); try { - xMan.set(xFrame->getPropertyValue("LayoutManager"),uno::UNO_QUERY); + xMan.set(xFrame->getPropertyValue(u"LayoutManager"_ustr),uno::UNO_QUERY); } catch ( uno::Exception& ex ) { @@ -930,7 +930,7 @@ bool SdrOle2Obj::UpdateLinkURL_Impl() // TODO/LATER: there should be possible to get current mediadescriptor settings from the object uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue( - "URL", aNewLinkURL) }; + u"URL"_ustr, aNewLinkURL) }; xPersObj->reload( aArgs, uno::Sequence< beans::PropertyValue >() ); mpImpl->maLinkURL = aNewLinkURL; @@ -1020,7 +1020,7 @@ void SdrOle2Obj::CheckFileLink_Impl() { uno::Reference<beans::XPropertySet> xSet(xObject->getComponent(), uno::UNO_QUERY); if (xSet.is()) - xSet->getPropertyValue("FrameURL") >>= aLinkURL; + xSet->getPropertyValue(u"FrameURL"_ustr) >>= aLinkURL; bIFrame = true; } } @@ -1100,7 +1100,7 @@ void SdrOle2Obj::Connect_Impl(SvxOle2Shape* pCreator) { uno::Reference<beans::XPropertySet> xSet(mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY); if (xSet.is()) - xSet->setPropertyValue("FrameURL", uno::Any(sFrameURL)); + xSet->setPropertyValue(u"FrameURL"_ustr, uno::Any(sFrameURL)); } } diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index fcc4bf0bd85e..0e7ecd3506e8 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -1853,7 +1853,7 @@ double SdrTextObj::GetCameraZRotation() const const SfxItemSet& rSet = GetObjectItemSet(); const SdrCustomShapeGeometryItem& rGeometryItem(rSet.Get(SDRATTR_CUSTOMSHAPE_GEOMETRY)); - pAny = rGeometryItem.GetPropertyValueByName("TextCameraZRotateAngle"); + pAny = rGeometryItem.GetPropertyValueByName(u"TextCameraZRotateAngle"_ustr); if ( pAny ) *pAny >>= fTextCameraZRotateAngle; diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 8666f262be92..4ecca10951e9 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -85,7 +85,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) { // Outliner has no text so we must set some // empty text so the outliner initialise itself - rOutl.SetText( "", rOutl.GetParagraph( 0 ) ); + rOutl.SetText( u""_ustr, rOutl.GetParagraph( 0 ) ); if(GetStyleSheet()) rOutl.SetStyleSheet( 0, GetStyleSheet()); diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 44a55fdb4ea2..4706cbe96a23 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -164,7 +164,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad) DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); ::ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - css::uno::Any aAny( aCnt.getPropertyValue("DateModified") ); + css::uno::Any aAny( aCnt.getPropertyValue(u"DateModified"_ustr) ); css::util::DateTime aDateTime; aAny >>= aDateTime; diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index ab0f5e378d43..070b85fbdacd 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -172,7 +172,7 @@ SdrUnoObj::SdrUnoObj( SdrModel& rSdrModel, SdrUnoObj const & rSource) uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aValue( xSet->getPropertyValue("DefaultControl") ); + uno::Any aValue( xSet->getPropertyValue(u"DefaultControl"_ustr) ); OUString aStr; if( aValue >>= aStr ) @@ -250,7 +250,7 @@ void SdrUnoObj::SetContextWritingMode( const sal_Int16 _nContextWritingMode ) try { uno::Reference< beans::XPropertySet > xModelProperties( GetUnoControlModel(), uno::UNO_QUERY_THROW ); - xModelProperties->setPropertyValue( "ContextWritingMode", uno::Any( _nContextWritingMode ) ); + xModelProperties->setPropertyValue( u"ContextWritingMode"_ustr, uno::Any( _nContextWritingMode ) ); } catch( const uno::Exception& ) { @@ -420,7 +420,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >& uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aValue( xSet->getPropertyValue("DefaultControl") ); + uno::Any aValue( xSet->getPropertyValue(u"DefaultControl"_ustr) ); OUString aStr; if( aValue >>= aStr ) aUnoControlTypeName = aStr; diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 29636efca8fd..7630b7e26c90 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -577,7 +577,7 @@ void SdrObjList::sort( std::vector<sal_Int32>& sortOrder) auto it = std::find_if( sortOrder.begin(), sortOrder.end(), [this](const sal_Int32& rIt) { return ( rIt < 0 || o3tl::make_unsigned(rIt) >= maList.size() ); } ); if ( it != sortOrder.end()) - throw css::lang::IllegalArgumentException("negative index of shape", nullptr, 1); + throw css::lang::IllegalArgumentException(u"negative index of shape"_ustr, nullptr, 1); // no duplicates std::vector<bool> aNoDuplicates(sortOrder.size(), false); @@ -586,7 +586,7 @@ void SdrObjList::sort( std::vector<sal_Int32>& sortOrder) size_t idx = static_cast<size_t>( sortOrder[i] ); if ( aNoDuplicates[idx] ) - throw css::lang::IllegalArgumentException("duplicate index of shape", nullptr, 2); + throw css::lang::IllegalArgumentException(u"duplicate index of shape"_ustr, nullptr, 2); aNoDuplicates[idx] = true; } @@ -615,7 +615,7 @@ void SdrObjList::sort( std::vector<sal_Int32>& sortOrder) if (aShapesWithTextbox.size() != maList.size() - sortOrder.size()) { - throw lang::IllegalArgumentException("mismatch of no. of shapes", nullptr, 0); + throw lang::IllegalArgumentException(u"mismatch of no. of shapes"_ustr, nullptr, 0); } for (size_t i = 0; i< sortOrder.size(); ++i) diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index bf0c6eecdaa7..ea8af4045878 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -949,7 +949,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll) { std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, VclMessageType::Info, VclButtonsType::Ok, - "SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.")); + u"SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."_ustr)); xInfoBox->run(); } } diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 9c5fb73060d7..8c7db13b2a75 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -801,37 +801,37 @@ OUString SdrFormatter::GetUnitStr(MapUnit eUnit) { // metrically case MapUnit::Map100thMM : - return "/100mm"; + return u"/100mm"_ustr; case MapUnit::Map10thMM : - return "/10mm"; + return u"/10mm"_ustr; case MapUnit::MapMM : - return "mm"; + return u"mm"_ustr; case MapUnit::MapCM : - return "cm"; + return u"cm"_ustr; // Inch case MapUnit::Map1000thInch: - return "/1000\""; + return u"/1000\""_ustr; case MapUnit::Map100thInch : - return "/100\""; + return u"/100\""_ustr; case MapUnit::Map10thInch : - return "/10\""; + return u"/10\""_ustr; case MapUnit::MapInch : - return "\""; + return u"\""_ustr; case MapUnit::MapPoint : - return "pt"; + return u"pt"_ustr; case MapUnit::MapTwip : - return "twip"; + return u"twip"_ustr; // others case MapUnit::MapPixel : - return "pixel"; + return u"pixel"_ustr; case MapUnit::MapSysFont : - return "sysfont"; + return u"sysfont"_ustr; case MapUnit::MapAppFont : - return "appfont"; + return u"appfont"_ustr; case MapUnit::MapRelative : - return "%"; + return u"%"_ustr; default: return OUString(); } @@ -848,33 +848,33 @@ OUString SdrFormatter::GetUnitStr(FieldUnit eUnit) // metrically case FieldUnit::MM_100TH: - return "/100mm"; + return u"/100mm"_ustr; case FieldUnit::MM : - return "mm"; + return u"mm"_ustr; case FieldUnit::CM : - return "cm"; + return u"cm"_ustr; case FieldUnit::M : - return "m"; + return u"m"_ustr; case FieldUnit::KM : - return "km"; + return u"km"_ustr; // Inch case FieldUnit::TWIP : - return "twip"; + return u"twip"_ustr; case FieldUnit::POINT : - return "pt"; + return u"pt"_ustr; case FieldUnit::PICA : - return "pica"; + return u"pica"_ustr; case FieldUnit::INCH : - return "\""; + return u"\""_ustr; case FieldUnit::FOOT : - return "ft"; + return u"ft"_ustr; case FieldUnit::MILE : - return "mile(s)"; + return u"mile(s)"_ustr; // others case FieldUnit::PERCENT: - return "%"; + return u"%"_ustr; } } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index c2a919924464..bed1294645a2 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -479,10 +479,10 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co // that data static SvxURLField aSvxURLField; - aSvxURLField.SetURL(pTextHierarchyFieldPrimitive2D->getValue("URL")); - aSvxURLField.SetRepresentation(pTextHierarchyFieldPrimitive2D->getValue("Representation")); - aSvxURLField.SetTargetFrame(pTextHierarchyFieldPrimitive2D->getValue("TargetFrame")); - const OUString aFormat(pTextHierarchyFieldPrimitive2D->getValue("SvxURLFormat")); + aSvxURLField.SetURL(pTextHierarchyFieldPrimitive2D->getValue(u"URL"_ustr)); + aSvxURLField.SetRepresentation(pTextHierarchyFieldPrimitive2D->getValue(u"Representation"_ustr)); + aSvxURLField.SetTargetFrame(pTextHierarchyFieldPrimitive2D->getValue(u"TargetFrame"_ustr)); + const OUString aFormat(pTextHierarchyFieldPrimitive2D->getValue(u"SvxURLFormat"_ustr)); if (!aFormat.isEmpty()) { diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index fd1f78684e99..e74674d9ba26 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -287,7 +287,7 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() // Transform coordinates from internal to pixel. if (maShapeTreeInfo.GetViewForwarder() == nullptr) - throw uno::RuntimeException ("AccessibleCell has no valid view forwarder", getXWeak()); + throw uno::RuntimeException (u"AccessibleCell has no valid view forwarder"_ustr, getXWeak()); ::Size aPixelSize( maShapeTreeInfo.GetViewForwarder()->LogicToPixel(::Size(aCellRect.GetWidth(), aCellRect.GetHeight())) ); ::Point aPixelPosition( maShapeTreeInfo.GetViewForwarder()->LogicToPixel( aCellRect.TopLeft() )); @@ -441,14 +441,14 @@ void SAL_CALL AccessibleCell::removeAccessibleEventListener( const Reference<XAc OUString SAL_CALL AccessibleCell::getImplementationName() { - return "AccessibleCell"; + return u"AccessibleCell"_ustr; } Sequence<OUString> SAL_CALL AccessibleCell::getSupportedServiceNames() { ThrowIfDisposed (); - const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleCell" }; + const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleCell"_ustr }; return comphelper::concatSequences(AccessibleContextBase::getSupportedServiceNames(), vals); } diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index df48ec55c9d4..1c47ddc0758b 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -333,7 +333,7 @@ void AccessibleTableShape::Init() try { Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW ); - Reference< XTable > xTable( xSet->getPropertyValue("Model"), UNO_QUERY_THROW ); + Reference< XTable > xTable( xSet->getPropertyValue(u"Model"_ustr), UNO_QUERY_THROW ); mxImpl->init( this, xTable ); } @@ -390,13 +390,13 @@ void SAL_CALL AccessibleTableShape::release( ) noexcept OUString SAL_CALL AccessibleTableShape::getImplementationName() { - return "com.sun.star.comp.accessibility.AccessibleTableShape"; + return u"com.sun.star.comp.accessibility.AccessibleTableShape"_ustr; } OUString AccessibleTableShape::CreateAccessibleBaseName() { - return "TableShape"; + return u"TableShape"_ustr; } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 5fffb53fa874..c10c431e16bf 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -1254,7 +1254,7 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyName const sal_Int32 nCount = aPropertyNames.getLength(); if (nCount != aValues.getLength()) - throw css::lang::IllegalArgumentException("lengths do not match", + throw css::lang::IllegalArgumentException(u"lengths do not match"_ustr, getXWeak(), -1); const OUString* pNames = aPropertyNames.getConstArray(); diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 63eeeae7d037..da914b58dee4 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -382,7 +382,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) const OUString sStyleName( Reference< XNamed >( rSource.mxTableStyle, UNO_QUERY_THROW )->getName() ); Reference< XStyleFamiliesSupplier > xSFS(rTargetSdrModel.getUnoModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), css::uno::UNO_SET_THROW ); - Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( "table" ), UNO_QUERY_THROW ); + Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( u"table"_ustr ), UNO_QUERY_THROW ); if( xTableFamilyAccess->hasByName( sStyleName ) ) { @@ -706,8 +706,8 @@ void SAL_CALL SdrTableObjImpl::disposing( const css::lang::EventObject& Source ) try { Reference<XStyleFamiliesSupplier> xSupplier(mpTableObj->getSdrModelFromSdrObject().getUnoModel(), UNO_QUERY_THROW); - Reference<XNameAccess> xTableFamily(xSupplier->getStyleFamilies()->getByName("table"), UNO_QUERY_THROW); - xDefaultStyle.set(xTableFamily->getByName("default"), UNO_QUERY_THROW); + Reference<XNameAccess> xTableFamily(xSupplier->getStyleFamilies()->getByName(u"table"_ustr), UNO_QUERY_THROW); + xDefaultStyle.set(xTableFamily->getByName(u"default"_ustr), UNO_QUERY_THROW); } catch( Exception& ) { diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 610b5026acd9..85f5cb60169a 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1126,7 +1126,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) { Reference< XStyleFamiliesSupplier > xSFS( rModel.getUnoModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), UNO_SET_THROW ); - Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( "table" ), UNO_QUERY_THROW ); + Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( u"table"_ustr ), UNO_QUERY_THROW ); if( xTableFamilyAccess->hasByName( pArg->GetValue() ) ) { diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index 2491ab94f30f..0cb561b355e1 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -214,16 +214,16 @@ const CellStyleNameMap& TableDesignStyle::getCellStyleNameMap() { static CellStyleNameMap const aMap { - { OUString( "first-row" ) , first_row_style }, - { OUString( "last-row" ) , last_row_style }, - { OUString( "first-column" ) , first_column_style }, - { OUString( "last-column" ) , last_column_style }, - { OUString( "body" ) , body_style }, - { OUString( "even-rows" ) , even_rows_style }, - { OUString( "odd-rows" ) , odd_rows_style }, - { OUString( "even-columns" ) , even_columns_style }, - { OUString( "odd-columns" ) , odd_columns_style }, - { OUString( "background" ) , background_style }, + { u"first-row"_ustr , first_row_style }, + { u"last-row"_ustr , last_row_style }, + { u"first-column"_ustr , first_column_style }, + { u"last-column"_ustr , last_column_style }, + { u"body"_ustr , body_style }, + { u"even-rows"_ustr , even_rows_style }, + { u"odd-rows"_ustr , odd_rows_style }, + { u"even-columns"_ustr , even_columns_style }, + { u"odd-columns"_ustr , odd_columns_style }, + { u"background"_ustr , background_style }, }; return aMap; @@ -232,7 +232,7 @@ const CellStyleNameMap& TableDesignStyle::getCellStyleNameMap() // XServiceInfo OUString SAL_CALL TableDesignStyle::getImplementationName() { - return "TableDesignStyle"; + return u"TableDesignStyle"_ustr; } sal_Bool SAL_CALL TableDesignStyle::supportsService( const OUString& ServiceName ) @@ -242,7 +242,7 @@ sal_Bool SAL_CALL TableDesignStyle::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL TableDesignStyle::getSupportedServiceNames() { - return { "com.sun.star.style.Style" }; + return { u"com.sun.star.style.Style"_ustr }; } // XStyle @@ -547,7 +547,7 @@ void SAL_CALL TableDesignStyle::disposing( const css::lang::EventObject& ) // XServiceInfo OUString SAL_CALL TableDesignFamily::getImplementationName() { - return "TableDesignFamily"; + return u"TableDesignFamily"_ustr; } sal_Bool SAL_CALL TableDesignFamily::supportsService( const OUString& ServiceName ) @@ -557,13 +557,13 @@ sal_Bool SAL_CALL TableDesignFamily::supportsService( const OUString& ServiceNam Sequence< OUString > SAL_CALL TableDesignFamily::getSupportedServiceNames() { - return { "com.sun.star.style.StyleFamily" }; + return { u"com.sun.star.style.StyleFamily"_ustr }; } // XNamed OUString SAL_CALL TableDesignFamily::getName() { - return "table"; + return u"table"_ustr; } void SAL_CALL TableDesignFamily::setName( const OUString& ) diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx index b3f1965de31b..a87eaa52b7c5 100644 --- a/svx/source/tbxctrls/Palette.cxx +++ b/svx/source/tbxctrls/Palette.cxx @@ -109,7 +109,7 @@ void PaletteASE::LoadPalette() aFile.ReadUInt16(nChunkSize); aFile.ReadUInt16(nChars); - OUString aPaletteName(""); + OUString aPaletteName(u""_ustr); if (nChars > 1) aPaletteName = read_uInt16s_ToOUString(aFile, nChars); else @@ -304,7 +304,7 @@ Palette* PaletteGPL::Clone() const static OString lcl_getToken(OStringBuffer& rStr, sal_Int32& index) { sal_Int32 substart, toklen = 0; - OUString aWhitespaceChars( " \n\t" ); + OUString aWhitespaceChars( u" \n\t"_ustr ); while(index < rStr.getLength() && aWhitespaceChars.indexOf( rStr[index] ) != -1) diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx index d26063d5447e..2870e5dc36b7 100644 --- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx +++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx @@ -58,13 +58,15 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::style::XStyleFamiliesSupplier> xStylesSupplier( xModel, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::lang::XServiceInfo> xServices(xModel, css::uno::UNO_QUERY_THROW); - if (xServices->supportsService("com.sun.star.text.TextDocument")) + if (xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr)) { css::uno::Reference<css::container::XNameAccess> xParaStyles; - xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= xParaStyles; - static const std::vector<OUString> aWriterStyles - = { "Standard", "Text body", "Heading 1", "Heading 2", "Heading 3", - "Heading 4", "Title", "Subtitle", "Quotations", "Preformatted Text" }; + xStylesSupplier->getStyleFamilies()->getByName(u"ParagraphStyles"_ustr) >>= xParaStyles; + static const std::vector<OUString> aWriterStyles = { + u"Standard"_ustr, u"Text body"_ustr, u"Heading 1"_ustr, u"Heading 2"_ustr, + u"Heading 3"_ustr, u"Heading 4"_ustr, u"Title"_ustr, u"Subtitle"_ustr, + u"Quotations"_ustr, u"Preformatted Text"_ustr + }; for (const OUString& aStyle : aWriterStyles) { try @@ -72,7 +74,7 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::beans::XPropertySet> xStyle; xParaStyles->getByName(aStyle) >>= xStyle; OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if (!sName.isEmpty()) m_aDefaultStyles.push_back(std::pair<OUString, OUString>(aStyle, sName)); } @@ -84,12 +86,12 @@ void StylesPreviewToolBoxControl::InitializeStyles( } } } - else if (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument")) + else if (xServices->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr)) { static const char* aCalcStyles[] = { "Default", "Accent 1", "Accent 2", "Accent 3", "Heading 1", "Heading 2", "Result" }; css::uno::Reference<css::container::XNameAccess> xCellStyles; - xStylesSupplier->getStyleFamilies()->getByName("CellStyles") >>= xCellStyles; + xStylesSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr) >>= xCellStyles; for (const char* pCalcStyle : aCalcStyles) { try @@ -100,7 +102,7 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::beans::XPropertySet> xStyle( xCellStyles->getByName(sStyleName), css::uno::UNO_QUERY_THROW); OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if (!sName.isEmpty()) { m_aDefaultStyles.push_back( @@ -161,7 +163,7 @@ StylesPreviewToolBoxControl::createItemWindow(const css::uno::Reference<css::awt OUString StylesPreviewToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.StylesPreviewToolBoxControl"; + return u"com.sun.star.comp.svx.StylesPreviewToolBoxControl"_ustr; } sal_Bool StylesPreviewToolBoxControl::supportsService(const OUString& rServiceName) @@ -171,7 +173,7 @@ sal_Bool StylesPreviewToolBoxControl::supportsService(const OUString& rServiceNa css::uno::Sequence<OUString> StylesPreviewToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index d7f46bda4318..153ad3c09661 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -133,7 +133,7 @@ StylePreviewCache::JsonStylePreviewCacheClear StylePreviewCache::gJsonIdleClear; StyleStatusListener::StyleStatusListener( StylesPreviewWindow_Base* pPreviewControl, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) - : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, ".uno:ParaStyle") + : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, u".uno:ParaStyle"_ustr) , m_pPreviewControl(pPreviewControl) { ReBind(); @@ -201,8 +201,8 @@ bool StylesPreviewWindow_Base::Command(const CommandEvent& rEvent) return false; std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(m_xStylesView.get(), "svx/ui/stylemenu.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + Application::CreateBuilder(m_xStylesView.get(), u"svx/ui/stylemenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); OUString rIdent = xMenu->popup_at_rect(m_xStylesView.get(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1))); if (rIdent == "update" || rIdent == "edit") @@ -211,10 +211,9 @@ bool StylesPreviewWindow_Base::Command(const CommandEvent& rEvent) const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, - rIdent == "update" ? OUString(".uno:StyleUpdateByExample") - : OUString(".uno:EditStyle"), - aArgs); + SfxToolBoxControl::Dispatch( + xProvider, + rIdent == "update" ? u".uno:StyleUpdateByExample"_ustr : u".uno:EditStyle"_ustr, aArgs); return true; } @@ -447,7 +446,7 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base( weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XFrame>& xFrame) : m_xFrame(xFrame) - , m_xStylesView(xBuilder.weld_icon_view("stylesview")) + , m_xStylesView(xBuilder.weld_icon_view(u"stylesview"_ustr)) , m_aUpdateTask(*this) , m_aDefaultStyles(std::move(aDefaultStyles)) { @@ -473,12 +472,12 @@ IMPL_LINK(StylesPreviewWindow_Base, Selected, weld::IconView&, rIconView, void) OUString sStyleName = rIconView.get_selected_text(); css::uno::Sequence<css::beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("Template", sStyleName), - comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para)) + comphelper::makePropertyValue(u"Template"_ustr, sStyleName), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16(SfxStyleFamily::Para)) }; const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleApply", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleApply"_ustr, aArgs); } IMPL_LINK(StylesPreviewWindow_Base, DoubleClick, weld::IconView&, rIconView, bool) @@ -486,12 +485,12 @@ IMPL_LINK(StylesPreviewWindow_Base, DoubleClick, weld::IconView&, rIconView, boo OUString sStyleName = rIconView.get_selected_text(); css::uno::Sequence<css::beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("Param", sStyleName), - comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para)) + comphelper::makePropertyValue(u"Param"_ustr, sStyleName), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16(SfxStyleFamily::Para)) }; const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:EditStyle", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:EditStyle"_ustr, aArgs); return true; } @@ -552,7 +551,7 @@ static OString extractPngString(const BitmapEx& rBitmap) SvMemoryStream aOStm(65535, 65535); // Use fastest compression "1" css::uno::Sequence<css::beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("Compression", sal_Int32(1)), + comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(1)), }; vcl::PngImageWriter aPNGWriter(aOStm); aPNGWriter.setParameters(aFilterData); @@ -661,7 +660,7 @@ void StylesPreviewWindow_Base::UpdateStylesList() StylesPreviewWindow_Impl::StylesPreviewWindow_Impl( vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XFrame>& xFrame) - : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", true, + : InterimItemWindow(pParent, u"svx/ui/stylespreview.ui"_ustr, u"ApplyStyleBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) , StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xFrame) { diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index e72ab98598d6..ca65798f9a34 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -84,7 +84,7 @@ void SvxColorValueSet::addEntriesForColorSet(const std::set<Color>& rColorSet, s { for(const auto& rColor : rColorSet) { - InsertItem(nStartIndex, rColor, ""); + InsertItem(nStartIndex, rColor, u""_ustr); nStartIndex++; } } diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx index bbbfa7363452..2e8c71af3902 100644 --- a/svx/source/tbxctrls/SvxPresetListBox.cxx +++ b/svx/source/tbxctrls/SvxPresetListBox.cxx @@ -53,8 +53,8 @@ bool SvxPresetListBox::Command(const CommandEvent& rEvent) if (nIndex > 0) { std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(GetDrawingArea(), "svx/ui/presetmenu.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + Application::CreateBuilder(GetDrawingArea(), u"svx/ui/presetmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); OnMenuItemSelected(xMenu->popup_at_rect( GetDrawingArea(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1)))); return true; diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index e7ccc6238800..f6ca64be5bdb 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -65,12 +65,12 @@ public: NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, weld::Widget* pParent, NumberingPageType ePageType) - : WeldToolbarPopup(rController.getFrameInterface(), pParent, "svx/ui/numberingwindow.ui", "NumberingWindow") + : WeldToolbarPopup(rController.getFrameInterface(), pParent, u"svx/ui/numberingwindow.ui"_ustr, u"NumberingWindow"_ustr) , mePageType(ePageType) , mrController(rController) - , mxValueSet(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet)) - , mxMoreButton(m_xBuilder->weld_button("more")) + , mxValueSet(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxValueSet)) + , mxMoreButton(m_xBuilder->weld_button(u"more"_ustr)) { mxValueSet->SetStyle(WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NO_DIRECTSELECT); mxValueSet->init(mePageType); @@ -108,13 +108,13 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFieldColor()); if ( mePageType == NumberingPageType::BULLET ) - AddStatusListener( ".uno:CurrentBulletListType" ); + AddStatusListener( u".uno:CurrentBulletListType"_ustr ); else if ( mePageType == NumberingPageType::SINGLENUM ) - AddStatusListener( ".uno:CurrentNumListType" ); + AddStatusListener( u".uno:CurrentNumListType"_ustr ); else - AddStatusListener( ".uno:CurrentOutlineType" ); + AddStatusListener( u".uno:CurrentOutlineType"_ustr ); - auto xImage = vcl::CommandInfoProvider::GetXGraphicForCommand(".uno:OutlineBullet", mrController.getFrameInterface()); + auto xImage = vcl::CommandInfoProvider::GetXGraphicForCommand(u".uno:OutlineBullet"_ustr, mrController.getFrameInterface()); mxMoreButton->set_image(xImage); mxMoreButton->connect_clicked(LINK(this, NumberingPopup, VSButtonClickSetHdl)); @@ -136,17 +136,17 @@ IMPL_LINK_NOARG(NumberingPopup, VSSelectValueSetHdl, ValueSet*, void) if ( mePageType == NumberingPageType::BULLET ) { auto aArgs( comphelper::InitPropertySequence( { { "SetBullet", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetBullet", aArgs ); + mrController.dispatchCommand( u".uno:SetBullet"_ustr, aArgs ); } else if ( mePageType == NumberingPageType::SINGLENUM ) { auto aArgs( comphelper::InitPropertySequence( { { "SetNumber", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetNumber", aArgs ); + mrController.dispatchCommand( u".uno:SetNumber"_ustr, aArgs ); } else { auto aArgs( comphelper::InitPropertySequence( { { "SetOutline", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetOutline", aArgs ); + mrController.dispatchCommand( u".uno:SetOutline"_ustr, aArgs ); } mrController.EndPopupMode(); } @@ -158,8 +158,8 @@ void NumberingPopup::GrabFocus() IMPL_LINK_NOARG(NumberingPopup, VSButtonClickSetHdl, weld::Button&, void) { - auto aArgs( comphelper::InitPropertySequence( { { "Page", css::uno::Any( OUString("customize") ) } } ) ); - mrController.dispatchCommand( ".uno:OutlineBullet", aArgs ); + auto aArgs( comphelper::InitPropertySequence( { { "Page", css::uno::Any( u"customize"_ustr ) } } ) ); + mrController.dispatchCommand( u".uno:OutlineBullet"_ustr, aArgs ); mrController.EndPopupMode(); } @@ -214,12 +214,12 @@ void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css OUString SAL_CALL NumberingToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.NumberingToolBoxControl"; + return u"com.sun.star.comp.svx.NumberingToolBoxControl"_ustr; } css::uno::Sequence< OUString > SAL_CALL NumberingToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index da2a83be8198..22bd359d7de5 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -167,8 +167,8 @@ bool SvxColorValueSet_docking::StartDrag() color.QueryValue(c, 0); style.QueryValue(s, 0); - uno::Sequence<beans::NamedValue> props{ { "FillColor", std::move(c) }, - { "FillStyle", std::move(s) } }; + uno::Sequence<beans::NamedValue> props{ { u"FillColor"_ustr, std::move(c) }, + { u"FillStyle"_ustr, std::move(s) } }; m_xHelper->SetData(props); return false; @@ -179,9 +179,9 @@ constexpr sal_uInt16 gnRightSlot = SID_ATTR_LINE_COLOR; SvxColorDockingWindow::SvxColorDockingWindow(SfxBindings* _pBindings, SfxChildWindow* pCW, vcl::Window* _pParent) : SfxDockingWindow(_pBindings, pCW, _pParent, - "DockingColorWindow", "svx/ui/dockingcolorwindow.ui") - , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , xColorSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *xColorSet)) + u"DockingColorWindow"_ustr, u"svx/ui/dockingcolorwindow.ui"_ustr) + , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , xColorSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *xColorSet)) { SetText(SvxResId(STR_COLORTABLE)); SetQuickHelpText(SvxResId(RID_SVXSTR_COLORBAR)); diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 99cb6ec7808f..54e4f7eb9c7b 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -114,12 +114,12 @@ static TranslateId aDirectionStrs[] = ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/directionwindow.ui", "DirectionWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/directionwindow.ui"_ustr, u"DirectionWindow"_ustr) , mxControl(pControl) , mxDirectionSet(new ValueSet(nullptr)) - , mxDirectionSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxDirectionSet)) - , mxPerspective(m_xBuilder->weld_radio_button("perspective")) - , mxParallel(m_xBuilder->weld_radio_button("parallel")) + , mxDirectionSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxDirectionSet)) + , mxPerspective(m_xBuilder->weld_radio_button(u"perspective"_ustr)) + , mxParallel(m_xBuilder->weld_radio_button(u"parallel"_ustr)) { mxDirectionSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); @@ -249,7 +249,7 @@ ExtrusionDirectionControl::ExtrusionDirectionControl( ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDirectionFloater" + u".uno:ExtrusionDirectionFloater"_ustr ) { } @@ -285,13 +285,13 @@ void SAL_CALL ExtrusionDirectionControl::initialize( const css::uno::Sequence< c OUString ExtrusionDirectionControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionDirectionController"; + return u"com.sun.star.comp.svx.ExtrusionDirectionController"_ustr; } Sequence< OUString > ExtrusionDirectionControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -305,8 +305,8 @@ com_sun_star_comp_svx_ExtrusionDirectionControl_get_implementation( ExtrusionDepthDialog::ExtrusionDepthDialog(weld::Window* pParent, double fDepth, FieldUnit eDefaultUnit) - : GenericDialogController(pParent, "svx/ui/extrustiondepthdialog.ui", "ExtrustionDepthDialog") - , m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", eDefaultUnit)) + : GenericDialogController(pParent, u"svx/ui/extrustiondepthdialog.ui"_ustr, u"ExtrustionDepthDialog"_ustr) + , m_xMtrDepth(m_xBuilder->weld_metric_spin_button(u"depth"_ustr, eDefaultUnit)) { m_xMtrDepth->set_value(static_cast<int>(fDepth) * 100, FieldUnit::MM_100TH); } @@ -327,15 +327,15 @@ constexpr OUString gsExtrusionDepth( u".uno:ExtrusionDepth"_ustr ); constexpr OUString gsMetricUnit( u".uno:MetricUnit"_ustr ); ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/depthwindow.ui", "DepthWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/depthwindow.ui"_ustr, u"DepthWindow"_ustr) , mxControl(pControl) - , mxDepth0(m_xBuilder->weld_radio_button("depth0")) - , mxDepth1(m_xBuilder->weld_radio_button("depth1")) - , mxDepth2(m_xBuilder->weld_radio_button("depth2")) - , mxDepth3(m_xBuilder->weld_radio_button("depth3")) - , mxDepth4(m_xBuilder->weld_radio_button("depth4")) - , mxInfinity(m_xBuilder->weld_radio_button("infinity")) - , mxCustom(m_xBuilder->weld_radio_button("custom")) + , mxDepth0(m_xBuilder->weld_radio_button(u"depth0"_ustr)) + , mxDepth1(m_xBuilder->weld_radio_button(u"depth1"_ustr)) + , mxDepth2(m_xBuilder->weld_radio_button(u"depth2"_ustr)) + , mxDepth3(m_xBuilder->weld_radio_button(u"depth3"_ustr)) + , mxDepth4(m_xBuilder->weld_radio_button(u"depth4"_ustr)) + , mxInfinity(m_xBuilder->weld_radio_button(u"infinity"_ustr)) + , mxCustom(m_xBuilder->weld_radio_button(u"custom"_ustr)) , meUnit(FieldUnit::NONE) , mfDepth( -1.0 ) , mbSettingValue(false) @@ -446,13 +446,13 @@ void ExtrusionDepthWindow::statusChanged( void ExtrusionDepthWindow::DispatchDepthDialog() { Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("Depth", mfDepth), - comphelper::makePropertyValue("Metric", static_cast<sal_Int32>( meUnit )) + comphelper::makePropertyValue(u"Depth"_ustr, mfDepth), + comphelper::makePropertyValue(u"Metric"_ustr, static_cast<sal_Int32>( meUnit )) }; rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode(); - xControl->dispatchCommand(".uno:ExtrusionDepthDialog", aArgs); + xControl->dispatchCommand(u".uno:ExtrusionDepthDialog"_ustr, aArgs); mbCommandDispatched = true; } @@ -529,7 +529,7 @@ ExtrusionDepthController::ExtrusionDepthController( ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDepthFloater" + u".uno:ExtrusionDepthFloater"_ustr ) { } @@ -565,13 +565,13 @@ void SAL_CALL ExtrusionDepthController::initialize( const css::uno::Sequence< cs OUString ExtrusionDepthController::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionDepthController"; + return u"com.sun.star.comp.svx.ExtrusionDepthController"_ustr; } Sequence< OUString > ExtrusionDepthController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -589,13 +589,13 @@ constexpr OUString g_sExtrusionLightingIntensity = u".uno:ExtrusionLightingInten ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/lightingwindow.ui", "LightingWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/lightingwindow.ui"_ustr, u"LightingWindow"_ustr) , mxControl(pControl) , mxLightingSet(new ValueSet(nullptr)) - , mxLightingSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLightingSet)) - , mxBright(m_xBuilder->weld_radio_button("bright")) - , mxNormal(m_xBuilder->weld_radio_button("normal")) - , mxDim(m_xBuilder->weld_radio_button("dim")) + , mxLightingSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLightingSet)) + , mxBright(m_xBuilder->weld_radio_button(u"bright"_ustr)) + , mxNormal(m_xBuilder->weld_radio_button(u"normal"_ustr)) + , mxDim(m_xBuilder->weld_radio_button(u"dim"_ustr)) { mxLightingSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); @@ -762,7 +762,7 @@ ExtrusionLightingControl::ExtrusionLightingControl( const Reference< XComponentContext >& rxContext ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDirectionFloater" + u".uno:ExtrusionDirectionFloater"_ustr ) { } @@ -798,13 +798,13 @@ void SAL_CALL ExtrusionLightingControl::initialize( const css::uno::Sequence< cs OUString ExtrusionLightingControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionLightingController"; + return u"com.sun.star.comp.svx.ExtrusionLightingController"_ustr; } Sequence< OUString > ExtrusionLightingControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -820,13 +820,13 @@ com_sun_star_comp_svx_ExtrusionLightingControl_get_implementation( constexpr OUString g_sExtrusionSurface = u".uno:ExtrusionSurface"_ustr; ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/surfacewindow.ui", "SurfaceWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/surfacewindow.ui"_ustr, u"SurfaceWindow"_ustr) , mxControl(pControl) - , mxWireFrame(m_xBuilder->weld_radio_button("wireframe")) - , mxMatt(m_xBuilder->weld_radio_button("matt")) - , mxPlastic(m_xBuilder->weld_radio_button("plastic")) - , mxMetal(m_xBuilder->weld_radio_button("metal")) - , mxMetalMSO(m_xBuilder->weld_radio_button("metalMSO")) + , mxWireFrame(m_xBuilder->weld_radio_button(u"wireframe"_ustr)) + , mxMatt(m_xBuilder->weld_radio_button(u"matt"_ustr)) + , mxPlastic(m_xBuilder->weld_radio_button(u"plastic"_ustr)) + , mxMetal(m_xBuilder->weld_radio_button(u"metal"_ustr)) + , mxMetalMSO(m_xBuilder->weld_radio_button(u"metalMSO"_ustr)) { mxWireFrame->connect_toggled(LINK(this, ExtrusionSurfaceWindow, SelectHdl)); mxMatt->connect_toggled(LINK(this, ExtrusionSurfaceWindow, SelectHdl)); @@ -908,7 +908,7 @@ ExtrusionSurfaceControl::ExtrusionSurfaceControl( : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionSurfaceFloater" + u".uno:ExtrusionSurfaceFloater"_ustr ) { } @@ -944,13 +944,13 @@ void SAL_CALL ExtrusionSurfaceControl::initialize( const css::uno::Sequence< css OUString ExtrusionSurfaceControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionSurfaceController"; + return u"com.sun.star.comp.svx.ExtrusionSurfaceController"_ustr; } Sequence< OUString > ExtrusionSurfaceControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index e044055e8904..23177914578f 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -88,14 +88,14 @@ SvxFillToolBoxControl::SvxFillToolBoxControl( , mnLastPosBitmap(0) , mnLastPosPattern(0) { - addStatusListener( ".uno:FillColor"); - addStatusListener( ".uno:FillGradient"); - addStatusListener( ".uno:FillHatch"); - addStatusListener( ".uno:FillBitmap"); - addStatusListener( ".uno:ColorTableState"); - addStatusListener( ".uno:GradientListState"); - addStatusListener( ".uno:HatchListState"); - addStatusListener( ".uno:BitmapListState"); + addStatusListener( u".uno:FillColor"_ustr); + addStatusListener( u".uno:FillGradient"_ustr); + addStatusListener( u".uno:FillHatch"_ustr); + addStatusListener( u".uno:FillBitmap"_ustr); + addStatusListener( u".uno:ColorTableState"_ustr); + addStatusListener( u".uno:GradientListState"_ustr); + addStatusListener( u".uno:HatchListState"_ustr); + addStatusListener( u".uno:BitmapListState"_ustr); } SvxFillToolBoxControl::~SvxFillToolBoxControl() @@ -405,7 +405,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - rtl::Reference<XGradientList> xGradientList = new XGradientList( "", ""/*TODO?*/ ); + rtl::Reference<XGradientList> xGradientList = new XGradientList( u""_ustr, u""_ustr/*TODO?*/ ); xGradientList->Insert(std::make_unique<XGradientEntry>(mpFillGradientItem->GetGradientValue(), aTmpStr)); xGradientList->SetDirty( false ); const BitmapEx aBmp = xGradientList->GetUiBitmap( 0 ); @@ -416,7 +416,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", xGradientList->Get(0)->GetName(), *pVD); + mpLbFillAttr->append(u""_ustr, xGradientList->Get(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } @@ -468,7 +468,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - rtl::Reference<XHatchList> xHatchList = new XHatchList( "", ""/*TODO?*/ ); + rtl::Reference<XHatchList> xHatchList = new XHatchList( u""_ustr, u""_ustr/*TODO?*/ ); xHatchList->Insert(std::make_unique<XHatchEntry>(mpHatchItem->GetHatchValue(), aTmpStr)); xHatchList->SetDirty( false ); const BitmapEx & aBmp = xHatchList->GetUiBitmap( 0 ); @@ -479,7 +479,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", xHatchList->GetHatch(0)->GetName(), *pVD); + mpLbFillAttr->append(u""_ustr, xHatchList->GetHatch(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } @@ -534,7 +534,7 @@ void SvxFillToolBoxControl::Update() XBitmapListRef xBitmapList = XPropertyList::AsBitmapList( XPropertyList::CreatePropertyList( - XPropertyListType::Bitmap, "TmpList", ""/*TODO?*/)); + XPropertyListType::Bitmap, u"TmpList"_ustr, u""_ustr/*TODO?*/)); xBitmapList->Insert(std::make_unique<XBitmapEntry>(mpBitmapItem->GetGraphicObject(), aTmpStr)); xBitmapList->SetDirty( false ); SvxFillAttrBox::Fill(*mpLbFillAttr, xBitmapList); @@ -590,11 +590,11 @@ VclPtr<InterimItemWindow> SvxFillToolBoxControl::CreateItemWindow(vcl::Window *p } FillControl::FillControl(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame) - : InterimItemWindow(pParent, "svx/ui/fillctrlbox.ui", "FillCtrlBox") - , mxLbFillType(m_xBuilder->weld_combo_box("type")) - , mxToolBoxColor(m_xBuilder->weld_toolbar("color")) + : InterimItemWindow(pParent, u"svx/ui/fillctrlbox.ui"_ustr, u"FillCtrlBox"_ustr) + , mxLbFillType(m_xBuilder->weld_combo_box(u"type"_ustr)) + , mxToolBoxColor(m_xBuilder->weld_toolbar(u"color"_ustr)) , mxColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxColor, *m_xBuilder, rFrame)) - , mxLbFillAttr(m_xBuilder->weld_combo_box("attr")) + , mxLbFillAttr(m_xBuilder->weld_combo_box(u"attr"_ustr)) , mnTypeCurPos(0) , mnAttrCurPos(0) { @@ -735,7 +735,7 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillTypeHdl, weld::ComboBox&, void) if (pSh) { const ::Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO; - const XFillColorItem aXFillColorItem( "", aColor ); + const XFillColorItem aXFillColorItem( u""_ustr, aColor ); // #i122676# change FillStyle and Color in one call pSh->GetDispatcher()->ExecuteList( @@ -1087,7 +1087,7 @@ void FillControl::GetFocus() { // tdf#148047 if the dropdown is active then leave the focus // there and don't grab back to a different widget - if (mxToolBoxColor->get_menu_item_active(".uno:FillColor")) + if (mxToolBoxColor->get_menu_item_active(u".uno:FillColor"_ustr)) return; InterimItemWindow::GetFocus(); } diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 416595c96b5d..7e54f1a3f932 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -60,13 +60,13 @@ namespace svx FontWorkGalleryDialog::FontWorkGalleryDialog(weld::Window* pParent, SdrView& rSdrView, Reference<css::frame::XFrame> xFrame) - : GenericDialogController(pParent, "svx/ui/fontworkgallerydialog.ui", "FontworkGalleryDialog") + : GenericDialogController(pParent, u"svx/ui/fontworkgallerydialog.ui"_ustr, u"FontworkGalleryDialog"_ustr) , mnThemeId(0xffff) , mrSdrView(rSdrView) , mbInsertIntoPage(true) , mpDestModel(nullptr) - , maCtlFavorites(m_xBuilder->weld_icon_view("ctlFavoriteswin")) - , mxOKButton(m_xBuilder->weld_button("ok")) + , maCtlFavorites(m_xBuilder->weld_icon_view(u"ctlFavoriteswin"_ustr)) + , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr)) , mxFrame(std::move(xFrame)) { Size aSize(530, 400); @@ -324,12 +324,12 @@ private: constexpr OUString gsFontworkAlignment(u".uno:FontworkAlignment"_ustr); FontworkAlignmentWindow::FontworkAlignmentWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkalignmentcontrol.ui", "FontworkAlignmentControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/fontworkalignmentcontrol.ui"_ustr, u"FontworkAlignmentControl"_ustr) , mxControl(pControl) - , mxLeft(m_xBuilder->weld_radio_button("left")) - , mxCenter(m_xBuilder->weld_radio_button("center")) - , mxRight(m_xBuilder->weld_radio_button("right")) - , mxStretch(m_xBuilder->weld_radio_button("stretch")) + , mxLeft(m_xBuilder->weld_radio_button(u"left"_ustr)) + , mxCenter(m_xBuilder->weld_radio_button(u"center"_ustr)) + , mxRight(m_xBuilder->weld_radio_button(u"right"_ustr)) + , mxStretch(m_xBuilder->weld_radio_button(u"stretch"_ustr)) , mbSettingValue(false) { mxLeft->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl)); @@ -424,7 +424,7 @@ public: } FontworkAlignmentControl::FontworkAlignmentControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), ".uno:FontworkAlignment" ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), u".uno:FontworkAlignment"_ustr ) { } @@ -465,13 +465,13 @@ void SAL_CALL FontworkAlignmentControl::initialize( const css::uno::Sequence< cs OUString FontworkAlignmentControl::getImplementationName() { - return "com.sun.star.comp.svx.FontworkAlignmentController"; + return u"com.sun.star.comp.svx.FontworkAlignmentController"_ustr; } Sequence< OUString > FontworkAlignmentControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -520,15 +520,15 @@ constexpr OUString gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing"_u constexpr OUString gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs"_ustr); FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkcharacterspacingcontrol.ui", "FontworkCharacterSpacingControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/fontworkcharacterspacingcontrol.ui"_ustr, u"FontworkCharacterSpacingControl"_ustr) , mxControl(pControl) - , mxVeryTight(m_xBuilder->weld_radio_button("verytight")) - , mxTight(m_xBuilder->weld_radio_button("tight")) - , mxNormal(m_xBuilder->weld_radio_button("normal")) - , mxLoose(m_xBuilder->weld_radio_button("loose")) - , mxVeryLoose(m_xBuilder->weld_radio_button("veryloose")) - , mxCustom(m_xBuilder->weld_radio_button("custom")) - , mxKernPairs(m_xBuilder->weld_check_button("kernpairs")) + , mxVeryTight(m_xBuilder->weld_radio_button(u"verytight"_ustr)) + , mxTight(m_xBuilder->weld_radio_button(u"tight"_ustr)) + , mxNormal(m_xBuilder->weld_radio_button(u"normal"_ustr)) + , mxLoose(m_xBuilder->weld_radio_button(u"loose"_ustr)) + , mxVeryLoose(m_xBuilder->weld_radio_button(u"veryloose"_ustr)) + , mxCustom(m_xBuilder->weld_radio_button(u"custom"_ustr)) + , mxKernPairs(m_xBuilder->weld_check_button(u"kernpairs"_ustr)) , mnCharacterSpacing(0) , mbSettingValue(false) , mbCommandDispatched(false) @@ -659,7 +659,7 @@ void FontworkCharacterSpacingWindow::DispatchSpacingDialog() rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode(); - xControl->dispatchCommand(".uno:FontworkCharacterSpacingDialog", aArgs); + xControl->dispatchCommand(u".uno:FontworkCharacterSpacingDialog"_ustr, aArgs); mbCommandDispatched = true; } @@ -744,7 +744,7 @@ public: } FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), ".uno:FontworkCharacterSpacingFloater" ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), u".uno:FontworkCharacterSpacingFloater"_ustr ) { } @@ -785,13 +785,13 @@ void SAL_CALL FontworkCharacterSpacingControl::initialize( const css::uno::Seque OUString FontworkCharacterSpacingControl::getImplementationName() { - return "com.sun.star.comp.svx.FontworkCharacterSpacingController"; + return u"com.sun.star.comp.svx.FontworkCharacterSpacingController"_ustr; } Sequence< OUString > FontworkCharacterSpacingControl::getSupportedServiceNames() { - Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; + Sequence<OUString> aSNS { u"com.sun.star.frame.ToolbarController"_ustr }; return aSNS; } @@ -805,8 +805,8 @@ com_sun_star_comp_svx_FontworkCharacterSpacingControl_get_implementation( } FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog(weld::Window* pParent, sal_Int32 nScale) - : GenericDialogController(pParent, "svx/ui/fontworkspacingdialog.ui", "FontworkSpacingDialog") - , m_xMtrScale(m_xBuilder->weld_metric_spin_button("entry", FieldUnit::PERCENT)) + : GenericDialogController(pParent, u"svx/ui/fontworkspacingdialog.ui"_ustr, u"FontworkSpacingDialog"_ustr) + , m_xMtrScale(m_xBuilder->weld_metric_spin_button(u"entry"_ustr, FieldUnit::PERCENT)) { m_xMtrScale->set_value(nScale, FieldUnit::PERCENT); } diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index f67efd12c701..a10040988fab 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -55,9 +55,9 @@ FormatPaintBrushToolBoxControl::~FormatPaintBrushToolBoxControl() void FormatPaintBrushToolBoxControl::impl_executePaintBrush() { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("PersistentCopy", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"PersistentCopy"_ustr, m_bPersistentCopy) }; - Dispatch( ".uno:FormatPaintbrush" + Dispatch( u".uno:FormatPaintbrush"_ustr , aArgs ); } diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 39e974fa0c2a..6ddb8450657a 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -193,11 +193,11 @@ ImplGrafControl::ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame) - : InterimItemWindow(pParent, "svx/ui/grafctrlbox.ui", "GrafCtrlBox") + : InterimItemWindow(pParent, u"svx/ui/grafctrlbox.ui"_ustr, u"GrafCtrlBox"_ustr) , maCommand(rCmd) , mxFrame(rFrame) - , mxImage(m_xBuilder->weld_image("image")) - , mxField(m_xBuilder->weld_metric_spin_button("spinfield", FieldUnit::NONE)) + , mxImage(m_xBuilder->weld_image(u"image"_ustr)) + , mxField(m_xBuilder->weld_metric_spin_button(u"spinfield"_ustr, FieldUnit::NONE)) { InitControlBase(&mxField->get_widget()); @@ -286,10 +286,10 @@ public: } ImplGrafModeControl::ImplGrafModeControl(vcl::Window* pParent, const Reference<XFrame>& rFrame) - : InterimItemWindow(pParent, "svx/ui/grafmodebox.ui", "GrafModeBox") + : InterimItemWindow(pParent, u"svx/ui/grafmodebox.ui"_ustr, u"GrafModeBox"_ustr) , mnCurPos(0) , mxFrame(rFrame) - , m_xWidget(m_xBuilder->weld_combo_box("grafmode")) + , m_xWidget(m_xBuilder->weld_combo_box(u"grafmode"_ustr)) { InitControlBase(m_xWidget.get()); @@ -318,7 +318,7 @@ ImplGrafModeControl::~ImplGrafModeControl() IMPL_LINK(ImplGrafModeControl, SelectHdl, weld::ComboBox&, rBox, void) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("GrafMode", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"GrafMode"_ustr, sal_Int16(rBox.get_active())) }; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -328,7 +328,7 @@ IMPL_LINK(ImplGrafModeControl, SelectHdl, weld::ComboBox&, rBox, void) SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), - ".uno:GrafMode", + u".uno:GrafMode"_ustr, aArgs ); } diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 4fd4086fe0a5..30a1b66d173e 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -47,8 +47,8 @@ using namespace ::com::sun::star::beans; SvxMetricField::SvxMetricField( vcl::Window* pParent, const Reference< XFrame >& rFrame ) - : InterimItemWindow(pParent, "svx/ui/metricfieldbox.ui", "MetricFieldBox") - , m_xWidget(m_xBuilder->weld_metric_spin_button("metricfield", FieldUnit::MM)) + : InterimItemWindow(pParent, u"svx/ui/metricfieldbox.ui"_ustr, u"MetricFieldBox"_ustr) + , m_xWidget(m_xBuilder->weld_metric_spin_button(u"metricfield"_ustr, FieldUnit::MM)) , nCurValue(0) , eDestPoolUnit(MapUnit::Map100thMM) , eDlgUnit(SfxModule::GetModuleFieldUnit(rFrame)) @@ -82,7 +82,7 @@ void SvxMetricField::set_sensitive(bool bSensitive) Enable(bSensitive); m_xWidget->set_sensitive(bSensitive); if (!bSensitive) - m_xWidget->set_text(""); + m_xWidget->set_text(u""_ustr); } void SvxMetricField::Update( const XLineWidthItem* pItem ) @@ -95,7 +95,7 @@ void SvxMetricField::Update( const XLineWidthItem* pItem ) SetMetricValue(*m_xWidget, pItem->GetValue(), MapUnit::Map100thMM); } else - m_xWidget->set_text(""); + m_xWidget->set_text(u""_ustr); } IMPL_LINK_NOARG(SvxMetricField, ModifyHdl, weld::MetricSpinButton&, void) @@ -105,9 +105,9 @@ IMPL_LINK_NOARG(SvxMetricField, ModifyHdl, weld::MetricSpinButton&, void) Any a; aLineWidthItem.QueryValue( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineWidth", a) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineWidth"_ustr, a) }; SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), - ".uno:LineWidth", + u".uno:LineWidth"_ustr, aArgs ); } @@ -258,7 +258,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XHatchListRef &pList) const Size aBmpSize(aBitmapEx.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } else rBox.append_text(pEntry->GetName()); @@ -285,7 +285,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XGradientListRef &pList) const Size aBmpSize(aBitmapEx.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } else rBox.append_text(pEntry->GetName()); @@ -312,7 +312,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XBitmapListRef &pList) BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(aBitmapEx, aSize); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } rBox.thaw(); @@ -336,7 +336,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XPatternListRef &pList) BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(aBitmapEx, aSize); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } rBox.thaw(); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 88dd401555d4..261c012c8287 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -110,10 +110,10 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl, weld::Button&, void) } TableWindow::TableWindow(SvxTableToolBoxControl* pControl, weld::Widget* pParent, const OUString& rCmd) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/tablewindow.ui", "TableWindow") - , mxTableButton(m_xBuilder->weld_button("moreoptions")) + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/tablewindow.ui"_ustr, u"TableWindow"_ustr) + , mxTableButton(m_xBuilder->weld_button(u"moreoptions"_ustr)) , mxTableWidget(new TableWidget(pControl, rCmd)) - , mxTableWidgetWin(new weld::CustomWeld(*m_xBuilder, "table", *mxTableWidget)) + , mxTableWidgetWin(new weld::CustomWeld(*m_xBuilder, u"table"_ustr, *mxTableWidget)) , mxControl(pControl) { mxTableButton->set_label( SvxResId( RID_SVXSTR_MORE ) ); @@ -337,8 +337,8 @@ void TableWidget::InsertTable() { if (nCol && nLine) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("Columns", sal_Int16( nCol )), - comphelper::makePropertyValue("Rows", sal_Int16( nLine )) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"Columns"_ustr, sal_Int16( nCol )), + comphelper::makePropertyValue(u"Rows"_ustr, sal_Int16( nLine )) }; mxControl->TableDialog( aArgs ); } @@ -442,10 +442,10 @@ public: } ColumnsWindow::ColumnsWindow(SvxColumnsToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/columnswindow.ui", "ColumnsWindow") - , mxSpinButton(m_xBuilder->weld_spin_button("spinbutton")) + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/columnswindow.ui"_ustr, u"ColumnsWindow"_ustr) + , mxSpinButton(m_xBuilder->weld_spin_button(u"spinbutton"_ustr)) , mxColumnsWidget(new ColumnsWidget(pControl, *mxSpinButton)) - , mxColumnsWidgetWin(new weld::CustomWeld(*m_xBuilder, "columns", *mxColumnsWidget)) + , mxColumnsWidgetWin(new weld::CustomWeld(*m_xBuilder, u"columns"_ustr, *mxColumnsWidget)) , mxControl(pControl) { } @@ -672,8 +672,8 @@ void ColumnsWidget::InsertColumns() if (nCol) { Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("Columns", sal_Int16( nCol )), - comphelper::makePropertyValue("Modifier", sal_Int16( m_bMod1 ? KEY_MOD1 : 0 )) + comphelper::makePropertyValue(u"Columns"_ustr, sal_Int16( nCol )), + comphelper::makePropertyValue(u"Modifier"_ustr, sal_Int16( m_bMod1 ? KEY_MOD1 : 0 )) }; mxControl->InsertColumns(aArgs); } @@ -721,12 +721,12 @@ VclPtr<vcl::Window> SvxTableToolBoxControl::createVclPopupWindow( vcl::Window* p OUString SvxTableToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.TableToolBoxControl"; + return u"com.sun.star.comp.svx.TableToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxTableToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -779,12 +779,12 @@ VclPtr<vcl::Window> SvxColumnsToolBoxControl::createVclPopupWindow(vcl::Window* OUString SvxColumnsToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.ColumnsToolBoxControl"; + return u"com.sun.star.comp.svx.ColumnsToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxColumnsToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 6b0a3e32e43c..f814cc87c249 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -70,9 +70,9 @@ public: SvxPopupWindowListBox::SvxPopupWindowListBox(SvxUndoRedoControl* pControl, weld::Widget* pParent, const std::vector<OUString>& rUndoRedoList) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingundoredo.ui", "FloatingUndoRedo") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingundoredo.ui"_ustr, u"FloatingUndoRedo"_ustr) , m_xControl(pControl) - , m_xListBox(m_xBuilder->weld_tree_view("treeview")) + , m_xListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr)) , m_xScratchIter(m_xListBox->make_iterator()) , m_nVisRows(10) { @@ -301,9 +301,9 @@ void SAL_CALL SvxUndoRedoControl::statusChanged(const css::frame::FeatureStateEv std::unique_ptr<WeldToolbarPopup> SvxUndoRedoControl::weldPopupWindow() { if ( m_aCommandURL == ".uno:Undo" ) - updateStatus( ".uno:GetUndoStrings"); + updateStatus( u".uno:GetUndoStrings"_ustr); else - updateStatus( ".uno:GetRedoStrings"); + updateStatus( u".uno:GetRedoStrings"_ustr); return std::make_unique<SvxPopupWindowListBox>(this, m_pToolbar, aUndoRedoList); } @@ -311,9 +311,9 @@ std::unique_ptr<WeldToolbarPopup> SvxUndoRedoControl::weldPopupWindow() VclPtr<vcl::Window> SvxUndoRedoControl::createVclPopupWindow( vcl::Window* pParent ) { if ( m_aCommandURL == ".uno:Undo" ) - updateStatus( ".uno:GetUndoStrings"); + updateStatus( u".uno:GetUndoStrings"_ustr); else - updateStatus( ".uno:GetRedoStrings"); + updateStatus( u".uno:GetRedoStrings"_ustr); auto xPopupWin = std::make_unique<SvxPopupWindowListBox>(this, pParent->GetFrameWeld(), aUndoRedoList); @@ -329,12 +329,12 @@ VclPtr<vcl::Window> SvxUndoRedoControl::createVclPopupWindow( vcl::Window* pPare OUString SvxUndoRedoControl::getImplementationName() { - return "com.sun.star.comp.svx.UndoRedoToolBoxControl"; + return u"com.sun.star.comp.svx.UndoRedoToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxUndoRedoControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index b1264a5a8f67..a47665d1bde5 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star; SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ) : svt::PopupWindowController( rContext, nullptr, OUString() ) { - addStatusListener(".uno:LineDash"); + addStatusListener(u".uno:LineDash"_ustr); } SvxLineStyleToolBoxControl::~SvxLineStyleToolBoxControl() @@ -205,12 +205,12 @@ VclPtr<vcl::Window> SvxLineStyleToolBoxControl::createVclPopupWindow( vcl::Windo OUString SvxLineStyleToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.LineStyleToolBoxControl"; + return u"com.sun.star.comp.svx.LineStyleToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxLineStyleToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -271,10 +271,10 @@ public: constexpr sal_uInt16 gnCols = 2; SvxLineEndWindow::SvxLineEndWindow(SvxLineEndToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglineend.ui", "FloatingLineEnd") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatinglineend.ui"_ustr, u"FloatingLineEnd"_ustr) , mxControl(pControl) - , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxLineEndSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineEndSet)) + , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxLineEndSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLineEndSet)) , mnLines(12) { mxLineEndSet->SetStyle(mxLineEndSet->GetStyle() | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -296,7 +296,7 @@ SvxLineEndWindow::SvxLineEndWindow(SvxLineEndToolBoxControl* pControl, weld::Wid // ValueSet fill with entries of LineEndList FillValueSet(); - AddStatusListener( ".uno:LineEndListState"); + AddStatusListener( u".uno:LineEndListState"_ustr); } IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void) @@ -490,12 +490,12 @@ VclPtr<vcl::Window> SvxLineEndToolBoxControl::createVclPopupWindow( vcl::Window* OUString SvxLineEndToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.LineEndToolBoxControl"; + return u"com.sun.star.comp.svx.LineEndToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxLineEndToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -507,10 +507,10 @@ com_sun_star_comp_svx_LineEndToolBoxControl_get_implementation( } SvxLineBox::SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglinestyle.ui", "FloatingLineStyle") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatinglinestyle.ui"_ustr, u"FloatingLineStyle"_ustr) , mxControl(pControl) - , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxLineStyleSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineStyleSet)) + , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxLineStyleSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLineStyleSet)) { mxLineStyleSet->SetStyle(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -605,8 +605,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) Any a; aLineDashItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineDash", a) }; - mxControl->dispatchLineStyleCommand(".uno:LineDash", aArgs); + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineDash"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:LineDash"_ustr, aArgs); // set also cap style using the toolbar line style selection popup css::drawing::DashStyle eStyle = pEntry->GetDash().GetDashStyle(); @@ -615,8 +615,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) ? css::drawing::LineCap_BUTT : css::drawing::LineCap_ROUND ); aLineCapItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs2{ comphelper::makePropertyValue("LineCap", a) }; - mxControl->dispatchLineStyleCommand(".uno:LineCap", aArgs2); + Sequence< PropertyValue > aArgs2{ comphelper::makePropertyValue(u"LineCap"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:LineCap"_ustr, aArgs2); } } break; @@ -625,8 +625,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) XLineStyleItem aLineStyleItem( eXLS ); Any a; aLineStyleItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("XLineStyle", a) }; - mxControl->dispatchLineStyleCommand(".uno:XLineStyle", aArgs); + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"XLineStyle"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:XLineStyle"_ustr, aArgs); mxControl->EndPopupMode(); } diff --git a/svx/source/tbxctrls/linewidthctrl.cxx b/svx/source/tbxctrls/linewidthctrl.cxx index cbb5b64b600a..8d23f1ab3c69 100644 --- a/svx/source/tbxctrls/linewidthctrl.cxx +++ b/svx/source/tbxctrls/linewidthctrl.cxx @@ -34,7 +34,7 @@ SvxLineWidthToolBoxControl::SvxLineWidthToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { - addStatusListener( ".uno:MetricUnit"); + addStatusListener( u".uno:MetricUnit"_ustr); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 85d38fd0556e..309f3e403b94 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -350,7 +350,7 @@ protected: { Sequence< PropertyValue > aArgs; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharEndPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharEndPreviewFontName"_ustr, aArgs); } bool CheckFontIsAvailable(std::u16string_view fontname); @@ -870,8 +870,8 @@ SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget, OUString _aMoreKey, bool bInSpec, SvxStyleToolBoxControl& rCtrl) : m_rCtrl(rCtrl) - , m_xMenuBuilder(Application::CreateBuilder(nullptr, "svx/ui/stylemenu.ui")) - , m_xMenu(m_xMenuBuilder->weld_menu("menu")) + , m_xMenuBuilder(Application::CreateBuilder(nullptr, u"svx/ui/stylemenu.ui"_ustr)) + , m_xMenu(m_xMenuBuilder->weld_menu(u"menu"_ustr)) , m_xWidget(std::move(xWidget)) , eStyleFamily( eFamily ) , m_nMaxUserDrawFontWidth(0) @@ -914,13 +914,13 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent, const OUString& rClearFormatKey, const OUString& rMoreKey, bool bInSpec, SvxStyleToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/applystylebox.ui", "ApplyStyleBox") - , SvxStyleBox_Base(m_xBuilder->weld_combo_box("applystyle"), rCommand, eFamily, _xFrame, + : InterimItemWindow(pParent, u"svx/ui/applystylebox.ui"_ustr, u"ApplyStyleBox"_ustr) + , SvxStyleBox_Base(m_xBuilder->weld_combo_box(u"applystyle"_ustr), rCommand, eFamily, _xFrame, rClearFormatKey, rMoreKey, bInSpec, rCtrl) { InitControlBase(m_xWidget.get()); - set_id("applystyle"); + set_id(u"applystyle"_ustr); SetOptimalSize(); } @@ -943,18 +943,18 @@ IMPL_LINK(SvxStyleBox_Base, MenuSelectHdl, const OUString&, rMenuIdent, void) OUString sEntry = m_xWidget->get_text(m_nLastItemWithMenu); ReleaseFocus(); // It must be after getting entry pos! - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("Param", sEntry), - comphelper::makePropertyValue("Family", + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"Param"_ustr, sEntry), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16( eStyleFamily )) }; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); if (rMenuIdent == "update") { - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleUpdateByExample", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleUpdateByExample"_ustr, aArgs); } else if (rMenuIdent == "edit") { - SfxToolBoxControl::Dispatch(xProvider, ".uno:EditStyle", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:EditStyle"_ustr, aArgs); } } @@ -995,7 +995,7 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect) //not only apply default style but also call 'ClearFormatting' Sequence< PropertyValue > aEmptyVals; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:ResetAttributes", aEmptyVals); + SfxToolBoxControl::Dispatch(xProvider, u".uno:ResetAttributes"_ustr, aEmptyVals); } else if (aSearchEntry == aMoreKey && m_xWidget->get_active() == (m_xWidget->get_count() - 1)) { @@ -1052,7 +1052,7 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect) if( bCreateNew ) { pArgs[0].Name = "Param"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleNewByExample", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleNewByExample"_ustr, aArgs); } else { @@ -1718,9 +1718,9 @@ static bool lcl_GetDocFontList(const FontList** ppFontList, SvxFontNameBox_Base* SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr<weld::ComboBox> xWidget, const Reference<XFrame>& rFrame, SvxFontNameToolBoxControl& rCtrl) - : m_xListener(new comphelper::ConfigurationListener("/org.openoffice.Office.Common/Font/View")) - , m_aWYSIWYG(m_xListener, "ShowFontBoxWYSIWYG", *this) - , m_aHistory(m_xListener, "History", *this) + : m_xListener(new comphelper::ConfigurationListener(u"/org.openoffice.Office.Common/Font/View"_ustr)) + , m_aWYSIWYG(m_xListener, u"ShowFontBoxWYSIWYG"_ustr, *this) + , m_aHistory(m_xListener, u"History"_ustr, *this) , m_rCtrl(rCtrl) , m_xWidget(new FontNameBox(std::move(xWidget))) , pFontList(nullptr) @@ -1746,10 +1746,10 @@ SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr<weld::ComboBox> xWidget SvxFontNameBox_Impl::SvxFontNameBox_Impl(vcl::Window* pParent, const Reference<XFrame>& rFrame, SvxFontNameToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/fontnamebox.ui", "FontNameBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , SvxFontNameBox_Base(m_xBuilder->weld_combo_box("fontnamecombobox"), rFrame, rCtrl) + : InterimItemWindow(pParent, u"svx/ui/fontnamebox.ui"_ustr, u"FontNameBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) + , SvxFontNameBox_Base(m_xBuilder->weld_combo_box(u"fontnamecombobox"_ustr), rFrame, rCtrl) { - set_id("fontnamecombobox"); + set_id(u"fontnamecombobox"_ustr); SetOptimalSize(); } @@ -1889,7 +1889,7 @@ IMPL_LINK(SvxFontNameBox_Base, LivePreviewHdl, const FontMetric&, rFontMetric, v aFontItem.QueryValue(pArgs[0].Value); pArgs[0].Name = "CharPreviewFontName"; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharPreviewFontName"_ustr, aArgs); } IMPL_LINK_NOARG(SvxFontNameBox_Base, PopupToggledHdl, weld::ComboBox&, void) @@ -2004,7 +2004,7 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect) if (pFontItem) { pArgs[0].Name = "CharFontName"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharFontName"_ustr, aArgs); } } else @@ -2012,7 +2012,7 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect) if (pFontItem) { pArgs[0].Name = "CharPreviewFontName"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharPreviewFontName"_ustr, aArgs); } } } @@ -2051,7 +2051,7 @@ ColorWindow::ColorWindow(OUString rCommand, const MenuOrToolMenuButton& rMenuButton, TopLevelParentFunction aTopLevelParentFunction, ColorSelectFunction aColorSelectFunction) - : WeldToolbarPopup(rFrame, rMenuButton.get_widget(), "svx/ui/colorwindow.ui", "palette_popup_window") + : WeldToolbarPopup(rFrame, rMenuButton.get_widget(), u"svx/ui/colorwindow.ui"_ustr, u"palette_popup_window"_ustr) , theSlotId(nSlotId) , maCommand(std::move(rCommand)) , maMenuButton(rMenuButton) @@ -2059,15 +2059,15 @@ ColorWindow::ColorWindow(OUString rCommand, , mrColorStatus(rColorStatus) , maTopLevelParentFunction(std::move(aTopLevelParentFunction)) , maColorSelectFunction(std::move(aColorSelectFunction)) - , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true))) + , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window(u"colorsetwin"_ustr, true))) , mxRecentColorSet(new SvxColorValueSet(nullptr)) - , mxPaletteListBox(m_xBuilder->weld_combo_box("palette_listbox")) - , mxButtonAutoColor(m_xBuilder->weld_button("auto_color_button")) - , mxButtonNoneColor(m_xBuilder->weld_button("none_color_button")) - , mxButtonPicker(m_xBuilder->weld_button("color_picker_button")) - , mxAutomaticSeparator(m_xBuilder->weld_widget("separator4")) - , mxColorSetWin(new weld::CustomWeld(*m_xBuilder, "colorset", *mxColorSet)) - , mxRecentColorSetWin(new weld::CustomWeld(*m_xBuilder, "recent_colorset", *mxRecentColorSet)) + , mxPaletteListBox(m_xBuilder->weld_combo_box(u"palette_listbox"_ustr)) + , mxButtonAutoColor(m_xBuilder->weld_button(u"auto_color_button"_ustr)) + , mxButtonNoneColor(m_xBuilder->weld_button(u"none_color_button"_ustr)) + , mxButtonPicker(m_xBuilder->weld_button(u"color_picker_button"_ustr)) + , mxAutomaticSeparator(m_xBuilder->weld_widget(u"separator4"_ustr)) + , mxColorSetWin(new weld::CustomWeld(*m_xBuilder, u"colorset"_ustr, *mxColorSet)) + , mxRecentColorSetWin(new weld::CustomWeld(*m_xBuilder, u"recent_colorset"_ustr, *mxRecentColorSet)) , mpDefaultButton(nullptr) { mxColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) ); @@ -2143,12 +2143,12 @@ ColorWindow::ColorWindow(OUString rCommand, aSize = mxRecentColorSet->layoutAllVisible(mxPaletteManager->GetRecentColorCount()); mxRecentColorSet->set_size_request(aSize.Width(), aSize.Height()); - AddStatusListener( ".uno:ColorTableState" ); + AddStatusListener( u".uno:ColorTableState"_ustr ); AddStatusListener( maCommand ); if ( maCommand == ".uno:FrameLineColor" ) { - AddStatusListener( ".uno:BorderTLBR" ); - AddStatusListener( ".uno:BorderBLTR" ); + AddStatusListener( u".uno:BorderTLBR"_ustr ); + AddStatusListener( u".uno:BorderBLTR"_ustr ); } } @@ -2457,20 +2457,20 @@ Color ColorStatus::GetColor() SvxFrameWindow_Impl::SvxFrameWindow_Impl(SvxFrameToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingframeborder.ui", "FloatingFrameBorder") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingframeborder.ui"_ustr, u"FloatingFrameBorder"_ustr) , mxControl(pControl) , mxFrameSet(new SvxFrmValueSet_Impl) - , mxFrameSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxFrameSet)) + , mxFrameSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxFrameSet)) , bParagraphMode(false) , m_bIsWriter(false) { // check whether the document is Writer or not if (Reference<lang::XServiceInfo> xSI{ m_xFrame->getController()->getModel(), UNO_QUERY }) - m_bIsWriter = xSI->supportsService("com.sun.star.text.TextDocument"); + m_bIsWriter = xSI->supportsService(u"com.sun.star.text.TextDocument"_ustr); mxFrameSet->SetStyle(WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); - AddStatusListener(".uno:BorderReducedMode"); + AddStatusListener(u".uno:BorderReducedMode"_ustr); InitImageList(); /* @@ -2674,10 +2674,10 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl, ValueSet*, void) Any a1, a2; aBorderOuter.QueryValue( a1 ); aBorderInner.QueryValue( a2 ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("OuterBorder", a1), - comphelper::makePropertyValue("InnerBorder", a2) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"OuterBorder"_ustr, a1), + comphelper::makePropertyValue(u"InnerBorder"_ustr, a2) }; - mxControl->dispatchCommand( ".uno:SetBorderStyle", aArgs ); + mxControl->dispatchCommand( u".uno:SetBorderStyle"_ustr, aArgs ); } // coverity[ check_after_deref : FALSE] @@ -2697,9 +2697,9 @@ void SvxFrameWindow_Impl::SetDiagonalDownBorder(const SvxLineItem& dDownLineItem // apply diagonal down border Any a; dDownLineItem.QueryValue(a); - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("BorderTLBR", a) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"BorderTLBR"_ustr, a) }; - mxControl->dispatchCommand(".uno:BorderTLBR", aArgs); + mxControl->dispatchCommand(u".uno:BorderTLBR"_ustr, aArgs); } void SvxFrameWindow_Impl::SetDiagonalUpBorder(const SvxLineItem& dUpLineItem) @@ -2707,9 +2707,9 @@ void SvxFrameWindow_Impl::SetDiagonalUpBorder(const SvxLineItem& dUpLineItem) // apply diagonal up border Any a; dUpLineItem.QueryValue(a); - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("BorderBLTR", a) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"BorderBLTR"_ustr, a) }; - mxControl->dispatchCommand(".uno:BorderBLTR", aArgs); + mxControl->dispatchCommand(u".uno:BorderBLTR"_ustr, aArgs); } void SvxFrameWindow_Impl::statusChanged( const css::frame::FeatureStateEvent& rEvent ) @@ -2816,16 +2816,16 @@ static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ ) } SvxLineWindow_Impl::SvxLineWindow_Impl(SvxFrameToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingframeborder.ui", "FloatingFrameBorder") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingframeborder.ui"_ustr, u"FloatingFrameBorder"_ustr) , m_xControl(pControl) , m_xLineStyleLb(new LineListBox) - , m_xLineStyleLbWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xLineStyleLb)) + , m_xLineStyleLbWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xLineStyleLb)) , m_bIsWriter(false) { try { Reference< lang::XServiceInfo > xServices(m_xFrame->getController()->getModel(), UNO_QUERY_THROW); - m_bIsWriter = xServices->supportsService("com.sun.star.text.TextDocument"); + m_bIsWriter = xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr); } catch(const uno::Exception& ) { @@ -2893,9 +2893,9 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ValueSet*, void) Any a; aLineItem.QueryValue( a, m_bIsWriter ? CONVERT_TWIPS : 0 ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineStyle", a) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineStyle"_ustr, a) }; - m_xControl->dispatchCommand( ".uno:LineStyle", aArgs ); + m_xControl->dispatchCommand( u".uno:LineStyle"_ustr, aArgs ); m_xControl->EndPopupMode(); } @@ -2968,24 +2968,24 @@ struct SvxStyleToolBoxControl::Impl { Reference< style::XStyleFamiliesSupplier > xStylesSupplier( xModel, UNO_QUERY_THROW ); Reference< lang::XServiceInfo > xServices( xModel, UNO_QUERY_THROW ); - bSpecModeWriter = xServices->supportsService("com.sun.star.text.TextDocument"); + bSpecModeWriter = xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr); if(bSpecModeWriter) { Reference<container::XNameAccess> xParaStyles; - xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= + xStylesSupplier->getStyleFamilies()->getByName(u"ParagraphStyles"_ustr) >>= xParaStyles; static const std::vector<OUString> aWriterStyles = { - "Standard", - "Text body", - "Title", - "Subtitle", - "Heading 1", - "Heading 2", - "Heading 3", - "Heading 4", - "Quotations", - "Preformatted Text" + u"Standard"_ustr, + u"Text body"_ustr, + u"Title"_ustr, + u"Subtitle"_ustr, + u"Heading 1"_ustr, + u"Heading 2"_ustr, + u"Heading 3"_ustr, + u"Heading 4"_ustr, + u"Quotations"_ustr, + u"Preformatted Text"_ustr }; for( const OUString& aStyle: aWriterStyles ) { @@ -2994,7 +2994,7 @@ struct SvxStyleToolBoxControl::Impl Reference< beans::XPropertySet > xStyle; xParaStyles->getByName( aStyle ) >>= xStyle; OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back( std::pair<OUString, OUString>(aStyle, sName) ); @@ -3006,7 +3006,7 @@ struct SvxStyleToolBoxControl::Impl } else if( ( bSpecModeCalc = xServices->supportsService( - "com.sun.star.sheet.SpreadsheetDocument"))) + u"com.sun.star.sheet.SpreadsheetDocument"_ustr))) { static const char* aCalcStyles[] = { @@ -3019,7 +3019,7 @@ struct SvxStyleToolBoxControl::Impl "Result" }; Reference<container::XNameAccess> xCellStyles; - xStylesSupplier->getStyleFamilies()->getByName("CellStyles") >>= xCellStyles; + xStylesSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr) >>= xCellStyles; for(const char* pCalcStyle : aCalcStyles) { try @@ -3029,7 +3029,7 @@ struct SvxStyleToolBoxControl::Impl { Reference< beans::XPropertySet > xStyle( xCellStyles->getByName( sStyleName), UNO_QUERY_THROW ); OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back( std::pair<OUString, OUString>(sStyleName, sName) ); @@ -3136,7 +3136,7 @@ void SAL_CALL SvxStyleToolBoxControl::dispose() OUString SvxStyleToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.StyleToolBoxControl"; + return u"com.sun.star.comp.svx.StyleToolBoxControl"_ustr; } sal_Bool SvxStyleToolBoxControl::supportsService( const OUString& rServiceName ) @@ -3146,7 +3146,7 @@ sal_Bool SvxStyleToolBoxControl::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SvxStyleToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3236,7 +3236,7 @@ void SvxStyleToolBoxControl::FillStyleBox() if (pImpl->bSpecModeWriter || pImpl->bSpecModeCalc) { pBox->append_text(pImpl->aClearForm); - pBox->insert_separator(1, "separator"); + pBox->insert_separator(1, u"separator"_ustr); // add default styles if less than 12 items for( const auto &rStyle : pImpl->aDefaultStyles ) @@ -3368,12 +3368,12 @@ css::uno::Reference<css::awt::XWindow> SvxStyleToolBoxControl::createItemWindow( { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("applystyle")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"applystyle"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); pImpl->m_xWeldBox.reset(new SvxStyleBox_Base(std::move(xWidget), - ".uno:StyleApply", + u".uno:StyleApply"_ustr, SfxStyleFamily::Para, m_xFrame, pImpl->aClearForm, @@ -3428,7 +3428,7 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven else { // no active element; delete value in the display m_xWidget->set_active(-1); - set_active_or_entry_text(""); + set_active_or_entry_text(u""_ustr); } m_xWidget->save_value(); } @@ -3459,7 +3459,7 @@ css::uno::Reference<css::awt::XWindow> SvxFontNameToolBoxControl::createItemWind { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("fontnamecombobox")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"fontnamecombobox"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); @@ -3493,7 +3493,7 @@ void SvxFontNameToolBoxControl::dispose() OUString SvxFontNameToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.FontNameToolBoxControl"; + return u"com.sun.star.comp.svx.FontNameToolBoxControl"_ustr; } sal_Bool SvxFontNameToolBoxControl::supportsService( const OUString& rServiceName ) @@ -3503,7 +3503,7 @@ sal_Bool SvxFontNameToolBoxControl::supportsService( const OUString& rServiceNam css::uno::Sequence< OUString > SvxFontNameToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3593,17 +3593,17 @@ void SvxColorToolBoxControl::update() switch( m_nSlotId ) { case SID_ATTR_CHAR_COLOR2: - addStatusListener( ".uno:CharColorExt"); + addStatusListener( u".uno:CharColorExt"_ustr); break; case SID_ATTR_CHAR_BACK_COLOR: case SID_ATTR_CHAR_COLOR_BACKGROUND: - addStatusListener( ".uno:CharBackgroundExt"); + addStatusListener( u".uno:CharBackgroundExt"_ustr); break; case SID_FRAME_LINECOLOR: - addStatusListener( ".uno:BorderTLBR"); - addStatusListener( ".uno:BorderBLTR"); + addStatusListener( u".uno:BorderTLBR"_ustr); + addStatusListener( u".uno:BorderBLTR"_ustr); break; } } @@ -3775,12 +3775,12 @@ void SvxColorToolBoxControl::functionSelected( const OUString& /*rCommand*/ ) OUString SvxColorToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.ColorToolBoxControl"; + return u"com.sun.star.comp.svx.ColorToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxColorToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3859,12 +3859,12 @@ VclPtr<vcl::Window> SvxFrameToolBoxControl::createVclPopupWindow( vcl::Window* p OUString SvxFrameToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.FrameToolBoxControl"; + return u"com.sun.star.comp.svx.FrameToolBoxControl"_ustr; } css::uno::Sequence< OUString > SvxFrameToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3906,11 +3906,11 @@ namespace public: SvxCurrencyList_Impl(SvxCurrencyToolBoxControl* pControl, weld::Widget* pParent, OUString& rSelectedFormat, LanguageType& eSelectedLanguage) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/currencywindow.ui", "CurrencyWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/currencywindow.ui"_ustr, u"CurrencyWindow"_ustr) , m_xControl(pControl) - , m_xLabel(m_xBuilder->weld_label("label")) - , m_xCurrencyLb(m_xBuilder->weld_tree_view("currency")) - , m_xOkBtn(m_xBuilder->weld_button("ok")) + , m_xLabel(m_xBuilder->weld_label(u"label"_ustr)) + , m_xCurrencyLb(m_xBuilder->weld_tree_view(u"currency"_ustr)) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) , m_rSelectedFormat(rSelectedFormat) , m_eSelectedLanguage(eSelectedLanguage) { @@ -4084,7 +4084,7 @@ void SvxCurrencyToolBoxControl::execute( sal_Int16 nSelectModifier ) if( nFormatKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("NumberFormatCurrency", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"NumberFormatCurrency"_ustr, nFormatKey) }; dispatchCommand( m_aCommandURL, aArgs ); m_nFormatKey = nFormatKey; @@ -4095,12 +4095,12 @@ void SvxCurrencyToolBoxControl::execute( sal_Int16 nSelectModifier ) OUString SvxCurrencyToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.CurrencyToolBoxControl"; + return u"com.sun.star.comp.svx.CurrencyToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxCurrencyToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 04bd869c8857..ccc8045dc989 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -176,7 +176,7 @@ SvxFontSizeBox_Base::SvxFontSizeBox_Base(std::unique_ptr<weld::ComboBox> xWidget , m_xWidget(new FontSizeBox(std::move(xWidget))) { m_xWidget->set_value(0); - m_xWidget->set_active_or_entry_text(""); + m_xWidget->set_active_or_entry_text(u""_ustr); m_xWidget->disable_entry_completion(); m_xWidget->connect_changed(LINK(this, SvxFontSizeBox_Base, SelectHdl)); @@ -215,7 +215,7 @@ void SvxFontSizeBox_Base::Select() sal_Int64 nSelVal = m_xWidget->get_value(); float fSelVal = float( nSelVal ) / 10; - uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue("FontHeight.Height", + uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue(u"FontHeight.Height"_ustr, fSelVal) }; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -241,7 +241,7 @@ void SvxFontSizeBox_Base::statusChanged_Impl( tools::Long nPoint, bool bErase ) { // delete value in the display m_xWidget->set_value(-1L); - m_xWidget->set_active_or_entry_text(""); + m_xWidget->set_active_or_entry_text(u""_ustr); } m_aCurText = m_xWidget->get_active_text(); } @@ -308,8 +308,8 @@ void SvxFontSizeBox_Impl::SetOptimalSize() SvxFontSizeBox_Impl::SvxFontSizeBox_Impl(vcl::Window* pParent, const uno::Reference<frame::XFrame>& rFrame, FontHeightToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/fontsizebox.ui", "FontSizeBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , SvxFontSizeBox_Base(m_xBuilder->weld_combo_box("fontsizecombobox"), rFrame, rCtrl) + : InterimItemWindow(pParent, u"svx/ui/fontsizebox.ui"_ustr, u"FontSizeBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) + , SvxFontSizeBox_Base(m_xBuilder->weld_combo_box(u"fontsizecombobox"_ustr), rFrame, rCtrl) { } @@ -353,7 +353,7 @@ FontHeightToolBoxControl::FontHeightToolBoxControl( const uno::Reference< uno::X ".uno:FontHeight" ), m_pBox( nullptr ) { - addStatusListener( ".uno:CharFontName"); + addStatusListener( u".uno:CharFontName"_ustr); } // XServiceInfo @@ -364,12 +364,12 @@ sal_Bool SAL_CALL FontHeightToolBoxControl::supportsService( const OUString& Ser OUString SAL_CALL FontHeightToolBoxControl::getImplementationName() { - return "com.sun.star.svx.FontHeightToolBoxController"; + return u"com.sun.star.svx.FontHeightToolBoxController"_ustr; } uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( ) { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -455,7 +455,7 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("fontsizecombobox")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"fontsizecombobox"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 2f23bfaa97f4..c2070618d69e 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -80,8 +80,8 @@ class CheckButtonItemWindow final : public InterimItemWindow { public: CheckButtonItemWindow(vcl::Window* pParent, const OUString& rLabel) - : InterimItemWindow(pParent, "svx/ui/checkbuttonbox.ui", "CheckButtonBox") - , m_xWidget(m_xBuilder->weld_check_button("checkbutton")) + : InterimItemWindow(pParent, u"svx/ui/checkbuttonbox.ui"_ustr, u"CheckButtonBox"_ustr) + , m_xWidget(m_xBuilder->weld_check_button(u"checkbutton"_ustr)) { InitControlBase(m_xWidget.get()); @@ -198,9 +198,9 @@ OUString FindTextFieldControl::m_sRememberedSearchString; FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, css::uno::Reference< css::frame::XFrame > xFrame, css::uno::Reference< css::uno::XComponentContext > xContext) : - InterimItemWindow(pParent, "svx/ui/findbox.ui", "FindBox"), + InterimItemWindow(pParent, u"svx/ui/findbox.ui"_ustr, u"FindBox"_ustr), m_nAsyncGetFocusId(nullptr), - m_xWidget(m_xBuilder->weld_combo_box("find")), + m_xWidget(m_xBuilder->weld_combo_box(u"find"_ustr)), m_xFrame(std::move(xFrame)), m_xContext(std::move(xContext)), m_pAcc(svt::AcceleratorExecute::createAcceleratorHelper()) @@ -314,7 +314,7 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -601,7 +601,7 @@ FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< // XServiceInfo OUString SAL_CALL FindTextToolbarController::getImplementationName() { - return "com.sun.star.svx.FindTextToolboxController"; + return u"com.sun.star.svx.FindTextToolboxController"_ustr; } sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& ServiceName ) @@ -611,7 +611,7 @@ sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& Se css::uno::Sequence< OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -744,8 +744,8 @@ UpDownSearchToolboxController::UpDownSearchToolboxController( const css::uno::Re OUString SAL_CALL UpDownSearchToolboxController::getImplementationName() { return meType == UpDownSearchToolboxController::UP? - OUString( "com.sun.star.svx.UpSearchToolboxController" ) : - OUString( "com.sun.star.svx.DownSearchToolboxController" ); + u"com.sun.star.svx.UpSearchToolboxController"_ustr : + u"com.sun.star.svx.DownSearchToolboxController"_ustr; } sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString& ServiceName ) @@ -755,7 +755,7 @@ sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString css::uno::Sequence< OUString > SAL_CALL UpDownSearchToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -836,7 +836,7 @@ MatchCaseToolboxController::MatchCaseToolboxController( const css::uno::Referenc // XServiceInfo OUString SAL_CALL MatchCaseToolboxController::getImplementationName() { - return "com.sun.star.svx.MatchCaseToolboxController"; + return u"com.sun.star.svx.MatchCaseToolboxController"_ustr; } sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& ServiceName ) @@ -846,7 +846,7 @@ sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -927,7 +927,7 @@ SearchFormattedToolboxController::SearchFormattedToolboxController( const css::u // XServiceInfo OUString SAL_CALL SearchFormattedToolboxController::getImplementationName() { - return "com.sun.star.svx.SearchFormattedToolboxController"; + return u"com.sun.star.svx.SearchFormattedToolboxController"_ustr; } sal_Bool SAL_CALL SearchFormattedToolboxController::supportsService( const OUString& ServiceName ) @@ -937,7 +937,7 @@ sal_Bool SAL_CALL SearchFormattedToolboxController::supportsService( const OUStr css::uno::Sequence< OUString > SAL_CALL SearchFormattedToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1014,7 +1014,7 @@ FindAllToolboxController::FindAllToolboxController( const css::uno::Reference< c // XServiceInfo OUString SAL_CALL FindAllToolboxController::getImplementationName() { - return "com.sun.star.svx.FindAllToolboxController"; + return u"com.sun.star.svx.FindAllToolboxController"_ustr; } @@ -1025,7 +1025,7 @@ sal_Bool SAL_CALL FindAllToolboxController::supportsService( const OUString& Ser css::uno::Sequence< OUString > SAL_CALL FindAllToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1096,7 +1096,7 @@ ExitSearchToolboxController::ExitSearchToolboxController( const css::uno::Refere // XServiceInfo OUString SAL_CALL ExitSearchToolboxController::getImplementationName() { - return "com.sun.star.svx.ExitFindbarToolboxController"; + return u"com.sun.star.svx.ExitFindbarToolboxController"_ustr; } @@ -1107,7 +1107,7 @@ sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL ExitSearchToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1139,7 +1139,7 @@ void SAL_CALL ExitSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -1192,7 +1192,7 @@ SearchLabelToolboxController::SearchLabelToolboxController( const css::uno::Refe // XServiceInfo OUString SAL_CALL SearchLabelToolboxController::getImplementationName() { - return "com.sun.star.svx.SearchLabelToolboxController"; + return u"com.sun.star.svx.SearchLabelToolboxController"_ustr; } @@ -1203,7 +1203,7 @@ sal_Bool SAL_CALL SearchLabelToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL SearchLabelToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1328,7 +1328,7 @@ void SAL_CALL FindbarDispatcher::release() noexcept // XServiceInfo OUString SAL_CALL FindbarDispatcher::getImplementationName() { - return "com.sun.star.comp.svx.Impl.FindbarDispatcher"; + return u"com.sun.star.comp.svx.Impl.FindbarDispatcher"_ustr; } sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceName ) @@ -1338,7 +1338,7 @@ sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceNam css::uno::Sequence< OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() { - return { "com.sun.star.comp.svx.FindbarDispatcher", "com.sun.star.frame.ProtocolHandler" }; + return { u"com.sun.star.comp.svx.FindbarDispatcher"_ustr, u"com.sun.star.frame.ProtocolHandler"_ustr }; } // XInitialization @@ -1383,7 +1383,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css return; css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (!xLayoutManager.is()) return; @@ -1403,7 +1403,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY); VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow ); ToolBox* pToolBox = static_cast<ToolBox*>(pWindow.get()); - pToolBox->set_id("FindBar"); + pToolBox->set_id(u"FindBar"_ustr); if ( !pToolBox ) return; diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx index 97e4898065fe..e0e00108f73a 100644 --- a/svx/source/tbxctrls/tbxcolor.cxx +++ b/svx/source/tbxctrls/tbxcolor.cxx @@ -34,7 +34,7 @@ namespace svx using namespace ::com::sun::star::beans; ToolboxAccess::ToolboxAccess( std::u16string_view rToolboxName ) : - m_sToolboxResName ( "private:resource/toolbar/" ) + m_sToolboxResName ( u"private:resource/toolbar/"_ustr ) { m_sToolboxResName += rToolboxName; @@ -48,7 +48,7 @@ namespace svx Reference< XFrame > xFrame = pViewFrm->GetFrame().GetFrameInterface(); Reference< XPropertySet > xFrameProps( xFrame, UNO_QUERY ); if ( xFrameProps.is() ) - xFrameProps->getPropertyValue( "LayoutManager" ) >>= m_xLayouter; + xFrameProps->getPropertyValue( u"LayoutManager"_ustr ) >>= m_xLayouter; } catch ( Exception const & ) { diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 064b4636230b..be2d13c79b3e 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -108,7 +108,7 @@ namespace svx if (aIterator != aSlotNamedColorMap.end()) { NamedColor aNamedColor(aIterator->second); - SvtViewOptions aViewOpt(EViewType::Dialog, "ToolboxButtonColor"); + SvtViewOptions aViewOpt(EViewType::Dialog, u"ToolboxButtonColor"_ustr); if (aViewOpt.Exists()) { css::uno::Any aUserItem = aViewOpt.GetUserItem(OUString::number(nSlotId)); @@ -143,7 +143,7 @@ namespace svx const OUString aUserData = oColor->m_aName + ";" + OUString::number(static_cast<sal_uInt32>(oColor->m_aColor)); - SvtViewOptions(EViewType::Dialog, "ToolboxButtonColor") + SvtViewOptions(EViewType::Dialog, u"ToolboxButtonColor"_ustr) .SetUserItem(OUString::number(mnSlotId), css::uno::Any(aUserData)); } } @@ -217,7 +217,7 @@ namespace svx Update(rNamedColor.m_aColor); // Also show the current color as QuickHelpText - OUString colorSuffix = OUString(" (%1)").replaceFirst("%1", rNamedColor.m_aName); + OUString colorSuffix = u" (%1)"_ustr.replaceFirst("%1", rNamedColor.m_aName); OUString colorHelpText = maCommandLabel + colorSuffix; SetQuickHelpText(colorHelpText); } diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx index 1f36ee635619..58ff163fa478 100644 --- a/svx/source/tbxctrls/verttexttbxctrl.cxx +++ b/svx/source/tbxctrls/verttexttbxctrl.cxx @@ -29,12 +29,12 @@ SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl( const css::uno::Reference<css::uno::XComponentContext>& rContext) : SvxVertCTLTextTbxCtrl(rContext) { - addStatusListener(".uno:CTLFontState"); + addStatusListener(u".uno:CTLFontState"_ustr); } OUString SvxCTLTextTbxCtrl::getImplementationName() { - return "com.sun.star.comp.svx.CTLToolBoxControl"; + return u"com.sun.star.comp.svx.CTLToolBoxControl"_ustr; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -48,12 +48,12 @@ SvxVertTextTbxCtrl::SvxVertTextTbxCtrl( const css::uno::Reference<css::uno::XComponentContext>& rContext) : SvxVertCTLTextTbxCtrl(rContext) { - addStatusListener(".uno:VerticalTextState"); + addStatusListener(u".uno:VerticalTextState"_ustr); } OUString SvxVertTextTbxCtrl::getImplementationName() { - return "com.sun.star.comp.svx.VertTextToolBoxControl"; + return u"com.sun.star.comp.svx.VertTextToolBoxControl"_ustr; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -154,7 +154,7 @@ sal_Bool SAL_CALL SvxVertCTLTextTbxCtrl::supportsService(const OUString& Service css::uno::Sequence<OUString> SvxVertCTLTextTbxCtrl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index 8d9cc95892f2..8d7424064b52 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star::uno; // we enter something which never occurs here (hopefully).) static SfxSlot aExtrusionBarSlots_Impl[] = { - { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, "" } + { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, u""_ustr } }; SFX_IMPL_INTERFACE(ExtrusionBar, SfxShell) @@ -330,7 +330,7 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r } else { - pObj->SetMergedItem( XSecondaryFillColorItem( "", aColor ) ); + pObj->SetMergedItem( XSecondaryFillColorItem( u""_ustr, aColor ) ); } pObj->BroadcastObjectChange(); } @@ -714,7 +714,7 @@ static void getExtrusionDirectionState( SdrView const * pSdrView, SfxItemSet& rS Position3D aViewPoint( 3472, -3472, 25000 ); // MSO default double fSkewAngle = -135; // MSO default - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "ProjectionMode" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"ProjectionMode"_ustr ); sal_Int16 nProjectionMode = sal_Int16(); if( pAny && ( *pAny >>= nProjectionMode ) ) bParallel = static_cast<ProjectionMode>(nProjectionMode) == ProjectionMode_PARALLEL; @@ -723,7 +723,7 @@ static void getExtrusionDirectionState( SdrView const * pSdrView, SfxItemSet& rS { double fSkew = 50.0; EnhancedCustomShapeParameterPair aSkewPropPair; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "Skew" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"Skew"_ustr ); if( pAny && ( *pAny >>= aSkewPropPair ) ) { aSkewPropPair.First.Value >>= fSkew; @@ -738,12 +738,12 @@ static void getExtrusionDirectionState( SdrView const * pSdrView, SfxItemSet& rS { double fOriginX = 0.50; double fOriginY = -0.50; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "ViewPoint" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"ViewPoint"_ustr ); if( pAny ) *pAny >>= aViewPoint; EnhancedCustomShapeParameterPair aOriginPropPair; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "Origin" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"Origin"_ustr ); if( pAny && ( *pAny >>= aOriginPropPair ) ) { aOriginPropPair.First.Value >>= fOriginX; @@ -859,7 +859,7 @@ static void getExtrusionProjectionState( SdrView const * pSdrView, SfxItemSet& r const SdrCustomShapeGeometryItem & rGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); bool bParallel = true; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "ProjectionMode" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"ProjectionMode"_ustr ); ProjectionMode eProjectionMode; if( pAny && ( *pAny >>= eProjectionMode ) ) bParallel = eProjectionMode == ProjectionMode_PARALLEL; @@ -1006,7 +1006,7 @@ static void getExtrusionDepthState( SdrView const * pSdrView, SfxItemSet& rSet ) } double fDepth = 1270.0; // =36pt ODF default - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "Depth" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"Depth"_ustr ); if( pAny ) { EnhancedCustomShapeParameterPair aDepthPropPair; @@ -1090,11 +1090,11 @@ static void getExtrusionLightingDirectionState( SdrView const * pSdrView, SfxIte Direction3D aFirstLightDirection( 50000, 0, 10000 ); Direction3D aSecondLightDirection( -50000, 0, 10000 ); - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "FirstLightDirection" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"FirstLightDirection"_ustr ); if( pAny ) *pAny >>= aFirstLightDirection; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "SecondLightDirection" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"SecondLightDirection"_ustr ); if( pAny ) *pAny >>= aSecondLightDirection; @@ -1162,7 +1162,7 @@ static void getExtrusionLightingIntensityState( SdrView const * pSdrView, SfxIte } double fBrightness = 22178.0 / 655.36; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "Brightness" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"Brightness"_ustr ); if( pAny ) *pAny >>= fBrightness; @@ -1233,7 +1233,7 @@ static void getExtrusionColorState( SdrView const * pSdrView, SfxItemSet& rSet ) Color aColor; bool bUseColor = false; - pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, "Color" ); + pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, u"Color"_ustr ); if( pAny ) *pAny >>= bUseColor; diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 93918d9ca5f9..ce629bab1405 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -151,7 +151,7 @@ static void SetFontWorkShapeTypeState( SdrView const * pSdrView, SfxItemSet& rSe if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr ) { const SdrCustomShapeGeometryItem & rGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" ); + const Any* pAny = rGeometryItem.GetPropertyValueByName( u"Type"_ustr ); if( pAny ) { OUString aType; @@ -177,7 +177,7 @@ static void SetFontWorkShapeTypeState( SdrView const * pSdrView, SfxItemSet& rSe // we enter something which never occurs here (hopefully).) static SfxSlot aFontworkBarSlots_Impl[] = { - { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, "" } + { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, u""_ustr } }; SFX_IMPL_INTERFACE(FontworkBar, SfxShell) @@ -240,7 +240,7 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r { case SID_FONTWORK_SAME_LETTER_HEIGHTS: { - css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "SameLetterHeights" ); + css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( u"TextPath"_ustr, u"SameLetterHeights"_ustr ); bool bOn = false; if( pAny ) @@ -249,7 +249,7 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r css::beans::PropertyValue aPropValue; aPropValue.Name = "SameLetterHeights"; aPropValue.Value <<= bOn; - rGeometryItem.SetPropertyValue("TextPath", aPropValue); + rGeometryItem.SetPropertyValue(u"TextPath"_ustr, aPropValue); } break; diff --git a/svx/source/uitest/sdrobject.cxx b/svx/source/uitest/sdrobject.cxx index bc72ee2a8c93..0c8d510f4d88 100644 --- a/svx/source/uitest/sdrobject.cxx +++ b/svx/source/uitest/sdrobject.cxx @@ -24,25 +24,25 @@ StringMap SdrUIObject::get_state() if (!pObject) return aMap; - aMap["Name"] = pObject->GetName(); - aMap["Description"] = pObject->GetDescription(); - aMap["Title"] = pObject->GetTitle(); - aMap["Z-Order"] = OUString::number(pObject->GetOrdNum()); - aMap["Layer"] = OUString::number(pObject->GetLayer().get()); - aMap["IsGroupObject"] = OUString::boolean(pObject->IsGroupObject()); - aMap["IsPolyObject"] = OUString::boolean(pObject->IsPolyObj()); - aMap["PointCount"] = OUString::number(pObject->GetPointCount()); - aMap["HasTextEdit"] = OUString::boolean(pObject->HasTextEdit()); - aMap["HasMacro"] = OUString::boolean(pObject->HasMacro()); - aMap["IsClosed"] = OUString::boolean(pObject->IsClosedObj()); - aMap["IsEdgeObject"] = OUString::boolean(pObject->IsEdgeObj()); - aMap["Is3DObject"] = OUString::boolean(pObject->Is3DObj()); - aMap["IsUNOObject"] = OUString::boolean(pObject->IsUnoObj()); - aMap["MoveProtected"] = OUString::boolean(pObject->IsMoveProtect()); - aMap["ResizeProtected"] = OUString::boolean(pObject->IsResizeProtect()); - aMap["Printable"] = OUString::boolean(pObject->IsPrintable()); - aMap["Visible"] = OUString::boolean(pObject->IsVisible()); - aMap["HasText"] = OUString::boolean(pObject->HasText()); + aMap[u"Name"_ustr] = pObject->GetName(); + aMap[u"Description"_ustr] = pObject->GetDescription(); + aMap[u"Title"_ustr] = pObject->GetTitle(); + aMap[u"Z-Order"_ustr] = OUString::number(pObject->GetOrdNum()); + aMap[u"Layer"_ustr] = OUString::number(pObject->GetLayer().get()); + aMap[u"IsGroupObject"_ustr] = OUString::boolean(pObject->IsGroupObject()); + aMap[u"IsPolyObject"_ustr] = OUString::boolean(pObject->IsPolyObj()); + aMap[u"PointCount"_ustr] = OUString::number(pObject->GetPointCount()); + aMap[u"HasTextEdit"_ustr] = OUString::boolean(pObject->HasTextEdit()); + aMap[u"HasMacro"_ustr] = OUString::boolean(pObject->HasMacro()); + aMap[u"IsClosed"_ustr] = OUString::boolean(pObject->IsClosedObj()); + aMap[u"IsEdgeObject"_ustr] = OUString::boolean(pObject->IsEdgeObj()); + aMap[u"Is3DObject"_ustr] = OUString::boolean(pObject->Is3DObj()); + aMap[u"IsUNOObject"_ustr] = OUString::boolean(pObject->IsUnoObj()); + aMap[u"MoveProtected"_ustr] = OUString::boolean(pObject->IsMoveProtect()); + aMap[u"ResizeProtected"_ustr] = OUString::boolean(pObject->IsResizeProtect()); + aMap[u"Printable"_ustr] = OUString::boolean(pObject->IsPrintable()); + aMap[u"Visible"_ustr] = OUString::boolean(pObject->IsVisible()); + aMap[u"HasText"_ustr] = OUString::boolean(pObject->HasText()); return aMap; } @@ -55,13 +55,13 @@ void SdrUIObject::execute(const OUString& rAction, const StringMap& rParameters) if (rAction == "MOVE") { - auto itrNX = rParameters.find("X"); + auto itrNX = rParameters.find(u"X"_ustr); if (itrNX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter X"); + throw css::uno::RuntimeException(u"missing parameter X"_ustr); - auto itrNY = rParameters.find("Y"); + auto itrNY = rParameters.find(u"Y"_ustr); if (itrNY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter Y"); + throw css::uno::RuntimeException(u"missing parameter Y"_ustr); tools::Long nX = itrNX->second.toInt32(); tools::Long nY = itrNY->second.toInt32(); @@ -70,27 +70,27 @@ void SdrUIObject::execute(const OUString& rAction, const StringMap& rParameters) } else if (rAction == "RESIZE") { - auto itrNX = rParameters.find("X"); + auto itrNX = rParameters.find(u"X"_ustr); if (itrNX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter X"); + throw css::uno::RuntimeException(u"missing parameter X"_ustr); - auto itrNY = rParameters.find("Y"); + auto itrNY = rParameters.find(u"Y"_ustr); if (itrNY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter Y"); + throw css::uno::RuntimeException(u"missing parameter Y"_ustr); tools::Long nX = itrNX->second.toInt32(); tools::Long nY = itrNY->second.toInt32(); Point aPos(nX, nY); - auto itrFracX = rParameters.find("FRAC_X"); + auto itrFracX = rParameters.find(u"FRAC_X"_ustr); if (itrFracX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter FRAC_X"); + throw css::uno::RuntimeException(u"missing parameter FRAC_X"_ustr); double nFracX = itrFracX->second.toDouble(); Fraction aFracX(nFracX); - auto itrFracY = rParameters.find("FRAC_Y"); + auto itrFracY = rParameters.find(u"FRAC_Y"_ustr); if (itrFracY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter FRAC_Y"); + throw css::uno::RuntimeException(u"missing parameter FRAC_Y"_ustr); double nFracY = itrFracY->second.toDouble(); Fraction aFracY(nFracY); pObj->Resize(aPos, aFracX, aFracY, true /*bRelative*/); @@ -99,47 +99,47 @@ void SdrUIObject::execute(const OUString& rAction, const StringMap& rParameters) { // RotateFlyFrame3: Note: Crop does nothing at SdrObject // anymore, see comment at SdrObject::NbcCrop - auto itrNX = rParameters.find("X"); + auto itrNX = rParameters.find(u"X"_ustr); if (itrNX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter X"); + throw css::uno::RuntimeException(u"missing parameter X"_ustr); - auto itrNY = rParameters.find("Y"); + auto itrNY = rParameters.find(u"Y"_ustr); if (itrNY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter Y"); + throw css::uno::RuntimeException(u"missing parameter Y"_ustr); const double fX(itrNX->second.toDouble()); const double fY(itrNY->second.toDouble()); const basegfx::B2DPoint aPos(fX, fY); - auto itrFracX = rParameters.find("FRAC_X"); + auto itrFracX = rParameters.find(u"FRAC_X"_ustr); if (itrFracX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter FRAC_X"); + throw css::uno::RuntimeException(u"missing parameter FRAC_X"_ustr); const double fFracX(itrFracX->second.toDouble()); - auto itrFracY = rParameters.find("FRAC_Y"); + auto itrFracY = rParameters.find(u"FRAC_Y"_ustr); if (itrFracY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter FRAC_Y"); + throw css::uno::RuntimeException(u"missing parameter FRAC_Y"_ustr); const double fFracY(itrFracY->second.toDouble()); pObj->Crop(aPos, fFracX, fFracY); } else if (rAction == "ROTATE") { - auto itrNX = rParameters.find("X"); + auto itrNX = rParameters.find(u"X"_ustr); if (itrNX == rParameters.end()) - throw css::uno::RuntimeException("missing parameter X"); + throw css::uno::RuntimeException(u"missing parameter X"_ustr); - auto itrNY = rParameters.find("Y"); + auto itrNY = rParameters.find(u"Y"_ustr); if (itrNY == rParameters.end()) - throw css::uno::RuntimeException("missing parameter Y"); + throw css::uno::RuntimeException(u"missing parameter Y"_ustr); tools::Long nX = itrNX->second.toInt32(); tools::Long nY = itrNY->second.toInt32(); Point aPos(nX, nY); - auto itrAngle = rParameters.find("ANGLE"); + auto itrAngle = rParameters.find(u"ANGLE"_ustr); if (itrAngle == rParameters.end()) - throw css::uno::RuntimeException("missing parameter ANGLE"); + throw css::uno::RuntimeException(u"missing parameter ANGLE"_ustr); double nAngle = itrAngle->second.toDouble(); pObj->Rotate(aPos, Degree100(sal_Int32(nAngle)), 0, 0); @@ -154,7 +154,7 @@ void SdrUIObject::execute(const OUString& rAction, const StringMap& rParameters) } } -OUString SdrUIObject::get_type() const { return "SdrUIObject"; } +OUString SdrUIObject::get_type() const { return u"SdrUIObject"_ustr; } SvxColorValueSetUIObject::SvxColorValueSetUIObject(vcl::Window* pColorSetWin) : DrawingAreaUIObject(pColorSetWin) @@ -166,9 +166,9 @@ void SvxColorValueSetUIObject::execute(const OUString& rAction, const StringMap& { if (rAction == "CHOOSE") { - if (rParameters.find("POS") != rParameters.end()) + if (rParameters.find(u"POS"_ustr) != rParameters.end()) { - OUString aIndexStr = rParameters.find("POS")->second; + OUString aIndexStr = rParameters.find(u"POS"_ustr)->second; sal_Int32 nIndex = aIndexStr.toInt32(); mpColorSet->SelectItem(nIndex); mpColorSet->Select(); @@ -183,23 +183,23 @@ std::unique_ptr<UIObject> SvxColorValueSetUIObject::create(vcl::Window* pWindow) return std::unique_ptr<UIObject>(new SvxColorValueSetUIObject(pWindow)); } -OUString SvxColorValueSetUIObject::get_name() const { return "SvxColorValueSetUIObject"; } +OUString SvxColorValueSetUIObject::get_name() const { return u"SvxColorValueSetUIObject"_ustr; } StringMap SvxColorValueSetUIObject::get_state() { StringMap aMap = DrawingAreaUIObject::get_state(); - aMap["CurrColorId"] = OUString::number(mpColorSet->GetSelectedItemId()); - aMap["CurrColorPos"] = OUString::number(mpColorSet->GetSelectItemPos()); - aMap["ColorsCount"] = OUString::number(mpColorSet->GetItemCount()); - aMap["ColCount"] = OUString::number(mpColorSet->GetColCount()); - aMap["ColorText"] = mpColorSet->GetItemText(mpColorSet->GetSelectedItemId()); + aMap[u"CurrColorId"_ustr] = OUString::number(mpColorSet->GetSelectedItemId()); + aMap[u"CurrColorPos"_ustr] = OUString::number(mpColorSet->GetSelectItemPos()); + aMap[u"ColorsCount"_ustr] = OUString::number(mpColorSet->GetItemCount()); + aMap[u"ColCount"_ustr] = OUString::number(mpColorSet->GetColCount()); + aMap[u"ColorText"_ustr] = mpColorSet->GetItemText(mpColorSet->GetSelectedItemId()); Color currColor = mpColorSet->GetItemColor(mpColorSet->GetSelectedItemId()); - aMap["R"] = OUString::number(currColor.GetRed()); - aMap["G"] = OUString::number(currColor.GetGreen()); - aMap["B"] = OUString::number(currColor.GetBlue()); - aMap["RGB"] = "(" + OUString::number(currColor.GetRed()) + "," - + OUString::number(currColor.GetGreen()) + "," - + OUString::number(currColor.GetBlue()) + ")"; + aMap[u"R"_ustr] = OUString::number(currColor.GetRed()); + aMap[u"G"_ustr] = OUString::number(currColor.GetGreen()); + aMap[u"B"_ustr] = OUString::number(currColor.GetBlue()); + aMap[u"RGB"_ustr] = "(" + OUString::number(currColor.GetRed()) + "," + + OUString::number(currColor.GetGreen()) + "," + + OUString::number(currColor.GetBlue()) + ")"; return aMap; } diff --git a/svx/source/uitest/uiobject.cxx b/svx/source/uitest/uiobject.cxx index 1c56b9b61bb0..0901a86dd933 100644 --- a/svx/source/uitest/uiobject.cxx +++ b/svx/source/uitest/uiobject.cxx @@ -24,18 +24,18 @@ void SvxShowCharSetUIObject::execute(const OUString& rAction, { if (rAction == "SELECT") { - if (rParameters.find("INDEX") != rParameters.end()) + if (rParameters.find(u"INDEX"_ustr) != rParameters.end()) { - OUString aIndexStr = rParameters.find("INDEX")->second; + OUString aIndexStr = rParameters.find(u"INDEX"_ustr)->second; sal_Int32 nIndex = aIndexStr.toInt32(); mpCharSet->OutputIndex(nIndex); } - else if (rParameters.find("COLUMN") != rParameters.end() && - rParameters.find("ROW") != rParameters.end()) + else if (rParameters.find(u"COLUMN"_ustr) != rParameters.end() && + rParameters.find(u"ROW"_ustr) != rParameters.end()) { - OUString aColStr = rParameters.find("COLUMN")->second; - OUString aRowStr = rParameters.find("ROW")->second; + OUString aColStr = rParameters.find(u"COLUMN"_ustr)->second; + OUString aRowStr = rParameters.find(u"ROW"_ustr)->second; sal_Int32 nColumn = aColStr.toInt32(); sal_Int32 nRow = aRowStr.toInt32(); @@ -55,7 +55,7 @@ std::unique_ptr<UIObject> SvxShowCharSetUIObject::create(vcl::Window* pWindow) OUString SvxShowCharSetUIObject::get_name() const { - return "SvxShowCharSetUIObject"; + return u"SvxShowCharSetUIObject"_ustr; } @@ -70,9 +70,9 @@ void SvxNumValueSetUIObject::execute(const OUString& rAction, { if (rAction == "CHOOSE") { - if (rParameters.find("POS") != rParameters.end()) + if (rParameters.find(u"POS"_ustr) != rParameters.end()) { - OUString aIndexStr = rParameters.find("POS")->second; + OUString aIndexStr = rParameters.find(u"POS"_ustr)->second; sal_Int32 nIndex = aIndexStr.toInt32(); mpNumValueSet->SelectItem(nIndex); mpNumValueSet->Select(); @@ -89,16 +89,16 @@ std::unique_ptr<UIObject> SvxNumValueSetUIObject::create(vcl::Window* pWindow) OUString SvxNumValueSetUIObject::get_name() const { - return "SvxNumValueSetUIObject"; + return u"SvxNumValueSetUIObject"_ustr; } StringMap SvxNumValueSetUIObject::get_state() { StringMap aMap = WindowUIObject::get_state(); - aMap["SelectedItemId"] = OUString::number( mpNumValueSet->GetSelectedItemId() ); - aMap["SelectedItemPos"] = OUString::number( mpNumValueSet->GetSelectItemPos() ); - aMap["ItemsCount"] = OUString::number(mpNumValueSet->GetItemCount()); - aMap["ItemText"] = mpNumValueSet->GetItemText(mpNumValueSet->GetSelectedItemId()); + aMap[u"SelectedItemId"_ustr] = OUString::number( mpNumValueSet->GetSelectedItemId() ); + aMap[u"SelectedItemPos"_ustr] = OUString::number( mpNumValueSet->GetSelectItemPos() ); + aMap[u"ItemsCount"_ustr] = OUString::number(mpNumValueSet->GetItemCount()); + aMap[u"ItemText"_ustr] = mpNumValueSet->GetItemText(mpNumValueSet->GetSelectedItemId()); return aMap; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 4ff5aadc8792..d2abde7d9675 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -297,19 +297,19 @@ void ChineseDictionaryDialog::initDictionaryControl(DictionaryList *pList, } ChineseDictionaryDialog::ChineseDictionaryDialog(weld::Window* pParent) - : GenericDialogController(pParent, "svx/ui/chinesedictionary.ui", "ChineseDictionaryDialog") + : GenericDialogController(pParent, u"svx/ui/chinesedictionary.ui"_ustr, u"ChineseDictionaryDialog"_ustr) , m_nTextConversionOptions(i18n::TextConversionOption::NONE) - , m_xRB_To_Simplified(m_xBuilder->weld_radio_button("tradtosimple")) - , m_xRB_To_Traditional(m_xBuilder->weld_radio_button("simpletotrad")) - , m_xCB_Reverse(m_xBuilder->weld_check_button("reverse")) - , m_xED_Term(m_xBuilder->weld_entry("term")) - , m_xED_Mapping(m_xBuilder->weld_entry("mapping")) - , m_xLB_Property(m_xBuilder->weld_combo_box("property")) - , m_xCT_DictionaryToSimplified(new DictionaryList(m_xBuilder->weld_tree_view("tradtosimpleview"))) - , m_xCT_DictionaryToTraditional(new DictionaryList(m_xBuilder->weld_tree_view("simpletotradview"))) - , m_xPB_Add(m_xBuilder->weld_button("add")) - , m_xPB_Modify(m_xBuilder->weld_button("modify")) - , m_xPB_Delete(m_xBuilder->weld_button("delete")) + , m_xRB_To_Simplified(m_xBuilder->weld_radio_button(u"tradtosimple"_ustr)) + , m_xRB_To_Traditional(m_xBuilder->weld_radio_button(u"simpletotrad"_ustr)) + , m_xCB_Reverse(m_xBuilder->weld_check_button(u"reverse"_ustr)) + , m_xED_Term(m_xBuilder->weld_entry(u"term"_ustr)) + , m_xED_Mapping(m_xBuilder->weld_entry(u"mapping"_ustr)) + , m_xLB_Property(m_xBuilder->weld_combo_box(u"property"_ustr)) + , m_xCT_DictionaryToSimplified(new DictionaryList(m_xBuilder->weld_tree_view(u"tradtosimpleview"_ustr))) + , m_xCT_DictionaryToTraditional(new DictionaryList(m_xBuilder->weld_tree_view(u"simpletotradview"_ustr))) + , m_xPB_Add(m_xBuilder->weld_button(u"add"_ustr)) + , m_xPB_Modify(m_xBuilder->weld_button(u"modify"_ustr)) + , m_xPB_Delete(m_xBuilder->weld_button(u"delete"_ustr)) { m_xCT_DictionaryToSimplified->set_size_request(-1, m_xCT_DictionaryToSimplified->get_height_rows(8)); m_xCT_DictionaryToTraditional->set_size_request(-1, m_xCT_DictionaryToTraditional->get_height_rows(8)); @@ -336,8 +336,8 @@ ChineseDictionaryDialog::ChineseDictionaryDialog(weld::Window* pParent) { try { - OUString aNameTo_Simplified("ChineseT2S"); - OUString aNameTo_Traditional("ChineseS2T"); + OUString aNameTo_Simplified(u"ChineseT2S"_ustr); + OUString aNameTo_Traditional(u"ChineseS2T"_ustr); lang::Locale aLocale; aLocale.Language = "zh"; diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index aedf268e2de7..ffd2c19960f5 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -53,7 +53,7 @@ void ChineseTranslation_UnoDialog::impl_DeleteDialog() // lang::XServiceInfo OUString SAL_CALL ChineseTranslation_UnoDialog::getImplementationName() { - return "com.sun.star.comp.linguistic2.ChineseTranslationDialog"; + return u"com.sun.star.comp.linguistic2.ChineseTranslationDialog"_ustr; } sal_Bool SAL_CALL ChineseTranslation_UnoDialog::supportsService( const OUString& ServiceName ) @@ -63,7 +63,7 @@ sal_Bool SAL_CALL ChineseTranslation_UnoDialog::supportsService( const OUString& uno::Sequence< OUString > SAL_CALL ChineseTranslation_UnoDialog::getSupportedServiceNames() { - return { "com.sun.star.linguistic2.ChineseTranslationDialog" }; + return { u"com.sun.star.linguistic2.ChineseTranslationDialog"_ustr }; } // ui::dialogs::XExecutableDialog diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx index 9bef507b73a9..df8e0994efda 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx @@ -31,12 +31,12 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; ChineseTranslationDialog::ChineseTranslationDialog(weld::Window* pParent) - : GenericDialogController(pParent, "svx/ui/chineseconversiondialog.ui", "ChineseConversionDialog") - , m_xBP_OK(m_xBuilder->weld_button("ok")) - , m_xPB_Editterms(m_xBuilder->weld_button("editterms")) - , m_xRB_To_Simplified(m_xBuilder->weld_radio_button("tosimplified")) - , m_xRB_To_Traditional(m_xBuilder->weld_radio_button("totraditional")) - , m_xCB_Translate_Commonterms(m_xBuilder->weld_check_button("commonterms")) + : GenericDialogController(pParent, u"svx/ui/chineseconversiondialog.ui"_ustr, u"ChineseConversionDialog"_ustr) + , m_xBP_OK(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xPB_Editterms(m_xBuilder->weld_button(u"editterms"_ustr)) + , m_xRB_To_Simplified(m_xBuilder->weld_radio_button(u"tosimplified"_ustr)) + , m_xRB_To_Traditional(m_xBuilder->weld_radio_button(u"totraditional"_ustr)) + , m_xCB_Translate_Commonterms(m_xBuilder->weld_check_button(u"commonterms"_ustr)) { SvtLinguConfig aLngCfg; bool bValue = false; diff --git a/svx/source/unodraw/SvxXTextColumns.cxx b/svx/source/unodraw/SvxXTextColumns.cxx index 0fb36aaedf08..8e5bcd27a94f 100644 --- a/svx/source/unodraw/SvxXTextColumns.cxx +++ b/svx/source/unodraw/SvxXTextColumns.cxx @@ -124,7 +124,10 @@ private: sal_Int16 m_nSepLineStyle = css::text::ColumnSeparatorStyle::NONE; }; -OUString SvxXTextColumns::getImplementationName() { return "com.sun.star.comp.svx.TextColumns"; } +OUString SvxXTextColumns::getImplementationName() +{ + return u"com.sun.star.comp.svx.TextColumns"_ustr; +} sal_Bool SvxXTextColumns::supportsService(const OUString& rServiceName) { @@ -133,7 +136,7 @@ sal_Bool SvxXTextColumns::supportsService(const OUString& rServiceName) css::uno::Sequence<OUString> SvxXTextColumns::getSupportedServiceNames() { - return { "com.sun.star.text.TextColumns" }; + return { u"com.sun.star.text.TextColumns"_ustr }; } sal_Int32 SvxXTextColumns::getReferenceValue() diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index ba35119fcbe9..3f980f4e9763 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -406,12 +406,12 @@ void GraphicExporter::ParseSettings(const Sequence<PropertyValue>& rDescriptor, comphelper::SequenceAsHashMap aMap(aDescriptor); Sequence<PropertyValue> aFilterData; OUString aFilterOptions; - auto it = aMap.find("FilterData"); + auto it = aMap.find(u"FilterData"_ustr); if (it != aMap.end()) { it->second >>= aFilterData; } - it = aMap.find("FilterOptions"); + it = aMap.find(u"FilterOptions"_ustr); if (it != aMap.end()) { it->second >>= aFilterOptions; @@ -424,7 +424,7 @@ void GraphicExporter::ParseSettings(const Sequence<PropertyValue>& rDescriptor, aFilterData = comphelper::containerToSequence(aData); if (aFilterData.hasElements()) { - aMap["FilterData"] <<= aFilterData; + aMap[u"FilterData"_ustr] <<= aFilterData; aDescriptor = aMap.getAsConstPropertyValueList(); } } @@ -1148,7 +1148,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon if (!xPropertySet.is()) break; uno::Reference<graphic::XGraphic> xGraphic( - xPropertySet->getPropertyValue("Graphic"), uno::UNO_QUERY); + xPropertySet->getPropertyValue(u"Graphic"_ustr), uno::UNO_QUERY); if (!xGraphic.is()) break; @@ -1230,7 +1230,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon // XServiceInfo OUString SAL_CALL GraphicExporter::getImplementationName( ) { - return "com.sun.star.comp.Draw.GraphicExporter"; + return u"com.sun.star.comp.Draw.GraphicExporter"_ustr; } sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName ) @@ -1240,7 +1240,7 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( ) { - Sequence< OUString > aSupportedServiceNames { "com.sun.star.drawing.GraphicExportFilter" }; + Sequence< OUString > aSupportedServiceNames { u"com.sun.star.drawing.GraphicExportFilter"_ustr }; return aSupportedServiceNames; } diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx index f022bad6a270..85e92438039e 100644 --- a/svx/source/unodraw/UnoNamespaceMap.cxx +++ b/svx/source/unodraw/UnoNamespaceMap.cxx @@ -78,14 +78,14 @@ namespace svx static Sequence< OUString > NamespaceMap_getSupportedServiceNames() noexcept { - Sequence<OUString> aSupportedServiceNames { "com.sun.star.xml.NamespaceMap" }; + Sequence<OUString> aSupportedServiceNames { u"com.sun.star.xml.NamespaceMap"_ustr }; return aSupportedServiceNames; } static OUString NamespaceMap_getImplementationName() noexcept { - return "com.sun.star.comp.Svx.NamespaceMap"; + return u"com.sun.star.comp.Svx.NamespaceMap"_ustr; } namespace { diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index ed3bf9d0a697..6ef42e7d0f2a 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -277,12 +277,12 @@ uno::Type SAL_CALL SvxUnoXColorTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXColorTable::getImplementationName( ) { - return "SvxUnoXColorTable"; + return u"SvxUnoXColorTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXColorTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.ColorTable" }; + return { u"com.sun.star.drawing.ColorTable"_ustr }; } namespace { @@ -345,12 +345,12 @@ uno::Type SAL_CALL SvxUnoXLineEndTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXLineEndTable::getImplementationName( ) { - return "SvxUnoXLineEndTable"; + return u"SvxUnoXLineEndTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXLineEndTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.LineEndTable" }; + return { u"com.sun.star.drawing.LineEndTable"_ustr }; } namespace { @@ -423,12 +423,12 @@ uno::Type SAL_CALL SvxUnoXDashTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXDashTable::getImplementationName( ) { - return "SvxUnoXDashTable"; + return u"SvxUnoXDashTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXDashTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.DashTable" }; + return { u"com.sun.star.drawing.DashTable"_ustr }; } namespace { @@ -496,12 +496,12 @@ uno::Type SAL_CALL SvxUnoXHatchTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXHatchTable::getImplementationName( ) { - return "SvxUnoXHatchTable"; + return u"SvxUnoXHatchTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXHatchTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.HatchTable" }; + return { u"com.sun.star.drawing.HatchTable"_ustr }; } namespace { @@ -559,12 +559,12 @@ uno::Type SAL_CALL SvxUnoXGradientTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXGradientTable::getImplementationName( ) { - return "SvxUnoXGradientTable"; + return u"SvxUnoXGradientTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXGradientTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.GradientTable" }; + return { u"com.sun.star.drawing.GradientTable"_ustr }; } namespace { @@ -631,12 +631,12 @@ uno::Type SAL_CALL SvxUnoXBitmapTable::getElementType() // XServiceInfo OUString SAL_CALL SvxUnoXBitmapTable::getImplementationName( ) { - return "SvxUnoXBitmapTable"; + return u"SvxUnoXBitmapTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoXBitmapTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.BitmapTable" }; + return { u"com.sun.star.drawing.BitmapTable"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index a8e2e9395417..015b1147b250 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -117,7 +117,7 @@ RecoveryUI::RecoveryUI(css::uno::Reference< css::uno::XComponentContext > xCont OUString SAL_CALL RecoveryUI::getImplementationName() { - return "com.sun.star.comp.svx.RecoveryUI"; + return u"com.sun.star.comp.svx.RecoveryUI"_ustr; } sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) @@ -127,7 +127,7 @@ sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) css::uno::Sequence< OUString > SAL_CALL RecoveryUI::getSupportedServiceNames() { - return { "com.sun.star.dialog.RecoveryUI" }; + return { u"com.sun.star.dialog.RecoveryUI"_ustr }; } css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& aURL, @@ -183,7 +183,7 @@ OUString GetCrashConfigDir() #elif defined(MACOSX) OUString ustrValue = "~"; #else - OUString ustrValue = "$SYSUSERCONFIG"; + OUString ustrValue = u"$SYSUSERCONFIG"_ustr; #endif rtl::Bootstrap::expandMacros( ustrValue ); diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx index 2dc3038e591e..c0df40ddc9f2 100644 --- a/svx/source/unodraw/tableshape.cxx +++ b/svx/source/unodraw/tableshape.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star::container; SvxTableShape::SvxTableShape(SdrObject* pObj) : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_TABLE), getSvxMapProvider().GetPropertySet(SVXMAP_TABLE, SdrObject::GetGlobalDrawObjectItemPool()) ) { - SetShapeType( "com.sun.star.drawing.TableShape" ); + SetShapeType( u"com.sun.star.drawing.TableShape"_ustr ); } SvxTableShape::~SvxTableShape() noexcept diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index bba7bdbff24f..3e4074a87e73 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -72,12 +72,12 @@ bool SvxUnoBitmapTable::isValid( const NameOrIndex* pItem ) const OUString SAL_CALL SvxUnoBitmapTable::getImplementationName() { - return "SvxUnoBitmapTable"; + return u"SvxUnoBitmapTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoBitmapTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.BitmapTable" }; + return { u"com.sun.star.drawing.BitmapTable"_ustr }; } NameOrIndex* SvxUnoBitmapTable::createItem() const diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 1d50a7c3297f..8bd06375df1d 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -65,7 +65,7 @@ public: SvxUnoColorTable::SvxUnoColorTable() : pList(XPropertyList::AsColorList( XPropertyList::CreatePropertyList( - XPropertyListType::Color, SvtPathOptions().GetPalettePath(), ""))) + XPropertyListType::Color, SvtPathOptions().GetPalettePath(), u""_ustr))) { } @@ -76,12 +76,12 @@ sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceNam OUString SAL_CALL SvxUnoColorTable::getImplementationName() { - return "com.sun.star.drawing.SvxUnoColorTable"; + return u"com.sun.star.drawing.SvxUnoColorTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getSupportedServiceNames() { - uno::Sequence<OUString> aSNS { "com.sun.star.drawing.ColorTable" }; + uno::Sequence<OUString> aSNS { u"com.sun.star.drawing.ColorTable"_ustr }; return aSNS; } diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx index c460bbd7ca30..5fa6fb3723cd 100644 --- a/svx/source/unodraw/unodtabl.cxx +++ b/svx/source/unodraw/unodtabl.cxx @@ -52,11 +52,11 @@ SvxUnoDashTable::SvxUnoDashTable(SdrModel* pModel) noexcept { } -OUString SAL_CALL SvxUnoDashTable::getImplementationName() { return "SvxUnoDashTable"; } +OUString SAL_CALL SvxUnoDashTable::getImplementationName() { return u"SvxUnoDashTable"_ustr; } uno::Sequence<OUString> SAL_CALL SvxUnoDashTable::getSupportedServiceNames() { - return { "com.sun.star.drawing.DashTable" }; + return { u"com.sun.star.drawing.DashTable"_ustr }; } NameOrIndex* SvxUnoDashTable::createItem() const diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx index 74f25f4a1397..90e18e9eeacd 100644 --- a/svx/source/unodraw/unogtabl.cxx +++ b/svx/source/unodraw/unogtabl.cxx @@ -52,11 +52,14 @@ SvxUnoGradientTable::SvxUnoGradientTable(SdrModel* pModel) noexcept { } -OUString SAL_CALL SvxUnoGradientTable::getImplementationName() { return "SvxUnoGradientTable"; } +OUString SAL_CALL SvxUnoGradientTable::getImplementationName() +{ + return u"SvxUnoGradientTable"_ustr; +} uno::Sequence<OUString> SAL_CALL SvxUnoGradientTable::getSupportedServiceNames() { - return { "com.sun.star.drawing.GradientTable" }; + return { u"com.sun.star.drawing.GradientTable"_ustr }; } // XNameContainer diff --git a/svx/source/unodraw/unohtabl.cxx b/svx/source/unodraw/unohtabl.cxx index cb36192bd06f..af7126ac698e 100644 --- a/svx/source/unodraw/unohtabl.cxx +++ b/svx/source/unodraw/unohtabl.cxx @@ -55,12 +55,12 @@ SvxUnoHatchTable::SvxUnoHatchTable( SdrModel* pModel ) noexcept OUString SAL_CALL SvxUnoHatchTable::getImplementationName() { - return "SvxUnoHatchTable"; + return u"SvxUnoHatchTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.HatchTable" }; + return { u"com.sun.star.drawing.HatchTable"_ustr }; } NameOrIndex* SvxUnoHatchTable::createItem() const diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index d631ec72f4cd..d6b2dac6b2b7 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -194,7 +194,7 @@ css::uno::Reference<css::uno::XInterface> create( uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier ) { - return create(rServiceSpecifier, ""); + return create(rServiceSpecifier, u""_ustr); } uno::Reference< uno::XInterface > SvxUnoDrawMSFactory::createTextField( std::u16string_view ServiceSpecifier ) @@ -447,7 +447,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c } // create the API wrapper - rtl::Reference<SvxShape> xNewShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor::Default, "" ); + rtl::Reference<SvxShape> xNewShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor::Default, u""_ustr ); pShape = xNewShape.get(); // set shape type @@ -469,28 +469,28 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames( const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() ); uno::Sequence< OUString > aSNS{ - "com.sun.star.drawing.DashTable", - "com.sun.star.drawing.GradientTable", - "com.sun.star.drawing.HatchTable", - "com.sun.star.drawing.BitmapTable", - "com.sun.star.drawing.TransparencyGradientTable", - "com.sun.star.drawing.MarkerTable", - "com.sun.star.text.NumberingRules", - "com.sun.star.image.ImageMapRectangleObject", - "com.sun.star.image.ImageMapCircleObject", - "com.sun.star.image.ImageMapPolygonObject", - - "com.sun.star.presentation.TitleTextShape", - "com.sun.star.presentation.OutlinerShape", - "com.sun.star.presentation.SubtitleShape", - "com.sun.star.presentation.GraphicObjectShape", - "com.sun.star.presentation.ChartShape", - "com.sun.star.presentation.PageShape", - "com.sun.star.presentation.OLE2Shape", - "com.sun.star.presentation.TableShape", - "com.sun.star.presentation.OrgChartShape", - "com.sun.star.presentation.NotesShape", - "com.sun.star.presentation.HandoutShape" + u"com.sun.star.drawing.DashTable"_ustr, + u"com.sun.star.drawing.GradientTable"_ustr, + u"com.sun.star.drawing.HatchTable"_ustr, + u"com.sun.star.drawing.BitmapTable"_ustr, + u"com.sun.star.drawing.TransparencyGradientTable"_ustr, + u"com.sun.star.drawing.MarkerTable"_ustr, + u"com.sun.star.text.NumberingRules"_ustr, + u"com.sun.star.image.ImageMapRectangleObject"_ustr, + u"com.sun.star.image.ImageMapCircleObject"_ustr, + u"com.sun.star.image.ImageMapPolygonObject"_ustr, + + u"com.sun.star.presentation.TitleTextShape"_ustr, + u"com.sun.star.presentation.OutlinerShape"_ustr, + u"com.sun.star.presentation.SubtitleShape"_ustr, + u"com.sun.star.presentation.GraphicObjectShape"_ustr, + u"com.sun.star.presentation.ChartShape"_ustr, + u"com.sun.star.presentation.PageShape"_ustr, + u"com.sun.star.presentation.OLE2Shape"_ustr, + u"com.sun.star.presentation.TableShape"_ustr, + u"com.sun.star.presentation.OrgChartShape"_ustr, + u"com.sun.star.presentation.NotesShape"_ustr, + u"com.sun.star.presentation.HandoutShape"_ustr }; return comphelper::concatSequences( aSNS_ORG, aSNS ); @@ -499,7 +499,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames( // lang::XServiceInfo OUString SAL_CALL SvxUnoDrawingModel::getImplementationName() { - return "SvxUnoDrawingModel"; + return u"SvxUnoDrawingModel"_ustr; } sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName ) @@ -509,7 +509,7 @@ sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceNa uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames() { - return { "com.sun.star.drawing.DrawingDocument" }; + return { u"com.sun.star.drawing.DrawingDocument"_ustr }; } // XAnyCompareFactory @@ -626,7 +626,7 @@ void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDra OUString SAL_CALL SvxUnoDrawPagesAccess::getImplementationName( ) { - return "SvxUnoDrawPagesAccess"; + return u"SvxUnoDrawPagesAccess"_ustr; } sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& ServiceName ) @@ -636,7 +636,7 @@ sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& Servic uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNames( ) { - return { "com.sun.star.drawing.DrawPages" }; + return { u"com.sun.star.drawing.DrawPages"_ustr }; } css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel* pModel) diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index 5a6872c0b777..988b6da01e5f 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -143,12 +143,12 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::supportsService( const OUString& ServiceNa OUString SAL_CALL SvxUnoMarkerTable::getImplementationName() { - return "SvxUnoMarkerTable"; + return u"SvxUnoMarkerTable"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getSupportedServiceNames( ) { - uno::Sequence<OUString> aSNS { "com.sun.star.drawing.MarkerTable" }; + uno::Sequence<OUString> aSNS { u"com.sun.star.drawing.MarkerTable"_ustr }; return aSNS; } diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index ffdc551893bc..fc613dd23f4a 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -324,7 +324,7 @@ uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index ) SolarMutexGuard aGuard; if( (mpModel == nullptr) || (mpPage == nullptr) ) - throw lang::DisposedException("Model or Page was already disposed!"); + throw lang::DisposedException(u"Model or Page was already disposed!"_ustr); if ( Index < 0 || o3tl::make_unsigned(Index) >= mpPage->GetObjCount() ) throw lang::IndexOutOfBoundsException("Index (" + OUString::number(Index) @@ -834,7 +834,7 @@ rtl::Reference<SdrObject> SvxDrawPage::CreateSdrObject( const Reference< drawing // css::lang::XServiceInfo OUString SAL_CALL SvxDrawPage::getImplementationName() { - return "SvxDrawPage"; + return u"SvxDrawPage"_ustr; } sal_Bool SAL_CALL SvxDrawPage::supportsService( const OUString& ServiceName ) @@ -844,7 +844,7 @@ sal_Bool SAL_CALL SvxDrawPage::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() { - uno::Sequence<OUString> aSeq { "com.sun.star.drawing.ShapeCollection" }; + uno::Sequence<OUString> aSeq { u"com.sun.star.drawing.ShapeCollection"_ustr }; return aSeq; } diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index c3ab804e1a5c..db75fd0ba0a4 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -182,7 +182,7 @@ void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** pp DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) - throw beans::UnknownPropertyException( "no pool, no properties..", getXWeak()); + throw beans::UnknownPropertyException( u"no pool, no properties.."_ustr, getXWeak()); while( *ppEntries ) putAny( pPool, *ppEntries++, *pValues++ ); @@ -196,7 +196,7 @@ void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** pp DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) - throw beans::UnknownPropertyException( "no pool, no properties..", getXWeak()); + throw beans::UnknownPropertyException( u"no pool, no properties.."_ustr, getXWeak()); while( *ppEntries ) getAny( pPool, *ppEntries++, *pValue++ ); @@ -349,12 +349,12 @@ sal_Bool SAL_CALL SvxUnoDrawPool::supportsService( const OUString& ServiceName OUString SAL_CALL SvxUnoDrawPool::getImplementationName() { - return "SvxUnoDrawPool"; + return u"SvxUnoDrawPool"_ustr; } uno::Sequence< OUString > SAL_CALL SvxUnoDrawPool::getSupportedServiceNames( ) { - uno::Sequence<OUString> aSNS { "com.sun.star.drawing.Defaults" }; + uno::Sequence<OUString> aSNS { u"com.sun.star.drawing.Defaults"_ustr }; return aSNS; } diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index b730a31b54da..d210da214ee7 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -783,7 +783,7 @@ static std::span<comphelper::PropertyMapEntry const> ImplGetAdditionalWriterDraw { static comphelper::PropertyMapEntry const aSvxAdditionalDefaultsPropertyMap_Impl[] = { - { "IsFollowingTextFlow", SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0}, + { u"IsFollowingTextFlow"_ustr, SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0}, }; return aSvxAdditionalDefaultsPropertyMap_Impl; diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index bbaf8db3bff6..2cf5c33e26b6 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -573,40 +573,40 @@ struct const SvxShapeControlPropertyMapping[] = { // Warning: The first entry must be FontSlant because the any needs to be converted - { UNO_NAME_EDIT_CHAR_POSTURE, "FontSlant" }, // const sal_Int16 => css::awt::FontSlant - { UNO_NAME_EDIT_CHAR_FONTNAME, "FontName" }, - { UNO_NAME_EDIT_CHAR_FONTSTYLENAME, "FontStyleName" }, - { UNO_NAME_EDIT_CHAR_FONTFAMILY, "FontFamily" }, - { UNO_NAME_EDIT_CHAR_FONTCHARSET, "FontCharset" }, - { UNO_NAME_EDIT_CHAR_HEIGHT, "FontHeight" }, - { UNO_NAME_EDIT_CHAR_FONTPITCH, "FontPitch" }, - { UNO_NAME_EDIT_CHAR_WEIGHT, "FontWeight" }, - { UNO_NAME_EDIT_CHAR_UNDERLINE, "FontUnderline" }, - { UNO_NAME_EDIT_CHAR_STRIKEOUT, "FontStrikeout" }, - { "CharKerning", "FontKerning" }, - { "CharWordMode", "FontWordLineMode" }, - { UNO_NAME_EDIT_CHAR_COLOR, "TextColor" }, - { "CharBackColor", "CharBackColor" }, - { "CharBackTransparent", "CharBackTransparent" }, + { UNO_NAME_EDIT_CHAR_POSTURE, u"FontSlant"_ustr }, // const sal_Int16 => css::awt::FontSlant + { UNO_NAME_EDIT_CHAR_FONTNAME, u"FontName"_ustr }, + { UNO_NAME_EDIT_CHAR_FONTSTYLENAME, u"FontStyleName"_ustr }, + { UNO_NAME_EDIT_CHAR_FONTFAMILY, u"FontFamily"_ustr }, + { UNO_NAME_EDIT_CHAR_FONTCHARSET, u"FontCharset"_ustr }, + { UNO_NAME_EDIT_CHAR_HEIGHT, u"FontHeight"_ustr }, + { UNO_NAME_EDIT_CHAR_FONTPITCH, u"FontPitch"_ustr }, + { UNO_NAME_EDIT_CHAR_WEIGHT, u"FontWeight"_ustr }, + { UNO_NAME_EDIT_CHAR_UNDERLINE, u"FontUnderline"_ustr }, + { UNO_NAME_EDIT_CHAR_STRIKEOUT, u"FontStrikeout"_ustr }, + { u"CharKerning"_ustr, u"FontKerning"_ustr }, + { u"CharWordMode"_ustr, u"FontWordLineMode"_ustr }, + { UNO_NAME_EDIT_CHAR_COLOR, u"TextColor"_ustr }, + { u"CharBackColor"_ustr, u"CharBackColor"_ustr }, + { u"CharBackTransparent"_ustr, u"CharBackTransparent"_ustr }, { UNO_NAME_TEXT_CHAINNEXTNAME, UNO_NAME_TEXT_CHAINNEXTNAME }, - { "CharRelief", "FontRelief" }, - { "CharUnderlineColor", "TextLineColor" }, - { UNO_NAME_EDIT_PARA_ADJUST, "Align" }, - { "TextVerticalAdjust", "VerticalAlign" }, - { "ControlBackground", "BackgroundColor" }, - { "ControlSymbolColor", "SymbolColor" }, - { "ControlBorder", "Border" }, - { "ControlBorderColor", "BorderColor" }, - { "ControlTextEmphasis", "FontEmphasisMark" }, - { "ImageScaleMode", "ScaleMode" }, - { "ControlWritingMode", "WritingMode" }, + { u"CharRelief"_ustr, u"FontRelief"_ustr }, + { u"CharUnderlineColor"_ustr, u"TextLineColor"_ustr }, + { UNO_NAME_EDIT_PARA_ADJUST, u"Align"_ustr }, + { u"TextVerticalAdjust"_ustr, u"VerticalAlign"_ustr }, + { u"ControlBackground"_ustr, u"BackgroundColor"_ustr }, + { u"ControlSymbolColor"_ustr, u"SymbolColor"_ustr }, + { u"ControlBorder"_ustr, u"Border"_ustr }, + { u"ControlBorderColor"_ustr, u"BorderColor"_ustr }, + { u"ControlTextEmphasis"_ustr, u"FontEmphasisMark"_ustr }, + { u"ImageScaleMode"_ustr, u"ScaleMode"_ustr }, + { u"ControlWritingMode"_ustr, u"WritingMode"_ustr }, //added for exporting OCX control - { "ControlTypeinMSO", "ControlTypeinMSO" }, - { "ObjIDinMSO", "ObjIDinMSO" }, - { "CharCaseMap", "CharCaseMap" }, - { "CharColorTheme", "CharColorTheme" }, - { "CharColorTintOrShade", "CharColorTintOrShade" }, - { UNO_NAME_EDIT_CHAR_COMPLEX_COLOR, "CharComplexColor" }, + { u"ControlTypeinMSO"_ustr, u"ControlTypeinMSO"_ustr }, + { u"ObjIDinMSO"_ustr, u"ObjIDinMSO"_ustr }, + { u"CharCaseMap"_ustr, u"CharCaseMap"_ustr }, + { u"CharColorTheme"_ustr, u"CharColorTheme"_ustr }, + { u"CharColorTintOrShade"_ustr, u"CharColorTintOrShade"_ustr }, + { UNO_NAME_EDIT_CHAR_COMPLEX_COLOR, u"CharComplexColor"_ustr }, }; namespace diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index f8801f064049..58ad9a6b2db0 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -450,8 +450,8 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL ) ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist(); uno::Sequence< beans::PropertyValue > aMediaDescr{ - comphelper::makePropertyValue("URL", aLinkURL), - comphelper::makePropertyValue("Referer", referer_) + comphelper::makePropertyValue(u"URL"_ustr, aLinkURL), + comphelper::makePropertyValue(u"Referer"_ustr, referer_) }; uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler(); @@ -564,7 +564,7 @@ OUString SvxOle2Shape::GetAndClearInitialFrameURL() SvxAppletShape::SvxAppletShape(SdrObject* pObject, OUString referer) : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool())) { - SetShapeType( "com.sun.star.drawing.AppletShape" ); + SetShapeType( u"com.sun.star.drawing.AppletShape"_ustr ); } SvxAppletShape::~SvxAppletShape() noexcept @@ -576,7 +576,7 @@ void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID ); createObject(aAppletClassId); - SetShapeType( "com.sun.star.drawing.AppletShape" ); + SetShapeType( u"com.sun.star.drawing.AppletShape"_ustr ); } void SAL_CALL SvxAppletShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue ) @@ -635,7 +635,7 @@ bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemP SvxPluginShape::SvxPluginShape(SdrObject* pObject, OUString referer) : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool())) { - SetShapeType( "com.sun.star.drawing.PluginShape" ); + SetShapeType( u"com.sun.star.drawing.PluginShape"_ustr ); } SvxPluginShape::~SvxPluginShape() noexcept @@ -647,7 +647,7 @@ void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID ); createObject(aPluginClassId); - SetShapeType( "com.sun.star.drawing.PluginShape" ); + SetShapeType( u"com.sun.star.drawing.PluginShape"_ustr ); } void SAL_CALL SvxPluginShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue ) @@ -706,7 +706,7 @@ bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemP SvxFrameShape::SvxFrameShape(SdrObject* pObject, OUString referer) : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool())) { - SetShapeType( "com.sun.star.drawing.FrameShape" ); + SetShapeType( u"com.sun.star.drawing.FrameShape"_ustr ); } SvxFrameShape::~SvxFrameShape() noexcept @@ -724,12 +724,12 @@ void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) { uno::Reference<beans::XPropertySet> xSet(static_cast<OWeakObject *>(this), uno::UNO_QUERY); if (xSet) - xSet->getPropertyValue("FrameURL") >>= m_sInitialFrameURL; + xSet->getPropertyValue(u"FrameURL"_ustr) >>= m_sInitialFrameURL; SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID ); createObject(aIFrameClassId); - SetShapeType( "com.sun.star.drawing.FrameShape" ); + SetShapeType( u"com.sun.star.drawing.FrameShape"_ustr ); } void SAL_CALL SvxFrameShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue ) @@ -790,7 +790,7 @@ SvxMediaShape::SvxMediaShape(SdrObject* pObj, OUString referer) : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) ), referer_(std::move(referer)) { - SetShapeType( "com.sun.star.drawing.MediaShape" ); + SetShapeType( u"com.sun.star.drawing.MediaShape"_ustr ); } @@ -822,7 +822,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr if( rValue >>= aURL ) { bOk = true; - aItem.setURL( aURL, "", referer_ ); + aItem.setURL( aURL, u""_ustr, referer_ ); } } #endif @@ -937,7 +937,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr { css::uno::Any exc = cppu::getCaughtException(); throw css::lang::WrappedTargetException( - "ContentCreationException Setting InputStream!", + u"ContentCreationException Setting InputStream!"_ustr, getXWeak(), exc); } @@ -945,7 +945,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetException( - "CommandFailedException Setting InputStream!", + u"CommandFailedException Setting InputStream!"_ustr, getXWeak(), anyEx); } @@ -1030,14 +1030,14 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetException( - "ContentCreationException Getting InputStream!", + u"ContentCreationException Getting InputStream!"_ustr, getXWeak(), anyEx ); } catch (const css::ucb::CommandFailedException&) { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetException( - "CommandFailedException Getting InputStream!", + u"CommandFailedException Getting InputStream!"_ustr, getXWeak(), anyEx ); } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 838d7e20b21c..934c72c85cfb 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1418,9 +1418,9 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem { const basegfx::B2DPolyPolygon aEmptyPoly; if( nWID == sal_uInt16(XATTR_LINEEND) ) - rSet.Put( XLineEndItem( "", aEmptyPoly ) ); + rSet.Put( XLineEndItem( u""_ustr, aEmptyPoly ) ); else - rSet.Put( XLineStartItem( "", aEmptyPoly ) ); + rSet.Put( XLineStartItem( u""_ustr, aEmptyPoly ) ); return true; } @@ -1659,7 +1659,7 @@ void SAL_CALL SvxShape::setPropertyValues( const css::uno::Sequence< OUString >& const sal_Int32 nCount = aPropertyNames.getLength(); if (nCount != aValues.getLength()) - throw css::lang::IllegalArgumentException("lengths do not match", + throw css::lang::IllegalArgumentException(u"lengths do not match"_ustr, getXWeak(), -1); const OUString* pNames = aPropertyNames.getConstArray(); @@ -2477,7 +2477,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn if (css::uno::Reference<css::beans::XPropertySet> xPropSet{ xTextColumns, css::uno::UNO_QUERY }) { - auto aVal = xPropSet->getPropertyValue("AutomaticDistance"); + auto aVal = xPropSet->getPropertyValue(u"AutomaticDistance"_ustr); if (sal_Int32 nSpacing; aVal >>= nSpacing) pTextObj->SetTextColumnsSpacing(nSpacing); } @@ -2517,7 +2517,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn " Property Type: " + pProperty->aType.getTypeName() + " Property Name: " + pProperty->aName + " Property nWID: " + OUString::number(pProperty->nWID) - + " Value Type: " + (rValue.hasValue() ? rValue.getValueTypeName() : "void (no value)")); + + " Value Type: " + (rValue.hasValue() ? rValue.getValueTypeName() : u"void (no value)"_ustr)); throw lang::IllegalArgumentException(sExceptionMessage, nullptr, 1); } @@ -2944,7 +2944,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn css::uno::Reference<css::text::XTextColumns> xCols(xIf, css::uno::UNO_QUERY_THROW); xCols->setColumnCount(pTextObj->GetTextColumnsNumber()); css::uno::Reference<css::beans::XPropertySet> xProp(xIf, css::uno::UNO_QUERY_THROW); - xProp->setPropertyValue("AutomaticDistance", + xProp->setPropertyValue(u"AutomaticDistance"_ustr, css::uno::Any(pTextObj->GetTextColumnsSpacing())); rValue <<= xIf; } @@ -3147,7 +3147,7 @@ uno::Sequence<uno::Any> SvxShape::getPropertyDefaults( OUString SAL_CALL SvxShape::getImplementationName() { - return "SvxShape"; + return u"SvxShape"_ustr; } constexpr OUString sUNO_service_style_ParagraphProperties = u"com.sun.star.style.ParagraphProperties"_ustr; @@ -3837,7 +3837,7 @@ uno::Any SAL_CALL SvxShapeText::queryAggregation( const uno::Type & rType ) OUString SAL_CALL SvxShapeText::getImplementationName() { - return "SvxShapeText"; + return u"SvxShapeText"_ustr; } diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index fd1fa7239771..3a58ab514ff3 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -185,7 +185,7 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() // XServiceInfo OUString SAL_CALL SvxShapeCollection::getImplementationName() { - return "com.sun.star.drawing.SvxShapeCollection"; + return u"com.sun.star.drawing.SvxShapeCollection"_ustr; } sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceName ) @@ -195,7 +195,7 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() { - return { "com.sun.star.drawing.Shapes", "com.sun.star.drawing.ShapeCollection" }; + return { u"com.sun.star.drawing.Shapes"_ustr, u"com.sun.star.drawing.ShapeCollection"_ustr }; } void SvxShapeCollection::getAllShapes(std::vector<css::uno::Reference<css::drawing::XShape>>& rShapes) const diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index e445978d98bb..37314e6f1bb6 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -586,7 +586,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() if (aStr.isEmpty()) { // its empty, so we have to force the outliner to initialise itself - mpOutliner->SetText( "", mpOutliner->GetParagraph( 0 ) ); + mpOutliner->SetText( u""_ustr, mpOutliner->GetParagraph( 0 ) ); auto pCell = dynamic_cast<sdr::table::Cell*>(mpText); if (pCell && pCell->GetStyleSheet()) diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx index 33cab4364937..905947798ded 100644 --- a/svx/source/unodraw/unottabl.cxx +++ b/svx/source/unodraw/unottabl.cxx @@ -53,12 +53,12 @@ SvxUnoTransGradientTable::SvxUnoTransGradientTable(SdrModel* pModel) noexcept OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() { - return "SvxUnoTransGradientTable"; + return u"SvxUnoTransGradientTable"_ustr; } uno::Sequence<OUString> SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames() { - return { "com.sun.star.drawing.TransparencyGradientTable" }; + return { u"com.sun.star.drawing.TransparencyGradientTable"_ustr }; } NameOrIndex* SvxUnoTransGradientTable::createItem() const diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 6e9f072585e7..495945ef7e96 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -109,7 +109,7 @@ void SAL_CALL GalleryItem::release() OUString SAL_CALL GalleryItem::getImplementationName() { - return "com.sun.star.comp.gallery.GalleryItem"; + return u"com.sun.star.comp.gallery.GalleryItem"_ustr; } sal_Bool SAL_CALL GalleryItem::supportsService( const OUString& ServiceName ) @@ -119,7 +119,7 @@ sal_Bool SAL_CALL GalleryItem::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL GalleryItem::getSupportedServiceNames() { - return { "com.sun.star.gallery.GalleryItem" }; + return { u"com.sun.star.gallery.GalleryItem"_ustr }; } uno::Sequence< uno::Type > SAL_CALL GalleryItem::getTypes() @@ -171,22 +171,22 @@ rtl::Reference<::comphelper::PropertySetInfo> GalleryItem::createPropertySetInfo { static ::comphelper::PropertyMapEntry const aEntries[] = { - { OUString("GalleryItemType"), UNOGALLERY_GALLERYITEMTYPE, cppu::UnoType<sal_Int8>::get(), + { u"GalleryItemType"_ustr, UNOGALLERY_GALLERYITEMTYPE, cppu::UnoType<sal_Int8>::get(), beans::PropertyAttribute::READONLY, 0 }, - { OUString("URL"), UNOGALLERY_URL, ::cppu::UnoType<OUString>::get(), + { u"URL"_ustr, UNOGALLERY_URL, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 }, - { OUString("Title"), UNOGALLERY_TITLE, ::cppu::UnoType<OUString>::get(), + { u"Title"_ustr, UNOGALLERY_TITLE, ::cppu::UnoType<OUString>::get(), 0, 0 }, - { OUString("Thumbnail"), UNOGALLERY_THUMBNAIL, cppu::UnoType<graphic::XGraphic>::get(), + { u"Thumbnail"_ustr, UNOGALLERY_THUMBNAIL, cppu::UnoType<graphic::XGraphic>::get(), beans::PropertyAttribute::READONLY, 0 }, - { OUString("Graphic"), UNOGALLERY_GRAPHIC, cppu::UnoType<graphic::XGraphic>::get(), + { u"Graphic"_ustr, UNOGALLERY_GRAPHIC, cppu::UnoType<graphic::XGraphic>::get(), beans::PropertyAttribute::READONLY, 0 }, - { OUString("Drawing"), UNOGALLERY_DRAWING, cppu::UnoType<lang::XComponent>::get(), + { u"Drawing"_ustr, UNOGALLERY_DRAWING, cppu::UnoType<lang::XComponent>::get(), beans::PropertyAttribute::READONLY, 0 }, }; diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index 0802d91a2e63..27f2afd3b360 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -66,7 +66,7 @@ GalleryTheme::~GalleryTheme() OUString SAL_CALL GalleryTheme::getImplementationName() { - return "com.sun.star.comp.gallery.GalleryTheme"; + return u"com.sun.star.comp.gallery.GalleryTheme"_ustr; } sal_Bool SAL_CALL GalleryTheme::supportsService( const OUString& ServiceName ) @@ -76,7 +76,7 @@ sal_Bool SAL_CALL GalleryTheme::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL GalleryTheme::getSupportedServiceNames() { - return { "com.sun.star.gallery.GalleryTheme" }; + return { u"com.sun.star.gallery.GalleryTheme"_ustr }; } uno::Sequence< uno::Type > SAL_CALL GalleryTheme::getTypes() diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index fb7e49e9c5b5..6e8c02037936 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -85,7 +85,7 @@ GalleryThemeProvider::GalleryThemeProvider() : OUString SAL_CALL GalleryThemeProvider::getImplementationName() { - return "com.sun.star.comp.gallery.GalleryThemeProvider"; + return u"com.sun.star.comp.gallery.GalleryThemeProvider"_ustr; } sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& ServiceName ) @@ -95,7 +95,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames() { - uno::Sequence<OUString> aSeq { "com.sun.star.gallery.GalleryThemeProvider" }; + uno::Sequence<OUString> aSeq { u"com.sun.star.gallery.GalleryThemeProvider"_ustr }; return aSeq; } diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index 173575af00b1..beb39da14ff8 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -375,8 +375,8 @@ void SvXMLEmbeddedObjectHelper::ImplReadObject( // This is an ole object uno::Reference< beans::XPropertySet > xProps( xStm, uno::UNO_QUERY_THROW ); xProps->setPropertyValue( - "MediaType", - uno::Any( OUString( "application/vnd.sun.star.oleobject" ) ) ); + u"MediaType"_ustr, + uno::Any( u"application/vnd.sun.star.oleobject"_ustr ) ); xStm->getOutputStream()->closeOutput(); } @@ -558,7 +558,7 @@ OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUSt { css::uno::Any anyEx = cppu::getCaughtException(); throw WrappedTargetRuntimeException( - "SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL non-RuntimeException", + u"SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL non-RuntimeException"_ustr, getXWeak(), anyEx); } return sRet; @@ -625,7 +625,7 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName( mxTempStorage = comphelper::OStorageHelper::GetTemporaryStorage(); Sequence < beans::PropertyValue > aDummy, - aEmbDescr{ comphelper::makePropertyValue("StoreVisualReplacement", + aEmbDescr{ comphelper::makePropertyValue(u"StoreVisualReplacement"_ustr, !bOasisFormat) }; if ( !bOasisFormat ) { diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 03e42c961b13..432288a710dc 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -473,7 +473,7 @@ SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const OUSt if (aRet.xStream.is() && (SvXMLGraphicHelperMode::Write == meCreateMode)) { uno::Reference<beans::XPropertySet> xProps(aRet.xStream, uno::UNO_QUERY); - xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::Any(true)); + xProps->setPropertyValue(u"UseCommonStoragePasswordEncryption"_ustr, uno::Any(true)); } return aRet; @@ -561,7 +561,7 @@ void splitUserDataFromURL(OUString const & rWholeURL, OUString & rJustURL, OUStr // XGraphicObjectResolver OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const OUString& /*rURL*/ ) { - throw uno::RuntimeException("XGraphicObjectResolver has been removed in LibreOffice 6.1"); + throw uno::RuntimeException(u"XGraphicObjectResolver has been removed in LibreOffice 6.1"_ustr); } // XGraphicStorageHandler @@ -737,7 +737,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X // set stream properties (MediaType/Compression) if (!aMimeType.isEmpty()) { - xProps->setPropertyValue("MediaType", uno::Any(aMimeType)); + xProps->setPropertyValue(u"MediaType"_ustr, uno::Any(aMimeType)); } // picture formats that actually _do_ benefit from zip @@ -770,7 +770,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X } } - xProps->setPropertyValue("Compressed", Any(bCompressed)); + xProps->setPropertyValue(u"Compressed"_ustr, Any(bCompressed)); std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(aStream.xStream)); if (bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData()) @@ -1060,8 +1060,8 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::resolveOutputStream( const Ref OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName() { if( m_eGraphicHelperMode == SvXMLGraphicHelperMode::Read ) - return "com.sun.star.comp.Svx.GraphicImportHelper"; - return "com.sun.star.comp.Svx.GraphicExportHelper"; + return u"com.sun.star.comp.Svx.GraphicImportHelper"_ustr; + return u"com.sun.star.comp.Svx.GraphicExportHelper"_ustr; } sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUString& ServiceName ) @@ -1071,9 +1071,9 @@ sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUStrin Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServiceNames() { - return { "com.sun.star.document.GraphicObjectResolver", - "com.sun.star.document.GraphicStorageHandler", - "com.sun.star.document.BinaryStreamResolver" }; + return { u"com.sun.star.document.GraphicObjectResolver"_ustr, + u"com.sun.star.document.GraphicStorageHandler"_ustr, + u"com.sun.star.document.BinaryStreamResolver"_ustr }; } } @@ -1126,7 +1126,7 @@ namespace svx { try { uno::Reference<util::XCancellable> const xGradient( - xModelFactory->createInstance("com.sun.star.drawing.GradientTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.GradientTable"_ustr), uno::UNO_QUERY ); if (xGradient.is()) { @@ -1134,7 +1134,7 @@ namespace svx { } uno::Reference<util::XCancellable> const xHatch( - xModelFactory->createInstance("com.sun.star.drawing.HatchTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY ); if (xHatch.is()) { @@ -1142,7 +1142,7 @@ namespace svx { } uno::Reference<util::XCancellable> const xBitmap( - xModelFactory->createInstance("com.sun.star.drawing.BitmapTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY ); if (xBitmap.is()) { @@ -1150,7 +1150,7 @@ namespace svx { } uno::Reference<util::XCancellable> const xTransGradient( - xModelFactory->createInstance("com.sun.star.drawing.TransparencyGradientTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY ); if (xTransGradient.is()) { @@ -1158,7 +1158,7 @@ namespace svx { } uno::Reference<util::XCancellable> const xMarker( - xModelFactory->createInstance("com.sun.star.drawing.MarkerTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.MarkerTable"_ustr), uno::UNO_QUERY ); if (xMarker.is()) { @@ -1166,7 +1166,7 @@ namespace svx { } uno::Reference<util::XCancellable> const xDashes( - xModelFactory->createInstance("com.sun.star.drawing.DashTable"), + xModelFactory->createInstance(u"com.sun.star.drawing.DashTable"_ustr), uno::UNO_QUERY ); if (xDashes.is()) { diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 622bbb2d830b..c78e92c70d2d 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -145,7 +145,7 @@ SvxXMLXTableExportComponent::SvxXMLXTableExportComponent( const uno::Reference<xml::sax::XDocumentHandler> & rHandler, const uno::Reference<container::XNameContainer >& xTable, uno::Reference<document::XGraphicStorageHandler> const & xGraphicStorageHandler) -: SvXMLExport(rContext, "", /*rFileName*/"", rHandler, nullptr, FieldUnit::MM_100TH, SvXMLExportFlags::NONE), +: SvXMLExport(rContext, u""_ustr, /*rFileName*/u""_ustr, rHandler, nullptr, FieldUnit::MM_100TH, SvXMLExportFlags::NONE), mxTable( xTable ) { @@ -173,10 +173,10 @@ static void initializeStreamMetadata( const uno::Reference< uno::XInterface > &x try { - xProps->setPropertyValue("MediaType", uno::Any( OUString( "text/xml" ) ) ); + xProps->setPropertyValue(u"MediaType"_ustr, uno::Any( u"text/xml"_ustr ) ); // use stock encryption - xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::Any( true ) ); + xProps->setPropertyValue(u"UseCommonStoragePasswordEncryption"_ustr, uno::Any( true ) ); } catch ( const uno::Exception & ) { TOOLS_WARN_EXCEPTION("svx", "exception setting stream metadata"); @@ -188,7 +188,7 @@ static void createStorageStream( uno::Reference < io::XOutputStream > *xOut, const uno::Reference < embed::XStorage >& xSubStorage ) { uno::Reference < io::XStream > xStream = xSubStorage->openStreamElement( - "Content.xml", + u"Content.xml"_ustr, embed::ElementModes::WRITE ); rxGraphicHelper = SvXMLGraphicHelper::Create( xSubStorage, SvXMLGraphicHelperMode::Write ); initializeStreamMetadata( xStream ); diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index c58ae3f7ce8b..a6d2b80194b4 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -376,7 +376,7 @@ SvxXMLXTableImport::SvxXMLXTableImport( const css::uno::Reference< css::uno::XComponentContext >& rContext, const uno::Reference< XNameContainer > & rTable, uno::Reference<XGraphicStorageHandler> const & xGraphicStorageHandler) -: SvXMLImport(rContext, "", SvXMLImportFlags::NONE), +: SvXMLImport(rContext, u""_ustr, SvXMLImportFlags::NONE), mrTable( rTable ) { SetGraphicStorageHandler(xGraphicStorageHandler); @@ -386,17 +386,17 @@ SvxXMLXTableImport::SvxXMLXTableImport( GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW); GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK); - GetNamespaceMap().Add( "__ooo", GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO ); - GetNamespaceMap().Add( "__xlink", GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( u"__ooo"_ustr, GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO ); + GetNamespaceMap().Add( u"__xlink"_ustr, GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); // OOo namespaces for reading OOo 1.1 files - GetNamespaceMap().Add( "___office", + GetNamespaceMap().Add( u"___office"_ustr, GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE ); - GetNamespaceMap().Add( "___draw", + GetNamespaceMap().Add( u"___draw"_ustr, GetXMLToken(XML_N_DRAW_OOO), XML_NAMESPACE_DRAW ); - GetNamespaceMap().Add( "___loext", + GetNamespaceMap().Add( u"___loext"_ustr, GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT); } @@ -409,7 +409,7 @@ static void openStorageStream( xml::sax::InputSource *pParserInput, rtl::Reference<SvXMLGraphicHelper>& rxGraphicHelper, const uno::Reference < embed::XStorage >& xStorage ) { - uno::Reference < io::XStream > xIStm( xStorage->openStreamElement( "Content.xml", embed::ElementModes::READ ), uno::UNO_SET_THROW ); + uno::Reference < io::XStream > xIStm( xStorage->openStreamElement( u"Content.xml"_ustr, embed::ElementModes::READ ), uno::UNO_SET_THROW ); pParserInput->aInputStream = xIStm->getInputStream(); rxGraphicHelper = SvXMLGraphicHelper::Create( xStorage, SvXMLGraphicHelperMode::Read ); } diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 18f574f51b70..db4ef7152089 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -200,7 +200,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, rFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); if (pMediaType) if (auto xGraphic = rGraphic.GetXGraphic().query<css::beans::XPropertySet>()) - xGraphic->getPropertyValue("MimeType") >>= *pMediaType; + xGraphic->getPropertyValue(u"MimeType"_ustr) >>= *pMediaType; SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC); SvStream* pOStm = aMedium.GetOutStream(); @@ -229,7 +229,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); if (pMediaType) if (auto xGraphic = rGraphic.GetXGraphic().query<css::beans::XPropertySet>()) - xGraphic->getPropertyValue("MimeType") >>= *pMediaType; + xGraphic->getPropertyValue(u"MimeType"_ustr) >>= *pMediaType; SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC); SvStream* pOStm = aMedium.GetOutStream(); diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 22f8f62bbeaa..66811b133d97 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -728,8 +728,8 @@ bool XLineDashItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const aLineDash.Distance = rXD.GetDistance(); uno::Sequence< beans::PropertyValue > aPropSeq{ - comphelper::makePropertyValue("Name", SvxUnogetApiNameForItem(Which(), GetName())), - comphelper::makePropertyValue("LineDash", aLineDash) + comphelper::makePropertyValue(u"Name"_ustr, SvxUnogetApiNameForItem(Which(), GetName())), + comphelper::makePropertyValue(u"LineDash"_ustr, aLineDash) }; rVal <<= aPropSeq; break; @@ -2279,8 +2279,8 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c // create sequence uno::Sequence< beans::PropertyValue > aPropSeq{ - comphelper::makePropertyValue("Name", SvxUnogetApiNameForItem(Which(), GetName())), - comphelper::makePropertyValue("FillGradient", aGradient2) + comphelper::makePropertyValue(u"Name"_ustr, SvxUnogetApiNameForItem(Which(), GetName())), + comphelper::makePropertyValue(u"FillGradient"_ustr, aGradient2) }; rVal <<= aPropSeq; break; @@ -2735,8 +2735,8 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons aUnoHatch.Angle = m_aHatch.GetAngle().get(); uno::Sequence< beans::PropertyValue > aPropSeq{ - comphelper::makePropertyValue("Name", SvxUnogetApiNameForItem(Which(), GetName())), - comphelper::makePropertyValue("FillHatch", aUnoHatch) + comphelper::makePropertyValue(u"Name"_ustr, SvxUnogetApiNameForItem(Which(), GetName())), + comphelper::makePropertyValue(u"FillHatch"_ustr, aUnoHatch) }; rVal <<= aPropSeq; break; diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index bf6c3c21d299..b8949e3edc0c 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -211,8 +211,8 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const // member-id 0 => complete item (e.g. for toolbars) DBG_ASSERT( nMemberId == 0, "invalid member-id" ); uno::Sequence< beans::PropertyValue > aPropSeq{ - comphelper::makePropertyValue("Name", aInternalName), - comphelper::makePropertyValue("Bitmap", xBmp) + comphelper::makePropertyValue(u"Name"_ustr, aInternalName), + comphelper::makePropertyValue(u"Bitmap"_ustr, xBmp) }; rVal <<= aPropSeq; diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index b4f5769cad99..fc380fde55d7 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -34,7 +34,7 @@ XColorListRef XColorList::CreateStdColorList() XPropertyList::CreatePropertyList( XPropertyListType::Color, !comphelper::IsFuzzing() ? SvtPathOptions().GetPalettePath() : - "", "")); + u""_ustr, u""_ustr)); } XColorListRef XColorList::GetStdColorList() diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index e842e5e854cc..ea7385063701 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -100,7 +100,7 @@ XPropertyList::XPropertyList( XPropertyListType type, OUString aPath, OUString aReferer ) : meType ( type ), - maName ( "standard" ), + maName ( u"standard"_ustr ), maPath (std::move( aPath )), maReferer (std::move( aReferer )), mbListDirty ( true ), @@ -361,7 +361,7 @@ XPropertyList::CreatePropertyListFromURL( XPropertyListType t, aPathURL.removeFinalSlash(); XPropertyListRef pList = XPropertyList::CreatePropertyList( - t, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" ); + t, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), u""_ustr ); pList->SetName( aURL.getName() ); return pList; |