diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 14:05:52 +0200 |
commit | 27aea4de846810fcca5afe3788b0d0615d85bb30 (patch) | |
tree | 3e8c24cbe8eb1af64196483966441248c86e3220 /chart2 | |
parent | fee44aa4d5080af29ff0e663118ea1e629d53605 (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: chart2
Change-Id: Ifcb57548a594cbbaf70df8d9da17cf94a96667db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158146
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
26 files changed, 65 insertions, 65 deletions
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx index fdd4e6daa11d..c4374e65c678 100644 --- a/chart2/qa/extras/chart2geometry.cxx +++ b/chart2/qa/extras/chart2geometry.cxx @@ -80,10 +80,10 @@ void Chart2GeometryTest::testTdf135184RoundLineCap() xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml"); CPPUNIT_ASSERT(pXmlDoc); - static constexpr OStringLiteral sStyleStart("/office:document-content/office:automatic-styles"); - static constexpr OStringLiteral sCap("/style:graphic-properties[@svg:stroke-linecap='round']"); - static constexpr OStringLiteral sChartStart( - "/office:document-content/office:body/office:chart/chart:chart"); + static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr); + static constexpr OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"_ostr); + static constexpr OString sChartStart( + "/office:document-content/office:body/office:chart/chart:chart"_ostr); OString sPredicate; // chart area const OUString sOUAreaStyleName = getXPathContent(pXmlDoc, sChartStart + "/@chart:style-name"); @@ -109,10 +109,10 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2() xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml"); CPPUNIT_ASSERT(pXmlDoc); - static constexpr OStringLiteral sStyleStart("/office:document-content/office:automatic-styles"); - static constexpr OStringLiteral sCap("/style:graphic-properties[@svg:stroke-linecap='round']"); - static constexpr OStringLiteral sChartStart( - "/office:document-content/office:body/office:chart/chart:chart"); + static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr); + static constexpr OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"_ostr); + static constexpr OString sChartStart( + "/office:document-content/office:body/office:chart/chart:chart"_ostr); OString sPredicate; // legend const OString sLegend(sChartStart + "/chart:legend"); @@ -140,11 +140,11 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3() xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); - static constexpr OStringLiteral sDash("/c:spPr/a:ln/a:prstDash"); + static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr); // chart area assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val", "dashDot"); // data series line - static constexpr OStringLiteral sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"); + static constexpr OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"_ostr); assertXPath(pXmlDoc, sStart + sDash, "val", "dash"); // regression-curve (trendline) assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val", "sysDot"); @@ -158,8 +158,8 @@ void Chart2GeometryTest::testTdf135184RoundLineCap4() xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); - static constexpr OStringLiteral sChartStart("/c:chartSpace/c:chart"); - static constexpr OStringLiteral sDash("/c:spPr/a:ln/a:prstDash"); + static constexpr OString sChartStart("/c:chartSpace/c:chart"_ostr); + static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr); assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val", "sysDot"); const OString sSeries(sChartStart + "/c:plotArea/c:pieChart/c:ser/c:dPt[3]"); assertXPath(pXmlDoc, sSeries + sDash, "val", "dash"); @@ -474,9 +474,9 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText() CPPUNIT_ASSERT(pXmlDoc); // Find custom text. As of version 7.0 it is in a <text:span> element. - static constexpr OStringLiteral sCustomTextPath( + static constexpr OString sCustomTextPath( "//office:document-content/office:body/office:chart/chart:chart/chart:plot-area" - "/chart:series/chart:data-point[2]/chart:data-label/text:p/text:span"); + "/chart:series/chart:data-point[2]/chart:data-label/text:p/text:span"_ostr); assertXPath(pXmlDoc, sCustomTextPath, 1); // Verify text content diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index a491dafa6c02..711d3017a8ee 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -447,7 +447,7 @@ sal_Int32 lcl_getNewAPIIndexForOldAPIIndex( OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName ) { - static constexpr OUStringLiteral aPrefix(u"com.sun.star.chart2.template."); + static constexpr OUString aPrefix(u"com.sun.star.chart2.template."_ustr); if( o3tl::starts_with(rTemplateServiceName, aPrefix) ) { diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index 8e33563f3ce0..6e11fbe021a2 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -61,7 +61,7 @@ WrappedScaleTextProperty::WrappedScaleTextProperty(std::shared_ptr<Chart2ModelCo void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const { - static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize"; + static constexpr OUString aRefSizeName = u"ReferencePageSize"_ustr; if( !xInnerPropertySet.is() ) return; diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 9458f82bb13d..edd00184e685 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -56,7 +56,7 @@ using ::com::sun::star::uno::Sequence; namespace { -constexpr OUStringLiteral lcl_aLabelRole( u"label" ); +constexpr OUString lcl_aLabelRole( u"label"_ustr ); OUString lcl_ConvertRole( const OUString & rRoleString ) diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 7ac75f3afa2b..c30ce8afaedd 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -46,7 +46,7 @@ using ::com::sun::star::uno::Reference; namespace { -constexpr OUStringLiteral lcl_aLabelRole( u"label" ); +constexpr OUString lcl_aLabelRole( u"label"_ustr ); void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole, const OUString& rRange) @@ -350,7 +350,7 @@ void DataSourceTabPage::fillSeriesListBox() OUString aResString(::chart::SchResId( STR_DATA_UNNAMED_SERIES_WITH_INDEX )); // replace index of unnamed series - static constexpr OUStringLiteral aReplacementStr( u"%NUMBER" ); + static constexpr OUString aReplacementStr( u"%NUMBER"_ustr ); sal_Int32 nIndex = aResString.indexOf( aReplacementStr ); if( nIndex != -1 ) aLabel = aResString.replaceAt( @@ -480,7 +480,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, weld::TreeView&, voi OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_xLB_ROLE ); // replace role in fixed text label - static constexpr OUStringLiteral aReplacementStr( u"%VALUETYPE" ); + static constexpr OUString aReplacementStr( u"%VALUETYPE"_ustr ); sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr ); if( nIndex != -1 ) { @@ -834,7 +834,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) // "$Sheet1.$A$1" aRange = xNewSeq->getSourceRangeRepresentation(); Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( "Role" , uno::Any( OUString(lcl_aLabelRole) )); + xProp->setPropertyValue( "Role" , uno::Any( lcl_aLabelRole )); //Labels should always include hidden cells, regardless of the setting chosen xProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true)); diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index 39bbc4bf2ec4..ac0b961ba2e4 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -426,7 +426,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( case XATTR_FILLBMP_STRETCH: if( lcl_supportsFillProperties( m_GraphicObjectType )) { - static constexpr OUStringLiteral aModePropName(u"FillBitmapMode"); + static constexpr OUString aModePropName(u"FillBitmapMode"_ustr); bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue(); drawing::BitmapMode aMode = (bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT); @@ -448,7 +448,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( case XATTR_FILLBMP_TILE: if( lcl_supportsFillProperties( m_GraphicObjectType )) { - static constexpr OUStringLiteral aModePropName(u"FillBitmapMode"); + static constexpr OUString aModePropName(u"FillBitmapMode"_ustr); bool bTiled = rItemSet.Get( XATTR_FILLBMP_TILE ).GetValue(); drawing::BitmapMode aMode = (bTiled ? drawing::BitmapMode_REPEAT : drawing::BitmapMode_NO_REPEAT); diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index aee8483cadf4..f5c79133434c 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -110,7 +110,7 @@ void ChartColorWrapper::updateModel(const rtl::Reference<::chart::ChartModel>& x void ChartColorWrapper::updateData() { - static constexpr OUStringLiteral aLineColor = u"LineColor"; + static constexpr OUString aLineColor = u"LineColor"_ustr; static const std::u16string_view aCommands[2] = {u".uno:XLineColor", u".uno:FillColor"}; css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel); diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index f430e3e48851..68eea85a0918 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -58,9 +58,9 @@ using ::osl::MutexGuard; namespace { -constexpr OUStringLiteral sXML_metaStreamName = u"meta.xml"; -constexpr OUStringLiteral sXML_styleStreamName = u"styles.xml"; -constexpr OUStringLiteral sXML_contentStreamName = u"content.xml"; +constexpr OUString sXML_metaStreamName = u"meta.xml"_ustr; +constexpr OUString sXML_styleStreamName = u"styles.xml"_ustr; +constexpr OUString sXML_contentStreamName = u"content.xml"_ustr; uno::Reference< embed::XStorage > lcl_getWriteStorage( diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index c65adee25829..1f1320d8ae69 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; } namespace { -constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian"; +constexpr OUString CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian"_ustr; } diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 7c319603a0cc..5634f358cce1 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -75,10 +75,10 @@ using namespace ::chart::CloneHelper; namespace { -constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType( - u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""); -constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast( - u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\""); +constexpr OUString lcl_aGDIMetaFileMIMEType( + u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr); +constexpr OUString lcl_aGDIMetaFileMIMETypeHighContrast( + u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr); } // anonymous namespace diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 5c891989e37f..0807415dac24 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -31,8 +31,8 @@ using ::com::sun::star::uno::Sequence; namespace { -constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME - = u"com.sun.star.chart2.CoordinateSystems.Polar"; +constexpr OUString CHART2_COOSYSTEM_POLAR_SERVICE_NAME + = u"com.sun.star.chart2.CoordinateSystems.Polar"_ustr; } diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 0fe822e6348c..e4300dd01f7b 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -419,7 +419,7 @@ void PieChartTypeTemplate::applyStyle2( if( nSeriesIndex == nOuterSeriesIndex ) //@todo in future this will depend on Orientation of the radius axis scale { - static constexpr OUStringLiteral aOffsetPropName( u"Offset" ); + static constexpr OUString aOffsetPropName( u"Offset"_ustr ); // get offset mode chart2::PieChartOffsetMode ePieOffsetMode; getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode; diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx index d0f4c93ee848..23f5add5f85f 100644 --- a/chart2/source/tools/CachedDataSequence.cxx +++ b/chart2/source/tools/CachedDataSequence.cxx @@ -39,7 +39,7 @@ using ::chart::impl::CachedDataSequence_Base; namespace { -constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence"; +constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence"_ustr; enum { diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index b3b77ac2a212..24ee5facb60e 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence; namespace { -constexpr OUStringLiteral aSeriesPropName = u"Series"; +constexpr OUString aSeriesPropName = u"Series"_ustr; } // anonymous namespace diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index f8581580dfc2..3d049a44527f 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star; namespace { -constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar"; +constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar"_ustr; bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq ) { diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index a07832babd24..883920daa9fb 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -60,12 +60,12 @@ namespace chart namespace { -constexpr OUStringLiteral lcl_aCategoriesRangeName = u"categories"; +constexpr OUString lcl_aCategoriesRangeName = u"categories"_ustr; const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point -constexpr OUStringLiteral lcl_aCategoriesRoleName = u"categories"; +constexpr OUString lcl_aCategoriesRoleName = u"categories"_ustr; const char lcl_aLabelRangePrefix[] = "label "; -constexpr OUStringLiteral lcl_aCompleteRange = u"all"; +constexpr OUString lcl_aCompleteRange = u"all"_ustr; typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > > lcl_tSequenceMap; @@ -787,7 +787,7 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments( { Sequence< beans::PropertyValue > aArguments{ beans::PropertyValue( - "CellRangeRepresentation", -1, uno::Any( OUString(lcl_aCompleteRange) ), + "CellRangeRepresentation", -1, uno::Any( lcl_aCompleteRange ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "DataRowSource", -1, uno::Any( @@ -1245,7 +1245,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM return ""; } - static constexpr OUStringLiteral aPivotTableID(u"PT@"); + static constexpr OUString aPivotTableID(u"PT@"_ustr); if (aXMLRange.startsWith(aPivotTableID)) return aXMLRange.copy(aPivotTableID.getLength()); diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index a9e155a3e8c6..6e7631c8a9e4 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -58,10 +58,10 @@ using namespace ::com::sun::star::chart2; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; -constexpr OUStringLiteral m_aMultiClick = u"MultiClick"; -constexpr OUStringLiteral m_aDragMethodEquals = u"DragMethod="; -constexpr OUStringLiteral m_aDragParameterEquals = u"DragParameter="; -constexpr OUStringLiteral m_aProtocol = u"CID/"; +constexpr OUString m_aMultiClick = u"MultiClick"_ustr; +constexpr OUString m_aDragMethodEquals = u"DragMethod="_ustr; +constexpr OUString m_aDragParameterEquals = u"DragParameter="_ustr; +constexpr OUString m_aProtocol = u"CID/"_ustr; constexpr OUString m_aPieSegmentDragMethodServiceName(u"PieSegmentDragging"_ustr); namespace diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index f7d6f3525c48..b1ca0b429a7b 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -133,7 +133,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet( if( ! xProp.is()) return; - static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize"; + static constexpr OUString aRefSizeName = u"ReferencePageSize"_ustr; try { diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index 65e6b13ac0a0..0277e61a44f1 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -851,7 +851,7 @@ void RegressionCurveHelper::resetEquationPosition( try { - static constexpr OUStringLiteral aPosPropertyName( u"RelativePosition" ); + static constexpr OUString aPosPropertyName( u"RelativePosition"_ustr ); Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); // since m233: , uno::UNO_SET_THROW ); if( xEqProp->getPropertyValue( aPosPropertyName ).hasValue()) xEqProp->setPropertyValue( aPosPropertyName, uno::Any()); diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx index b49dab6d6fb9..b7179537c43b 100644 --- a/chart2/source/tools/Scaling.cxx +++ b/chart2/source/tools/Scaling.cxx @@ -29,10 +29,10 @@ namespace com::sun::star::uno { class XComponentContext; } namespace { -constexpr OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling"; -constexpr OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling"; -constexpr OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling"; -constexpr OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling"; +constexpr OUString lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling"_ustr; +constexpr OUString lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling"_ustr; +constexpr OUString lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling"_ustr; +constexpr OUString lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling"_ustr; } diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx index 95fa4464ad52..64ce94f3b179 100644 --- a/chart2/source/tools/StatisticsHelper.cxx +++ b/chart2/source/tools/StatisticsHelper.cxx @@ -144,7 +144,7 @@ void lcl_setXMLRangePropertyAtDataSequence( { 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 )) diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx index 0e9f654cec95..7211daedba6f 100644 --- a/chart2/source/tools/UncachedDataSequence.cxx +++ b/chart2/source/tools/UncachedDataSequence.cxx @@ -41,7 +41,7 @@ using ::chart::impl::UncachedDataSequence_Base; namespace { -constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence"; +constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence"_ustr; enum { @@ -212,7 +212,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data: // auto-generated label sal_Int32 nSeries = m_aSourceRepresentation.toInt32() + 1; OUString aResString(::chart::SchResId(STR_DATA_UNNAMED_SERIES_WITH_INDEX)); - static constexpr OUStringLiteral aReplacementStr(u"%NUMBER"); + static constexpr OUString aReplacementStr(u"%NUMBER"_ustr); sal_Int32 nIndex = aResString.indexOf(aReplacementStr); OUString aName; if( nIndex != -1 ) diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx index 15cb59635d69..f24f46a8e457 100644 --- a/chart2/source/view/axes/DateScaling.cxx +++ b/chart2/source/view/axes/DateScaling.cxx @@ -27,9 +27,9 @@ namespace { -constexpr OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling"; -constexpr OUStringLiteral lcl_aServiceName_InverseDateScaling - = u"com.sun.star.chart2.InverseDateScaling"; +constexpr OUString lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling"_ustr; +constexpr OUString lcl_aServiceName_InverseDateScaling + = u"com.sun.star.chart2.InverseDateScaling"_ustr; const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic } diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 25919f548cfb..8163058ad5e0 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -103,7 +103,7 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( SvxShapeText& rShape2DText, if( !nAvgCharWidth ) return; - static constexpr OUStringLiteral sDots = u"..."; + static constexpr OUString sDots = u"..."_ustr; const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsSize ) / nAvgCharWidth + 1; sal_Int32 nNewLen = rLabel.size() - nCharsToRemove - sDots.getLength(); // Prevent from showing only dots diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 08aaeb69ffe1..51132d5a9679 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -224,10 +224,10 @@ void ChartView::impl_deleteCoordinateSystems() // datatransfer::XTransferable namespace { -constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType( - u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ); -constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast( - u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" ); +constexpr OUString lcl_aGDIMetaFileMIMEType( + u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr ); +constexpr OUString lcl_aGDIMetaFileMIMETypeHighContrast( + u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr ); } // anonymous namespace void ChartView::getMetaFile( const uno::Reference< io::XOutputStream >& xOutStream diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index de8d0377bd7c..8a4935e9b058 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -421,7 +421,7 @@ awt::Size lcl_placeLegendEntries( try { OUString aLabelString = rEntries[0].xLabel->getString(); - static constexpr OUStringLiteral sDots = u"..."; + static constexpr OUString sDots = u"..."_ustr; for (sal_Int32 nNewLen = aLabelString.getLength() - sDots.getLength(); nNewLen > 0; ) { OUString aNewLabel = aLabelString.subView(0, nNewLen) + sDots; |