chart2/qa/extras/uichart.cxx | 2 chart2/source/tools/ErrorBar.cxx | 30 comphelper/qa/string/test_string.cxx | 10 comphelper/source/misc/configuration.cxx | 2 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 2 cppcanvas/qa/unit/test.cxx | 4 cppuhelper/source/factory.cxx | 4 desktop/qa/desktop_lib/test_desktop_lib.cxx | 4 editeng/source/accessibility/AccessibleEditableTextPara.cxx | 4 editeng/source/uno/unotext.cxx | 12 emfio/qa/cppunit/wmf/wmfimporttest.cxx | 6 extensions/source/bibliography/bibload.cxx | 2 filter/qa/unit/textfilterdetect.cxx | 6 filter/source/pdf/pdfexport.cxx | 2 filter/source/svg/svgexport.cxx | 26 forms/source/richtext/richtextunowrapper.cxx | 4 framework/source/uielement/langselectionstatusbarcontroller.cxx | 2 i18nlangtag/source/languagetag/languagetag.cxx | 2 i18npool/qa/cppunit/test_characterclassification.cxx | 84 i18npool/qa/cppunit/test_defaultnumberingprovider.cxx | 56 i18npool/qa/cppunit/test_textsearch.cxx | 18 lingucomponent/source/lingutil/lingutil.cxx | 10 lotuswordpro/source/filter/lwpfribptr.cxx | 2 lotuswordpro/source/filter/lwpnumericfmt.hxx | 10 o3tl/qa/test-string_view.cxx | 4 oox/qa/unit/drawingml.cxx | 14 oox/qa/unit/shape.cxx | 180 oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 2 oox/source/drawingml/fontworkhelpers.cxx | 131 oox/source/drawingml/shape.cxx | 42 oox/source/export/DMLPresetShapeExport.cxx | 90 oox/source/export/drawingml.cxx | 8 oox/source/shape/WpsContext.cxx | 53 sal/qa/rtl/math/test-rtl-math.cxx | 2 sal/qa/rtl/textenc/rtl_textcvt.cxx | 24 sal/qa/rtl/uri/rtl_testuri.cxx | 6 sc/qa/extras/accessibility/basics.cxx | 4 sc/qa/extras/macros-test.cxx | 6 sc/qa/extras/vba-macro-test.cxx | 3 sc/qa/unit/subsequent_export_test2.cxx | 4 sc/qa/unit/subsequent_filters_test3.cxx | 28 sc/qa/unit/subsequent_filters_test4.cxx | 12 sc/qa/unit/tiledrendering/tiledrendering.cxx | 4 sc/qa/unit/ucalc.cxx | 4 sc/qa/unit/uicalc/uicalc2.cxx | 8 sc/source/filter/xml/SparklineGroupsExport.cxx | 24 sc/source/ui/dialogs/SparklineDataRangeDialog.cxx | 2 sc/source/ui/dialogs/SparklineDialog.cxx | 2 sc/source/ui/unoobj/condformatuno.cxx | 46 sc/source/ui/unoobj/docuno.cxx | 2 sd/qa/unit/TextFittingTest.cxx | 12 sd/qa/unit/a11y/layout.cxx | 6 sd/qa/unit/export-tests-ooxml1.cxx | 7 sd/qa/unit/export-tests-ooxml2.cxx | 2 sd/qa/unit/import-tests-smartart.cxx | 6 sd/qa/unit/import-tests.cxx | 32 sd/qa/unit/layout-tests.cxx | 3 sd/qa/unit/tiledrendering/tiledrendering.cxx | 6 sd/qa/unit/uiimpress.cxx | 28 sd/source/core/stlsheet.cxx | 16 sd/source/core/text/textapi.cxx | 8 sd/source/ui/slideshow/slideshow.cxx | 32 sd/source/ui/unoidl/unolayer.cxx | 12 sd/source/ui/unoidl/unomodel.cxx | 8 sd/source/ui/unoidl/unoobj.cxx | 4 sd/source/ui/unoidl/unopage.cxx | 108 sd/source/ui/unoidl/unosrch.cxx | 6 sdext/qa/unit/pdfimport.cxx | 20 sdext/source/pdfimport/inc/contentsink.hxx | 2 sdext/source/pdfimport/tree/drawtreevisiting.cxx | 2 sdext/source/pdfimport/tree/pdfiprocessor.cxx | 4 sdext/source/pdfimport/tree/writertreevisiting.cxx | 2 sdext/source/pdfimport/wrapper/wrapper.cxx | 52 sfx2/source/doc/iframe.cxx | 16 sfx2/source/view/viewfrm.cxx | 4 starmath/inc/mathml/element.hxx | 4 starmath/inc/token.hxx | 6 starmath/qa/cppunit/test_cursor.cxx | 4 starmath/qa/cppunit/test_nodetotextvisitors.cxx | 4 starmath/qa/extras/mmlexport-test.cxx | 8 starmath/qa/extras/mmlimport-test.cxx | 10 starmath/source/cursor.cxx | 4 starmath/source/mathml/attribute.cxx | 16 starmath/source/mathml/export.cxx | 14 starmath/source/mathml/import.cxx | 25 starmath/source/mathml/mathmlMo.cxx | 2201 ++--- starmath/source/mathml/mathmlimport.cxx | 42 starmath/source/mathml/xparsmlbase.cxx | 4254 +++++----- starmath/source/parse5.cxx | 538 - starmath/source/smediteng.cxx | 2 svl/qa/unit/svl.cxx | 26 svl/qa/unit/test_URIHelper.cxx | 38 svl/source/numbers/zforfind.cxx | 6 svx/qa/unit/svdraw.cxx | 4 svx/source/dialog/dlgunit.hxx | 2 svx/source/stbctrls/selctrl.cxx | 2 svx/source/svdraw/svdoashp.cxx | 4 svx/source/svdraw/svdobj.cxx | 2 svx/source/table/cell.cxx | 16 svx/source/toolbars/extrusionbar.cxx | 18 svx/source/unodraw/SvxXTextColumns.cxx | 18 svx/source/unodraw/unoprov.cxx | 276 sw/qa/core/crsr/crsr.cxx | 4 sw/qa/core/text/text.cxx | 14 sw/qa/core/theme/ThemeTest.cxx | 36 sw/qa/core/unocore/unocore.cxx | 8 sw/qa/extras/accessibility/basics.cxx | 10 sw/qa/extras/accessibility/dialogs.cxx | 24 sw/qa/extras/accessibility/tdf155705.cxx | 2 sw/qa/extras/accessibility/unicode.cxx | 22 sw/qa/extras/globalfilter/globalfilter.cxx | 2 sw/qa/extras/htmlexport/htmlexport.cxx | 10 sw/qa/extras/htmlimport/htmlimport.cxx | 4 sw/qa/extras/layout/layout.cxx | 2 sw/qa/extras/mailmerge/mailmerge.cxx | 18 sw/qa/extras/odfexport/odfexport2.cxx | 6 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 28 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 4 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 14 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 32 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 22 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 4 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 4 sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 14 sw/qa/extras/rtfexport/rtfexport.cxx | 42 sw/qa/extras/rtfexport/rtfexport2.cxx | 17 sw/qa/extras/rtfexport/rtfexport4.cxx | 26 sw/qa/extras/rtfexport/rtfexport5.cxx | 15 sw/qa/extras/rtfexport/rtfexport6.cxx | 19 sw/qa/extras/rtfimport/rtfimport.cxx | 5 sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 sw/qa/extras/txtexport/txtexport.cxx | 4 sw/qa/extras/txtimport/txtimport.cxx | 14 sw/qa/extras/uiwriter/uiwriter.cxx | 14 sw/qa/extras/uiwriter/uiwriter2.cxx | 2 sw/qa/extras/uiwriter/uiwriter6.cxx | 38 sw/qa/extras/uiwriter/uiwriter7.cxx | 15 sw/qa/extras/uiwriter/uiwriter8.cxx | 2 sw/qa/extras/ww8export/ww8export2.cxx | 2 sw/qa/extras/ww8export/ww8export3.cxx | 2 sw/qa/extras/ww8export/ww8export4.cxx | 2 sw/qa/filter/ww8/ww8.cxx | 2 sw/qa/uibase/wrtsh/wrtsh.cxx | 8 sw/source/core/doc/DocumentStylePoolManager.cxx | 2 sw/source/core/fields/textapi.cxx | 8 sw/source/core/text/itrform2.cxx | 4 sw/source/core/unocore/unomap.cxx | 30 sw/source/core/unocore/unomap1.cxx | 6 sw/source/filter/ww8/docxexport.cxx | 2 sw/source/filter/ww8/docxexportfilter.cxx | 2 sw/source/filter/xml/xmlexp.cxx | 4 sw/source/ui/config/optcomp.cxx | 2 sw/source/uibase/utlui/AccessibilityStatusBarControl.cxx | 2 sw/source/uibase/utlui/tmplctrl.cxx | 2 sw/source/uibase/utlui/wordcountctrl.cxx | 4 sw/source/uibase/wrtsh/wrtsh1.cxx | 6 test/qa/cppunit/dialog.cxx | 6 tools/qa/cppunit/test_inetmime.cxx | 2 unotools/qa/unit/testRecodeString.cxx | 4 vcl/qa/cppunit/BmpFilterTest.cxx | 2 vcl/qa/cppunit/XpmFilterTest.cxx | 2 vcl/qa/cppunit/cjktext.cxx | 2 vcl/qa/cppunit/complextext.cxx | 36 vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx | 2 vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx | 2 vcl/qa/cppunit/mnemonic.cxx | 2 vcl/qa/cppunit/pdfexport/pdfexport.cxx | 65 vcl/qa/cppunit/physicalfontcollection.cxx | 4 vcl/qa/cppunit/text.cxx | 58 vcl/qt5/QtAccessibleWidget.cxx | 64 vcl/qt5/QtMenu.cxx | 2 vcl/source/control/field.cxx | 4 vcl/source/font/fontmetric.cxx | 2 vcl/source/gdi/pdfwriter_impl.cxx | 2 vcl/source/window/builder.cxx | 4 vcl/workben/minvcl.cxx | 2 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx | 6 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 writerfilter/source/dmapper/StyleSheetTable.cxx | 8 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 4 xmloff/qa/unit/style.cxx | 4 xmloff/qa/unit/text.cxx | 16 xmloff/source/draw/shapeexport.cxx | 4 xmloff/source/style/GradientStyle.cxx | 2 xmloff/source/text/txtimp.cxx | 2 191 files changed, 4949 insertions(+), 4926 deletions(-)
New commits: commit e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Oct 6 09:42:38 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sat Oct 7 00:47:20 2023 +0200 loplugin:ostr: automatic rewrite Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Jenkins diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx index 2f5aee857e80..229c7f21f0f7 100644 --- a/chart2/qa/extras/uichart.cxx +++ b/chart2/qa/extras/uichart.cxx @@ -120,7 +120,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf120348) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091) { std::vector<OUString> aExpected - = { u"Ωφέλιμο", u"Επικίνδυνο", u"Απόσταση", u"Μάσκα", u"Εμβόλιο" }; + = { u"Ωφέλιμο"_ustr, u"Επικίνδυνο"_ustr, u"Απόσταση"_ustr, u"Μάσκα"_ustr, u"Εμβόλιο"_ustr }; loadFromURL(u"ods/tdf151091.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index 4c10502d4186..f8581580dfc2 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -53,21 +53,21 @@ const SfxItemPropertySet* GetErrorBarPropertySet() { static const SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] = { - {u"ShowPositiveError",0,cppu::UnoType<bool>::get(), 0, 0}, - {u"ShowNegativeError",1,cppu::UnoType<bool>::get(), 0, 0}, - {u"PositiveError",2,cppu::UnoType<double>::get(),0,0}, - {u"NegativeError",3,cppu::UnoType<double>::get(), 0, 0}, - {u"PercentageError",4,cppu::UnoType<double>::get(), 0, 0}, - {u"ErrorBarStyle",5,cppu::UnoType<sal_Int32>::get(),0,0}, - {u"ErrorBarRangePositive",6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export - {u"ErrorBarRangeNegative",7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export - {u"Weight",8,cppu::UnoType<double>::get(),0,0}, - {u"LineStyle",9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0}, - {u"LineDash",10,cppu::UnoType<drawing::LineDash>::get(),0,0}, - {u"LineWidth",11,cppu::UnoType<sal_Int32>::get(),0,0}, - {u"LineColor",12,cppu::UnoType<css::util::Color>::get(),0,0}, - {u"LineTransparence",13,cppu::UnoType<sal_Int16>::get(),0,0}, - {u"LineJoint",14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0}, + {u"ShowPositiveError"_ustr,0,cppu::UnoType<bool>::get(), 0, 0}, + {u"ShowNegativeError"_ustr,1,cppu::UnoType<bool>::get(), 0, 0}, + {u"PositiveError"_ustr,2,cppu::UnoType<double>::get(),0,0}, + {u"NegativeError"_ustr,3,cppu::UnoType<double>::get(), 0, 0}, + {u"PercentageError"_ustr,4,cppu::UnoType<double>::get(), 0, 0}, + {u"ErrorBarStyle"_ustr,5,cppu::UnoType<sal_Int32>::get(),0,0}, + {u"ErrorBarRangePositive"_ustr,6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export + {u"ErrorBarRangeNegative"_ustr,7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export + {u"Weight"_ustr,8,cppu::UnoType<double>::get(),0,0}, + {u"LineStyle"_ustr,9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0}, + {u"LineDash"_ustr,10,cppu::UnoType<drawing::LineDash>::get(),0,0}, + {u"LineWidth"_ustr,11,cppu::UnoType<sal_Int32>::get(),0,0}, + {u"LineColor"_ustr,12,cppu::UnoType<css::util::Color>::get(),0,0}, + {u"LineTransparence"_ustr,13,cppu::UnoType<sal_Int16>::get(),0,0}, + {u"LineJoint"_ustr,14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0}, }; static SfxItemPropertySet aPropSet( aErrorBarPropertyMap_Impl ); return &aPropSet; diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 58f9c3f63c16..7a97736c1e74 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -73,7 +73,7 @@ void TestString::testDecimalStringToNumber() s1 += u"\u07C6"; CPPUNIT_ASSERT_EQUAL(sal_uInt32(12346), comphelper::string::decimalStringToNumber(s1)); // Codepoints on 2 16bits words - s1 = u"\U0001D7FE\U0001D7F7"; // MATHEMATICAL MONOSPACE DIGIT EIGHT and ONE + s1 = u"\U0001D7FE\U0001D7F7"_ustr; // MATHEMATICAL MONOSPACE DIGIT EIGHT and ONE CPPUNIT_ASSERT_EQUAL(sal_uInt32(81), comphelper::string::decimalStringToNumber(s1)); } @@ -192,7 +192,7 @@ void TestString::testReverseString() comphelper::string::reverseString(u"u\U00010000v\U0010FFFFw")); static sal_Unicode const malformed[] = {0xDC00, 0xD800}; CPPUNIT_ASSERT_EQUAL( - OUString(u"\U00010000"), + u"\U00010000"_ustr, comphelper::string::reverseString(std::u16string_view(malformed, std::size(malformed)))); } @@ -200,11 +200,11 @@ void TestString::testReverseCodePoints() { CPPUNIT_ASSERT_EQUAL(OUString(), comphelper::string::reverseCodePoints("")); CPPUNIT_ASSERT_EQUAL(OUString("cba"), comphelper::string::reverseCodePoints("abc")); CPPUNIT_ASSERT_EQUAL( - OUString(u"w\U0010FFFFv\U00010000u"), - comphelper::string::reverseCodePoints(u"u\U00010000v\U0010FFFFw")); + u"w\U0010FFFFv\U00010000u"_ustr, + comphelper::string::reverseCodePoints(u"u\U00010000v\U0010FFFFw"_ustr)); static sal_Unicode const malformed[] = {0xDC00, 0xD800}; CPPUNIT_ASSERT_EQUAL( - OUString(u"\U00010000"), + u"\U00010000"_ustr, comphelper::string::reverseCodePoints(OUString(malformed, std::size(malformed)))); } diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx index 2c99e64e46d9..6e500f619232 100644 --- a/comphelper/source/misc/configuration.cxx +++ b/comphelper/source/misc/configuration.cxx @@ -148,7 +148,7 @@ comphelper::detail::ConfigurationWrapper::ConfigurationWrapper(): css::uno::Any( css::beans::NamedValue{ "locale", css::uno::Any( OUString("*"))} ) }; css::uno::Reference< css::uno::XInterface > xCfg - = xConfigProvider->createInstanceWithArguments(u"com.sun.star.configuration.ConfigurationAccess", + = xConfigProvider->createInstanceWithArguments(u"com.sun.star.configuration.ConfigurationAccess"_ustr, params); maNotifier = css::uno::Reference< css::util::XChangesNotifier >(xCfg, css::uno::UNO_QUERY); diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx index 43d277fe0097..1bc934af57a9 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx @@ -623,7 +623,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getSchemas() Reference<XInterface> executed = statement->executeQuery( u"SELECT SCHEMA_NAME AS TABLE_SCHEM, CATALOG_NAME AS TABLE_CATALOG FROM INFORMATION_SCHEMA.SCHEMATA \ WHERE SCHEMA_NAME NOT IN ('information_schema', 'mysql', 'performance_schema') \ - ORDER BY SCHEMA_NAME"); + ORDER BY SCHEMA_NAME"_ustr); Reference<XResultSet> rs(executed, UNO_QUERY_THROW); Reference<XResultSetMetaDataSupplier> supp(executed, UNO_QUERY_THROW); Reference<XResultSetMetaData> rs_meta = supp->getMetaData(); diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx index 5d30509db94b..ad278f10834b 100644 --- a/cppcanvas/qa/unit/test.cxx +++ b/cppcanvas/qa/unit/test.cxx @@ -120,12 +120,12 @@ CPPUNIT_TEST_FIXTURE(CanvasTest, testTdf155810) { ScopedVclPtrInstance<VirtualDevice> pDev; - vcl::Font aFont(u"Noto Naskh Arabic", u"Regular", Size(0, 72)); + vcl::Font aFont(u"Noto Naskh Arabic"_ustr, u"Regular"_ustr, Size(0, 72)); pDev->SetFont(aFont); aInputMetaFile.Record(pDev.get()); - OUString aText(u"خالد"); + OUString aText(u"خالد"_ustr); pDev->GetTextArray(aText, &aDXArray); auto nKashida = 200; diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 9a08674d7bdd..d039e43824a8 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -629,9 +629,9 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory() { aActivatorName = aLocation.subView( 0, nPos ); if( aActivatorName == u"java" ) - aActivatorName = u"com.sun.star.loader.Java"; + aActivatorName = u"com.sun.star.loader.Java"_ustr; else if( aActivatorName == u"module" ) - aActivatorName = u"com.sun.star.loader.SharedLibrary"; + aActivatorName = u"com.sun.star.loader.SharedLibrary"_ustr; aLocation = aLocation.copy( nPos + 3 ); } } diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 8f90f3198b27..186a18b0a03b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2319,7 +2319,7 @@ void DesktopLOKTest::testPaintPartTileDifferentSchemes() aValue.bIsVisible = true; aValue.nColor = aDarkColor; aColorConfig.SetColorValue(svtools::DOCCOLOR, aValue); - aColorConfig.AddScheme(u"Dark"); + aColorConfig.AddScheme(u"Dark"_ustr); } // Add a minimal light scheme @@ -2329,7 +2329,7 @@ void DesktopLOKTest::testPaintPartTileDifferentSchemes() aValue.bIsVisible = true; aValue.nColor = COL_WHITE; aColorConfig.SetColorValue(svtools::DOCCOLOR, aValue); - aColorConfig.AddScheme(u"Light"); + aColorConfig.AddScheme(u"Light"_ustr); } // This view will default to light scheme diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index d1e9e5baab52..a4d0ca950b92 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -92,8 +92,8 @@ namespace accessibility SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, SVX_UNOEDIT_NUMBERING_PROPERTY, - { u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, - { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"TextUserDefinedAttributes"_ustr, EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"ParaUserDefinedAttributes"_ustr, EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, }; static SvxItemPropertySet aPropSet( aPropMap, EditEngine::GetGlobalItemPool() ); return &aPropSet; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index df4d615f0979..be92bb4d89d3 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -88,10 +88,10 @@ o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap() SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_OUTLINER_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - { u"TextField", EE_FEATURE_FIELD, cppu::UnoType<text::XTextField>::get(), beans::PropertyAttribute::READONLY, 0 }, - { u"TextPortionType", WID_PORTIONTYPE, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 }, - { u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, - { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"TextField"_ustr, EE_FEATURE_FIELD, cppu::UnoType<text::XTextField>::get(), beans::PropertyAttribute::READONLY, 0 }, + { u"TextPortionType"_ustr, WID_PORTIONTYPE, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 }, + { u"TextUserDefinedAttributes"_ustr, EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"ParaUserDefinedAttributes"_ustr, EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, }; return aSvxTextPortionPropertyMap; } @@ -116,8 +116,8 @@ o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropert SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_OUTLINER_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - { u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, - { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"TextUserDefinedAttributes"_ustr, EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, + { u"ParaUserDefinedAttributes"_ustr, EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, }; return aSvxUnoOutlinerTextCursorPropertyMap; diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx index de9be9ba0a52..a42e7f0dd7c3 100644 --- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx +++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx @@ -115,7 +115,7 @@ void WmfTest::testNonPlaceableWmf() void WmfTest::testTdf88163NonPlaceableWmf() { - OUString fileName(u"tdf88163-non-placeable.wmf"); + OUString fileName(u"tdf88163-non-placeable.wmf"_ustr); SvFileStream aFileStream(getFullUrl(fileName), StreamMode::READ); GDIMetaFile aGDIMetaFile; ReadWindowMetafile(aFileStream, aGDIMetaFile); @@ -150,7 +150,7 @@ void WmfTest::testTdf88163NonPlaceableWmf() void WmfTest::testTdf88163PlaceableWmf() { - OUString fileName(u"tdf88163-wrong-font-size.wmf"); + OUString fileName(u"tdf88163-wrong-font-size.wmf"_ustr); SvFileStream aFileStream(getFullUrl(fileName), StreamMode::READ); GDIMetaFile aGDIMetaFile; ReadWindowMetafile(aFileStream, aGDIMetaFile); @@ -188,7 +188,7 @@ void WmfTest::testTdf88163PlaceableWmf() void WmfTest::testSetTextAlignWmf() { - OUString fileName(u"TestSetTextAlign.wmf"); + OUString fileName(u"TestSetTextAlign.wmf"_ustr); SvFileStream aFileStream(getFullUrl(fileName), StreamMode::READ); GDIMetaFile aGDIMetaFile; ReadWindowMetafile(aFileStream, aGDIMetaFile); diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index f686c4205855..c8d88d8d0160 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -515,7 +515,7 @@ Reference< XPropertySetInfo > BibliographyLoader::getPropertySetInfo() { static const SfxItemPropertyMapEntry aBibProps_Impl[] = { - { u"BibliographyDataFieldNames", 0, cppu::UnoType<Sequence<PropertyValue>>::get(), PropertyAttribute::READONLY, 0}, + { u"BibliographyDataFieldNames"_ustr, 0, cppu::UnoType<Sequence<PropertyValue>>::get(), PropertyAttribute::READONLY, 0}, }; static Reference< XPropertySetInfo > xRet = SfxItemPropertySet(aBibProps_Impl).getPropertySetInfo(); diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx index 293f211a46e3..e8de97a8df61 100644 --- a/filter/qa/unit/textfilterdetect.cxx +++ b/filter/qa/unit/textfilterdetect.cxx @@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) uno::Reference<text::XTextRange> xParagraph(xEnum->nextElement(), uno::UNO_QUERY_THROW); // Make sure the template's text was loaded - CPPUNIT_ASSERT_EQUAL(OUString(u"Writer template’s first line"), xParagraph->getString()); + CPPUNIT_ASSERT_EQUAL(u"Writer template’s first line"_ustr, xParagraph->getString()); } loadFromURL(u"empty.ods"); @@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) uno::Reference<text::XTextRange> xC(xRA->getCellByPosition(0, 0, 0), uno::UNO_QUERY_THROW); // Make sure the template's text was loaded - CPPUNIT_ASSERT_EQUAL(OUString(u"Calc template’s first cell"), xC->getString()); + CPPUNIT_ASSERT_EQUAL(u"Calc template’s first cell"_ustr, xC->getString()); } loadFromURL(u"empty.odp"); @@ -169,7 +169,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) uno::Reference<text::XTextRange> xParagraph(xEnum->nextElement(), uno::UNO_QUERY_THROW); // Make sure the template's text was loaded - CPPUNIT_ASSERT_EQUAL(OUString(u"Writer template’s first line"), xParagraph->getString()); + CPPUNIT_ASSERT_EQUAL(u"Writer template’s first line"_ustr, xParagraph->getString()); } } } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index a9a717a56cc5..bfa67aea1787 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -958,7 +958,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& else if (aSrcMimetype == "application/vnd.oasis.opendocument.graphics") aExt = ".odg"; std::unique_ptr<vcl::PDFOutputStream> pStream(new PDFExportStreamDoc(mxSrcDoc, aPreparedPermissionPassword)); - aPDFWriter.AddAttachedFile("Original" + aExt, aSrcMimetype, u"Embedded original document of this PDF file", std::move(pStream)); + aPDFWriter.AddAttachedFile("Original" + aExt, aSrcMimetype, u"Embedded original document of this PDF file"_ustr, std::move(pStream)); } if ( pOut ) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 98a21eeed5c1..1e7756b8657a 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -308,7 +308,7 @@ public: OUString sDateTimeFormat = sDateFormat + " " + sTimeFormat; - pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format", sDateTimeFormat ); + pSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-format"_ustr, sDateTimeFormat ); SvXMLElementExport aExp( *pSVGExport, XML_NAMESPACE_NONE, "g", true, true ); } virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const override @@ -1220,13 +1220,13 @@ void SVGFilter::implGenerateMetaData() // we wrap all meta presentation info into a svg:defs element SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_slides" ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides", OUString::number( nCount ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number", OUString::number( mnVisiblePage ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_slides"_ustr ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "number-of-slides"_ustr, OUString::number( nCount ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "start-slide-number"_ustr, OUString::number( mnVisiblePage ) ); if( mpSVGExport->IsUsePositionedCharacters() ) { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars", "true" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "use-positioned-chars"_ustr, "true" ); } // Add a (global) Page Numbering Type attribute for the document @@ -1267,20 +1267,20 @@ void SVGFilter::implGenerateMetaData() break; } if( !sNumberingType.isEmpty() ) - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type", sNumberingType ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-numbering-type"_ustr, sNumberingType ); } { SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); - const OUString aId( NSPREFIX "meta_slide" ); + const OUString aId( NSPREFIX "meta_slide"_ustr ); const OUString aElemTextFieldId( aOOOElemTextField ); std::vector< std::unique_ptr<TextField> > aFieldSet; // dummy slide - used as leaving slide for transition on the first slide if( mbPresentation ) { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_dummy_slide" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", NSPREFIX "meta_dummy_slide"_ustr ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, "dummy-slide" ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrMaster, "dummy-master-page" ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrBackgroundVisibility, "hidden" ); @@ -1353,7 +1353,7 @@ void SVGFilter::implGenerateMetaData() bPageNumberVisibility = bPageNumberVisibility && ( nPageNumberingType != css::style::NumberingType::NUMBER_NONE ); if( bPageNumberVisibility ) // visibility default value: 'hidden' { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility", "visible" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "page-number-visibility"_ustr, "visible" ); } // DateTime Field @@ -1377,7 +1377,7 @@ void SVGFilter::implGenerateMetaData() xPropSet->getPropertyValue( "IsDateTimeVisible" ) >>= bDateTimeVisibility; if( !bDateTimeVisibility ) // visibility default value: 'visible' { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility", "hidden" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "date-time-visibility"_ustr, "hidden" ); } // Footer Field @@ -1390,7 +1390,7 @@ void SVGFilter::implGenerateMetaData() xPropSet->getPropertyValue( "IsFooterVisible" ) >>= bFooterVisibility; if( !bFooterVisibility ) // visibility default value: 'visible' { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility", "hidden" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "footer-visibility"_ustr, "hidden" ); } } else @@ -1534,7 +1534,7 @@ void SVGFilter::implExportTextShapeIndex() if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() ) { mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, rPageId ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list", sTextShapeIdList ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "id-list"_ustr, sTextShapeIdList ); SvXMLElementExport aGElem( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); } } @@ -2203,7 +2203,7 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap default: break; } - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust", sTextAdjust ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, NSPREFIX "text-adjust"_ustr, sTextAdjust ); } } mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", aShapeClass ); diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index fbf4b875e3af..f75b9a7943c3 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -49,8 +49,8 @@ namespace frm SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - { u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, - { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, + { u"TextUserDefinedAttributes"_ustr, EE_CHAR_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, + { u"ParaUserDefinedAttributes"_ustr, EE_PARA_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, }; static SvxItemPropertySet aTextEnginePropertySet( aTextEnginePropertyMap, SdrObject::GetGlobalDrawObjectItemPool() ); return &aTextEnginePropertySet; diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 8ea7cb5eccc6..cd1f13c2149d 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -344,7 +344,7 @@ void SAL_CALL LangSelectionStatusbarController::statusChanged( const FeatureStat else if ( !Event.State.hasValue() ) { m_xStatusbarItem->setText( OUString() ); - m_xStatusbarItem->setQuickHelpText(u""); + m_xStatusbarItem->setQuickHelpText(u""_ustr); m_bShowMenu = false; // no language -> no menu } } diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 63462e3e6a3a..b57186d49367 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1581,7 +1581,7 @@ const OUString & LanguageTagImpl::getBcp47() const const OUString & LanguageTag::getBcp47( bool bResolveSystem ) const { - static const OUString theEmptyBcp47 = u""; + static const OUString theEmptyBcp47 = u""_ustr; if (!bResolveSystem && mbSystemLocale) return theEmptyBcp47; diff --git a/i18npool/qa/cppunit/test_characterclassification.cxx b/i18npool/qa/cppunit/test_characterclassification.cxx index 78397029b71f..a7689aa1559f 100644 --- a/i18npool/qa/cppunit/test_characterclassification.cxx +++ b/i18npool/qa/cppunit/test_characterclassification.cxx @@ -85,33 +85,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSigma) { { // From upper case - OUString sTest(u"ὈΔΥΣΣΕΎΣ"); + OUString sTest(u"ὈΔΥΣΣΕΎΣ"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ὀδυσσεύς"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ὀδυσσεύς"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } { // From lower case - OUString sTest(u"ὀδυσσεύς"); + OUString sTest(u"ὀδυσσεύς"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ὀδυσσεύς"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ὀδυσσεύς"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ὈΔΥΣΣΕΎΣ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ὈΔΥΣΣΕΎΣ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase); } { // From title case - OUString sTest(u"Ὀδυσσεύς"); + OUString sTest(u"Ὀδυσσεύς"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ὀδυσσεύς"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ὀδυσσεύς"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ὈΔΥΣΣΕΎΣ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ὈΔΥΣΣΕΎΣ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ὀδυσσεύς"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ὀδυσσεύς"_ustr, sLowerCase); } } @@ -119,33 +119,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf96343) { { // From upper case - OUString sTest(u"ꙊꙌꙖ"); + OUString sTest(u"ꙊꙌꙖ"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ꙋꙍꙗ"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ꙋꙍꙗ"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } { // From lower case - OUString sTest(u"ꙋꙍꙗ"); + OUString sTest(u"ꙋꙍꙗ"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ꙋꙍꙗ"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ꙋꙍꙗ"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ꙊꙌꙖ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ꙊꙌꙖ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase); } { // From title case - OUString sTest(u"Ꙋꙍꙗ"); + OUString sTest(u"Ꙋꙍꙗ"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ꙋꙍꙗ"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ꙋꙍꙗ"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ꙊꙌꙖ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ꙊꙌꙖ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ꙋꙍꙗ"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ꙋꙍꙗ"_ustr, sLowerCase); } } @@ -153,33 +153,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf134766) { { // From upper case - OUString sTest(u"QꞋORBꞋAL"); + OUString sTest(u"QꞋORBꞋAL"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"qꞌorbꞌal"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"qꞌorbꞌal"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } { // From lower case - OUString sTest(u"qꞌorbꞌal"); + OUString sTest(u"qꞌorbꞌal"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Qꞌorbꞌal"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Qꞌorbꞌal"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"QꞋORBꞋAL"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"QꞋORBꞋAL"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase); } { // From title case - OUString sTest(u"Qꞌorbꞌal"); + OUString sTest(u"Qꞌorbꞌal"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Qꞌorbꞌal"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Qꞌorbꞌal"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"QꞋORBꞋAL"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"QꞋORBꞋAL"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"qꞌorbꞌal"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"qꞌorbꞌal"_ustr, sLowerCase); } } @@ -187,33 +187,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf97152) { { // From upper case - OUString sTest(u"ͲͰϽϾϿͿϏϹ"); + OUString sTest(u"ͲͰϽϾϿͿϏϹ"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ͳͱͻͼͽϳϗϲ"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ͳͱͻͼͽϳϗϲ"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } { // From lower case - OUString sTest(u"ͳͱͻͼͽϳϗϲ"); + OUString sTest(u"ͳͱͻͼͽϳϗϲ"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ͳͱͻͼͽϳϗϲ"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ͳͱͻͼͽϳϗϲ"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ͲͰϽϾϿͿϏϹ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ͲͰϽϾϿͿϏϹ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase); } { // From title case - OUString sTest(u"Ͳͱͻͼͽϳϗϲ"); + OUString sTest(u"Ͳͱͻͼͽϳϗϲ"_ustr); OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ͳͱͻͼͽϳϗϲ"), sTitleCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ͳͱͻͼͽϳϗϲ"_ustr, sTitleCase); OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ͲͰϽϾϿͿϏϹ"), sUpperCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ͲͰϽϾϿͿϏϹ"_ustr, sUpperCase); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ͳͱͻͼͽϳϗϲ"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ͳͱͻͼͽϳϗϲ"_ustr, sLowerCase); } } @@ -221,18 +221,18 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSurrogatePairs) { { // No case mapping - OUString sTest(u"\U0001F600"); + OUString sTest(u"\U0001F600"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"\U0001F600"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"\U0001F600"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } { // Case mapping - OUString sTest(u"\U00010400"); + OUString sTest(u"\U00010400"_ustr); OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {}); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"\U00010428"), sLowerCase); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"\U00010428"_ustr, sLowerCase); OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {}); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase); } @@ -240,8 +240,8 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSurrogatePairs) CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testAdlam) { - OUString sUpper(u"𞤀𞤁𞤂𞤃𞤄𞤅𞤆𞤇𞤈𞤉𞤊𞤋𞤌𞤍𞤎𞤏𞤐𞤑𞤒𞤓𞤔𞤕𞤖𞤗𞤘𞤙𞤚𞤛𞤜𞤝𞤞𞤟𞤠𞤡"); - OUString sLower(u"𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃"); + OUString sUpper(u"𞤀𞤁𞤂𞤃𞤄𞤅𞤆𞤇𞤈𞤉𞤊𞤋𞤌𞤍𞤎𞤏𞤐𞤑𞤒𞤓𞤔𞤕𞤖𞤗𞤘𞤙𞤚𞤛𞤜𞤝𞤞𞤟𞤠𞤡"_ustr); + OUString sLower(u"𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃"_ustr); OUString sTitle = sLower; // Adlam doesn’t have title case? { // From upper case diff --git a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx index 1bf0ab521079..69ac73d41a89 100644 --- a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx +++ b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx @@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting) OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale); // Without the accompanying fix in place, this test would have failed with a // lang.IllegalArgumentException, support for NUMBER_HANGUL_KO was missing. - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual); // 10 -> "십" aProperties = { @@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc2ed"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc2ed"_ustr, aActual); // 100 -> "백" aProperties = { @@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\ubc31"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ubc31"_ustr, aActual); } CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) @@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale); // Without the accompanying fix in place, this test would have failed with a // lang.IllegalArgumentException, support for NUMBER_LEGAL_KO was missing. - CPPUNIT_ASSERT_EQUAL(OUString(u"\ud558\ub098"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ud558\ub098"_ustr, aActual); // 2 -> "둘" aProperties = { @@ -241,7 +241,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(2)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\ub458"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ub458"_ustr, aActual); // 3 -> "셋" aProperties = { @@ -250,7 +250,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(3)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc14b"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc14b"_ustr, aActual); // 4 -> "넷" aProperties = { @@ -259,7 +259,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(4)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\ub137"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ub137"_ustr, aActual); // 5 -> "다섯" aProperties = { @@ -268,7 +268,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(5)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\ub2e4\uc12f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ub2e4\uc12f"_ustr, aActual); // 6 -> "여섯 aProperties = { comphelper::makePropertyValue( @@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(6)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\uc12f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc5ec\uc12f"_ustr, aActual); // 7 -> "일곱" aProperties = { comphelper::makePropertyValue( @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(7)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uacf1"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c\uacf1"_ustr, aActual); // 8 -> "여덟" aProperties = { @@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(8)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\ub35f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub35f"_ustr, aActual); // 9 -> "아홉" aProperties = { @@ -302,7 +302,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(9)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud649"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc544\ud649"_ustr, aActual); // 10 -> "열" aProperties = { @@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5f4"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc5f4"_ustr, aActual); // 21 -> "스물하나" aProperties = { @@ -320,7 +320,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(21)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc2a4\ubb3c\ud558\ub098"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc2a4\ubb3c\ud558\ub098"_ustr, aActual); // 32 -> "서른둘" aProperties = { @@ -329,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(32)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc11c\ub978\ub458"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc11c\ub978\ub458"_ustr, aActual); // 43 -> "마흔셋" aProperties = { @@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(43)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\ub9c8\ud754\uc14b"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\ub9c8\ud754\uc14b"_ustr, aActual); // 54 -> "쉰넷" aProperties = { @@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(54)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc270\ub137"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc270\ub137"_ustr, aActual); // 65 -> "예순다섯" aProperties = { @@ -356,7 +356,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(65)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc608\uc21c\ub2e4\uc12f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc608\uc21c\ub2e4\uc12f"_ustr, aActual); // 76 -> "일흔여섯" aProperties = { @@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(76)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\ud754\uc5ec\uc12f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c\ud754\uc5ec\uc12f"_ustr, aActual); // 87 -> "여든일곱" aProperties = { @@ -374,7 +374,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(87)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\ub4e0\uc77c\uacf1"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub4e0\uc77c\uacf1"_ustr, aActual); // 98 -> "아흔여덟" aProperties = { @@ -383,7 +383,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(98)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud754\uc5ec\ub35f"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc5ec\ub35f"_ustr, aActual); // 99 -> "아흔아홉" aProperties = { @@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(99)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud754\uc544\ud649"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc544\ud649"_ustr, aActual); } CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital) @@ -409,7 +409,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital) OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale); // Without the accompanying fix in place, this test would have failed with a // lang.IllegalArgumentException, support for NUMBER_DIGITAL_KO was missing. - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual); // 10 -> "일영" aProperties = { @@ -418,7 +418,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uc601"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601"_ustr, aActual); // 100 -> "일영영" aProperties = { @@ -427,7 +427,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uc601\uc601"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601\uc601"_ustr, aActual); } CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2) @@ -444,7 +444,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2) OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale); // Without the accompanying fix in place, this test would have failed with a // lang.IllegalArgumentException, support for NUMBER_DIGITAL2_KO was missing. - CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\u4e00"_ustr, aActual); // 10 -> "一零" aProperties = { @@ -453,7 +453,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00\u96f6"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6"_ustr, aActual); // 100 -> "一零零" aProperties = { @@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2) comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)), }; aActual = xFormatter->makeNumberingString(aProperties, aLocale); - CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00\u96f6\u96f6"), aActual); + CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6\u96f6"_ustr, aActual); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/i18npool/qa/cppunit/test_textsearch.cxx b/i18npool/qa/cppunit/test_textsearch.cxx index f224e58c3809..2efb2b9cdc37 100644 --- a/i18npool/qa/cppunit/test_textsearch.cxx +++ b/i18npool/qa/cppunit/test_textsearch.cxx @@ -294,7 +294,7 @@ void TestTextSearch::testWildcardSearch() void TestTextSearch::testApostropheSearch() { // A) find typographic apostrophes also by using ASCII apostrophe in searchString - OUString str( u"It\u2019s an apostrophe." ); + OUString str( u"It\u2019s an apostrophe."_ustr ); sal_Int32 startPos = 0, endPos = str.getLength(); // set options @@ -355,7 +355,7 @@ void TestTextSearch::testApostropheSearch() CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(2), aRes.endOffset[0] ); // C) search typographic apostrophe in a text with ASCII apostrophes (no result) - aOptions.searchString = OUString(u"\u2019"); + aOptions.searchString = u"\u2019"_ustr; m_xSearch->setOptions( aOptions ); aRes = m_xSearch->searchForward( str, startPos, endPos ); @@ -380,9 +380,9 @@ void TestTextSearch::testApostropheSearch() CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(2), aRes.endOffset[0] ); // E) search mixed apostrophes in a text with mixed apostrophes: - aOptions.searchString = OUString(u"'\u2019"); + aOptions.searchString = u"'\u2019"_ustr; m_xSearch->setOptions( aOptions ); - str = u"test: \u2019'"; + str = u"test: \u2019'"_ustr; // search forward aRes = m_xSearch->searchForward( str, startPos, str.getLength()); @@ -393,7 +393,7 @@ void TestTextSearch::testApostropheSearch() CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); // F) search mixed apostrophes in a text with ASCII apostrophes: - str = u"test: ''"; + str = u"test: ''"_ustr; // search forward aRes = m_xSearch->searchForward( str, startPos, str.getLength()); @@ -406,7 +406,7 @@ void TestTextSearch::testApostropheSearch() void TestTextSearch::testTdf138410() { - OUString str(u"\u0643\u064f\u062a\u064f\u0628 \u0643\u062a\u0628"); + OUString str(u"\u0643\u064f\u062a\u064f\u0628 \u0643\u062a\u0628"_ustr); sal_Int32 startPos = 0, endPos = str.getLength(); util::SearchOptions aOptions; @@ -419,7 +419,7 @@ void TestTextSearch::testTdf138410() // text or not, and whether IGNORE_DIACRITICS_CTL is set or not. // set options - aOptions.searchString = u"\u0643"; + aOptions.searchString = u"\u0643"_ustr; aOptions.transliterateFlags = 0; m_xSearch->setOptions(aOptions); @@ -457,7 +457,7 @@ void TestTextSearch::testTdf138410() // not. // set options - aOptions.searchString = u"\u0643\u064f"; + aOptions.searchString = u"\u0643\u064f"_ustr; aOptions.transliterateFlags = 0; m_xSearch->setOptions(aOptions); @@ -494,7 +494,7 @@ void TestTextSearch::testTdf138410() // set. // set options - aOptions.searchString = u"\u064f"; + aOptions.searchString = u"\u064f"_ustr; aOptions.transliterateFlags = 0; m_xSearch->setOptions(aOptions); diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index e5ea427eda1c..781e91725e03 100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -125,11 +125,11 @@ static void GetOldStyleDicsInDir( if (aLocaleName == u"ar") aDicEntry.aLocaleNames = { aLocaleName, - u"ar-AE", u"ar-BH", u"ar-DJ", u"ar-DZ", u"ar-EG", - u"ar-ER", u"ar-IL", u"ar-IQ", u"ar-JO", u"ar-KM", - u"ar-KW", u"ar-LB", u"ar-LY", u"ar-MA", u"ar-MR", - u"ar-OM", u"ar-PS", u"ar-QA", u"ar-SA", u"ar-SD", - u"ar-SO", u"ar-SY", u"ar-TD", u"ar-TN", u"ar-YE" + u"ar-AE"_ustr, u"ar-BH"_ustr, u"ar-DJ"_ustr, u"ar-DZ"_ustr, u"ar-EG"_ustr, + u"ar-ER"_ustr, u"ar-IL"_ustr, u"ar-IQ"_ustr, u"ar-JO"_ustr, u"ar-KM"_ustr, + u"ar-KW"_ustr, u"ar-LB"_ustr, u"ar-LY"_ustr, u"ar-MA"_ustr, u"ar-MR"_ustr, + u"ar-OM"_ustr, u"ar-PS"_ustr, u"ar-QA"_ustr, u"ar-SA"_ustr, u"ar-SD"_ustr, + u"ar-SO"_ustr, u"ar-SY"_ustr, u"ar-TD"_ustr, u"ar-TN"_ustr, u"ar-YE"_ustr }; else aDicEntry.aLocaleNames = { aLocaleName }; diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx index 746aac854cb7..b1cd449765a1 100644 --- a/lotuswordpro/source/filter/lwpfribptr.cxx +++ b/lotuswordpro/source/filter/lwpfribptr.cxx @@ -261,7 +261,7 @@ void LwpFribPtr::XFConvert() } break; case FRIB_TAG_SOFTHYPHEN: - pFrib->ConvertChars(m_pXFPara.get(), u"\x00ad"); + pFrib->ConvertChars(m_pXFPara.get(), u"\x00ad"_ustr); break; case FRIB_TAG_FRAME: { diff --git a/lotuswordpro/source/filter/lwpnumericfmt.hxx b/lotuswordpro/source/filter/lwpnumericfmt.hxx index cc3b8f5d0ee2..c3b6bfb2b187 100644 --- a/lotuswordpro/source/filter/lwpnumericfmt.hxx +++ b/lotuswordpro/source/filter/lwpnumericfmt.hxx @@ -193,9 +193,9 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo("oS",true, true);//FMT_AUSTRIANSCHILLING = 3, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("BF",true, true);//FMT_BELGIANFRANC = 4, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("R$",false, true);//FMT_BRAZILIANCRUZEIRO = 5, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(u"\uFFE1")); //FMT_BRITISHPOUND = 6, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(u"\uFFE1"_ustr); //FMT_BRITISHPOUND = 6, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("C$"); //FMT_CANADIANDOLLAR = 7, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(u"PRC\uFFE5"),false,true); //FMT_CHINESEYUAN = 8, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(u"PRC\uFFE5"_ustr,false,true); //FMT_CHINESEYUAN = 8, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Kc",true, true);//FMT_CZECHKORUNA = 9, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Dkr",false, true);//FMT_DANISHKRONE = 10, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("ECU",true, true);//FMT_ECU = 11, @@ -207,9 +207,9 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Ft",true, true);//FMT_HUNGARIANFORINT = 17, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Rs",false, true);//FMT_INDIANRUPEE = 18, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Rp",false, true);//FMT_INDONESIANRUPIAH = 19, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(u"IR\uFFE1")); //FMT_IRISHPUNT = 20, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(u"IR\uFFE1"_ustr); //FMT_IRISHPUNT = 20, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("L.",false, true);//FMT_ITALIANLIRA = 21, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(u"\uFFE5")); //FMT_JAPANESEYEN = 22, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(u"\uFFE5"_ustr); //FMT_JAPANESEYEN = 22, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("LF",true, true);//FMT_LUXEMBOURGFRANC = 23, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Rm",false, true);//FMT_MALAYSIANRINGGIT = 24, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("Mex$"); //FMT_MEXICANPESO = 25, @@ -233,7 +233,7 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo("$"); //FMT_USDOLLAR = 43, m_aCurrencyInfo[nC++]=LwpCurrencyInfo("OTH",false, true);//FMT_OTHERCURRENCY = 44, - m_aCurrencyInfo[FMT_EURO]=LwpCurrencyInfo(OUString(u"\u20AC")); //FMT_EURO = 52 + m_aCurrencyInfo[FMT_EURO]=LwpCurrencyInfo(u"\u20AC"_ustr); //FMT_EURO = 52 } }; diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx index c534adbd945f..021c8decf431 100644 --- a/o3tl/qa/test-string_view.cxx +++ b/o3tl/qa/test-string_view.cxx @@ -699,11 +699,11 @@ private: } { CPPUNIT_ASSERT_MESSAGE("compareToAscii", - OUString(u"aaa").compareToAscii("aa") + u"aaa"_ustr.compareToAscii("aa") > 0); // just for comparison to following line CPPUNIT_ASSERT_MESSAGE("compareToAscii", o3tl::compareToAscii(u"aaa", "aa") > 0); - OUString aa(u"aa"); + OUString aa(u"aa"_ustr); CPPUNIT_ASSERT_MESSAGE("compareToAscii", aa.compareToAscii("aaa") < 0); // just for comparison to following line diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx index b9e4066876dc..89658e0874fc 100644 --- a/oox/qa/unit/drawingml.cxx +++ b/oox/qa/unit/drawingml.cxx @@ -351,7 +351,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize) CPPUNIT_ASSERT(xShapeProps.is()); uno::Reference<container::XNamed> xShapeNamed(xShape, uno::UNO_QUERY); CPPUNIT_ASSERT(xShapeNamed.is()); - CPPUNIT_ASSERT_EQUAL(OUString(u"Bézier curve 1"), xShapeNamed->getName()); + CPPUNIT_ASSERT_EQUAL(u"Bézier curve 1"_ustr, xShapeNamed->getName()); css::awt::Rectangle aBoundRect; xShapeProps->getPropertyValue("BoundRect") >>= aBoundRect; @@ -671,11 +671,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme) // Without the fix some application defaults were used. OUString sFontName; xShapeProps->getPropertyValue("CharFontNameComplex") >>= sFontName; - CPPUNIT_ASSERT_EQUAL(OUString(u"Noto Serif Hebrew"), sFontName); + CPPUNIT_ASSERT_EQUAL(u"Noto Serif Hebrew"_ustr, sFontName); css::lang::Locale aLocal; xShapeProps->getPropertyValue("CharLocaleComplex") >>= aLocal; - CPPUNIT_ASSERT_EQUAL(OUString(u"IL"), aLocal.Country); - CPPUNIT_ASSERT_EQUAL(OUString(u"he"), aLocal.Language); + CPPUNIT_ASSERT_EQUAL(u"IL"_ustr, aLocal.Country); + CPPUNIT_ASSERT_EQUAL(u"he"_ustr, aLocal.Language); } CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontText) @@ -694,11 +694,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontText) // Without the fix some application defaults were used. OUString sFontName; xShapeProps->getPropertyValue("CharFontNameComplex") >>= sFontName; - CPPUNIT_ASSERT_EQUAL(OUString(u"Noto Serif Hebrew"), sFontName); + CPPUNIT_ASSERT_EQUAL(u"Noto Serif Hebrew"_ustr, sFontName); css::lang::Locale aLocal; xShapeProps->getPropertyValue("CharLocaleComplex") >>= aLocal; - CPPUNIT_ASSERT_EQUAL(OUString(u"IL"), aLocal.Country); - CPPUNIT_ASSERT_EQUAL(OUString(u"he"), aLocal.Language); + CPPUNIT_ASSERT_EQUAL(u"IL"_ustr, aLocal.Country); + CPPUNIT_ASSERT_EQUAL(u"he"_ustr, aLocal.Language); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index efcc6591cf86..565ac39b52ad 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -201,15 +201,17 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151008VertAnchor) drawing::TextHorizontalAdjust eAnchorHori; drawing::TextVerticalAdjust eAnchorVert; }; - anchorDesc aExpected[6] = { - { u"Right", drawing::TextHorizontalAdjust_RIGHT, drawing::TextVerticalAdjust_TOP }, - { u"Center", drawing::TextHorizontalAdjust_CENTER, drawing::TextVerticalAdjust_TOP }, - { u"Left", drawing::TextHorizontalAdjust_LEFT, drawing::TextVerticalAdjust_TOP }, - { u"RightMiddle", drawing::TextHorizontalAdjust_RIGHT, drawing::TextVerticalAdjust_CENTER }, - { u"CenterMiddle", drawing::TextHorizontalAdjust_CENTER, - drawing::TextVerticalAdjust_CENTER }, - { u"LeftMiddle", drawing::TextHorizontalAdjust_LEFT, drawing::TextVerticalAdjust_CENTER } - }; + anchorDesc aExpected[6] + = { { u"Right"_ustr, drawing::TextHorizontalAdjust_RIGHT, drawing::TextVerticalAdjust_TOP }, + { u"Center"_ustr, drawing::TextHorizontalAdjust_CENTER, + drawing::TextVerticalAdjust_TOP }, + { u"Left"_ustr, drawing::TextHorizontalAdjust_LEFT, drawing::TextVerticalAdjust_TOP }, + { u"RightMiddle"_ustr, drawing::TextHorizontalAdjust_RIGHT, + drawing::TextVerticalAdjust_CENTER }, + { u"CenterMiddle"_ustr, drawing::TextHorizontalAdjust_CENTER, + drawing::TextVerticalAdjust_CENTER }, + { u"LeftMiddle"_ustr, drawing::TextHorizontalAdjust_LEFT, + drawing::TextVerticalAdjust_CENTER } }; // without the fix horizontal and vertical anchor positions were exchanged for (size_t i = 0; i < 6; ++i) { @@ -247,10 +249,10 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151518VertAnchor) sal_Int32 nLowerDistance; sal_Int32 nUpperDistance; }; - TextDistance aExpected[4] = { { u"Diagram Target List", 2, 2979, 201 }, - { u"Diagram Nested Target", 1, 3203, 127 }, - { u"Diagram Stacked Venn", 1, 3112, -302 }, - { u"Diagram Grouped List", 1, 4106, 196 } }; + TextDistance aExpected[4] = { { u"Diagram Target List"_ustr, 2, 2979, 201 }, + { u"Diagram Nested Target"_ustr, 1, 3203, 127 }, + { u"Diagram Stacked Venn"_ustr, 1, 3112, -302 }, + { u"Diagram Grouped List"_ustr, 1, 4106, 196 } }; // without the fix the observed distances were // {4434, -464}, {4674, -751}, {4620, -1399}, {6152, -744} for (size_t i = 0; i < 4; ++i) @@ -346,65 +348,66 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork) // Is it a Fontwork? bool bTextBox = bool(); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"TextBox") >>= bTextBox); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"TextBox"_ustr) >>= bTextBox); CPPUNIT_ASSERT(!bTextBox); uno::Reference<css::text::XTextFrame> xTextFrame; - xShapeProps->getPropertyValue(u"TextBoxContent") >>= xTextFrame; + xShapeProps->getPropertyValue(u"TextBoxContent"_ustr) >>= xTextFrame; CPPUNIT_ASSERT(!xTextFrame.is()); uno::Sequence<beans::PropertyValue> aGeoPropSeq; - xShapeProps->getPropertyValue(u"CustomShapeGeometry") >>= aGeoPropSeq; + xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq; CPPUNIT_ASSERT(aGeoPropSeq.getLength() > 0); comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq); uno::Sequence<beans::PropertyValue> aTextPathSeq; - aGeoPropMap.getValue(u"TextPath") >>= aTextPathSeq; + aGeoPropMap.getValue(u"TextPath"_ustr) >>= aTextPathSeq; CPPUNIT_ASSERT(aTextPathSeq.getLength() > 0); comphelper::SequenceAsHashMap aTextPathPropMap(aTextPathSeq); bool bTextPathOn = bool(); - CPPUNIT_ASSERT(aTextPathPropMap.getValue(u"TextPath") >>= bTextPathOn); + CPPUNIT_ASSERT(aTextPathPropMap.getValue(u"TextPath"_ustr) >>= bTextPathOn); CPPUNIT_ASSERT(bTextPathOn); // Is it the correct kind of Fontwork? uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq; - aGeoPropMap.getValue(u"AdjustmentValues") >>= aAdjustmentSeq; + aGeoPropMap.getValue(u"AdjustmentValues"_ustr) >>= aAdjustmentSeq; CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aAdjustmentSeq.getLength()); uno::Sequence<uno::Sequence<beans::PropertyValue>> aHandleSeq; - aGeoPropMap.getValue(u"Handles") >>= aHandleSeq; + aGeoPropMap.getValue(u"Handles"_ustr) >>= aHandleSeq; CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aHandleSeq.getLength()); awt::Rectangle aViewBox; - aGeoPropMap.getValue(u"ViewBox") >>= aViewBox; + aGeoPropMap.getValue(u"ViewBox"_ustr) >>= aViewBox; CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aViewBox.Width); CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aViewBox.Height); - CPPUNIT_ASSERT_EQUAL(uno::Any(OUString(u"textDoubleWave1")), - aGeoPropMap.getValue(u"PresetTextWarp")); + CPPUNIT_ASSERT_EQUAL(uno::Any(u"textDoubleWave1"_ustr), + aGeoPropMap.getValue(u"PresetTextWarp"_ustr)); - CPPUNIT_ASSERT_EQUAL(uno::Any(OUString(u"mso-spt158")), aGeoPropMap.getValue(u"Type")); + CPPUNIT_ASSERT_EQUAL(uno::Any(u"mso-spt158"_ustr), aGeoPropMap.getValue(u"Type"_ustr)); // Are properties correctly copied to shape? - CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0, 0, 255)), xShapeProps->getPropertyValue(u"FillColor")); + CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0, 0, 255)), + xShapeProps->getPropertyValue(u"FillColor"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_SOLID), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); - CPPUNIT_ASSERT_EQUAL(uno::Any(OUString(u"Courier New")), - xShapeProps->getPropertyValue(u"CharFontName")); + CPPUNIT_ASSERT_EQUAL(uno::Any(u"Courier New"_ustr), + xShapeProps->getPropertyValue(u"CharFontName"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(float(awt::FontWeight::BOLD)), xShapeProps->getPropertyValue("CharWeight")); lang::Locale aCharLocale; - xShapeProps->getPropertyValue(u"CharLocale") >>= aCharLocale; + xShapeProps->getPropertyValue(u"CharLocale"_ustr) >>= aCharLocale; CPPUNIT_ASSERT_EQUAL(OUString("en"), aCharLocale.Language); CPPUNIT_ASSERT_EQUAL(OUString("US"), aCharLocale.Country); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::TextHorizontalAdjust_RIGHT), - xShapeProps->getPropertyValue(u"TextHorizontalAdjust")); + xShapeProps->getPropertyValue(u"TextHorizontalAdjust"_ustr)); } CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2) @@ -421,35 +424,38 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2) // Fill CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(4000)), - xShapeProps->getPropertyValue(u"FillColorLumMod")); + xShapeProps->getPropertyValue(u"FillColorLumMod"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(6000)), - xShapeProps->getPropertyValue(u"FillColorLumOff")); + xShapeProps->getPropertyValue(u"FillColorLumOff"_ustr)); // ID "6" for the theme "accent3" is not yet in API, but defined in enum PredefinedClrSchemeID // in drawingml/clrscheme.hxx. - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(6)), xShapeProps->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(6)), + xShapeProps->getPropertyValue(u"FillColorTheme"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(Color(215, 228, 189)), - xShapeProps->getPropertyValue(u"FillColor")); + xShapeProps->getPropertyValue(u"FillColor"_ustr)); // Stroke CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineCap_ROUND), - xShapeProps->getPropertyValue(u"LineCap")); + xShapeProps->getPropertyValue(u"LineCap"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineStyle_DASH), - xShapeProps->getPropertyValue(u"LineStyle")); + xShapeProps->getPropertyValue(u"LineStyle"_ustr)); // Stroke has only the resulted color, but no reference to the used theme color "accent2". - CPPUNIT_ASSERT_EQUAL(uno::Any(Color(149, 55, 53)), xShapeProps->getPropertyValue(u"LineColor")); + CPPUNIT_ASSERT_EQUAL(uno::Any(Color(149, 55, 53)), + xShapeProps->getPropertyValue(u"LineColor"_ustr)); drawing::LineDash aLineDash; - xShapeProps->getPropertyValue(u"LineDash") >>= aLineDash; + xShapeProps->getPropertyValue(u"LineDash"_ustr) >>= aLineDash; CPPUNIT_ASSERT_EQUAL(drawing::DashStyle_ROUNDRELATIVE, aLineDash.Style); CPPUNIT_ASSERT_EQUAL(sal_Int16(1), aLineDash.Dots); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aLineDash.DotLen); CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aLineDash.Dashes); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aLineDash.DashLen); CPPUNIT_ASSERT_EQUAL(sal_Int32(199), aLineDash.Distance); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(635)), xShapeProps->getPropertyValue(u"LineWidth")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(635)), + xShapeProps->getPropertyValue(u"LineWidth"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(20)), - xShapeProps->getPropertyValue(u"LineTransparence")); + xShapeProps->getPropertyValue(u"LineTransparence"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineJoint_BEVEL), - xShapeProps->getPropertyValue(u"LineJoint")); + xShapeProps->getPropertyValue(u"LineJoint"_ustr)); } CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) @@ -467,9 +473,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -491,9 +497,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -515,9 +521,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(2), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -552,26 +558,31 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkNonAccentColor) // background 1 = lt1 = ID 1 uno::Reference<beans::XPropertySet> xShape0Props(xDrawPage->getByIndex(0), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(1)), xShape0Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(1)), + xShape0Props->getPropertyValue(u"FillColorTheme"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(Color(255, 204, 153)), - xShape0Props->getPropertyValue(u"FillColor")); + xShape0Props->getPropertyValue(u"FillColor"_ustr)); // text 1 = dk1 = ID 0 uno::Reference<beans::XPropertySet> xShape1Props(xDrawPage->getByIndex(1), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), xShape1Props->getPropertyValue(u"FillColorTheme")); - CPPUNIT_ASSERT_EQUAL(uno::Any(Color(255, 0, 0)), xShape1Props->getPropertyValue(u"FillColor")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), + xShape1Props->getPropertyValue(u"FillColorTheme"_ustr)); + CPPUNIT_ASSERT_EQUAL(uno::Any(Color(255, 0, 0)), + xShape1Props->getPropertyValue(u"FillColor"_ustr)); // background 2 = lt2 = ID 3 uno::Reference<beans::XPropertySet> xShape2Props(xDrawPage->getByIndex(2), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), xShape2Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), + xShape2Props->getPropertyValue(u"FillColorTheme"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(Color(235, 221, 195)), - xShape2Props->getPropertyValue(u"FillColor")); + xShape2Props->getPropertyValue(u"FillColor"_ustr)); // text 2 = dk2 = ID 2 uno::Reference<beans::XPropertySet> xShape3Props(xDrawPage->getByIndex(3), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(2)), xShape3Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(2)), + xShape3Props->getPropertyValue(u"FillColorTheme"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(Color(119, 95, 85)), - xShape3Props->getPropertyValue(u"FillColor")); + xShape3Props->getPropertyValue(u"FillColor"_ustr)); } CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor) @@ -587,13 +598,17 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor) // The ID for the theme colors is not yet in API, but defined in enum PredefinedClrSchemeID // in drawingml/clrscheme.hxx. Without fix the ID was -1 meaning no theme is used. uno::Reference<beans::XPropertySet> xShape0Props(xDrawPage->getByIndex(0), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), xShape0Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), + xShape0Props->getPropertyValue(u"FillColorTheme"_ustr)); uno::Reference<beans::XPropertySet> xShape1Props(xDrawPage->getByIndex(1), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(1)), xShape1Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(1)), + xShape1Props->getPropertyValue(u"FillColorTheme"_ustr)); uno::Reference<beans::XPropertySet> xShape2Props(xDrawPage->getByIndex(2), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), xShape2Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), + xShape2Props->getPropertyValue(u"FillColorTheme"_ustr)); uno::Reference<beans::XPropertySet> xShape3Props(xDrawPage->getByIndex(3), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(2)), xShape3Props->getPropertyValue(u"FillColorTheme")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(2)), + xShape3Props->getPropertyValue(u"FillColorTheme"_ustr)); } CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency) @@ -614,7 +629,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency) // Actual: 11897660 (= 0xB58B3C = rgb(181, 139, 60) => luminance 47.25% ) // The original "Background 2" is 0xEBDDC3 = rgb(235, 221, 195) => luminance 84.31% CPPUNIT_ASSERT_EQUAL(uno::Any(Color(208, 175, 114)), - xShapeProps->getPropertyValue(u"FillColor")); + xShapeProps->getPropertyValue(u"FillColor"_ustr)); } CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) @@ -631,9 +646,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -649,12 +664,12 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) CPPUNIT_ASSERT_EQUAL(sal_Int16(690), aGradient.Angle); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineStyle_SOLID), - xShapeProps->getPropertyValue(u"LineStyle")); + xShapeProps->getPropertyValue(u"LineStyle"_ustr)); sal_Int32 nOutlineColor; - xShapeProps->getPropertyValue(u"LineColor") >>= nOutlineColor; + xShapeProps->getPropertyValue(u"LineColor"_ustr) >>= nOutlineColor; CPPUNIT_ASSERT_EQUAL(sal_Int32(7384391), nOutlineColor); sal_Int16 nLineTransparence; - xShapeProps->getPropertyValue(u"LineTransparence") >>= nLineTransparence; + xShapeProps->getPropertyValue(u"LineTransparence"_ustr) >>= nLineTransparence; CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nLineTransparence); } @@ -663,9 +678,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -681,7 +696,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.XOffset); CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.YOffset); - xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops); @@ -697,13 +712,13 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.YOffset); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineStyle_DASH), - xShapeProps->getPropertyValue(u"LineStyle")); + xShapeProps->getPropertyValue(u"LineStyle"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineCap_ROUND), - xShapeProps->getPropertyValue(u"LineCap")); + xShapeProps->getPropertyValue(u"LineCap"_ustr)); CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(7384391)), - xShapeProps->getPropertyValue(u"LineColor")); + xShapeProps->getPropertyValue(u"LineColor"_ustr)); drawing::LineDash aLineDash; - xShapeProps->getPropertyValue(u"LineDash") >>= aLineDash; + xShapeProps->getPropertyValue(u"LineDash"_ustr) >>= aLineDash; CPPUNIT_ASSERT_EQUAL(drawing::DashStyle_ROUNDRELATIVE, aLineDash.Style); CPPUNIT_ASSERT_EQUAL(sal_Int16(1), aLineDash.Dots); CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aLineDash.Dashes); @@ -715,9 +730,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) { uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(2), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); awt::Gradient2 aGradient; - xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness basegfx::BColorStops aColorStops; @@ -733,7 +748,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.XOffset); CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.YOffset); - xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= aGradient; + xShapeProps->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops); @@ -749,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.YOffset); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineStyle_NONE), - xShapeProps->getPropertyValue(u"LineStyle")); + xShapeProps->getPropertyValue(u"LineStyle"_ustr)); } } @@ -764,14 +779,14 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtBitmapFill) uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_BITMAP), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); // Test some bitmap properties CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::BitmapMode_REPEAT), - xShapeProps->getPropertyValue(u"FillBitmapMode")); - CPPUNIT_ASSERT_EQUAL(uno::Any(true), xShapeProps->getPropertyValue(u"FillBitmapTile")); + xShapeProps->getPropertyValue(u"FillBitmapMode"_ustr)); + CPPUNIT_ASSERT_EQUAL(uno::Any(true), xShapeProps->getPropertyValue(u"FillBitmapTile"_ustr)); uno::Reference<awt::XBitmap> xBitmap; - xShapeProps->getPropertyValue(u"FillBitmap") >>= xBitmap; + xShapeProps->getPropertyValue(u"FillBitmap"_ustr) >>= xBitmap; uno::Reference<graphic::XGraphic> xGraphic; xGraphic.set(xBitmap, uno::UNO_QUERY); @@ -797,9 +812,10 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtDefaultColor) uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_SOLID), - xShapeProps->getPropertyValue(u"FillStyle")); + xShapeProps->getPropertyValue(u"FillStyle"_ustr)); - CPPUNIT_ASSERT_EQUAL(uno::Any(Color(3, 74, 144)), xShapeProps->getPropertyValue(u"FillColor")); + CPPUNIT_ASSERT_EQUAL(uno::Any(Color(3, 74, 144)), + xShapeProps->getPropertyValue(u"FillColor"_ustr)); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 225c0a1e6e3c..f9fce3b1f837 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -1826,7 +1826,7 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>& = o3tl::convert(-285750, o3tl::Length::emu, o3tl::Length::mm100); // It is not possible to change the bullet style for text. - aParagraph->getProperties().getBulletList().setBulletChar(u"•"); + aParagraph->getProperties().getBulletList().setBulletChar(u"•"_ustr); aParagraph->getProperties().getBulletList().setSuffixNone(); isBulletList = true; } diff --git a/oox/source/drawingml/fontworkhelpers.cxx b/oox/source/drawingml/fontworkhelpers.cxx index 591caf104ecb..3aacfaf378b1 100644 --- a/oox/source/drawingml/fontworkhelpers.cxx +++ b/oox/source/drawingml/fontworkhelpers.cxx @@ -160,12 +160,12 @@ void FontworkHelpers::putCustomShapeIntoTextPathMode( static constexpr OUStringLiteral sAdjustmentValues(u"AdjustmentValues"); static constexpr OUStringLiteral sPresetTextWarp(u"PresetTextWarp"); - resetPropertyValueInVec(aGeomPropVec, u"CoordinateSize"); - resetPropertyValueInVec(aGeomPropVec, u"Equations"); - resetPropertyValueInVec(aGeomPropVec, u"Path"); + resetPropertyValueInVec(aGeomPropVec, u"CoordinateSize"_ustr); + resetPropertyValueInVec(aGeomPropVec, u"Equations"_ustr); + resetPropertyValueInVec(aGeomPropVec, u"Path"_ustr); resetPropertyValueInVec(aGeomPropVec, sAdjustmentValues); - resetPropertyValueInVec(aGeomPropVec, u"ViewBox"); - resetPropertyValueInVec(aGeomPropVec, u"Handles"); + resetPropertyValueInVec(aGeomPropVec, u"ViewBox"_ustr); + resetPropertyValueInVec(aGeomPropVec, u"Handles"_ustr); resetPropertyValueInVec(aGeomPropVec, sTextPath); resetPropertyValueInVec(aGeomPropVec, sPresetTextWarp); @@ -191,7 +191,7 @@ void FontworkHelpers::putCustomShapeIntoTextPathMode( aGeomPropVec.push_back(comphelper::makePropertyValue(sAdjustmentValues, aAdjustment)); } - xSet->setPropertyValue(u"CustomShapeGeometry", + xSet->setPropertyValue(u"CustomShapeGeometry"_ustr, uno::Any(comphelper::containerToSequence(aGeomPropVec))); } @@ -853,8 +853,8 @@ void FontworkHelpers::collectCharColorProps(const uno::Reference<text::XText>& r // We have found a non-empty run. Collect its simple color properties. const std::array<OUString, 6> aNamesArray - = { u"CharColor", u"CharLumMod", u"CharLumOff", - u"CharColorTheme", u"CharComplexColor", u"CharTransparence" }; + = { u"CharColor"_ustr, u"CharLumMod"_ustr, u"CharLumOff"_ustr, + u"CharColorTheme"_ustr, u"CharComplexColor"_ustr, u"CharTransparence"_ustr }; for (const auto& propName : aNamesArray) { if (xRunPropSetInfo->hasPropertyByName(propName)) @@ -931,18 +931,18 @@ void FontworkHelpers::createCharFillPropsFromShape( // CharColor contains the color including all color transformations // FillColor contains darken and lighten but not transparency sal_Int32 nColorRGB = 0; - if (xPropSetInfo->hasPropertyByName(u"FillColor") - && (rXPropSet->getPropertyValue(u"FillColor") >>= nColorRGB)) + if (xPropSetInfo->hasPropertyByName(u"FillColor"_ustr) + && (rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nColorRGB)) { ::Color aColor(ColorTransparency, nColorRGB); sal_Int16 nTransPercent = 0; - if (xPropSetInfo->hasPropertyByName(u"FillTransparence") - && (rXPropSet->getPropertyValue(u"FillTransparence") >>= nTransPercent)) + if (xPropSetInfo->hasPropertyByName(u"FillTransparence"_ustr) + && (rXPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nTransPercent)) { sal_uInt8 nAlpha = 255 - sal_uInt8(std::lround(double(nTransPercent) * 2.55)); aColor.SetAlpha(nAlpha); } - rCharPropVec.push_back(comphelper::makePropertyValue(u"CharColor", sal_Int32(aColor))); + rCharPropVec.push_back(comphelper::makePropertyValue(u"CharColor"_ustr, sal_Int32(aColor))); } for (size_t i = 0; i < 5; i++) @@ -984,23 +984,23 @@ bool FontworkHelpers::createPrstDashFromLineDash(const drawing::LineDash& rLineD bIsConverted = true; if (nDotLen == 100 && rLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300) - rsPrstDash = u"dot"; + rsPrstDash = u"dot"_ustr; else if (nDotLen == 400 && rLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300) - rsPrstDash = u"dash"; + rsPrstDash = u"dash"_ustr; else if (nDotLen == 400 && rLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 300) - rsPrstDash = u"dashDot"; + rsPrstDash = u"dashDot"_ustr; else if (nDotLen == 800 && rLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300) - rsPrstDash = u"lgDash"; + rsPrstDash = u"lgDash"_ustr; else if (nDotLen == 800 && rLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 300) - rsPrstDash = u"lgDashDot"; + rsPrstDash = u"lgDashDot"_ustr; else if (nDotLen == 800 && rLineDash.Dashes == 2 && nDashLen == 100 && nDistance == 300) - rsPrstDash = u"lgDashDotDot"; + rsPrstDash = u"lgDashDotDot"_ustr; else if (nDotLen == 100 && rLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 100) - rsPrstDash = u"sysDot"; + rsPrstDash = u"sysDot"_ustr; else if (nDotLen == 300 && rLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 100) - rsPrstDash = u"sysDash"; + rsPrstDash = u"sysDash"_ustr; else if (nDotLen == 300 && rLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 100) - rsPrstDash = u"sysDashDot"; + rsPrstDash = u"sysDashDot"_ustr; else if (nDotLen == 300 && rLineDash.Dashes == 2 && nDashLen == 100 && nDistance == 100) rsPrstDash = "sysDashDotDot"; else @@ -1139,19 +1139,20 @@ void lcl_getGradientsFromShape(const uno::Reference<beans::XPropertySet>& rXProp { OUString sColorGradientName; rbHasColorGradient - = rXPropSetInfo->hasPropertyByName(u"FillGradientName") - && (rXPropSet->getPropertyValue(u"FillGradientName") >>= sColorGradientName) - && !sColorGradientName.isEmpty() && rXPropSetInfo->hasPropertyByName(u"FillGradient") - && (rXPropSet->getPropertyValue(u"FillGradient") >>= rColorGradient); + = rXPropSetInfo->hasPropertyByName(u"FillGradientName"_ustr) + && (rXPropSet->getPropertyValue(u"FillGradientName"_ustr) >>= sColorGradientName) + && !sColorGradientName.isEmpty() && rXPropSetInfo->hasPropertyByName(u"FillGradient"_ustr) + && (rXPropSet->getPropertyValue(u"FillGradient"_ustr) >>= rColorGradient); OUString sTransparenceGradientName; rbHasTransparenceGradient - = rXPropSetInfo->hasPropertyByName(u"FillTransparenceGradientName") - && (rXPropSet->getPropertyValue(u"FillTransparenceGradientName") + = rXPropSetInfo->hasPropertyByName(u"FillTransparenceGradientName"_ustr) + && (rXPropSet->getPropertyValue(u"FillTransparenceGradientName"_ustr) >>= sTransparenceGradientName) && !sTransparenceGradientName.isEmpty() - && rXPropSetInfo->hasPropertyByName(u"FillTransparenceGradient") - && (rXPropSet->getPropertyValue(u"FillTransparenceGradient") >>= rTransparenceGradient); + && rXPropSetInfo->hasPropertyByName(u"FillTransparenceGradient"_ustr) + && (rXPropSet->getPropertyValue(u"FillTransparenceGradient"_ustr) + >>= rTransparenceGradient); } ColorMapType lcl_createColorMapFromShapeProps( @@ -1185,7 +1186,7 @@ ColorMapType lcl_createColorMapFromShapeProps( { sal_Int32 nFillColor(0); if (rXPropSetInfo->hasPropertyByName("FillColor")) - rXPropSet->getPropertyValue(u"FillColor") >>= nFillColor; + rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; aSingleColor = ::Color(ColorTransparency, nFillColor).getBColor().clamp(); } @@ -1207,8 +1208,8 @@ ColorMapType lcl_createColorMapFromShapeProps( else { sal_Int16 nAPITrans(0); - if (rXPropSetInfo->hasPropertyByName(u"FillTransparence")) - rXPropSet->getPropertyValue(u"FillTransparence") >>= nAPITrans; + if (rXPropSetInfo->hasPropertyByName(u"FillTransparence"_ustr)) + rXPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nAPITrans; // API transparency is in range 0..100, BColor in range [0.0, 1.0]. aSingleTrans = basegfx::BColor(nAPITrans * 0.01).clamp(); } @@ -1270,16 +1271,16 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // CharTextFillTextEffect pGrabBagStack.reset(new oox::GrabBagStack("textFill")); drawing::FillStyle eFillStyle = drawing::FillStyle_SOLID; - if (xPropSetInfo->hasPropertyByName(u"FillStyle")) - rXPropSet->getPropertyValue(u"FillStyle") >>= eFillStyle; + if (xPropSetInfo->hasPropertyByName(u"FillStyle"_ustr)) + rXPropSet->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle; // We might have a solid fill but a transparency gradient. That needs to be exported as gradFill // too, because Word has transparency not separated but in the color stops in a color gradient. // A gradient exists, if the GradientName is not empty. OUString sTransparenceGradientName; if (eFillStyle == drawing::FillStyle_SOLID - && xPropSetInfo->hasPropertyByName(u"FillTransparenceGradientName") - && (rXPropSet->getPropertyValue(u"FillTransparenceGradientName") + && xPropSetInfo->hasPropertyByName(u"FillTransparenceGradientName"_ustr) + && (rXPropSet->getPropertyValue(u"FillTransparenceGradientName"_ustr) >>= sTransparenceGradientName) && !sTransparenceGradientName.isEmpty()) eFillStyle = drawing::FillStyle_GRADIENT; @@ -1408,8 +1409,8 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( { pGrabBagStack->push("srgbClr"); sal_Int32 nFillColor(0); - if (xPropSetInfo->hasPropertyByName(u"FillColor")) - rXPropSet->getPropertyValue(u"FillColor") >>= nFillColor; + if (xPropSetInfo->hasPropertyByName(u"FillColor"_ustr)) + rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; pGrabBagStack->push("attributes"); ::Color aColor(ColorTransparency, nFillColor); pGrabBagStack->addString("val", aColor.AsRGBHexString()); @@ -1418,8 +1419,8 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( } sal_Int16 nFillTransparence(0); - if (xPropSetInfo->hasPropertyByName(u"FillTransparence")) - rXPropSet->getPropertyValue(u"FillTransparence") >>= nFillTransparence; + if (xPropSetInfo->hasPropertyByName(u"FillTransparence"_ustr)) + rXPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nFillTransparence; if (nFillTransparence != 0) { pGrabBagStack->push("alpha"); @@ -1446,29 +1447,29 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( pGrabBagStack->push("attributes"); // line width sal_Int32 nLineWidth(0); - if (xPropSetInfo->hasPropertyByName(u"LineWidth")) - rXPropSet->getPropertyValue(u"LineWidth") >>= nLineWidth; + if (xPropSetInfo->hasPropertyByName(u"LineWidth"_ustr)) + rXPropSet->getPropertyValue(u"LineWidth"_ustr) >>= nLineWidth; pGrabBagStack->addInt32("w", nLineWidth * 360); // cap for dashes drawing::LineCap eLineCap = drawing::LineCap_BUTT; - if (xPropSetInfo->hasPropertyByName(u"LineCap")) - rXPropSet->getPropertyValue(u"LineCap") >>= eLineCap; - OUString sCap = u"flat"; + if (xPropSetInfo->hasPropertyByName(u"LineCap"_ustr)) + rXPropSet->getPropertyValue(u"LineCap"_ustr) >>= eLineCap; + OUString sCap = u"flat"_ustr; if (eLineCap == drawing::LineCap_ROUND) - sCap = u"rnd"; + sCap = u"rnd"_ustr; else if (eLineCap == drawing::LineCap_SQUARE) - sCap = u"sq"; + sCap = u"sq"_ustr; pGrabBagStack->addString("cap", sCap); // LO has no compound lines and always centers the lines - pGrabBagStack->addString("cmpd", u"sng"); - pGrabBagStack->addString("alng", u"ctr"); + pGrabBagStack->addString("cmpd", u"sng"_ustr); + pGrabBagStack->addString("alng", u"ctr"_ustr); pGrabBagStack->pop(); // maCurrentElement:'textOutline', maPropertyList:'attributes' // style drawing::LineStyle eLineStyle = drawing::LineStyle_NONE; ... etc. - the rest is truncated