diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-20 22:46:53 +0200 |
commit | fe7f4eab95c0f8262c8e08ef6cfaf54b2cb24f18 (patch) | |
tree | 2f41f0f43f403c52e3fb46dce7d8b28938829f4d /xmloff | |
parent | 335e73a7f37f5efc08a6691d8e4b271c68e0a2ac (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: xmloff
Change-Id: I2d58bbea770c4dd188cae13e11218a29f4cd5d05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158294
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
47 files changed, 269 insertions, 269 deletions
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx index 225f77a09536..c3a556f54967 100644 --- a/xmloff/qa/unit/draw.cxx +++ b/xmloff/qa/unit/draw.cxx @@ -758,8 +758,8 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport) // and check the markup. xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); - static constexpr OStringLiteral sThemePath - = "//office:master-styles/style:master-page/loext:theme"; + static constexpr OString sThemePath + = "//office:master-styles/style:master-page/loext:theme"_ostr; assertXPath(pXmlDoc, sThemePath, 1); assertXPath(pXmlDoc, sThemePath + "[@loext:name='Custom']"); diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx index 237888980d6a..b7a4b45dd893 100644 --- a/xmloff/source/chart/ColorPropertySet.cxx +++ b/xmloff/source/chart/ColorPropertySet.cxx @@ -44,7 +44,7 @@ protected: virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override; private: - static constexpr OUStringLiteral g_aColorPropName = u"FillColor"; + static constexpr OUString g_aColorPropName = u"FillColor"_ustr; Property m_aColorProp; }; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index e07fb6a77693..200ef0aa42d2 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -282,7 +282,7 @@ public: rtl::Reference< XMLPropertySetMapper > mxPropertySetMapper; rtl::Reference< XMLChartExportPropertyMapper > mxExpPropMapper; - static constexpr OUStringLiteral gsTableName = u"local-table"; + static constexpr OUString gsTableName = u"local-table"_ustr; OUStringBuffer msStringBuffer; OUString msString; diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index b559d5f075e0..cf4e33e769cf 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -886,7 +886,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe // this property) bool bHasErrorBarRangesFromData = false; { - static constexpr OUStringLiteral aErrorBarStylePropName( u"ErrorBarStyle"); + static constexpr OUString aErrorBarStylePropName( u"ErrorBarStyle"_ustr); uno::Any aErrorBarStyle( SchXMLTools::getPropertyFromContext( aErrorBarStylePropName, pPropStyleContext, pStylesCtxt )); if( aErrorBarStyle.hasValue()) diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index b12f5886e69b..ac0e9aeed524 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -57,7 +57,7 @@ using ::com::sun::star::uno::Reference; namespace { -constexpr OUStringLiteral aCategoriesRange = u"categories"; +constexpr OUString aCategoriesRange = u"categories"_ustr; typedef ::std::multimap< OUString, OUString > lcl_tOriginalRangeToInternalRangeMap; @@ -104,7 +104,7 @@ void lcl_fillRangeMapping( sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 ); const OUString lcl_aCategoriesRange(aCategoriesRange); - static constexpr OUStringLiteral lcl_aLabelPrefix(u"label "); + static constexpr OUString lcl_aLabelPrefix(u"label "_ustr); // Fill range mapping const size_t nTableRowCount( rTable.aData.size()); diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index ff344f164edc..120e361f84f0 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -91,7 +91,7 @@ sal_Int32 lcl_getBuildIDFromGenerator( std::u16string_view rGenerator ) { //returns -1 if nothing found sal_Int32 nBuildId = -1; - static constexpr OUStringLiteral sBuildCompare( u"$Build-" ); + static constexpr OUString sBuildCompare( u"$Build-"_ustr ); size_t nBegin = rGenerator.find( sBuildCompare ); if( nBegin != std::u16string_view::npos ) { @@ -632,7 +632,7 @@ void setXMLRangePropertyAtDataSequence( return; try { - static constexpr OUStringLiteral aXMLRangePropName( u"CachedXMLRange" ); + static constexpr OUString aXMLRangePropName( u"CachedXMLRange"_ustr ); Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW ); Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo()); if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName )) @@ -654,7 +654,7 @@ bool getXMLRangePropertyFromDataSequence( { try { - static constexpr OUStringLiteral aXMLRangePropName( u"CachedXMLRange" ); + static constexpr OUString aXMLRangePropName( u"CachedXMLRange"_ustr ); Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW ); Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo()); bResult = @@ -840,7 +840,7 @@ Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Refere Reference< lang::XMultiServiceFactory > xFact( xChild->getParent(), uno::UNO_QUERY ); if( xFact.is() ) { - static constexpr OUStringLiteral aDataProviderServiceName( u"com.sun.star.chart2.data.DataProvider"); + static constexpr OUString aDataProviderServiceName( u"com.sun.star.chart2.data.DataProvider"_ustr); const uno::Sequence< OUString > aServiceNames( xFact->getAvailableServiceNames()); const OUString * pBegin = aServiceNames.getConstArray(); const OUString * pEnd = pBegin + aServiceNames.getLength(); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 1f0f5a9780d8..7c6be149fac3 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -114,17 +114,17 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::io; using namespace ::xmloff::token; -constexpr OUStringLiteral XML_MODEL_SERVICE_WRITER = u"com.sun.star.text.TextDocument"; -constexpr OUStringLiteral XML_MODEL_SERVICE_CALC = u"com.sun.star.sheet.SpreadsheetDocument"; -constexpr OUStringLiteral XML_MODEL_SERVICE_DRAW = u"com.sun.star.drawing.DrawingDocument"; -constexpr OUStringLiteral XML_MODEL_SERVICE_IMPRESS = u"com.sun.star.presentation.PresentationDocument"; -constexpr OUStringLiteral XML_MODEL_SERVICE_MATH = u"com.sun.star.formula.FormulaProperties"; -constexpr OUStringLiteral XML_MODEL_SERVICE_CHART = u"com.sun.star.chart.ChartDocument"; +constexpr OUString XML_MODEL_SERVICE_WRITER = u"com.sun.star.text.TextDocument"_ustr; +constexpr OUString XML_MODEL_SERVICE_CALC = u"com.sun.star.sheet.SpreadsheetDocument"_ustr; +constexpr OUString XML_MODEL_SERVICE_DRAW = u"com.sun.star.drawing.DrawingDocument"_ustr; +constexpr OUString XML_MODEL_SERVICE_IMPRESS = u"com.sun.star.presentation.PresentationDocument"_ustr; +constexpr OUString XML_MODEL_SERVICE_MATH = u"com.sun.star.formula.FormulaProperties"_ustr; +constexpr OUString XML_MODEL_SERVICE_CHART = u"com.sun.star.chart.ChartDocument"_ustr; constexpr OUStringLiteral XML_USEPRETTYPRINTING = u"UsePrettyPrinting"; -constexpr OUStringLiteral XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE = u"vnd.sun.star.GraphicObject:"; -constexpr OUStringLiteral XML_EMBEDDEDOBJECT_URL_BASE = u"vnd.sun.star.EmbeddedObject:"; +constexpr OUString XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE = u"vnd.sun.star.GraphicObject:"_ustr; +constexpr OUString XML_EMBEDDEDOBJECT_URL_BASE = u"vnd.sun.star.EmbeddedObject:"_ustr; const std::pair<OUString, OUString> aServiceMap[] = { { XML_MODEL_SERVICE_WRITER, XML_EXPORT_FILTER_WRITER }, @@ -540,9 +540,9 @@ SvXMLExport::~SvXMLExport() { if (mpProgressBarHelper) { - static constexpr OUStringLiteral sProgressMax(XML_PROGRESSMAX); - static constexpr OUStringLiteral sProgressCurrent(XML_PROGRESSCURRENT); - static constexpr OUStringLiteral sRepeat(XML_PROGRESSREPEAT); + static constexpr OUString sProgressMax(XML_PROGRESSMAX); + static constexpr OUString sProgressCurrent(XML_PROGRESSCURRENT); + static constexpr OUString sRepeat(XML_PROGRESSREPEAT); if (xPropertySetInfo->hasPropertyByName(sProgressMax) && xPropertySetInfo->hasPropertyByName(sProgressCurrent)) { @@ -556,7 +556,7 @@ SvXMLExport::~SvXMLExport() } if (mpNumExport && (mnExportFlags & (SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::STYLES))) { - static constexpr OUStringLiteral sWrittenNumberFormats(XML_WRITTENNUMBERSTYLES); + static constexpr OUString sWrittenNumberFormats(XML_WRITTENNUMBERSTYLES); if (xPropertySetInfo->hasPropertyByName(sWrittenNumberFormats)) { mxExportInfo->setPropertyValue(sWrittenNumberFormats, Any(mpNumExport->GetWasUsed())); @@ -701,7 +701,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxExportInfo->getPropertySetInfo(); - static constexpr OUStringLiteral sBaseURI = u"BaseURI"; + static constexpr OUString sBaseURI = u"BaseURI"_ustr; if( xPropertySetInfo->hasPropertyByName(sBaseURI) ) { uno::Any aAny = mxExportInfo->getPropertyValue(sBaseURI); @@ -710,14 +710,14 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen mpImpl->SetSchemeOf( msOrigFileName ); } OUString sRelPath; - static constexpr OUStringLiteral sStreamRelPath = u"StreamRelPath"; + static constexpr OUString sStreamRelPath = u"StreamRelPath"_ustr; if( xPropertySetInfo->hasPropertyByName(sStreamRelPath) ) { uno::Any aAny = mxExportInfo->getPropertyValue(sStreamRelPath); aAny >>= sRelPath; } OUString sName; - static constexpr OUStringLiteral sStreamName = u"StreamName"; + static constexpr OUString sStreamName = u"StreamName"_ustr; if( xPropertySetInfo->hasPropertyByName(sStreamName) ) { uno::Any aAny = mxExportInfo->getPropertyValue(sStreamName); @@ -734,8 +734,8 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen mpImpl->mStreamName = sName; // Note: may be empty (XSLT) // Written OpenDocument file format doesn't fit to the created text document (#i69627#) - static constexpr OUStringLiteral sOutlineStyleAsNormalListStyle( - u"OutlineStyleAsNormalListStyle" ); + static constexpr OUString sOutlineStyleAsNormalListStyle( + u"OutlineStyleAsNormalListStyle"_ustr ); if( xPropertySetInfo->hasPropertyByName( sOutlineStyleAsNormalListStyle ) ) { uno::Any aAny = mxExportInfo->getPropertyValue( sOutlineStyleAsNormalListStyle ); @@ -746,8 +746,8 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen if( xPropertySetInfo->hasPropertyByName( sTargetStorage ) ) mxExportInfo->getPropertyValue( sTargetStorage ) >>= mpImpl->mxTargetStorage; - static constexpr OUStringLiteral sExportTextNumberElement( - u"ExportTextNumberElement" ); + static constexpr OUString sExportTextNumberElement( + u"ExportTextNumberElement"_ustr ); if( xPropertySetInfo->hasPropertyByName( sExportTextNumberElement ) ) { uno::Any aAny = mxExportInfo->getPropertyValue( sExportTextNumberElement ); @@ -869,7 +869,7 @@ uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( ) OUString SvXMLExport::EnsureNamespace(OUString const & i_rNamespace) { - static constexpr OUStringLiteral aPreferredPrefix(u"gen"); + static constexpr OUString aPreferredPrefix(u"gen"_ustr); OUString sPrefix; sal_uInt16 nKey( GetNamespaceMap_().GetKeyByName( i_rNamespace ) ); if( XML_NAMESPACE_UNKNOWN == nKey ) @@ -1084,8 +1084,8 @@ void SvXMLExport::ImplExportStyles() if( ( mnExportFlags & SvXMLExportFlags::CONTENT ) || !mxExportInfo.is() ) return; - static constexpr OUStringLiteral sStyleNames( u"StyleNames" ); - static constexpr OUStringLiteral sStyleFamilies( u"StyleFamilies" ); + static constexpr OUString sStyleNames( u"StyleNames"_ustr ); + static constexpr OUString sStyleFamilies( u"StyleFamilies"_ustr ); uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxExportInfo->getPropertySetInfo(); if ( xPropertySetInfo->hasPropertyByName( sStyleNames ) && xPropertySetInfo->hasPropertyByName( sStyleFamilies ) ) { diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index a13c58b41d91..de6b50a1471e 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -119,7 +119,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() ) ) bWordWrapDefault = false; - static constexpr OUStringLiteral sTextWordWrap( u"TextWordWrap" ); + static constexpr OUString sTextWordWrap( u"TextWordWrap"_ustr ); Reference< XPropertySetInfo > xInfo( xDefaults->getPropertySetInfo() ); if ( xInfo->hasPropertyByName( sTextWordWrap ) ) xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) ); diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index a9c70f2c70d4..e3a16c08636c 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -483,7 +483,7 @@ void XMLImageMapCircleContext::Prepare( } -constexpr OUStringLiteral gsImageMap(u"ImageMap"); +constexpr OUString gsImageMap(u"ImageMap"_ustr); XMLImageMapContext::XMLImageMapContext( SvXMLImport& rImport, diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 918d13ad07ce..833df40af214 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.cxx @@ -56,7 +56,7 @@ using ::com::sun::star::drawing::PointSequence; constexpr OUStringLiteral gsBoundary(u"Boundary"); constexpr OUStringLiteral gsCenter(u"Center"); constexpr OUStringLiteral gsDescription(u"Description"); -constexpr OUStringLiteral gsImageMap(u"ImageMap"); +constexpr OUString gsImageMap(u"ImageMap"_ustr); constexpr OUStringLiteral gsIsActive(u"IsActive"); constexpr OUStringLiteral gsName(u"Name"); constexpr OUStringLiteral gsPolygon(u"Polygon"); diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index ed280f1e1060..0c78f4f1d85b 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -232,18 +232,18 @@ class AnimExpImpl public: std::list<XMLEffectHint> maEffects; - static constexpr OUStringLiteral gsDimColor = u"DimColor"; - static constexpr OUStringLiteral gsDimHide = u"DimHide"; - static constexpr OUStringLiteral gsDimPrev = u"DimPrevious"; - static constexpr OUStringLiteral gsEffect = u"Effect"; - static constexpr OUStringLiteral gsPlayFull = u"PlayFull"; - static constexpr OUStringLiteral gsPresOrder = u"PresentationOrder"; - static constexpr OUStringLiteral gsSound = u"Sound"; - static constexpr OUStringLiteral gsSoundOn = u"SoundOn"; - static constexpr OUStringLiteral gsSpeed = u"Speed"; - static constexpr OUStringLiteral gsTextEffect = u"TextEffect"; - static constexpr OUStringLiteral gsIsAnimation = u"IsAnimation"; - static constexpr OUStringLiteral gsAnimPath = u"AnimationPath"; + static constexpr OUString gsDimColor = u"DimColor"_ustr; + static constexpr OUString gsDimHide = u"DimHide"_ustr; + static constexpr OUString gsDimPrev = u"DimPrevious"_ustr; + static constexpr OUString gsEffect = u"Effect"_ustr; + static constexpr OUString gsPlayFull = u"PlayFull"_ustr; + static constexpr OUString gsPresOrder = u"PresentationOrder"_ustr; + static constexpr OUString gsSound = u"Sound"_ustr; + static constexpr OUString gsSoundOn = u"SoundOn"_ustr; + static constexpr OUString gsSpeed = u"Speed"_ustr; + static constexpr OUString gsTextEffect = u"TextEffect"_ustr; + static constexpr OUString gsIsAnimation = u"IsAnimation"_ustr; + static constexpr OUString gsAnimPath = u"AnimationPath"_ustr; }; XMLAnimationsExporter::XMLAnimationsExporter() diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 1fdf818a8be1..dd0c77ec8efc 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -376,7 +376,7 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI maPresRect.SetSize(aLayoutSize); } -constexpr OUStringLiteral gsPageLayoutNames( u"PageLayoutNames" ); +constexpr OUString gsPageLayoutNames( u"PageLayoutNames"_ustr ); SdXMLExport::SdXMLExport( const css::uno::Reference< css::uno::XComponentContext >& xContext, @@ -1362,9 +1362,9 @@ static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, cons return pPrefix + OUString::number( nIndex ); } -constexpr OUStringLiteral gpStrHeaderTextPrefix = u"hdr"; -constexpr OUStringLiteral gpStrFooterTextPrefix = u"ftr"; -constexpr OUStringLiteral gpStrDateTimeTextPrefix = u"dtd"; +constexpr OUString gpStrHeaderTextPrefix = u"hdr"_ustr; +constexpr OUString gpStrFooterTextPrefix = u"ftr"_ustr; +constexpr OUString gpStrDateTimeTextPrefix = u"dtd"_ustr; HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( const Reference<XDrawPage>& xDrawPage ) { @@ -1377,7 +1377,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons OUString aStrText; - static constexpr OUStringLiteral aStrHeaderTextProp( u"HeaderText" ); + static constexpr OUString aStrHeaderTextProp( u"HeaderText"_ustr ); if( xInfo->hasPropertyByName( aStrHeaderTextProp ) ) { xSet->getPropertyValue( aStrHeaderTextProp ) >>= aStrText; @@ -1385,7 +1385,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons aSettings.maStrHeaderDeclName = findOrAppendImpl( maHeaderDeclsVector, aStrText, gpStrHeaderTextPrefix ); } - static constexpr OUStringLiteral aStrFooterTextProp( u"FooterText" ); + static constexpr OUString aStrFooterTextProp( u"FooterText"_ustr ); if( xInfo->hasPropertyByName( aStrFooterTextProp ) ) { xSet->getPropertyValue( aStrFooterTextProp ) >>= aStrText; @@ -1393,7 +1393,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons aSettings.maStrFooterDeclName = findOrAppendImpl( maFooterDeclsVector, aStrText, gpStrFooterTextPrefix ); } - static constexpr OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" ); + static constexpr OUString aStrDateTimeTextProp( u"DateTimeText"_ustr ); if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) ) { bool bFixed = false; @@ -1508,7 +1508,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( const Reference<XDrawPage>& xD // which itself is a property of the pages property set // we now merge these two propertysets if possible to simulate // a single propertyset with all draw page properties - static constexpr OUStringLiteral aBackground(u"Background"); + static constexpr OUString aBackground(u"Background"_ustr); Reference< beans::XPropertySet > xPropSet2; Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() ); if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index ebeae2a62258..19fd66d5a380 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -375,7 +375,7 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen { SvXMLImport::initialize( aArguments ); - static constexpr OUStringLiteral sOrganizerMode(u"OrganizerMode"); + static constexpr OUString sOrganizerMode(u"OrganizerMode"_ustr); bool bStyleOnly(false); css::beans::PropertyValue aPropValue; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 30b251cbda01..60ccbf57c490 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -154,20 +154,20 @@ bool supportsText(XmlShapeType eShapeType) } -constexpr OUStringLiteral gsZIndex( u"ZOrder" ); +constexpr OUString gsZIndex( u"ZOrder"_ustr ); constexpr OUStringLiteral gsPrintable( u"Printable" ); constexpr OUStringLiteral gsVisible( u"Visible" ); -constexpr OUStringLiteral gsModel( u"Model" ); +constexpr OUString gsModel( u"Model"_ustr ); constexpr OUStringLiteral gsStartShape( u"StartShape" ); constexpr OUStringLiteral gsEndShape( u"EndShape" ); -constexpr OUStringLiteral gsOnClick( u"OnClick" ); +constexpr OUString gsOnClick( u"OnClick"_ustr ); constexpr OUStringLiteral gsEventType( u"EventType" ); constexpr OUStringLiteral gsPresentation( u"Presentation" ); constexpr OUStringLiteral gsMacroName( u"MacroName" ); -constexpr OUStringLiteral gsScript( u"Script" ); +constexpr OUString gsScript( u"Script"_ustr ); constexpr OUStringLiteral gsLibrary( u"Library" ); constexpr OUStringLiteral gsClickAction( u"ClickAction" ); -constexpr OUStringLiteral gsBookmark( u"Bookmark" ); +constexpr OUString gsBookmark( u"Bookmark"_ustr ); constexpr OUStringLiteral gsEffect( u"Effect" ); constexpr OUStringLiteral gsPlayFull( u"PlayFull" ); constexpr OUStringLiteral gsVerb( u"Verb" ); @@ -3127,7 +3127,7 @@ void XMLShapeExport::ImpExportPageShape( // export page number used for this page uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - static constexpr OUStringLiteral aPageNumberStr(u"PageNumber"); + static constexpr OUString aPageNumberStr(u"PageNumber"_ustr); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr)) { sal_Int32 nPageNumber = 0; @@ -3524,21 +3524,21 @@ void XMLShapeExport::ImpExportMediaShape( auto pPluginOBJ = std::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); // export parameters - static constexpr OUStringLiteral aFalseStr( u"false" ); - static constexpr OUStringLiteral aTrueStr( u"true" ); + static constexpr OUString aFalseStr( u"false"_ustr ); + static constexpr OUString aTrueStr( u"true"_ustr ); bool bLoop = false; - static constexpr OUStringLiteral aLoopStr( u"Loop" ); + static constexpr OUString aLoopStr( u"Loop"_ustr ); xPropSet->getPropertyValue( aLoopStr ) >>= bLoop; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aLoopStr ); - mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bLoop ? OUString(aTrueStr) : OUString(aFalseStr) ); + mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bLoop ? aTrueStr : aFalseStr ); delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true ); bool bMute = false; - static constexpr OUStringLiteral aMuteStr( u"Mute" ); + static constexpr OUString aMuteStr( u"Mute"_ustr ); xPropSet->getPropertyValue( aMuteStr ) >>= bMute; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aMuteStr ); - mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bMute ? OUString(aTrueStr) : OUString(aFalseStr) ); + mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bMute ? aTrueStr : aFalseStr ); delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true ); sal_Int16 nVolumeDB = 0; @@ -4367,7 +4367,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); // geometry - static constexpr OUStringLiteral sCustomShapeGeometry( u"CustomShapeGeometry" ); + static constexpr OUString sCustomShapeGeometry( u"CustomShapeGeometry"_ustr ); if ( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( sCustomShapeGeometry ) ) { uno::Any aGeoPropSet( xPropSet->getPropertyValue( sCustomShapeGeometry ) ); diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index c97be226bd3e..37619c72ce34 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -286,7 +286,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseHeaderDeclName.isEmpty() ) { - static constexpr OUStringLiteral aStrHeaderTextProp( u"HeaderText" ); + static constexpr OUString aStrHeaderTextProp( u"HeaderText"_ustr ); if( xInfo->hasPropertyByName( aStrHeaderTextProp ) ) xSet->setPropertyValue( aStrHeaderTextProp, Any( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) ); @@ -294,7 +294,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseFooterDeclName.isEmpty() ) { - static constexpr OUStringLiteral aStrFooterTextProp( u"FooterText" ); + static constexpr OUString aStrFooterTextProp( u"FooterText"_ustr ); if( xInfo->hasPropertyByName( aStrFooterTextProp ) ) xSet->setPropertyValue( aStrFooterTextProp, Any( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) ); @@ -302,7 +302,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseDateTimeDeclName.isEmpty() ) { - static constexpr OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" ); + static constexpr OUString aStrDateTimeTextProp( u"DateTimeText"_ustr ); if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) ) { bool bFixed; @@ -369,7 +369,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName ) Reference< beans::XPropertySet > xPropSet( xPropSet1 ); Reference< beans::XPropertySet > xBackgroundSet; - static constexpr OUStringLiteral aBackground(u"Background"); + static constexpr OUString aBackground(u"Background"_ustr); if( xPropSet1->getPropertySetInfo()->hasPropertyByName( aBackground ) ) { Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() ); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 4de4bd28edb8..3591c8a357c9 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -720,7 +720,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) // SwTextBoxHelper::syncProperty, which indirectly calls SwTextBoxHelper::isTextBox) uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropSet->getPropertySetInfo(); - static constexpr OUStringLiteral sTextBox = u"TextBox"; + static constexpr OUString sTextBox = u"TextBox"_ustr; if (xPropertySetInfo->hasPropertyByName(sTextBox)) xPropSet->setPropertyValue(sTextBox, uno::Any(mbTextBox)); @@ -2203,7 +2203,7 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement, if(xPropSet.is()) { uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - static constexpr OUStringLiteral aPageNumberStr(u"PageNumber"); + static constexpr OUString aPageNumberStr(u"PageNumber"_ustr); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr)) xPropSet->setPropertyValue(aPageNumberStr, uno::Any( mnPageNumber )); } @@ -2635,7 +2635,7 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/, if ( GetImport().IsPackageURL( maHref ) ) { - static constexpr OUStringLiteral sURL( u"vnd.sun.star.EmbeddedObject:" ); + static constexpr OUString sURL( u"vnd.sun.star.EmbeddedObject:"_ustr ); if ( aPersistName.startsWith( sURL ) ) aPersistName = aPersistName.copy( sURL.getLength() ); @@ -2999,7 +2999,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) { if ( maSize.Width && maSize.Height ) { - static constexpr OUStringLiteral sVisibleArea( u"VisibleArea" ); + static constexpr OUString sVisibleArea( u"VisibleArea"_ustr ); uno::Reference< beans::XPropertySetInfo > aXPropSetInfo( xProps->getPropertySetInfo() ); if ( !aXPropSetInfo.is() || aXPropSetInfo->hasPropertyByName( sVisibleArea ) ) { @@ -3679,7 +3679,7 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement) if (aScale.getX() < 0.0) { - static constexpr OUStringLiteral sName(u"MirroredX"); + static constexpr OUString sName(u"MirroredX"_ustr); //fdo#84043 Merge, if property exists, otherwise append it auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(), [](beans::PropertyValue& rValue) { return rValue.Name == sName; }); @@ -3705,7 +3705,7 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement) if (aScale.getY() < 0.0) { - static constexpr OUStringLiteral sName(u"MirroredY"); + static constexpr OUString sName(u"MirroredY"_ustr); //fdo#84043 Merge, if property exists, otherwise append it auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(), [](beans::PropertyValue& rValue) { return rValue.Name == sName; }); diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index fdb5508a5232..d1d691d6519a 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -442,7 +442,7 @@ namespace xmloff { // no optimization here. If this method gets called, the XML stream did not contain a name for the // element, which is a heavy error. So in this case we don't care for performance - static constexpr OUStringLiteral sUnnamedName = u"unnamed"; + static constexpr OUString sUnnamedName = u"unnamed"_ustr; OSL_ENSURE(m_xParentContainer.is(), "OElementImport::implGetDefaultName: no parent container!"); if (!m_xParentContainer.is()) return sUnnamedName; diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index a73fc844e7a9..09324ba8b2cc 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -245,8 +245,8 @@ void SvXMLMetaDocumentContext::setBuildId(std::u16string_view i_rBuildId, const { OUStringBuffer sBuffer( i_rBuildId.substr( nBegin+1, nEnd-nBegin-1 ) ); - static constexpr OUStringLiteral sBuildCompare( - u"$Build-" ); + static constexpr OUString sBuildCompare( + u"$Build-"_ustr ); nBegin = i_rBuildId.find( sBuildCompare, nEnd ); if ( nBegin != std::u16string_view::npos ) { @@ -305,7 +305,7 @@ void SvXMLMetaDocumentContext::setBuildId(std::u16string_view i_rBuildId, const { if( xImportInfo.is() ) { - static constexpr OUStringLiteral aPropName(u"BuildId"); + static constexpr OUString aPropName(u"BuildId"_ustr); uno::Reference< beans::XPropertySetInfo > xSetInfo( xImportInfo->getPropertySetInfo()); if( xSetInfo.is() && xSetInfo->hasPropertyByName( aPropName ) ) diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 20bf6d5a2386..1554fff9aa99 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -constexpr OUStringLiteral XMLN_VERSIONSLIST = u"VersionList.xml"; +constexpr OUString XMLN_VERSIONSLIST = u"VersionList.xml"_ustr; XMLVersionListExport::XMLVersionListExport( const css::uno::Reference< css::uno::XComponentContext >& rContext, diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx index 3ebc45c1c98a..0e7caa3d69f7 100644 --- a/xmloff/source/script/XMLScriptContextFactory.cxx +++ b/xmloff/source/script/XMLScriptContextFactory.cxx @@ -32,9 +32,9 @@ using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -constexpr OUStringLiteral gsEventType(u"EventType"); -constexpr OUStringLiteral gsScript(u"Script"); -constexpr OUStringLiteral gsURL(u"Script"); +constexpr OUString gsEventType(u"EventType"_ustr); +constexpr OUString gsScript(u"Script"_ustr); +constexpr OUString gsURL(u"Script"_ustr); XMLScriptContextFactory::XMLScriptContextFactory() {} @@ -56,7 +56,7 @@ SvXMLImportContext* XMLScriptContextFactory::CreateContext( if (!sURLVal.isEmpty()) rImport.NotifyMacroEventRead(); - Sequence<PropertyValue> aValues{ comphelper::makePropertyValue(gsEventType, OUString(gsScript)), + Sequence<PropertyValue> aValues{ comphelper::makePropertyValue(gsEventType, gsScript), comphelper::makePropertyValue(gsURL, sURLVal) }; // add values for event now diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx index bab59a0d7505..2a2b76cfb5f1 100644 --- a/xmloff/source/script/XMLStarBasicContextFactory.cxx +++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx @@ -35,10 +35,10 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -constexpr OUStringLiteral gsEventType(u"EventType"); -constexpr OUStringLiteral gsLibrary(u"Library"); -constexpr OUStringLiteral gsMacroName(u"MacroName"); -constexpr OUStringLiteral gsStarBasic(u"StarBasic"); +constexpr OUString gsEventType(u"EventType"_ustr); +constexpr OUString gsLibrary(u"Library"_ustr); +constexpr OUString gsMacroName(u"MacroName"_ustr); +constexpr OUString gsStarBasic(u"StarBasic"_ustr); XMLStarBasicContextFactory::XMLStarBasicContextFactory() { @@ -86,7 +86,7 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext( Sequence<PropertyValue> aValues { - comphelper::makePropertyValue(gsEventType, OUString(gsStarBasic)), + comphelper::makePropertyValue(gsEventType, gsStarBasic), comphelper::makePropertyValue(gsLibrary, sLibraryVal), comphelper::makePropertyValue(gsMacroName, sMacroNameVal) }; diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index 874c87509302..4e4a2912918c 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -166,7 +166,7 @@ void PageStyleContext::FillPropertySet_PageStyle( // ones are used when a FillStyle is defined if(!m_bIsFillStyleAlreadyConverted && !GetProperties().empty()) { - static constexpr OUStringLiteral s_FillStyle(u"FillStyle"); + static constexpr OUString s_FillStyle(u"FillStyle"_ustr); static constexpr OUStringLiteral s_HeaderFillStyle(u"HeaderFillStyle"); static constexpr OUStringLiteral s_FooterFillStyle(u"FooterFillStyle"); diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 41f212901feb..500f9463b68e 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -41,8 +41,8 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using namespace ::xmloff::token; -constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" ); -constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" ); +constexpr OUString gsIsPhysical( u"IsPhysical"_ustr ); +constexpr OUString gsFollowStyle( u"FollowStyle"_ustr ); namespace { @@ -215,7 +215,7 @@ XMLPageExport::XMLPageExport(SvXMLExport & rExp) "getStyleFamilies() from XModel failed for export!" ); if( xFamilies.is() ) { - static constexpr OUStringLiteral aPageStyleName(u"PageStyles"); + static constexpr OUString aPageStyleName(u"PageStyles"_ustr); if( xFamilies->hasByName( aPageStyleName ) ) { diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index da33b500741c..f2c3a3b2caf9 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -38,10 +38,10 @@ using namespace com::sun::star; using namespace xmloff::token; -constexpr OUStringLiteral gsStandardFormat(u"StandardFormat"); -constexpr OUStringLiteral gsType(u"Type"); -constexpr OUStringLiteral gsCurrencySymbol(u"CurrencySymbol"); -constexpr OUStringLiteral gsCurrencyAbbreviation(u"CurrencyAbbreviation"); +constexpr OUString gsStandardFormat(u"StandardFormat"_ustr); +constexpr OUString gsType(u"Type"_ustr); +constexpr OUString gsCurrencySymbol(u"CurrencySymbol"_ustr); +constexpr OUString gsCurrencyAbbreviation(u"CurrencyAbbreviation"_ustr); XMLNumberFormatAttributesExportHelper::XMLNumberFormatAttributesExportHelper( css::uno::Reference< css::util::XNumberFormatsSupplier > const & xTempNumberFormatsSupplier) diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index ec5f2d7d8d85..7aef1ec4c03c 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -143,8 +143,8 @@ namespace -constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" ); -constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" ); +constexpr OUString gsIsPhysical( u"IsPhysical"_ustr ); +constexpr OUString gsFollowStyle( u"FollowStyle"_ustr ); XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport, SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index aa3ad9719e8a..15e2d714d385 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -53,11 +53,11 @@ using namespace ::xmloff::token; using ::com::sun::star::document::XEventsSupplier; -constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" ); -constexpr OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" ); -constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" ); -constexpr OUStringLiteral gsNumberingStyleName( u"NumberingStyleName" ); -constexpr OUStringLiteral gsOutlineLevel( u"OutlineLevel" ); +constexpr OUString gsIsPhysical( u"IsPhysical"_ustr ); +constexpr OUString gsIsAutoUpdate( u"IsAutoUpdate"_ustr ); +constexpr OUString gsFollowStyle( u"FollowStyle"_ustr ); +constexpr OUString gsNumberingStyleName( u"NumberingStyleName"_ustr ); +constexpr OUString gsOutlineLevel( u"OutlineLevel"_ustr ); XMLStyleExport::XMLStyleExport( SvXMLExport& rExp, diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index a5ae61c12543..d6ab01426698 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -628,8 +628,8 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, constexpr OUStringLiteral gsNumberingRules( u"NumberingRules" ); -constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" ); -constexpr OUStringLiteral gsIsContinuousNumbering( u"IsContinuousNumbering" ); +constexpr OUString gsIsPhysical( u"IsPhysical"_ustr ); +constexpr OUString gsIsContinuousNumbering( u"IsContinuousNumbering"_ustr ); SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) : m_rExport( rExp ), @@ -808,7 +808,7 @@ void SvxXMLNumRuleExport::exportStyles( bool bUsed, bool bExportChapterNumbering if( !xFamilies.is() ) return; - static constexpr OUStringLiteral aNumberStyleName( u"NumberingStyles" ); + static constexpr OUString aNumberStyleName( u"NumberingStyles"_ustr ); Reference< XIndexAccess > xStyles; if( !xFamilies->hasByName( aNumberStyleName ) ) diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index c9149a03a255..0ddab1466df8 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -848,9 +848,9 @@ void SvxXMLListStyleContext::SetAttribute( sal_Int32 nElement, } } -constexpr OUStringLiteral sIsPhysical( u"IsPhysical" ); -constexpr OUStringLiteral sNumberingRules( u"NumberingRules" ); -constexpr OUStringLiteral sIsContinuousNumbering( u"IsContinuousNumbering" ); +constexpr OUString sIsPhysical( u"IsPhysical"_ustr ); +constexpr OUString sNumberingRules( u"NumberingRules"_ustr ); +constexpr OUString sIsContinuousNumbering( u"IsContinuousNumbering"_ustr ); SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport, bool bOutl ) diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 5158b43592cd..168483af1db0 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -67,8 +67,8 @@ using namespace ::xmloff::token; constexpr OUStringLiteral gsParaStyleServiceName( u"com.sun.star.style.ParagraphStyle" ); constexpr OUStringLiteral gsTextStyleServiceName( u"com.sun.star.style.CharacterStyle" ); -constexpr OUStringLiteral gsParagraphStyles(u"ParagraphStyles"); -constexpr OUStringLiteral gsCharacterStyles(u"CharacterStyles"); +constexpr OUString gsParagraphStyles(u"ParagraphStyles"_ustr); +constexpr OUString gsCharacterStyles(u"CharacterStyles"_ustr); void SvXMLStyleContext::SetAttribute( sal_Int32 nElement, const OUString& rValue ) diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index fe6613836bca..294469f85e90 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -712,7 +712,7 @@ void XMLCellStyleExport::exportStyleAttributes(const Reference<XStyle>& rStyle) return; Reference<XPropertySetInfo> xPropSetInfo(xPropSet->getPropertySetInfo()); - static constexpr OUStringLiteral sNumberFormat(u"NumberFormat"); + static constexpr OUString sNumberFormat(u"NumberFormat"_ustr); if (xPropSetInfo->hasPropertyByName(sNumberFormat)) { Reference<XPropertyState> xPropState(xPropSet, UNO_QUERY); diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index 822d77912500..e7ba5e6baee7 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx @@ -45,14 +45,14 @@ using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::lang::XMultiServiceFactory; -constexpr OUStringLiteral gsFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography"); +constexpr OUString gsFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography"_ustr); constexpr OUStringLiteral gsBracketBefore(u"BracketBefore"); constexpr OUStringLiteral gsBracketAfter(u"BracketAfter"); constexpr OUStringLiteral gsIsNumberEntries(u"IsNumberEntries"); constexpr OUStringLiteral gsIsSortByPosition(u"IsSortByPosition"); constexpr OUStringLiteral gsSortKeys(u"SortKeys"); -constexpr OUStringLiteral gsSortKey(u"SortKey"); -constexpr OUStringLiteral gsIsSortAscending(u"IsSortAscending"); +constexpr OUString gsSortKey(u"SortKey"_ustr); +constexpr OUString gsIsSortAscending(u"IsSortAscending"_ustr); constexpr OUStringLiteral gsSortAlgorithm(u"SortAlgorithm"); constexpr OUStringLiteral gsLocale(u"Locale"); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index ceea38316150..fc3adc0c8856 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -1588,7 +1588,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport) if ( !xTextFieldsSupp.is() ) return; - static constexpr OUStringLiteral sFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography"); + static constexpr OUString sFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography"_ustr); // get bibliography field master Reference<XNameAccess> xMasters = diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 2df8234dfa0d..eb49a0d77678 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -307,14 +307,14 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) ); } - static constexpr OUStringLiteral sIsPixelContour(u"IsPixelContour"); + static constexpr OUString sIsPixelContour(u"IsPixelContour"_ustr); if( xPropSetInfo->hasPropertyByName( sIsPixelContour ) ) { xPropSet->setPropertyValue( sIsPixelContour, Any(bPixelWidth) ); } - static constexpr OUStringLiteral sIsAutomaticContour(u"IsAutomaticContour"); + static constexpr OUString sIsAutomaticContour(u"IsAutomaticContour"_ustr); if( xPropSetInfo->hasPropertyByName( sIsAutomaticContour ) ) { @@ -1250,10 +1250,10 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, const OUString& rTargetFrameName, bool bMap ) { - static constexpr OUStringLiteral s_HyperLinkURL = u"HyperLinkURL"; - static constexpr OUStringLiteral s_HyperLinkName = u"HyperLinkName"; - static constexpr OUStringLiteral s_HyperLinkTarget = u"HyperLinkTarget"; - static constexpr OUStringLiteral s_ServerMap = u"ServerMap"; + static constexpr OUString s_HyperLinkURL = u"HyperLinkURL"_ustr; + static constexpr OUString s_HyperLinkName = u"HyperLinkName"_ustr; + static constexpr OUString s_HyperLinkTarget = u"HyperLinkTarget"_ustr; + static constexpr OUString s_ServerMap = u"ServerMap"_ustr; if( !xPropSet.is() ) return; diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index db79c6933273..786528201dff 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -69,7 +69,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, } if (bFirst) { - static constexpr OUStringLiteral sShareContentFirst( u"FirstIsShared" ); + static constexpr OUString sShareContentFirst( u"FirstIsShared"_ustr ); aAny = xPropSet->getPropertyValue( sShareContentFirst ); bool bSharedFirst = bool(); if (!(aAny >>= bSharedFirst)) diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 1e62a66e6846..affca2cc9894 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -166,7 +166,7 @@ XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) : xFamilies = xFamiliesSupp->getStyleFamilies(); Reference<XIndexAccess> xStyles; - static constexpr OUStringLiteral aNumberStyleName(u"NumberingStyles"); + static constexpr OUString aNumberStyleName(u"NumberingStyles"_ustr); if (xFamilies.is() && xFamilies->hasByName(aNumberStyleName)) xFamilies->getByName(aNumberStyleName) >>= xStyles; diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index c22eb2e221f2..ffacadf6cf70 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -51,7 +51,7 @@ XMLTextListBlockContext::XMLTextListBlockContext( , mbRestartNumbering( false ) , mbSetDefaults( false ) { - static constexpr OUStringLiteral s_PropNameDefaultListId = u"DefaultListId"; + static constexpr OUString s_PropNameDefaultListId = u"DefaultListId"_ustr; { // get the parent list block context (if any); this is a bit ugly... XMLTextListBlockContext * pLB(nullptr); diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index bdae5f16c8d6..96a694cf1def 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -264,7 +264,7 @@ static auto PopFieldmark(XMLTextImportHelper & rHelper) -> void void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement) { - static constexpr OUStringLiteral sAPI_bookmark = u"com.sun.star.text.Bookmark"; + static constexpr OUString sAPI_bookmark = u"com.sun.star.text.Bookmark"_ustr; lcl_MarkType nTmp{}; if (!SvXMLUnitConverter::convertEnum(nTmp, SvXMLImport::getNameFromToken(nElement), lcl_aMarkTypeMap)) @@ -306,7 +306,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement) // export point bookmark const Reference<XInterface> xContent( CreateAndInsertMark(GetImport(), - (bImportAsField ? OUString("com.sun.star.text.FormFieldmark") : OUString(sAPI_bookmark)), + (bImportAsField ? OUString("com.sun.star.text.FormFieldmark") : sAPI_bookmark), m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(), m_sXmlId) ); diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index 73048a4e4685..71e5f6770182 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -65,7 +65,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create() return xNewStyle; } -constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" ); +constexpr OUString gsFollowStyle( u"FollowStyle"_ustr ); XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport, sal_Int32 /*nElement*/, diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx index 87490a0df2ee..7be7be7aff0b 100644 --- a/xmloff/source/text/XMLTextMasterPageExport.cxx +++ b/xmloff/source/text/XMLTextMasterPageExport.cxx @@ -37,7 +37,7 @@ constexpr OUStringLiteral gsHeaderOn( u"HeaderIsOn" ); constexpr OUStringLiteral gsHeaderShareContent( u"HeaderIsShared" ); constexpr OUStringLiteral gsHeaderTextFirst( u"HeaderTextFirst" ); constexpr OUStringLiteral gsHeaderTextLeft( u"HeaderTextLeft" ); -constexpr OUStringLiteral gsFirstShareContent( u"FirstIsShared" ); +constexpr OUString gsFirstShareContent( u"FirstIsShared"_ustr ); constexpr OUStringLiteral gsFooterText( u"FooterText" ); constexpr OUStringLiteral gsFooterOn( u"FooterIsOn" ); constexpr OUStringLiteral gsFooterShareContent( u"FooterIsShared" ); diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 52574c10d650..5ce5fafe4f4f 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -134,7 +134,7 @@ void XMLTextShapeStyleContext::SetAttribute( sal_Int32 nElement, } -constexpr OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" ); +constexpr OUString gsIsAutoUpdate( u"IsAutoUpdate"_ustr ); XMLTextShapeStyleContext::XMLTextShapeStyleContext( SvXMLImport& rImport, SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) : diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 5a109cef0a43..304572ff8e60 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -296,25 +296,25 @@ static Sequence<OUString> GetStringSequenceProperty( // service names -constexpr OUStringLiteral gsServicePrefix(u"com.sun.star.text.textfield."); +constexpr OUString gsServicePrefix(u"com.sun.star.text.textfield."_ustr); constexpr OUStringLiteral gsFieldMasterPrefix(u"com.sun.star.text.FieldMaster."); -constexpr OUStringLiteral gsPresentationServicePrefix(u"com.sun.star.presentation.TextField."); +constexpr OUString gsPresentationServicePrefix(u"com.sun.star.presentation.TextField."_ustr); // property names -constexpr OUStringLiteral gsPropertyAdjust(u"Adjust"); +constexpr OUString gsPropertyAdjust(u"Adjust"_ustr); constexpr OUStringLiteral gsPropertyAuthor(u"Author"); constexpr OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat"); constexpr OUStringLiteral gsPropertyChapterNumberingLevel(u"ChapterNumberingLevel"); constexpr OUStringLiteral gsPropertyCharStyleNames(u"CharStyleNames"); -constexpr OUStringLiteral gsPropertyCondition(u"Condition"); -constexpr OUStringLiteral gsPropertyContent(u"Content"); +constexpr OUString gsPropertyCondition(u"Condition"_ustr); +constexpr OUString gsPropertyContent(u"Content"_ustr); constexpr OUStringLiteral gsPropertyDataBaseName(u"DataBaseName"); -constexpr OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL"); +constexpr OUString gsPropertyDataBaseURL(u"DataBaseURL"_ustr); constexpr OUStringLiteral gsPropertyDataColumnName(u"DataColumnName"); -constexpr OUStringLiteral gsPropertyDataCommandType(u"DataCommandType"); -constexpr OUStringLiteral gsPropertyDataTableName(u"DataTableName"); -constexpr OUStringLiteral gsPropertyDateTime(u"DateTime"); -constexpr OUStringLiteral gsPropertyDateTimeValue(u"DateTimeValue"); +constexpr OUString gsPropertyDataCommandType(u"DataCommandType"_ustr); +constexpr OUString gsPropertyDataTableName(u"DataTableName"_ustr); +constexpr OUString gsPropertyDateTime(u"DateTime"_ustr); +constexpr OUString gsPropertyDateTimeValue(u"DateTimeValue"_ustr); constexpr OUStringLiteral gsPropertyDDECommandElement(u"DDECommandElement"); constexpr OUStringLiteral gsPropertyDDECommandFile(u"DDECommandFile"); constexpr OUStringLiteral gsPropertyDDECommandType(u"DDECommandType"); @@ -322,52 +322,52 @@ constexpr OUStringLiteral gsPropertyDependentTextFields(u"DependentTextFields"); constexpr OUStringLiteral gsPropertyFalseContent(u"FalseContent"); constexpr OUStringLiteral gsPropertyFields(u"Fields"); constexpr OUStringLiteral gsPropertyFieldSubType(u"UserDataType"); -constexpr OUStringLiteral gsPropertyFileFormat(u"FileFormat"); +constexpr OUString gsPropertyFileFormat(u"FileFormat"_ustr); constexpr OUStringLiteral gsPropertyFullName(u"FullName"); -constexpr OUStringLiteral gsPropertyHint(u"Hint"); +constexpr OUString gsPropertyHint(u"Hint"_ustr); constexpr OUStringLiteral gsPropertyInitials(u"Initials"); constexpr OUStringLiteral gsPropertyInstanceName(u"InstanceName"); constexpr OUStringLiteral gsPropertyIsAutomaticUpdate(u"IsAutomaticUpdate"); constexpr OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue"); -constexpr OUStringLiteral gsPropertyIsDataBaseFormat(u"DataBaseFormat"); -constexpr OUStringLiteral gsPropertyIsDate(u"IsDate"); -constexpr OUStringLiteral gsPropertyIsExpression(u"IsExpression"); -constexpr OUStringLiteral gsPropertyIsFixed(u"IsFixed"); -constexpr OUStringLiteral gsPropertyIsFixedLanguage(u"IsFixedLanguage"); -constexpr OUStringLiteral gsPropertyIsHidden(u"IsHidden"); +constexpr OUString gsPropertyIsDataBaseFormat(u"DataBaseFormat"_ustr); +constexpr OUString gsPropertyIsDate(u"IsDate"_ustr); +constexpr OUString gsPropertyIsExpression(u"IsExpression"_ustr); +constexpr OUString gsPropertyIsFixed(u"IsFixed"_ustr); +constexpr OUString gsPropertyIsFixedLanguage(u"IsFixedLanguage"_ustr); +constexpr OUString gsPropertyIsHidden(u"IsHidden"_ustr); constexpr OUStringLiteral gsPropertyIsInput(u"Input"); -constexpr OUStringLiteral gsPropertyIsShowFormula(u"IsShowFormula"); -constexpr OUStringLiteral gsPropertyIsVisible(u"IsVisible"); +constexpr OUString gsPropertyIsShowFormula(u"IsShowFormula"_ustr); +constexpr OUString gsPropertyIsVisible(u"IsVisible"_ustr); constexpr OUStringLiteral gsPropertyItems(u"Items"); constexpr OUStringLiteral gsPropertyLevel(u"Level"); constexpr OUStringLiteral gsPropertyMeasureKind(u"Kind"); -constexpr OUStringLiteral gsPropertyName(u"Name"); +constexpr OUString gsPropertyName(u"Name"_ustr); constexpr OUStringLiteral gsPropertyParentName(u"ParentName"); -constexpr OUStringLiteral gsPropertyNumberFormat(u"NumberFormat"); +constexpr OUString gsPropertyNumberFormat(u"NumberFormat"_ustr); constexpr OUStringLiteral gsPropertyNumberingSeparator(u"NumberingSeparator"); -constexpr OUStringLiteral gsPropertyNumberingType(u"NumberingType"); -constexpr OUStringLiteral gsPropertyOffset(u"Offset"); +constexpr OUString gsPropertyNumberingType(u"NumberingType"_ustr); +constexpr OUString gsPropertyOffset(u"Offset"_ustr); constexpr OUStringLiteral gsPropertyOn(u"On"); constexpr OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType"); -constexpr OUStringLiteral gsPropertyReferenceFieldPart(u"ReferenceFieldPart"); -constexpr OUStringLiteral gsPropertyReferenceFieldSource(u"ReferenceFieldSource"); -constexpr OUStringLiteral gsPropertyReferenceFieldLanguage(u"ReferenceFieldLanguage"); +constexpr OUString gsPropertyReferenceFieldPart(u"ReferenceFieldPart"_ustr); +constexpr OUString gsPropertyReferenceFieldSource(u"ReferenceFieldSource"_ustr); +constexpr OUString gsPropertyReferenceFieldLanguage(u"ReferenceFieldLanguage"_ustr); constexpr OUStringLiteral gsPropertyScriptType(u"ScriptType"); constexpr OUStringLiteral gsPropertySelectedItem(u"SelectedItem"); -constexpr OUStringLiteral gsPropertySequenceNumber(u"SequenceNumber"); +constexpr OUString gsPropertySequenceNumber(u"SequenceNumber"_ustr); constexpr OUStringLiteral gsPropertySequenceValue(u"SequenceValue"); -constexpr OUStringLiteral gsPropertySetNumber(u"SetNumber"); -constexpr OUStringLiteral gsPropertySourceName(u"SourceName"); -constexpr OUStringLiteral gsPropertySubType(u"SubType"); +constexpr OUString gsPropertySetNumber(u"SetNumber"_ustr); +constexpr OUString gsPropertySourceName(u"SourceName"_ustr); +constexpr OUString gsPropertySubType(u"SubType"_ustr); constexpr OUStringLiteral gsPropertyTargetFrame(u"TargetFrame"); constexpr OUStringLiteral gsPropertyTrueContent(u"TrueContent"); constexpr OUStringLiteral gsPropertyURL(u"URL"); constexpr OUStringLiteral gsPropertyURLContent(u"URLContent"); constexpr OUStringLiteral gsPropertyUserText(u"UserText"); -constexpr OUStringLiteral gsPropertyValue(u"Value"); -constexpr OUStringLiteral gsPropertyVariableName(u"VariableName"); -constexpr OUStringLiteral gsPropertyHelp(u"Help"); -constexpr OUStringLiteral gsPropertyTooltip(u"Tooltip"); +constexpr OUString gsPropertyValue(u"Value"_ustr); +constexpr OUString gsPropertyVariableName(u"VariableName"_ustr); +constexpr OUString gsPropertyHelp(u"Help"_ustr); +constexpr OUString gsPropertyTooltip(u"Tooltip"_ustr); constexpr OUStringLiteral gsPropertyTextRange(u"TextRange"); XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 05086325da2b..2d966f10da89 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -87,40 +87,40 @@ using namespace ::xmloff::token; // service prefix and service names -constexpr OUStringLiteral sAPI_textfield_prefix = u"com.sun.star.text.TextField."; +constexpr OUString sAPI_textfield_prefix = u"com.sun.star.text.TextField."_ustr; constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster."; -constexpr OUStringLiteral sAPI_presentation_prefix = u"com.sun.star.presentation.TextField."; +constexpr OUString sAPI_presentation_prefix = u"com.sun.star.presentation.TextField."_ustr; -constexpr OUStringLiteral sAPI_date_time = u"DateTime"; -constexpr OUStringLiteral sAPI_page_number = u"PageNumber"; -constexpr OUStringLiteral sAPI_docinfo_change_date_time = u"DocInfo.ChangeDateTime"; -constexpr OUStringLiteral sAPI_docinfo_create_date_time = u"DocInfo.CreateDateTime"; -constexpr OUStringLiteral sAPI_docinfo_custom = u"DocInfo.Custom"; -constexpr OUStringLiteral sAPI_docinfo_print_date_time = u"DocInfo.PrintDateTime"; -constexpr OUStringLiteral sAPI_dde = u"DDE"; -constexpr OUStringLiteral sAPI_url = u"URL"; +constexpr OUString sAPI_date_time = u"DateTime"_ustr; +constexpr OUString sAPI_page_number = u"PageNumber"_ustr; +constexpr OUString sAPI_docinfo_change_date_time = u"DocInfo.ChangeDateTime"_ustr; +constexpr OUString sAPI_docinfo_create_date_time = u"DocInfo.CreateDateTime"_ustr; +constexpr OUString sAPI_docinfo_custom = u"DocInfo.Custom"_ustr; +constexpr OUString sAPI_docinfo_print_date_time = u"DocInfo.PrintDateTime"_ustr; +constexpr OUString sAPI_dde = u"DDE"_ustr; +constexpr OUString sAPI_url = u"URL"_ustr; // property names -constexpr OUStringLiteral sAPI_is_fixed = u"IsFixed"; -constexpr OUStringLiteral sAPI_content = u"Content"; -constexpr OUStringLiteral sAPI_author = u"Author"; -constexpr OUStringLiteral sAPI_hint = u"Hint"; -constexpr OUStringLiteral sAPI_name = u"Name"; +constexpr OUString sAPI_is_fixed = u"IsFixed"_ustr; +constexpr OUString sAPI_content = u"Content"_ustr; +constexpr OUString sAPI_author = u"Author"_ustr; +constexpr OUString sAPI_hint = u"Hint"_ustr; +constexpr OUString sAPI_name = u"Name"_ustr; constexpr OUStringLiteral sAPI_parent_name = u"ParentName"; -constexpr OUStringLiteral sAPI_sub_type = u"SubType"; -constexpr OUStringLiteral sAPI_date_time_value = u"DateTimeValue"; -constexpr OUStringLiteral sAPI_number_format = u"NumberFormat"; -constexpr OUStringLiteral sAPI_numbering_type = u"NumberingType"; -constexpr OUStringLiteral sAPI_offset = u"Offset"; -constexpr OUStringLiteral sAPI_condition = u"Condition"; -constexpr OUStringLiteral sAPI_set_number = u"SetNumber"; -constexpr OUStringLiteral sAPI_file_format = u"FileFormat"; -constexpr OUStringLiteral sAPI_is_date = u"IsDate"; -constexpr OUStringLiteral sAPI_current_presentation = u"CurrentPresentation"; -constexpr OUStringLiteral sAPI_is_hidden = u"IsHidden"; -constexpr OUStringLiteral sAPI_is_fixed_language = u"IsFixedLanguage"; - -constexpr OUStringLiteral sAPI_true = u"TRUE"; +constexpr OUString sAPI_sub_type = u"SubType"_ustr; +constexpr OUString sAPI_date_time_value = u"DateTimeValue"_ustr; +constexpr OUString sAPI_number_format = u"NumberFormat"_ustr; +constexpr OUString sAPI_numbering_type = u"NumberingType"_ustr; +constexpr OUString sAPI_offset = u"Offset"_ustr; +constexpr OUString sAPI_condition = u"Condition"_ustr; +constexpr OUString sAPI_set_number = u"SetNumber"_ustr; +constexpr OUString sAPI_file_format = u"FileFormat"_ustr; +constexpr OUString sAPI_is_date = u"IsDate"_ustr; +constexpr OUString sAPI_current_presentation = u"CurrentPresentation"_ustr; +constexpr OUString sAPI_is_hidden = u"IsHidden"_ustr; +constexpr OUString sAPI_is_fixed_language = u"IsFixedLanguage"_ustr; + +constexpr OUString sAPI_true = u"TRUE"_ustr; XMLTextFieldImportContext::XMLTextFieldImportContext( @@ -914,7 +914,7 @@ void XMLPlaceholderFieldImportContext::PrepareField( // time field -constexpr OUStringLiteral gsPropertyAdjust(u"Adjust"); +constexpr OUString gsPropertyAdjust(u"Adjust"_ustr); XMLTimeFieldImportContext::XMLTimeFieldImportContext( SvXMLImport& rImport, XMLTextImportHelper& rHlp) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 811dbf97e47d..81fea590ea5a 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -406,7 +406,7 @@ XMLTextImportHelper::XMLTextImportHelper( bProgress, bBlockMode, bOrganizerMode) ) , m_xBackpatcherImpl( MakeBackpatcherImpl() ) { - static constexpr OUStringLiteral s_PropNameDefaultListId = u"DefaultListId"; + static constexpr OUString s_PropNameDefaultListId = u"DefaultListId"_ustr; Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY ); @@ -456,42 +456,42 @@ XMLTextImportHelper::XMLTextImportHelper( { Reference< XNameAccess > xFamilies(xFamiliesSupp->getStyleFamilies()); - static constexpr OUStringLiteral aParaStyles(u"ParagraphStyles"); + static constexpr OUString aParaStyles(u"ParagraphStyles"_ustr); if( xFamilies->hasByName( aParaStyles ) ) { m_xImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles), UNO_QUERY); } - static constexpr OUStringLiteral aCharStyles(u"CharacterStyles"); + static constexpr OUString aCharStyles(u"CharacterStyles"_ustr); if( xFamilies->hasByName( aCharStyles ) ) { m_xImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles), UNO_QUERY); } - static constexpr OUStringLiteral aNumStyles(u"NumberingStyles"); + static constexpr OUString aNumStyles(u"NumberingStyles"_ustr); if( xFamilies->hasByName( aNumStyles ) ) { m_xImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles), UNO_QUERY); } - static constexpr OUStringLiteral aFrameStyles(u"FrameStyles"); + static constexpr OUString aFrameStyles(u"FrameStyles"_ustr); if( xFamilies->hasByName( aFrameStyles ) ) { m_xImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles), UNO_QUERY); } - static constexpr OUStringLiteral aPageStyles(u"PageStyles"); + static constexpr OUString aPageStyles(u"PageStyles"_ustr); if( xFamilies->hasByName( aPageStyles ) ) { m_xImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles), UNO_QUERY); } - static constexpr OUStringLiteral aCellStyles(u"CellStyles"); + static constexpr OUString aCellStyles(u"CellStyles"_ustr); if( xFamilies->hasByName( aCellStyles ) ) { m_xImpl->m_xCellStyles.set(xFamilies->getByName(aCellStyles), @@ -1046,14 +1046,14 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( bool bSetListAttrs, bool bOutlineContentVisible) { - static constexpr OUStringLiteral s_NumberingRules = u"NumberingRules"; - static constexpr OUStringLiteral s_NumberingIsNumber = u"NumberingIsNumber"; - static constexpr OUStringLiteral s_NumberingLevel = u"NumberingLevel"; - static constexpr OUStringLiteral s_ParaIsNumberingRestart = u"ParaIsNumberingRestart"; - static constexpr OUStringLiteral s_NumberingStartValue = u"NumberingStartValue"; - static constexpr OUStringLiteral s_PropNameListId = u"ListId"; - static constexpr OUStringLiteral s_PageDescName = u"PageDescName"; - static constexpr OUStringLiteral s_OutlineLevel = u"OutlineLevel"; + static constexpr OUString s_NumberingRules = u"NumberingRules"_ustr; + static constexpr OUString s_NumberingIsNumber = u"NumberingIsNumber"_ustr; + static constexpr OUString s_NumberingLevel = u"NumberingLevel"_ustr; + static constexpr OUString s_ParaIsNumberingRestart = u"ParaIsNumberingRestart"_ustr; + static constexpr OUString s_NumberingStartValue = u"NumberingStartValue"_ustr; + static constexpr OUString s_PropNameListId = u"ListId"_ustr; + static constexpr OUString s_PageDescName = u"PageDescName"_ustr; + static constexpr OUString s_OutlineLevel = u"OutlineLevel"_ustr; const XmlStyleFamily nFamily = bPara ? XmlStyleFamily::TEXT_PARAGRAPH : XmlStyleFamily::TEXT_TEXT; @@ -1683,12 +1683,12 @@ void XMLTextImportHelper::SetHyperlink( const OUString& rVisitedStyleName, XMLEventsImportContext* pEvents) { - static constexpr OUStringLiteral s_HyperLinkURL = u"HyperLinkURL"; - static constexpr OUStringLiteral s_HyperLinkName = u"HyperLinkName"; - static constexpr OUStringLiteral s_HyperLinkTarget = u"HyperLinkTarget"; - static constexpr OUStringLiteral s_UnvisitedCharStyleName = u"UnvisitedCharStyleName"; - static constexpr OUStringLiteral s_VisitedCharStyleName = u"VisitedCharStyleName"; - static constexpr OUStringLiteral s_HyperLinkEvents = u"HyperLinkEvents"; + static constexpr OUString s_HyperLinkURL = u"HyperLinkURL"_ustr; + static constexpr OUString s_HyperLinkName = u"HyperLinkName"_ustr; + static constexpr OUString s_HyperLinkTarget = u"HyperLinkTarget"_ustr; + static constexpr OUString s_UnvisitedCharStyleName = u"UnvisitedCharStyleName"_ustr; + static constexpr OUString s_VisitedCharStyleName = u"VisitedCharStyleName"_ustr; + static constexpr OUString s_HyperLinkEvents = u"HyperLinkEvents"_ustr; Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY ); Reference < XPropertySetInfo > xPropSetInfo( @@ -2287,7 +2287,7 @@ void XMLTextImportHelper::ConnectFrameChains( bool XMLTextImportHelper::IsInFrame() const { - static constexpr OUStringLiteral s_TextFrame = u"TextFrame"; + static constexpr OUString s_TextFrame = u"TextFrame"_ustr; bool bIsInFrame = false; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 58667a448a31..f55ee1055825 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -129,58 +129,58 @@ using namespace ::xmloff; using namespace ::xmloff::token; // Implement Title/Description Elements UI (#i73249#) -constexpr OUStringLiteral gsTitle(u"Title"); -constexpr OUStringLiteral gsDescription(u"Description"); +constexpr OUString gsTitle(u"Title"_ustr); +constexpr OUString gsDescription(u"Description"_ustr); constexpr OUStringLiteral gsAnchorPageNo(u"AnchorPageNo"); constexpr OUStringLiteral gsAnchorType(u"AnchorType"); -constexpr OUStringLiteral gsBookmark(u"Bookmark"); -constexpr OUStringLiteral gsChainNextName(u"ChainNextName"); -constexpr OUStringLiteral gsContourPolyPolygon(u"ContourPolyPolygon"); +constexpr OUString gsBookmark(u"Bookmark"_ustr); +constexpr OUString gsChainNextName(u"ChainNextName"_ustr); +constexpr OUString gsContourPolyPolygon(u"ContourPolyPolygon"_ustr); constexpr OUStringLiteral gsDocumentIndexMark(u"DocumentIndexMark"); constexpr OUStringLiteral gsFrame(u"Frame"); constexpr OUStringLiteral gsGraphicFilter(u"GraphicFilter"); constexpr OUStringLiteral gsGraphicRotation(u"GraphicRotation"); -constexpr OUStringLiteral gsHeight(u"Height"); +constexpr OUString gsHeight(u"Height"_ustr); constexpr OUStringLiteral gsHoriOrient(u"HoriOrient"); constexpr OUStringLiteral gsHoriOrientPosition(u"HoriOrientPosition"); -constexpr OUStringLiteral gsHyperLinkName(u"HyperLinkName"); -constexpr OUStringLiteral gsHyperLinkTarget(u"HyperLinkTarget"); -constexpr OUStringLiteral gsHyperLinkURL(u"HyperLinkURL"); -constexpr OUStringLiteral gsIsAutomaticContour(u"IsAutomaticContour"); -constexpr OUStringLiteral gsIsCollapsed(u"IsCollapsed"); -constexpr OUStringLiteral gsIsPixelContour(u"IsPixelContour"); -constexpr OUStringLiteral gsIsStart(u"IsStart"); -constexpr OUStringLiteral gsIsSyncHeightToWidth(u"IsSyncHeightToWidth"); -constexpr OUStringLiteral gsIsSyncWidthToHeight(u"IsSyncWidthToHeight"); -constexpr OUStringLiteral gsNumberingRules(u"NumberingRules"); -constexpr OUStringLiteral gsParaConditionalStyleName(u"ParaConditionalStyleName"); +constexpr OUString gsHyperLinkName(u"HyperLinkName"_ustr); +constexpr OUString gsHyperLinkTarget(u"HyperLinkTarget"_ustr); +constexpr OUString gsHyperLinkURL(u"HyperLinkURL"_ustr); +constexpr OUString gsIsAutomaticContour(u"IsAutomaticContour"_ustr); +constexpr OUString gsIsCollapsed(u"IsCollapsed"_ustr); +constexpr OUString gsIsPixelContour(u"IsPixelContour"_ustr); +constexpr OUString gsIsStart(u"IsStart"_ustr); +constexpr OUString gsIsSyncHeightToWidth(u"IsSyncHeightToWidth"_ustr); +constexpr OUString gsIsSyncWidthToHeight(u"IsSyncWidthToHeight"_ustr); +constexpr OUString gsNumberingRules(u"NumberingRules"_ustr); +constexpr OUString gsParaConditionalStyleName(u"ParaConditionalStyleName"_ustr); constexpr OUStringLiteral gsParagraphService(u"com.sun.star.text.Paragraph"); constexpr OUStringLiteral gsRedline(u"Redline"); -constexpr OUStringLiteral gsReferenceMark(u"ReferenceMark"); -constexpr OUStringLiteral gsRelativeHeight(u"RelativeHeight"); -constexpr OUStringLiteral gsRelativeWidth(u"RelativeWidth"); +constexpr OUString gsReferenceMark(u"ReferenceMark"_ustr); +constexpr OUString gsRelativeHeight(u"RelativeHeight"_ustr); +constexpr OUString gsRelativeWidth(u"RelativeWidth"_ustr); constexpr OUStringLiteral gsRuby(u"Ruby"); constexpr OUStringLiteral gsRubyCharStyleName(u"RubyCharStyleName"); constexpr OUStringLiteral gsRubyText(u"RubyText"); -constexpr OUStringLiteral gsServerMap(u"ServerMap"); -constexpr OUStringLiteral gsShapeService(u"com.sun.star.drawing.Shape"); -constexpr OUStringLiteral gsSizeType(u"SizeType"); +constexpr OUString gsServerMap(u"ServerMap"_ustr); +constexpr OUString gsShapeService(u"com.sun.star.drawing.Shape"_ustr); +constexpr OUString gsSizeType(u"SizeType"_ustr); constexpr OUStringLiteral gsSoftPageBreak( u"SoftPageBreak" ); constexpr OUStringLiteral gsTableService(u"com.sun.star.text.TextTable"); constexpr OUStringLiteral gsText(u"Text"); -constexpr OUStringLiteral gsTextContentService(u"com.sun.star.text.TextContent"); +constexpr OUString gsTextContentService(u"com.sun.star.text.TextContent"_ustr); constexpr OUStringLiteral gsTextEmbeddedService(u"com.sun.star.text.TextEmbeddedObject"); -constexpr OUStringLiteral gsTextField(u"TextField"); +constexpr OUString gsTextField(u"TextField"_ustr); constexpr OUStringLiteral gsTextFieldService(u"com.sun.star.text.TextField"); constexpr OUStringLiteral gsTextFrameService(u"com.sun.star.text.TextFrame"); constexpr OUStringLiteral gsTextGraphicService(u"com.sun.star.text.TextGraphicObject"); -constexpr OUStringLiteral gsTextPortionType(u"TextPortionType"); -constexpr OUStringLiteral gsUnvisitedCharStyleName(u"UnvisitedCharStyleName"); +constexpr OUString gsTextPortionType(u"TextPortionType"_ustr); +constexpr OUString gsUnvisitedCharStyleName(u"UnvisitedCharStyleName"_ustr); constexpr OUStringLiteral gsVertOrient(u"VertOrient"); constexpr OUStringLiteral gsVertOrientPosition(u"VertOrientPosition"); -constexpr OUStringLiteral gsVisitedCharStyleName(u"VisitedCharStyleName"); -constexpr OUStringLiteral gsWidth(u"Width"); -constexpr OUStringLiteral gsWidthType( u"WidthType" ); +constexpr OUString gsVisitedCharStyleName(u"VisitedCharStyleName"_ustr); +constexpr OUString gsWidth(u"Width"_ustr); +constexpr OUString gsWidthType( u"WidthType"_ustr ); constexpr OUStringLiteral gsTextFieldStart( u"TextFieldStart" ); constexpr OUStringLiteral gsTextFieldSep(u"TextFieldSeparator"); constexpr OUStringLiteral gsTextFieldEnd( u"TextFieldEnd" ); @@ -349,7 +349,7 @@ namespace rPropSet->getPropertyValue(gsVisitedCharStyleName) >>= vstyleName; } - static constexpr OUStringLiteral sHyperLinkEvents(u"HyperLinkEvents"); + static constexpr OUString sHyperLinkEvents(u"HyperLinkEvents"_ustr); if (xPropSetInfo->hasPropertyByName(sHyperLinkEvents)) { events.set(rPropSet->getPropertyValue(sHyperLinkEvents), uno::UNO_QUERY); diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index fa78300b730f..bf4893479d4a 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -197,7 +197,7 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite ) Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - static constexpr OUStringLiteral sIsAutoUpdate(u"IsAutoUpdate"); + static constexpr OUString sIsAutoUpdate(u"IsAutoUpdate"_ustr); if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) ) { xPropSet->setPropertyValue( sIsAutoUpdate, Any(m_isAutoUpdate) ); @@ -264,7 +264,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite ) Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - static constexpr OUStringLiteral sOutlineLevel(u"OutlineLevel"); + static constexpr OUString sOutlineLevel(u"OutlineLevel"_ustr); if( xPropSetInfo->hasPropertyByName( sOutlineLevel )) { if (m_nOutlineLevel >= 0) @@ -274,7 +274,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite ) } // Consider set empty list style (#i69523#) - static constexpr OUStringLiteral sNumberingStyleName(u"NumberingStyleName"); + static constexpr OUString sNumberingStyleName(u"NumberingStyleName"_ustr); if (m_bListStyleSet && xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) { @@ -362,7 +362,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite ) const Reference < XNameContainer >& rPageStyles = GetImport().GetTextImport()->GetPageStyles(); - static constexpr OUStringLiteral sPageDescName(u"PageDescName"); + static constexpr OUString sPageDescName(u"PageDescName"_ustr); if( ( sDisplayName.isEmpty() || (rPageStyles.is() && rPageStyles->hasByName( sDisplayName )) ) && diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 7e3cbac9d424..7855a2c5be59 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -54,17 +54,17 @@ // service names constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster."; -constexpr OUStringLiteral sAPI_get_expression = u"GetExpression"; -constexpr OUStringLiteral sAPI_set_expression = u"SetExpression"; -constexpr OUStringLiteral sAPI_user = u"User"; -constexpr OUStringLiteral sAPI_database = u"com.sun.star.text.TextField.Database"; +constexpr OUString sAPI_get_expression = u"GetExpression"_ustr; +constexpr OUString sAPI_set_expression = u"SetExpression"_ustr; +constexpr OUString sAPI_user = u"User"_ustr; +constexpr OUString sAPI_database = u"com.sun.star.text.TextField.Database"_ustr; // property names -constexpr OUStringLiteral sAPI_content = u"Content"; -constexpr OUStringLiteral sAPI_sub_type = u"SubType"; -constexpr OUStringLiteral sAPI_number_format = u"NumberFormat"; -constexpr OUStringLiteral sAPI_is_visible = u"IsVisible"; -constexpr OUStringLiteral sAPI_current_presentation = u"CurrentPresentation"; +constexpr OUString sAPI_content = u"Content"_ustr; +constexpr OUString sAPI_sub_type = u"SubType"_ustr; +constexpr OUString sAPI_number_format = u"NumberFormat"_ustr; +constexpr OUString sAPI_is_visible = u"IsVisible"_ustr; +constexpr OUString sAPI_current_presentation = u"CurrentPresentation"_ustr; using namespace ::com::sun::star; @@ -864,7 +864,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster( OUString sService = sAPI_fieldmaster_prefix + ((eVarType==VarTypeUserField) ? - OUString(sAPI_user) : OUString(sAPI_set_expression)); + sAPI_user : sAPI_set_expression); Reference<XInterface> xIfc = xFactory->createInstance( sService ); if (xIfc.is()) { diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 9b1bc0da624f..b0d5c9e99820 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -780,7 +780,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop { Reference< XPropertySet > xModelProps( _rXForms->getByName( modelName ), UNO_QUERY_THROW ); - static constexpr OUStringLiteral sExternalData = u"ExternalData"; + static constexpr OUString sExternalData = u"ExternalData"_ustr; Sequence<PropertyValue> aModelSettings{ comphelper::makePropertyValue( sExternalData, xModelProps->getPropertyValue(sExternalData)) }; |