diff options
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
28 files changed, 358 insertions, 358 deletions
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index 995a0f92cf4d..11884859927a 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -70,7 +70,7 @@ void SAL_CALL AreaWrapper::setSize( const awt::Size& /*aSize*/ ) // ____ XShapeDescriptor (base of XShape) ____ OUString SAL_CALL AreaWrapper::getShapeType() { - return "com.sun.star.chart.ChartArea"; + return u"com.sun.star.chart.ChartArea"_ustr; } // ____ XComponent ____ @@ -128,14 +128,14 @@ std::vector< std::unique_ptr<WrappedProperty> > AreaWrapper::createWrappedProper { std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties; - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("LineStyle","LineStyle") ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"LineStyle"_ustr,u"LineStyle"_ustr) ); return aWrappedProperties; } OUString SAL_CALL AreaWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Area"; + return u"com.sun.star.comp.chart.Area"_ustr; } sal_Bool SAL_CALL AreaWrapper::supportsService( const OUString& rServiceName ) @@ -146,10 +146,10 @@ sal_Bool SAL_CALL AreaWrapper::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL AreaWrapper::getSupportedServiceNames() { return { - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.beans.PropertySet", - "com.sun.star.drawing.FillProperties", - "com.sun.star.drawing.LineProperties" }; + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.beans.PropertySet"_ustr, + u"com.sun.star.drawing.FillProperties"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr }; } } // namespace chart::wrapper diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index ea50320e506e..3376282d6ffc 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -473,7 +473,7 @@ void SAL_CALL AxisWrapper::setSize( const awt::Size& /*aSize*/ ) // ____ XShapeDescriptor (base of XShape) ____ OUString SAL_CALL AxisWrapper::getShapeType() { - return "com.sun.star.chart.ChartAxis"; + return u"com.sun.star.chart.ChartAxis"_ustr; } // ____ XNumberFormatsSupplier ____ @@ -546,8 +546,8 @@ void AxisWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp( getAxis(), uno::UNO_QUERY ); if( xProp.is() ) { - if( xProp->getPropertyValue("ReferencePageSize").hasValue() ) - xProp->setPropertyValue("ReferencePageSize", uno::Any( + if( xProp->getPropertyValue(u"ReferencePageSize"_ustr).hasValue() ) + xProp->setPropertyValue(u"ReferencePageSize"_ustr, uno::Any( m_spChart2ModelContact->GetPageSize() )); } } @@ -556,7 +556,7 @@ Any AxisWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp( getAxis(), uno::UNO_QUERY ); if( xProp.is() ) - aRet = xProp->getPropertyValue("ReferencePageSize"); + aRet = xProp->getPropertyValue(u"ReferencePageSize"_ustr); return aRet; } awt::Size AxisWrapper::getCurrentSizeForReference() @@ -579,7 +579,7 @@ Reference< chart2::XAxis > AxisWrapper::getAxis() { xAxis = AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, m_spChart2ModelContact->m_xContext ); if( xAxis.is() ) - xAxis->setPropertyValue("Show", uno::Any( false ) ); + xAxis->setPropertyValue(u"Show"_ustr, uno::Any( false ) ); } } catch( const uno::Exception & ) @@ -605,19 +605,19 @@ std::vector< std::unique_ptr<WrappedProperty> > AxisWrapper::createWrappedProper std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties; aWrappedProperties.emplace_back( new WrappedTextRotationProperty() ); - aWrappedProperties.emplace_back( new WrappedProperty("Marks","MajorTickmarks") ); - aWrappedProperties.emplace_back( new WrappedProperty("HelpMarks","MinorTickmarks") ); - aWrappedProperties.emplace_back( new WrappedProperty("TextCanOverlap","TextOverlap") ); - aWrappedProperties.emplace_back( new WrappedProperty("ArrangeOrder","ArrangeOrder") ); - aWrappedProperties.emplace_back( new WrappedProperty("Visible","Show") ); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("DisplayLabels","DisplayLabels") ); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("TryStaggeringFirst","TryStaggeringFirst") ); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("TextBreak","TextBreak") ); + aWrappedProperties.emplace_back( new WrappedProperty(u"Marks"_ustr,u"MajorTickmarks"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"HelpMarks"_ustr,u"MinorTickmarks"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"TextCanOverlap"_ustr,u"TextOverlap"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"ArrangeOrder"_ustr,u"ArrangeOrder"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"Visible"_ustr,u"Show"_ustr) ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"DisplayLabels"_ustr,u"DisplayLabels"_ustr) ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"TryStaggeringFirst"_ustr,u"TryStaggeringFirst"_ustr) ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"TextBreak"_ustr,u"TextBreak"_ustr) ); aWrappedProperties.emplace_back( new WrappedNumberFormatProperty(m_spChart2ModelContact) ); aWrappedProperties.emplace_back( new WrappedLinkNumberFormatProperty ); - aWrappedProperties.emplace_back( new WrappedProperty("StackedText","StackCharacters") ); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("CrossoverPosition","CrossoverPosition") ); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("MajorOrigin","MajorOrigin") ); + aWrappedProperties.emplace_back( new WrappedProperty(u"StackedText"_ustr,u"StackCharacters"_ustr) ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"CrossoverPosition"_ustr,u"CrossoverPosition"_ustr) ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"MajorOrigin"_ustr,u"MajorOrigin"_ustr) ); { WrappedGapwidthProperty* pWrappedGapwidthProperty( new WrappedGapwidthProperty( m_spChart2ModelContact ) ); WrappedBarOverlapProperty* pWrappedBarOverlapProperty( new WrappedBarOverlapProperty( m_spChart2ModelContact ) ); @@ -643,7 +643,7 @@ std::vector< std::unique_ptr<WrappedProperty> > AxisWrapper::createWrappedProper OUString SAL_CALL AxisWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Axis"; + return u"com.sun.star.comp.chart.Axis"_ustr; } sal_Bool SAL_CALL AxisWrapper::supportsService( const OUString& rServiceName ) @@ -654,9 +654,9 @@ sal_Bool SAL_CALL AxisWrapper::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL AxisWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartAxis", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.style.CharacterProperties" + u"com.sun.star.chart.ChartAxis"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.style.CharacterProperties"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index ba286cc62623..771ca721b781 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -64,11 +64,11 @@ void Chart2ModelContact::setDocumentModel( ChartModel* pChartModel ) if( !pChartModel ) return; - m_aTableMap["LineDashName"].set(pChartModel->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY); - m_aTableMap["FillGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY); - m_aTableMap["FillHatchName"].set(pChartModel->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY); - m_aTableMap["FillBitmapName"].set(pChartModel->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY); - m_aTableMap["FillTransparenceGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY); + m_aTableMap[u"LineDashName"_ustr].set(pChartModel->createInstance(u"com.sun.star.drawing.DashTable"_ustr), uno::UNO_QUERY); + m_aTableMap[u"FillGradientName"_ustr].set(pChartModel->createInstance(u"com.sun.star.drawing.GradientTable"_ustr), uno::UNO_QUERY); + m_aTableMap[u"FillHatchName"_ustr].set(pChartModel->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY); + m_aTableMap[u"FillBitmapName"_ustr].set(pChartModel->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY); + m_aTableMap[u"FillTransparenceGradientName"_ustr].set(pChartModel->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY); } void Chart2ModelContact::clear() @@ -198,7 +198,7 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const { ExplicitValueProvider* pProvider( getExplicitValueProvider() ); if( pProvider ) - aRect = pProvider->getRectangleOfObject("PlotAreaIncludingAxes"); + aRect = pProvider->getRectangleOfObject(u"PlotAreaIncludingAxes"_ustr); } return aRect; } diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 7988ef90df94..92cfdccb62bd 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -627,9 +627,9 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator ) uno::Reference< beans::XPropertySet > xDiaProp( xOldDoc->getDiagram(), uno::UNO_QUERY ); if( xDiaProp.is()) { - xDiaProp->getPropertyValue("Stacked") >>= bStacked; - xDiaProp->getPropertyValue("Percent") >>= bPercent; - xDiaProp->getPropertyValue("Deep") >>= bDeep; + xDiaProp->getPropertyValue(u"Stacked"_ustr) >>= bStacked; + xDiaProp->getPropertyValue(u"Percent"_ustr) >>= bPercent; + xDiaProp->getPropertyValue(u"Deep"_ustr) >>= bDeep; } //detect arguments for the new data source @@ -687,7 +687,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator ) OUString SAL_CALL ChartDataWrapper::getImplementationName() { - return "com.sun.star.comp.chart.ChartData"; + return u"com.sun.star.comp.chart.ChartData"_ustr; } sal_Bool SAL_CALL ChartDataWrapper::supportsService( const OUString& rServiceName ) @@ -698,8 +698,8 @@ sal_Bool SAL_CALL ChartDataWrapper::supportsService( const OUString& rServiceNam css::uno::Sequence< OUString > SAL_CALL ChartDataWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartDataArray", - "com.sun.star.chart.ChartData" + u"com.sun.star.chart.ChartDataArray"_ustr, + u"com.sun.star.chart.ChartData"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 51c803a1db0c..7c832ed0d781 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -261,7 +261,7 @@ private: //member } WrappedDataSourceLabelsInFirstRowProperty::WrappedDataSourceLabelsInFirstRowProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("DataSourceLabelsInFirstRow",OUString()) + : WrappedProperty(u"DataSourceLabelsInFirstRow"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault( nullptr ); @@ -271,7 +271,7 @@ void WrappedDataSourceLabelsInFirstRowProperty::setPropertyValue( const Any& rOu { bool bLabelsInFirstRow = true; if( ! (rOuterValue >>= bLabelsInFirstRow) ) - throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property DataSourceLabelsInFirstRow requires value of type boolean"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; bool bNewValue = bLabelsInFirstRow; @@ -351,7 +351,7 @@ private: //member } WrappedDataSourceLabelsInFirstColumnProperty::WrappedDataSourceLabelsInFirstColumnProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("DataSourceLabelsInFirstColumn",OUString()) + : WrappedProperty(u"DataSourceLabelsInFirstColumn"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault( nullptr ); @@ -361,7 +361,7 @@ void WrappedDataSourceLabelsInFirstColumnProperty::setPropertyValue( const Any& { bool bLabelsInFirstRow = true; if( ! (rOuterValue >>= bLabelsInFirstRow) ) - throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property DataSourceLabelsInFirstRow requires value of type boolean"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; bool bNewValue = bLabelsInFirstRow; @@ -440,7 +440,7 @@ private: //member } WrappedHasLegendProperty::WrappedHasLegendProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("HasLegend",OUString()) + : WrappedProperty(u"HasLegend"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } @@ -449,7 +449,7 @@ void WrappedHasLegendProperty::setPropertyValue( const Any& rOuterValue, const R { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasLegend requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property HasLegend requires value of type boolean"_ustr, nullptr, 0 ); try { @@ -457,10 +457,10 @@ void WrappedHasLegendProperty::setPropertyValue( const Any& rOuterValue, const R if(xLegend.is()) { bool bOldValue = true; - Any aAOld = xLegend->getPropertyValue("Show"); + Any aAOld = xLegend->getPropertyValue(u"Show"_ustr); aAOld >>= bOldValue; if( bOldValue != bNewValue ) - xLegend->setPropertyValue("Show", uno::Any( bNewValue )); + xLegend->setPropertyValue(u"Show"_ustr, uno::Any( bNewValue )); } } catch (const uno::Exception&) @@ -477,7 +477,7 @@ Any WrappedHasLegendProperty::getPropertyValue( const Reference< beans::XPropert rtl::Reference< Legend > xLegend = LegendHelper::getLegend( *m_spChart2ModelContact->getDocumentModel() ); if( xLegend.is()) - aRet = xLegend->getPropertyValue("Show"); + aRet = xLegend->getPropertyValue(u"Show"_ustr); else aRet <<= false; } @@ -516,7 +516,7 @@ private: //member } WrappedHasMainTitleProperty::WrappedHasMainTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("HasMainTitle",OUString()) + : WrappedProperty(u"HasMainTitle"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } @@ -525,12 +525,12 @@ void WrappedHasMainTitleProperty::setPropertyValue( const Any& rOuterValue, cons { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasMainTitle requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property HasMainTitle requires value of type boolean"_ustr, nullptr, 0 ); try { if( bNewValue ) - TitleHelper::createTitle( TitleHelper::MAIN_TITLE, "main-title", m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext ); + TitleHelper::createTitle( TitleHelper::MAIN_TITLE, u"main-title"_ustr, m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext ); else TitleHelper::removeTitle( TitleHelper::MAIN_TITLE, m_spChart2ModelContact->getDocumentModel() ); } @@ -582,7 +582,7 @@ private: //member } WrappedHasSubTitleProperty::WrappedHasSubTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("HasSubTitle",OUString()) + : WrappedProperty(u"HasSubTitle"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } @@ -591,12 +591,12 @@ void WrappedHasSubTitleProperty::setPropertyValue( const Any& rOuterValue, const { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasSubTitle requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property HasSubTitle requires value of type boolean"_ustr, nullptr, 0 ); try { if( bNewValue ) - TitleHelper::createTitle( TitleHelper::SUB_TITLE, "", m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext ); + TitleHelper::createTitle( TitleHelper::SUB_TITLE, u""_ustr, m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext ); else TitleHelper::removeTitle( TitleHelper::SUB_TITLE, m_spChart2ModelContact->getDocumentModel() ); } @@ -1070,7 +1070,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Area"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Area"_ustr); bCreateDiagram = true; } break; @@ -1080,7 +1080,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( // this is for bar and column (the latter is the default if // no "Vertical=false" property was set) xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Column"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Column"_ustr); bCreateDiagram = true; } break; @@ -1088,7 +1088,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Donut"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Donut"_ustr); bCreateDiagram = true; } break; @@ -1096,7 +1096,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Line"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Line"_ustr); bCreateDiagram = true; } break; @@ -1104,7 +1104,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Net"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Net"_ustr); bCreateDiagram = true; } break; @@ -1112,7 +1112,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.FilledNet"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.FilledNet"_ustr); bCreateDiagram = true; } break; @@ -1120,7 +1120,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Pie"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Pie"_ustr); bCreateDiagram = true; } break; @@ -1128,7 +1128,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.StockLowHighClose"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.StockLowHighClose"_ustr); bCreateDiagram = true; } break; @@ -1136,7 +1136,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.ScatterLineSymbol"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.ScatterLineSymbol"_ustr); bCreateDiagram = true; } break; @@ -1145,7 +1145,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( if( xChartTypeManager.is()) { xTemplate = - xChartTypeManager->createTemplate("com.sun.star.chart2.template.Bubble"); + xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Bubble"_ustr); bCreateDiagram = true; } break; @@ -1312,7 +1312,7 @@ void SAL_CALL ChartDocumentWrapper::setDelegator( if( m_bIsDisposed ) { if( rDelegator.is() ) - throw lang::DisposedException("ChartDocumentWrapper is disposed", + throw lang::DisposedException(u"ChartDocumentWrapper is disposed"_ustr, static_cast< ::cppu::OWeakObject* >( this )); return; } @@ -1400,9 +1400,9 @@ std::vector< std::unique_ptr<WrappedProperty> > ChartDocumentWrapper::createWrap aWrappedProperties.emplace_back( new WrappedBaseDiagramProperty( *this ) ); aWrappedProperties.emplace_back( new WrappedAdditionalShapesProperty( *this ) ); aWrappedProperties.emplace_back( new WrappedRefreshAddInAllowedProperty( *this ) ); - aWrappedProperties.emplace_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104 - aWrappedProperties.emplace_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::Any(true) ) ); - aWrappedProperties.emplace_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::Any(true) ) ); + aWrappedProperties.emplace_back( new WrappedIgnoreProperty(u"NullDate"_ustr,Any() ) ); // i99104 + aWrappedProperties.emplace_back( new WrappedIgnoreProperty(u"EnableComplexChartTypes"_ustr, uno::Any(true) ) ); + aWrappedProperties.emplace_back( new WrappedIgnoreProperty(u"EnableDataTableDialog"_ustr, uno::Any(true) ) ); return aWrappedProperties; } @@ -1420,10 +1420,10 @@ sal_Bool SAL_CALL ChartDocumentWrapper::supportsService( const OUString& rServic css::uno::Sequence< OUString > SAL_CALL ChartDocumentWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartDocument", + u"com.sun.star.chart.ChartDocument"_ustr, CHART_CHARTAPIWRAPPER_SERVICE_NAME, - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.beans.PropertySet" + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.beans.PropertySet"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index ac9a53ce331f..c102a706af08 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -279,7 +279,7 @@ protected: WrappedAttachedAxisProperty::WrappedAttachedAxisProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact ) - : WrappedProperty("Axis",OUString()) + : WrappedProperty(u"Axis"_ustr,OUString()) , m_spChart2ModelContact( spChart2ModelContact ) { } @@ -310,7 +310,7 @@ void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, cons sal_Int32 nChartAxisAssign = css::chart::ChartAxisAssign::PRIMARY_Y; if( ! (rOuterValue >>= nChartAxisAssign) ) - throw lang::IllegalArgumentException("Property Axis requires value of type sal_Int32", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property Axis requires value of type sal_Int32"_ustr, nullptr, 0 ); bool bNewAttachedToMainAxis = nChartAxisAssign == css::chart::ChartAxisAssign::PRIMARY_Y; bool bOldAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries ); @@ -334,7 +334,7 @@ protected: }; WrappedSegmentOffsetProperty::WrappedSegmentOffsetProperty() : - WrappedProperty("SegmentOffset","Offset") + WrappedProperty(u"SegmentOffset"_ustr,u"Offset"_ustr) {} Any WrappedSegmentOffsetProperty::convertInnerToOuterValue( const Any& rInnerValue ) const @@ -379,7 +379,7 @@ protected: WrappedLineColorProperty::WrappedLineColorProperty( DataSeriesPointWrapper* pDataSeriesPointWrapper ) - : WrappedSeriesAreaOrLineProperty("LineColor","BorderColor","Color", pDataSeriesPointWrapper ) + : WrappedSeriesAreaOrLineProperty(u"LineColor"_ustr,u"BorderColor"_ustr,u"Color"_ustr, pDataSeriesPointWrapper ) , m_pDataSeriesPointWrapper( pDataSeriesPointWrapper ) , m_aDefaultValue(uno::Any(sal_Int32( 0x0099ccff ))) // blue 8 { @@ -420,7 +420,7 @@ protected: WrappedLineStyleProperty::WrappedLineStyleProperty( DataSeriesPointWrapper* pDataSeriesPointWrapper ) - : WrappedSeriesAreaOrLineProperty("LineStyle","BorderStyle", "LineStyle", pDataSeriesPointWrapper ) + : WrappedSeriesAreaOrLineProperty(u"LineStyle"_ustr,u"BorderStyle"_ustr, u"LineStyle"_ustr, pDataSeriesPointWrapper ) , m_pDataSeriesPointWrapper( pDataSeriesPointWrapper ) { } @@ -475,7 +475,7 @@ void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any if( !m_xDataSeries.is() ) throw uno::Exception( - "DataSeries index invalid", static_cast< ::cppu::OWeakObject * >( this )); + u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this )); //todo: check upper border of point index @@ -576,8 +576,8 @@ void DataSeriesPointWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp = getInnerPropertySet(); if( xProp.is() ) { - if( xProp->getPropertyValue("ReferencePageSize").hasValue() ) - xProp->setPropertyValue("ReferencePageSize", uno::Any( + if( xProp->getPropertyValue(u"ReferencePageSize"_ustr).hasValue() ) + xProp->setPropertyValue(u"ReferencePageSize"_ustr, uno::Any( m_spChart2ModelContact->GetPageSize() )); } } @@ -586,7 +586,7 @@ Any DataSeriesPointWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp = getInnerPropertySet(); if( xProp.is() ) - aRet = xProp->getPropertyValue("ReferencePageSize"); + aRet = xProp->getPropertyValue(u"ReferencePageSize"_ustr); return aRet; } awt::Size DataSeriesPointWrapper::getCurrentSizeForReference() @@ -604,7 +604,7 @@ beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( const OU { if (rPropertyName == "SymbolBitmap" || rPropertyName == "SymbolBitmapURL") { - uno::Any aAny = WrappedPropertySet::getPropertyValue("SymbolType"); + uno::Any aAny = WrappedPropertySet::getPropertyValue(u"SymbolType"_ustr); sal_Int32 nVal = css::chart::ChartSymbolType::NONE; if (aAny >>= nVal) { @@ -735,38 +735,38 @@ std::vector< std::unique_ptr<WrappedProperty> > DataSeriesPointWrapper::createWr //add unnamed line properties (different inner names here) - aWrappedProperties.emplace_back( new WrappedProperty("FillColor","Color") ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillColor"_ustr,u"Color"_ustr) ); aWrappedProperties.emplace_back( new WrappedLineStyleProperty( this ) ); aWrappedProperties.emplace_back( new WrappedLineColorProperty( this ) ); - aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineDashName","BorderDashName","LineDashName", this ) ); - aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineTransparence","BorderTransparency","Transparency", this ) ); - aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineWidth","BorderWidth","LineWidth", this ) ); - aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineCap","LineCap","LineCap", this ) ); - aWrappedProperties.emplace_back( new WrappedProperty("FillStyle","FillStyle" ) ); - aWrappedProperties.emplace_back( new WrappedProperty("FillTransparence","Transparency") ); - - aWrappedProperties.emplace_back( new WrappedIgnoreProperty("LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) ); - aWrappedProperties.emplace_back( new WrappedProperty("FillTransparenceGradientName","TransparencyGradientName") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillGradientName","GradientName") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillGradientStepCount","GradientStepCount") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillHatchName","HatchName") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapName","FillBitmapName") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBackground","FillBackground") ); + aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineDashName"_ustr,u"BorderDashName"_ustr,u"LineDashName"_ustr, this ) ); + aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineTransparence"_ustr,u"BorderTransparency"_ustr,u"Transparency"_ustr, this ) ); + aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineWidth"_ustr,u"BorderWidth"_ustr,u"LineWidth"_ustr, this ) ); + aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineCap"_ustr,u"LineCap"_ustr,u"LineCap"_ustr, this ) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillStyle"_ustr,u"FillStyle"_ustr ) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillTransparence"_ustr,u"Transparency"_ustr) ); + + aWrappedProperties.emplace_back( new WrappedIgnoreProperty(u"LineJoint"_ustr, uno::Any( drawing::LineJoint_ROUND ) ) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillTransparenceGradientName"_ustr,u"TransparencyGradientName"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillGradientName"_ustr,u"GradientName"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillGradientStepCount"_ustr,u"GradientStepCount"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillHatchName"_ustr,u"HatchName"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapName"_ustr,u"FillBitmapName"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBackground"_ustr,u"FillBackground"_ustr) ); //bitmap properties - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapMode","FillBitmapMode") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeX","FillBitmapSizeX") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeY","FillBitmapSizeY") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapLogicalSize","FillBitmapLogicalSize") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetX","FillBitmapOffsetX") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetY","FillBitmapOffsetY") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapRectanglePoint","FillBitmapRectanglePoint") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetX","FillBitmapPositionOffsetX") ); - aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetY","FillBitmapPositionOffsetY") ); - - aWrappedProperties.emplace_back( new WrappedProperty("SolidType","Geometry3D") ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapMode"_ustr,u"FillBitmapMode"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapSizeX"_ustr,u"FillBitmapSizeX"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapSizeY"_ustr,u"FillBitmapSizeY"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapLogicalSize"_ustr,u"FillBitmapLogicalSize"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapOffsetX"_ustr,u"FillBitmapOffsetX"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapOffsetY"_ustr,u"FillBitmapOffsetY"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapRectanglePoint"_ustr,u"FillBitmapRectanglePoint"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapPositionOffsetX"_ustr,u"FillBitmapPositionOffsetX"_ustr) ); + aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapPositionOffsetY"_ustr,u"FillBitmapPositionOffsetY"_ustr) ); + + aWrappedProperties.emplace_back( new WrappedProperty(u"SolidType"_ustr,u"Geometry3D"_ustr) ); aWrappedProperties.emplace_back( new WrappedSegmentOffsetProperty() ); - aWrappedProperties.emplace_back( new WrappedProperty("D3DPercentDiagonal","PercentDiagonal") ); + aWrappedProperties.emplace_back( new WrappedProperty(u"D3DPercentDiagonal"_ustr,u"PercentDiagonal"_ustr) ); aWrappedProperties.emplace_back( new WrappedTextRotationProperty() ); @@ -778,11 +778,11 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert if(rPropertyName == "Lines") { if( ! (rValue >>= m_bLinesAllowed) ) - throw lang::IllegalArgumentException("Property Lines requires value of type sal_Bool", nullptr, 0 ); + throw lang::IllegalArgumentException(u"Property Lines requires value of type sal_Bool"_ustr, nullptr, 0 ); } sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName ); - static const sal_Int32 nErrorCategoryHandle = getInfoHelper().getHandleByName("ErrorCategory"); + static const sal_Int32 nErrorCategoryHandle = getInfoHelper().getHandleByName(u"ErrorCategory"_ustr); if( nErrorCategoryHandle == nHandle ) { css::chart::ChartErrorCategory aNewValue = css::chart::ChartErrorCategory_NONE; @@ -792,16 +792,16 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert switch(aNewValue) { case css::chart::ChartErrorCategory_CONSTANT_VALUE: - aHigh = getPropertyValue("ConstantErrorHigh"); - aLow = getPropertyValue("ConstantErrorLow"); + aHigh = getPropertyValue(u"ConstantErrorHigh"_ustr); + aLow = getPropertyValue(u"ConstantErrorLow"_ustr); bSetHighAndLowValues = true; break; case css::chart::ChartErrorCategory_PERCENT: - aHigh = aLow = getPropertyValue("PercentageError"); + aHigh = aLow = getPropertyValue(u"PercentageError"_ustr); bSetHighAndLowValues = true; break; case css::chart::ChartErrorCategory_ERROR_MARGIN: - aHigh = aLow = getPropertyValue("ErrorMargin"); + aHigh = aLow = getPropertyValue(u"ErrorMargin"_ustr); bSetHighAndLowValues = true; break; default: @@ -815,14 +815,14 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert switch(aNewValue) { case css::chart::ChartErrorCategory_CONSTANT_VALUE: - setPropertyValue("ConstantErrorHigh",aHigh); - setPropertyValue("ConstantErrorLow",aLow); + setPropertyValue(u"ConstantErrorHigh"_ustr,aHigh); + setPropertyValue(u"ConstantErrorLow"_ustr,aLow); break; case css::chart::ChartErrorCategory_PERCENT: - setPropertyValue("PercentageError",aHigh); + setPropertyValue(u"PercentageError"_ustr,aHigh); break; case css::chart::ChartErrorCategory_ERROR_MARGIN: - setPropertyValue("ErrorMargin",aHigh); + setPropertyValue(u"ErrorMargin"_ustr,aHigh); break; default: break; @@ -846,7 +846,7 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyValue( const OUString& rProperty && bVaryColorsByPoint ) { uno::Reference< beans::XPropertyState > xPointState( DataSeriesPointWrapper::getDataPointProperties(), uno::UNO_QUERY ); - if( xPointState.is() && xPointState->getPropertyState("Color") == beans::PropertyState_DEFAULT_VALUE ) + if( xPointState.is() && xPointState->getPropertyState(u"Color"_ustr) == beans::PropertyState_DEFAULT_VALUE ) { rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() ); if( xDiagram.is() ) @@ -864,7 +864,7 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyValue( const OUString& rProperty OUString SAL_CALL DataSeriesPointWrapper::getImplementationName() { - return "com.sun.star.comp.chart.DataSeries"; + return u"com.sun.star.comp.chart.DataSeries"_ustr; } sal_Bool SAL_CALL DataSeriesPointWrapper::supportsService( const OUString& rServiceName ) @@ -875,13 +875,13 @@ sal_Bool SAL_CALL DataSeriesPointWrapper::supportsService( const OUString& rServ css::uno::Sequence< OUString > SAL_CALL DataSeriesPointWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartDataRowProperties", - "com.sun.star.chart.ChartDataPointProperties", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.beans.PropertySet", - "com.sun.star.drawing.FillProperties", - "com.sun.star.drawing.LineProperties", - "com.sun.star.style.CharacterProperties" + u"com.sun.star.chart.ChartDataRowProperties"_ustr, + u"com.sun.star.chart.ChartDataPointProperties"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.beans.PropertySet"_ustr, + u"com.sun.star.drawing.FillProperties"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr, + u"com.sun.star.style.CharacterProperties"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 2917b989f040..f0e8d0168e1a 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -463,20 +463,20 @@ OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName ) // "Area" "StackedArea" "PercentStackedArea" "ThreeDArea" // "StackedThreeDArea" "PercentStackedThreeDArea" if( aName.find( u"Area" ) != std::u16string_view::npos ) - return "com.sun.star.chart.AreaDiagram"; + return u"com.sun.star.chart.AreaDiagram"_ustr; // Handle bar-of-pie and pie-of-pie before simple pie // "BarOfPie" if( aName.find( u"BarOfPie" ) != std::u16string_view::npos ) - return "com.sun.star.chart.BarOfPieDiagram"; + return u"com.sun.star.chart.BarOfPieDiagram"_ustr; // "PieOfPie" if( aName.find( u"PieOfPie" ) != std::u16string_view::npos ) - return "com.sun.star.chart.PieOfPieDiagram"; + return u"com.sun.star.chart.PieOfPieDiagram"_ustr; // "Pie" "PieAllExploded" "ThreeDPie" "ThreeDPieAllExploded" if( aName.find( u"Pie" ) != std::u16string_view::npos ) - return "com.sun.star.chart.PieDiagram"; + return u"com.sun.star.chart.PieDiagram"_ustr; // "Column" "StackedColumn" "PercentStackedColumn" "ThreeDColumnDeep" // "ThreeDColumnFlat" "StackedThreeDColumnFlat" @@ -485,33 +485,33 @@ OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName ) // "StackedThreeDBarFlat" "PercentStackedThreeDBarFlat" "ColumnWithLine" // "StackedColumnWithLine" if( aName.find( u"Column" ) != std::u16string_view::npos || aName.find( u"Bar" ) != std::u16string_view::npos ) - return "com.sun.star.chart.BarDiagram"; + return u"com.sun.star.chart.BarDiagram"_ustr; // "Donut" "DonutAllExploded" "ThreeDDonut" "ThreeDDonutAllExploded" if( aName.find( u"Donut" ) != std::u16string_view::npos ) - return "com.sun.star.chart.DonutDiagram"; + return u"com.sun.star.chart.DonutDiagram"_ustr; // "ScatterLineSymbol" "ScatterLine" "ScatterSymbol" "ThreeDScatter" if( aName.find( u"Scatter" ) != std::u16string_view::npos ) - return "com.sun.star.chart.XYDiagram"; + return u"com.sun.star.chart.XYDiagram"_ustr; // "FilledNet" "StackedFilledNet" "PercentStackedFilledNet" if( aName.find( u"FilledNet" ) != std::u16string_view::npos ) - return "com.sun.star.chart.FilledNetDiagram"; + return u"com.sun.star.chart.FilledNetDiagram"_ustr; // "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol" // "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol" // "PercentStackedNetLine" if( aName.find( u"Net" ) != std::u16string_view::npos ) - return "com.sun.star.chart.NetDiagram"; + return u"com.sun.star.chart.NetDiagram"_ustr; // "StockLowHighClose" "StockOpenLowHighClose" "StockVolumeLowHighClose" // "StockVolumeOpenLowHighClose" if( aName.find( u"Stock" ) != std::u16string_view::npos ) - return "com.sun.star.chart.StockDiagram"; + return u"com.sun.star.chart.StockDiagram"_ustr; if( aName.find( u"Bubble" ) != std::u16string_view::npos ) - return "com.sun.star.chart.BubbleDiagram"; + return u"com.sun.star.chart.BubbleDiagram"_ustr; // Note: this must be checked after Bar, Net and Scatter @@ -520,7 +520,7 @@ OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName ) // "PercentStackedLineSymbol" "ThreeDLine" "StackedThreeDLine" // "PercentStackedThreeDLine" "ThreeDLineDeep" if( aName.find( u"Line" ) != std::u16string_view::npos || aName.find( u"Symbol" ) != std::u16string_view::npos ) - return "com.sun.star.chart.LineDiagram"; + return u"com.sun.star.chart.LineDiagram"_ustr; OSL_FAIL( "unknown template" ); } @@ -586,7 +586,7 @@ OUString SAL_CALL DiagramWrapper::getDiagramType() if( xChartDocProp.is() ) { uno::Reference< util::XRefreshable > xAddIn; - if( xChartDocProp->getPropertyValue( "AddIn" ) >>= xAddIn ) + if( xChartDocProp->getPropertyValue( u"AddIn"_ustr ) >>= xAddIn ) { uno::Reference< lang::XServiceName > xServiceName( xAddIn, uno::UNO_QUERY ); if( xServiceName.is()) @@ -626,12 +626,12 @@ Reference< beans::XPropertySet > SAL_CALL DiagramWrapper::getDataRowProperties( sal_Int32 nRow ) { if( nRow < 0 ) - throw lang::IndexOutOfBoundsException("DataSeries index invalid", + throw lang::IndexOutOfBoundsException(u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this )); sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getDiagram() ); if( nNewAPIIndex < 0 ) - throw lang::IndexOutOfBoundsException("DataSeries index invalid", + throw lang::IndexOutOfBoundsException(u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this )); Reference< beans::XPropertySet > xRet( new DataSeriesPointWrapper( @@ -643,12 +643,12 @@ Reference< beans::XPropertySet > SAL_CALL DiagramWrapper::getDataPointProperties( sal_Int32 nCol, sal_Int32 nRow ) { if( nCol < 0 || nRow < 0 ) - throw lang::IndexOutOfBoundsException("DataSeries index invalid", + throw lang::IndexOutOfBoundsException(u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this )); sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getDiagram() ); if( nNewAPIIndex < 0 ) - throw lang::IndexOutOfBoundsException("DataSeries index invalid", + throw lang::IndexOutOfBoundsException(u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this )); //todo: check borders of point index @@ -683,11 +683,11 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) { OSL_FAIL("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" ); uno::Any aEmpty; - xProp->setPropertyValue( "RelativePosition", aEmpty ); + xProp->setPropertyValue( u"RelativePosition"_ustr, aEmpty ); return; } - xProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); - xProp->setPropertyValue( "PosSizeExcludeAxes", uno::Any(false) ); + xProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); + xProp->setPropertyValue( u"PosSizeExcludeAxes"_ustr, uno::Any(false) ); } awt::Size SAL_CALL DiagramWrapper::getSize() @@ -713,18 +713,18 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) { OSL_FAIL("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); uno::Any aEmpty; - xProp->setPropertyValue( "RelativeSize", aEmpty ); + xProp->setPropertyValue( u"RelativeSize"_ustr, aEmpty ); return; } - xProp->setPropertyValue( "RelativeSize", uno::Any(aRelativeSize) ); - xProp->setPropertyValue( "PosSizeExcludeAxes", uno::Any(false) ); + xProp->setPropertyValue( u"RelativeSize"_ustr, uno::Any(aRelativeSize) ); + xProp->setPropertyValue( u"PosSizeExcludeAxes"_ustr, uno::Any(false) ); } // ____ XShapeDescriptor (base of XShape) ____ OUString SAL_CALL DiagramWrapper::getShapeType() { - return "com.sun.star.chart.Diagram"; + return u"com.sun.star.chart.Diagram"_ustr; } // ____ XDiagramPositioning ____ @@ -735,8 +735,8 @@ void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() uno::Reference< beans::XPropertySet > xDiaProps( getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - xDiaProps->setPropertyValue( "RelativeSize", Any() ); - xDiaProps->setPropertyValue( "RelativePosition", Any() ); + xDiaProps->setPropertyValue( u"RelativeSize"_ustr, Any() ); + xDiaProps->setPropertyValue( u"RelativePosition"_ustr, Any() ); } } sal_Bool SAL_CALL DiagramWrapper::isAutomaticDiagramPositioning( ) @@ -744,8 +744,8 @@ sal_Bool SAL_CALL DiagramWrapper::isAutomaticDiagramPositioning( ) uno::Reference< beans::XPropertySet > xDiaProps( getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - Any aRelativeSize( xDiaProps->getPropertyValue( "RelativeSize" ) ); - Any aRelativePosition( xDiaProps->getPropertyValue( "RelativePosition" ) ); + Any aRelativeSize( xDiaProps->getPropertyValue( u"RelativeSize"_ustr ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( u"RelativePosition"_ustr ) ); if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) return false; } @@ -757,19 +757,19 @@ void SAL_CALL DiagramWrapper::setDiagramPositionExcludingAxes( const awt::Rectan DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getDocumentModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) - xDiaProps->setPropertyValue("PosSizeExcludeAxes", uno::Any(true) ); + xDiaProps->setPropertyValue(u"PosSizeExcludeAxes"_ustr, uno::Any(true) ); } sal_Bool SAL_CALL DiagramWrapper::isExcludingDiagramPositioning() { uno::Reference< beans::XPropertySet > xDiaProps( getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - Any aRelativeSize( xDiaProps->getPropertyValue( "RelativeSize" ) ); - Any aRelativePosition( xDiaProps->getPropertyValue( "RelativePosition" ) ); + Any aRelativeSize( xDiaProps->getPropertyValue( u"RelativeSize"_ustr ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( u"RelativePosition"_ustr ) ); if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) { bool bPosSizeExcludeAxes = false; - xDiaProps->getPropertyValue( "PosSizeExcludeAxes" ) >>= bPosSizeExcludeAxes; + xDiaProps->getPropertyValue( u"PosSizeExcludeAxes"_ustr ) >>= bPosSizeExcludeAxes; return bPosSizeExcludeAxes; } } @@ -785,7 +785,7 @@ void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxes( const awt::Rectan DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getDocumentModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) - xDiaProps->setPropertyValue("PosSizeExcludeAxes", uno::Any(false) ); + xDiaProps->setPropertyValue(u"PosSizeExcludeAxes"_ustr, uno::Any(false) ); } awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( ) { @@ -1114,7 +1114,7 @@ private: //member } WrappedDataRowSourceProperty::WrappedDataRowSourceProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("DataRowSource",OUString()) + : WrappedProperty(u"DataRowSource"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedDataRowSourceProperty::getPropertyDefault( nullptr ); @@ -1127,7 +1127,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNew = sal_Int32(css::chart::ChartDataRowSource_ROWS); if( !(rOuterValue >>= nNew) ) - throw lang::IllegalArgumentException( "Property DataRowSource requires css::chart::ChartDataRowSource value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property DataRowSource requires css::chart::ChartDataRowSource value"_ustr, nullptr, 0 ); eChartDataRowSource = css::chart::ChartDataRowSource(nNew); } @@ -1245,7 +1245,7 @@ void WrappedStackingProperty::setPropertyValue( const Any& rOuterValue, const Re { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Stacking Properties require boolean values", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Stacking Properties require boolean values"_ustr, nullptr, 0 ); StackMode eInnerStackMode; bool bHasDetectableInnerValue = detectInnerValue( eInnerStackMode ); @@ -1309,7 +1309,7 @@ private: //member } WrappedDim3DProperty::WrappedDim3DProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("Dim3D",OUString()) + : WrappedProperty(u"Dim3D"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedDim3DProperty::getPropertyDefault( nullptr ); @@ -1319,7 +1319,7 @@ void WrappedDim3DProperty::setPropertyValue( const Any& rOuterValue, const Refer { bool bNew3D = false; if( ! (rOuterValue >>= bNew3D) ) - throw lang::IllegalArgumentException( "Property Dim3D requires boolean value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property Dim3D requires boolean value"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1372,7 +1372,7 @@ private: //member } WrappedVerticalProperty::WrappedVerticalProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("Vertical",OUString()) + : WrappedProperty(u"Vertical"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedVerticalProperty::getPropertyDefault( nullptr ); @@ -1382,7 +1382,7 @@ void WrappedVerticalProperty::setPropertyValue( const Any& rOuterValue, const Re { bool bNewVertical = false; if( ! (rOuterValue >>= bNewVertical) ) - throw lang::IllegalArgumentException( "Property Vertical requires boolean value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property Vertical requires boolean value"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1443,7 +1443,7 @@ private: //member } WrappedNumberOfLinesProperty::WrappedNumberOfLinesProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("NumberOfLines",OUString()) + : WrappedProperty(u"NumberOfLines"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) , m_aOuterValue( getPropertyDefault(nullptr) ) { @@ -1488,7 +1488,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNewValue; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( "property NumberOfLines requires sal_Int32 value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"property NumberOfLines requires sal_Int32 value"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1525,14 +1525,14 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con } else { - xTemplate = xChartTypeManager->createTemplate("com.sun.star.chart2.template.Column"); + xTemplate = xChartTypeManager->createTemplate(u"com.sun.star.chart2.template.Column"_ustr); } } else if( aTemplateAndService.sServiceName == "com.sun.star.chart2.template.Column" ) { if( nNewValue == 0 ) return; - xTemplate = xChartTypeManager->createTemplate( "com.sun.star.chart2.template.ColumnWithLine" ); + xTemplate = xChartTypeManager->createTemplate( u"com.sun.star.chart2.template.ColumnWithLine"_ustr ); } if(!xTemplate.is()) @@ -1543,7 +1543,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con // locked controllers ControllerLockGuardUNO aCtrlLockGuard( m_spChart2ModelContact->getDocumentModel() ); uno::Reference< beans::XPropertySet > xProp( static_cast<cppu::OWeakObject*>(xTemplate.get()), uno::UNO_QUERY ); - xProp->setPropertyValue( "NumberOfLines", uno::Any(nNewValue) ); + xProp->setPropertyValue( u"NumberOfLines"_ustr, uno::Any(nNewValue) ); xTemplate->changeDiagram( xDiagram ); } catch( const uno::Exception & ) @@ -1589,7 +1589,7 @@ private: //member } WrappedAttributedDataPointsProperty::WrappedAttributedDataPointsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("AttributedDataPoints",OUString()) + : WrappedProperty(u"AttributedDataPoints"_ustr,OUString()) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedAttributedDataPointsProperty::getPropertyDefault( nullptr ); @@ -1599,7 +1599,7 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal { uno::Sequence< uno::Sequence< sal_Int32 > > aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw lang::IllegalArgumentException( "Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1683,7 +1683,7 @@ private: //member } WrappedSolidTypeProperty::WrappedSolidTypeProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty( "SolidType", OUString() ) + : WrappedProperty( u"SolidType"_ustr, OUString() ) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { m_aOuterValue = WrappedSolidTypeProperty::getPropertyDefault( nullptr ); @@ -1693,7 +1693,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const Any& rOuterValue, const R { sal_Int32 nNewSolidType = css::chart::ChartSolidType::RECTANGULAR_SOLID; if( ! (rOuterValue >>= nNewSolidType) ) - throw lang::IllegalArgumentException( "Property SolidType requires integer value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property SolidType requires integer value"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1744,7 +1744,7 @@ public: } WrappedAutomaticSizeProperty::WrappedAutomaticSizeProperty() - : WrappedProperty( "AutomaticSize", OUString() ) + : WrappedProperty( u"AutomaticSize"_ustr, OUString() ) { } @@ -1755,15 +1755,15 @@ void WrappedAutomaticSizeProperty::setPropertyValue( const Any& rOuterValue, con bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property AutomaticSize requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property AutomaticSize requires value of type boolean"_ustr, nullptr, 0 ); try { if( bNewValue ) { - Any aRelativeSize( xInnerPropertySet->getPropertyValue( "RelativeSize" ) ); + Any aRelativeSize( xInnerPropertySet->getPropertyValue( u"RelativeSize"_ustr ) ); if( aRelativeSize.hasValue() ) - xInnerPropertySet->setPropertyValue( "RelativeSize", Any() ); + xInnerPropertySet->setPropertyValue( u"RelativeSize"_ustr, Any() ); } } catch( const uno::Exception & ) @@ -1777,7 +1777,7 @@ Any WrappedAutomaticSizeProperty::getPropertyValue( const Reference< beans::XPro Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - Any aRelativeSize( xInnerPropertySet->getPropertyValue( "RelativeSize" ) ); + Any aRelativeSize( xInnerPropertySet->getPropertyValue( u"RelativeSize"_ustr ) ); if( !aRelativeSize.hasValue() ) aRet <<= true; } @@ -1809,7 +1809,7 @@ private: //member } WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : WrappedProperty("IncludeHiddenCells","IncludeHiddenCells") + : WrappedProperty(u"IncludeHiddenCells"_ustr,u"IncludeHiddenCells"_ustr) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } @@ -1818,7 +1818,7 @@ void WrappedIncludeHiddenCellsProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property IncludeHiddenCells requires boolean value", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property IncludeHiddenCells requires boolean value"_ustr, nullptr, 0 ); ChartModelHelper::setIncludeHiddenCells( bNewValue, *m_spChart2ModelContact->getDocumentModel() ); } @@ -1877,7 +1877,7 @@ std::vector< std::unique_ptr<WrappedProperty> > DiagramWrapper::createWrappedPro aWrappedProperties.emplace_back( new WrappedVerticalProperty( m_spChart2ModelContact ) ); aWrappedProperties.emplace_back( new WrappedNumberOfLinesProperty( m_spChart2ModelContact ) ); aWrappedProperties.emplace_back( new WrappedAttributedDataPointsProperty( m_spChart2ModelContact ) ); - aWrappedProperties.emplace_back( new WrappedProperty( "StackedBarsConnected", "ConnectBars" ) ); + aWrappedProperties.emplace_back( new WrappedProperty( u"StackedBarsConnected"_ustr, u"ConnectBars"_ustr ) ); aWrappedProperties.emplace_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) ); aWrappedProperties.emplace_back( new WrappedAutomaticSizeProperty() ); aWrappedProperties.emplace_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) ); @@ -1887,7 +1887,7 @@ std::vector< std::unique_ptr<WrappedProperty> > DiagramWrapper::createWrappedPro OUString SAL_CALL DiagramWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Diagram"; + return u"com.sun.star.comp.chart.Diagram"_ustr; } sal_Bool SAL_CALL DiagramWrapper::supportsService( const OUString& rServiceName ) @@ -1898,14 +1898,14 @@ sal_Bool SAL_CALL DiagramWrapper::supportsService( const OUString& rServiceName css::uno::Sequence< OUString > SAL_CALL DiagramWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.Diagram", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.chart.StackableDiagram", - "com.sun.star.chart.ChartAxisXSupplier", - "com.sun.star.chart.ChartAxisYSupplier", - "com.sun.star.chart.ChartAxisZSupplier", - "com.sun.star.chart.ChartTwoAxisXSupplier", - "com.sun.star.chart.ChartTwoAxisYSupplier" + u"com.sun.star.chart.Diagram"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.chart.StackableDiagram"_ustr, + u"com.sun.star.chart.ChartAxisXSupplier"_ustr, + u"com.sun.star.chart.ChartAxisYSupplier"_ustr, + u"com.sun.star.chart.ChartAxisZSupplier"_ustr, + u"com.sun.star.chart.ChartTwoAxisXSupplier"_ustr, + u"com.sun.star.chart.ChartTwoAxisYSupplier"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx index 5f75aa686a69..b1a24bf7ce6d 100644 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -141,14 +141,14 @@ std::vector< std::unique_ptr<WrappedProperty> > GridWrapper::createWrappedProper { std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties; - aWrappedProperties.emplace_back( new WrappedDefaultProperty( "LineColor", "LineColor", uno::Any( sal_Int32( 0x000000) ) ) ); // black + aWrappedProperties.emplace_back( new WrappedDefaultProperty( u"LineColor"_ustr, u"LineColor"_ustr, uno::Any( sal_Int32( 0x000000) ) ) ); // black return aWrappedProperties; } OUString SAL_CALL GridWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Grid"; + return u"com.sun.star.comp.chart.Grid"_ustr; } sal_Bool SAL_CALL GridWrapper::supportsService( const OUString& rServiceName ) @@ -159,10 +159,10 @@ sal_Bool SAL_CALL GridWrapper::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL GridWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartGrid", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.drawing.LineProperties", - "com.sun.star.beans.PropertySet" + u"com.sun.star.chart.ChartGrid"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr, + u"com.sun.star.beans.PropertySet"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index 9ec8f02819ef..5d17f3a609c0 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -66,7 +66,7 @@ protected: } WrappedLegendAlignmentProperty::WrappedLegendAlignmentProperty() - : ::chart::WrappedProperty( "Alignment", "AnchorPosition" ) + : ::chart::WrappedProperty( u"Alignment"_ustr, u"AnchorPosition"_ustr ) { } @@ -76,7 +76,7 @@ Any WrappedLegendAlignmentProperty::getPropertyValue( const Reference< beans::XP if( xInnerPropertySet.is() ) { bool bShowLegend = true; - xInnerPropertySet->getPropertyValue( "Show" ) >>= bShowLegend; + xInnerPropertySet->getPropertyValue( u"Show"_ustr ) >>= bShowLegend; if(!bShowLegend) { aRet <<= css::chart::ChartLegendPosition_NONE; @@ -101,11 +101,11 @@ void WrappedLegendAlignmentProperty::setPropertyValue( const Any& rOuterValue, c css::chart::ChartLegendPosition eOuterPos(css::chart::ChartLegendPosition_NONE); if( (rOuterValue >>= eOuterPos) && eOuterPos == css::chart::ChartLegendPosition_NONE ) bNewShowLegend = false; - xInnerPropertySet->getPropertyValue( "Show" ) >>= bOldShowLegend; + xInnerPropertySet->getPropertyValue( u"Show"_ustr ) >>= bOldShowLegend; } if(bNewShowLegend!=bOldShowLegend) { - xInnerPropertySet->setPropertyValue( "Show", uno::Any(bNewShowLegend) ); + xInnerPropertySet->setPropertyValue( u"Show"_ustr, uno::Any(bNewShowLegend) ); } if(!bNewShowLegend) return; @@ -126,17 +126,17 @@ void WrappedLegendAlignmentProperty::setPropertyValue( const Any& rOuterValue, c css::chart::ChartLegendExpansion eOldExpansion( css::chart::ChartLegendExpansion_HIGH ); bool bExpansionWasSet( - xInnerPropertySet->getPropertyValue( "Expansion" ) >>= eOldExpansion ); + xInnerPropertySet->getPropertyValue( u"Expansion"_ustr ) >>= eOldExpansion ); if( !bExpansionWasSet || (eOldExpansion != eNewExpansion)) - xInnerPropertySet->setPropertyValue( "Expansion", uno::Any( eNewExpansion )); + xInnerPropertySet->setPropertyValue( u"Expansion"_ustr, uno::Any( eNewExpansion )); } //correct RelativePosition - Any aRelativePosition( xInnerPropertySet->getPropertyValue("RelativePosition") ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue(u"RelativePosition"_ustr) ); if(aRelativePosition.hasValue()) { - xInnerPropertySet->setPropertyValue( "RelativePosition", Any() ); + xInnerPropertySet->setPropertyValue( u"RelativePosition"_ustr, Any() ); } } @@ -276,7 +276,7 @@ void SAL_CALL LegendWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT; aRelativePosition.Primary = aPageSize.Width == 0 ? 0 : double(aPosition.X)/double(aPageSize.Width); aRelativePosition.Secondary = aPageSize.Height == 0 ? 0 : double(aPosition.Y)/double(aPageSize.Height); - xProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); } } @@ -304,7 +304,7 @@ void SAL_CALL LegendWrapper::setSize( const awt::Size& aSize ) // ____ XShapeDescriptor (base of XShape) ____ OUString SAL_CALL LegendWrapper::getShapeType() { - return "com.sun.star.chart.ChartLegend"; + return u"com.sun.star.chart.ChartLegend"_ustr; } // ____ XComponent ____ @@ -337,8 +337,8 @@ void LegendWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp = getInnerPropertySet(); if( xProp.is() ) { - if( xProp->getPropertyValue( "ReferencePageSize" ).hasValue() ) - xProp->setPropertyValue( "ReferencePageSize", uno::Any( + if( xProp->getPropertyValue( u"ReferencePageSize"_ustr ).hasValue() ) + xProp->setPropertyValue( u"ReferencePageSize"_ustr, uno::Any( m_spChart2ModelContact->GetPageSize() )); } } @@ -347,7 +347,7 @@ Any LegendWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp = getInnerPropertySet(); if( xProp.is() ) - aRet = xProp->getPropertyValue( "ReferencePageSize" ); + aRet = xProp->getPropertyValue( u"ReferencePageSize"_ustr ); return aRet; } @@ -377,11 +377,11 @@ std::vector< std::unique_ptr<WrappedProperty> > LegendWrapper::createWrappedProp std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties; aWrappedProperties.emplace_back( new WrappedLegendAlignmentProperty() ); - aWrappedProperties.emplace_back( new WrappedProperty( "Expansion", "Expansion")); + aWrappedProperties.emplace_back( new WrappedProperty( u"Expansion"_ustr, u"Expansion"_ustr)); WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this ); //same problem as for wall: the defaults in the old chart are different for different charttypes, so we need to export explicitly - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("FillStyle", "FillStyle")); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty("FillColor", "FillColor")); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"FillStyle"_ustr, u"FillStyle"_ustr)); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty(u"FillColor"_ustr, u"FillColor"_ustr)); WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties ); WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); @@ -390,7 +390,7 @@ std::vector< std::unique_ptr<WrappedProperty> > LegendWrapper::createWrappedProp OUString SAL_CALL LegendWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Legend"; + return u"com.sun.star.comp.chart.Legend"_ustr; } sal_Bool SAL_CALL LegendWrapper::supportsService( const OUString& rServiceName ) @@ -401,10 +401,10 @@ sal_Bool SAL_CALL LegendWrapper::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL LegendWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartLegend", - "com.sun.star.drawing.Shape", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.style.CharacterProperties" + u"com.sun.star.chart.ChartLegend"_ustr, + u"com.sun.star.drawing.Shape"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.style.CharacterProperties"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index d0cb5eab6552..95e5a794d245 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -78,7 +78,7 @@ namespace chart::wrapper MinMaxLineWrapper::MinMaxLineWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) : m_spChart2ModelContact(std::move( spChart2ModelContact )) - , m_aWrappedLineJointProperty( "LineJoint", uno::Any( drawing::LineJoint_NONE )) + , m_aWrappedLineJointProperty( u"LineJoint"_ustr, uno::Any( drawing::LineJoint_NONE )) { } @@ -128,9 +128,9 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName if(aSeriesSeq[0].is()) { if( rPropertyName == "LineColor" ) - aSeriesSeq[0]->setPropertyValue( "Color", rValue ); + aSeriesSeq[0]->setPropertyValue( u"Color"_ustr, rValue ); else if( rPropertyName == "LineTransparence" ) - aSeriesSeq[0]->setPropertyValue( "Transparency", rValue ); + aSeriesSeq[0]->setPropertyValue( u"Transparency"_ustr, rValue ); else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() ) m_aWrappedLineJointProperty.setPropertyValue( rValue, aSeriesSeq[0] ); else @@ -164,9 +164,9 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty if(xPropSet.is()) { if( rPropertyName == "LineColor" ) - aRet = xPropSet->getPropertyValue( "Color" ); + aRet = xPropSet->getPropertyValue( u"Color"_ustr ); else if( rPropertyName == "LineTransparence" ) - aRet = xPropSet->getPropertyValue( "Transparency" ); + aRet = xPropSet->getPropertyValue( u"Transparency"_ustr ); else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() ) aRet = m_aWrappedLineJointProperty.getPropertyValue( xPropSet ); else @@ -328,7 +328,7 @@ uno::Sequence< uno::Any > SAL_CALL MinMaxLineWrapper::getPropertyDefaults( const OUString SAL_CALL MinMaxLineWrapper::getImplementationName() { - return "com.sun.star.comp.chart.ChartLine"; + return u"com.sun.star.comp.chart.ChartLine"_ustr; } sal_Bool SAL_CALL MinMaxLineWrapper::supportsService( const OUString& rServiceName ) @@ -339,9 +339,9 @@ sal_Bool SAL_CALL MinMaxLineWrapper::supportsService( const OUString& rServiceNa css::uno::Sequence< OUString > SAL_CALL MinMaxLineWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartLine", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.drawing.LineProperties" + u"com.sun.star.chart.ChartLine"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index 129798d3706f..e4ca74c37f19 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -67,7 +67,7 @@ protected: } WrappedTitleStringProperty::WrappedTitleStringProperty( const Reference< uno::XComponentContext >& xContext ) - : ::chart::WrappedProperty( "String", OUString() ) + : ::chart::WrappedProperty( u"String"_ustr, OUString() ) , m_xContext( xContext ) { } @@ -119,7 +119,7 @@ namespace { } WrappedTitleFormStringsProperty::WrappedTitleFormStringsProperty() - : ::chart::WrappedProperty( "FormattedStrings", OUString() ) + : ::chart::WrappedProperty( u"FormattedStrings"_ustr, OUString() ) { } @@ -160,7 +160,7 @@ public: } WrappedStackedTextProperty::WrappedStackedTextProperty() - : ::chart::WrappedProperty( "StackedText", "StackCharacters" ) + : ::chart::WrappedProperty( u"StackedText"_ustr, u"StackCharacters"_ustr ) { } @@ -269,7 +269,7 @@ void SAL_CALL TitleWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT; aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width); aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height); - xPropertySet->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xPropertySet->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); } } @@ -286,7 +286,7 @@ void SAL_CALL TitleWrapper::setSize( const awt::Size& /*aSize*/ ) // ____ XShapeDescriptor (base of XShape) ____ OUString SAL_CALL TitleWrapper::getShapeType() { - return "com.sun.star.chart.ChartTitle"; + return u"com.sun.star.chart.ChartTitle"_ustr; } // ____ XComponent ____ @@ -481,8 +481,8 @@ void TitleWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp( getTitleObject(), uno::UNO_QUERY ); if( xProp.is() ) { - if( xProp->getPropertyValue( "ReferencePageSize" ).hasValue() ) - xProp->setPropertyValue( "ReferencePageSize", uno::Any( + if( xProp->getPropertyValue( u"ReferencePageSize"_ustr ).hasValue() ) + xProp->setPropertyValue( u"ReferencePageSize"_ustr, uno::Any( m_spChart2ModelContact->GetPageSize() )); } } @@ -491,7 +491,7 @@ Any TitleWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp( getTitleObject(), uno::UNO_QUERY ); if( xProp.is() ) - aRet = xProp->getPropertyValue( "ReferencePageSize" ); + aRet = xProp->getPropertyValue( u"ReferencePageSize"_ustr ); return aRet; } @@ -534,7 +534,7 @@ std::vector< std::unique_ptr<WrappedProperty> > TitleWrapper::createWrappedPrope OUString SAL_CALL TitleWrapper::getImplementationName() { - return "com.sun.star.comp.chart.Title"; + return u"com.sun.star.comp.chart.Title"_ustr; } sal_Bool SAL_CALL TitleWrapper::supportsService( const OUString& rServiceName ) @@ -545,10 +545,10 @@ sal_Bool SAL_CALL TitleWrapper::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL TitleWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartTitle", - "com.sun.star.drawing.Shape", - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.style.CharacterProperties" + u"com.sun.star.chart.ChartTitle"_ustr, + u"com.sun.star.drawing.Shape"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.style.CharacterProperties"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index c63090d81ac8..f8645b46647a 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -73,7 +73,7 @@ namespace chart::wrapper UpDownBarWrapper::UpDownBarWrapper( bool bUp, std::shared_ptr<Chart2ModelContact> spChart2ModelContact) : m_spChart2ModelContact(std::move( spChart2ModelContact )) - , m_aPropertySetName( bUp ? OUString( "WhiteDay" ) : OUString( "BlackDay" )) + , m_aPropertySetName( bUp ? u"WhiteDay"_ustr : u"BlackDay"_ustr) { } @@ -292,7 +292,7 @@ uno::Sequence< uno::Any > SAL_CALL UpDownBarWrapper::getPropertyDefaults( const OUString SAL_CALL UpDownBarWrapper::getImplementationName() { - return "com.sun.star.comp.chart.ChartArea"; + return u"com.sun.star.comp.chart.ChartArea"_ustr; } sal_Bool SAL_CALL UpDownBarWrapper::supportsService( const OUString& rServiceName ) @@ -303,10 +303,10 @@ sal_Bool SAL_CALL UpDownBarWrapper::supportsService( const OUString& rServiceNam css::uno::Sequence< OUString > SAL_CALL UpDownBarWrapper::getSupportedServiceNames() { return { - "com.sun.star.chart.ChartArea", - "com.sun.star.drawing.LineProperties", - "com.sun.star.drawing.FillProperties", - "com.sun.star.xml.UserDefinedAttributesSupplier" + u"com.sun.star.chart.ChartArea"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr, + u"com.sun.star.drawing.FillProperties"_ustr, + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx index 9c8a6f61afb0..23ef0780ccae 100644 --- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx @@ -117,15 +117,15 @@ std::vector< std::unique_ptr<WrappedProperty> > WallFloorWrapper::createWrappedP // exported. Because in the old chart the defaults is as follows: // Floor: SOLID (new and old model default), Wall: NONE, except for some chart types (line, scatter) if( m_bWall ) - aWrappedProperties.emplace_back( new WrappedDirectStateProperty( "FillStyle", "FillStyle" )); - aWrappedProperties.emplace_back( new WrappedDirectStateProperty( "FillColor", "FillColor" )); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty( u"FillStyle"_ustr, u"FillStyle"_ustr )); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty( u"FillColor"_ustr, u"FillColor"_ustr )); return aWrappedProperties; } OUString SAL_CALL WallFloorWrapper::getImplementationName() { - return "com.sun.star.comp.chart.WallOrFloor"; + return u"com.sun.star.comp.chart.WallOrFloor"_ustr; } sal_Bool SAL_CALL WallFloorWrapper::supportsService( const OUString& rServiceName ) @@ -136,10 +136,10 @@ sal_Bool SAL_CALL WallFloorWrapper::supportsService( const OUString& rServiceNam css::uno::Sequence< OUString > SAL_CALL WallFloorWrapper::getSupportedServiceNames() { return { - "com.sun.star.xml.UserDefinedAttributesSupplier", - "com.sun.star.drawing.FillProperties", - "com.sun.star.drawing.LineProperties", - "com.sun.star.beans.PropertySet" + u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr, + u"com.sun.star.drawing.FillProperties"_ustr, + u"com.sun.star.drawing.LineProperties"_ustr, + u"com.sun.star.beans.PropertySet"_ustr }; } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx index 24a6dfb78a1c..261826eb0497 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx @@ -29,7 +29,7 @@ namespace chart::wrapper { WrappedAddInProperty::WrappedAddInProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( "AddIn", OUString() ) + : ::chart::WrappedProperty( u"AddIn"_ustr, OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -41,7 +41,7 @@ void WrappedAddInProperty::setPropertyValue( const Any& rOuterValue, const Refer { Reference< util::XRefreshable > xAddIn; if( ! (rOuterValue >>= xAddIn) ) - throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", nullptr, 0 ); + throw lang::IllegalArgumentException( u"AddIn properties require type XRefreshable"_ustr, nullptr, 0 ); m_rChartDocumentWrapper.setAddIn( xAddIn ); } @@ -52,7 +52,7 @@ Any WrappedAddInProperty::getPropertyValue( const Reference< beans::XPropertySet } WrappedBaseDiagramProperty::WrappedBaseDiagramProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( "BaseDiagram" , OUString() ) + : ::chart::WrappedProperty( u"BaseDiagram"_ustr , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -64,7 +64,7 @@ void WrappedBaseDiagramProperty::setPropertyValue( const Any& rOuterValue, const { OUString aBaseDiagram; if( ! (rOuterValue >>= aBaseDiagram) ) - throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", nullptr, 0 ); + throw lang::IllegalArgumentException( u"BaseDiagram properties require type OUString"_ustr, nullptr, 0 ); m_rChartDocumentWrapper.setBaseDiagram( aBaseDiagram ); } @@ -75,7 +75,7 @@ Any WrappedBaseDiagramProperty::getPropertyValue( const Reference< beans::XPrope } WrappedAdditionalShapesProperty::WrappedAdditionalShapesProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( "AdditionalShapes" , OUString() ) + : ::chart::WrappedProperty( u"AdditionalShapes"_ustr , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -85,7 +85,7 @@ WrappedAdditionalShapesProperty::~WrappedAdditionalShapesProperty() void WrappedAdditionalShapesProperty::setPropertyValue( const Any& /*rOuterValue*/, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const { - throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", nullptr, 0 ); + throw lang::IllegalArgumentException( u"AdditionalShapes is a read only property"_ustr, nullptr, 0 ); } Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const @@ -94,7 +94,7 @@ Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::X } WrappedRefreshAddInAllowedProperty::WrappedRefreshAddInAllowedProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( "RefreshAddInAllowed" , OUString() ) + : ::chart::WrappedProperty( u"RefreshAddInAllowed"_ustr , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -106,7 +106,7 @@ void WrappedRefreshAddInAllowedProperty::setPropertyValue( const Any& rOuterValu { bool bUpdateAddIn = true; if( ! (rOuterValue >>= bUpdateAddIn) ) - throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException( u"The property RefreshAddInAllowed requires type boolean"_ustr, nullptr, 0 ); m_rChartDocumentWrapper.setUpdateAddIn( bUpdateAddIn ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx index b88468c9941e..0434e6dc041e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx @@ -48,7 +48,7 @@ public: } WrappedAutomaticPositionProperty::WrappedAutomaticPositionProperty() - : ::chart::WrappedProperty( "AutomaticPosition" , OUString() ) + : ::chart::WrappedProperty( u"AutomaticPosition"_ustr , OUString() ) { } @@ -59,15 +59,15 @@ void WrappedAutomaticPositionProperty::setPropertyValue( const Any& rOuterValue, bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property AutomaticPosition requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property AutomaticPosition requires value of type boolean"_ustr, nullptr, 0 ); try { if( bNewValue ) { - Any aRelativePosition( xInnerPropertySet->getPropertyValue( "RelativePosition" ) ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue( u"RelativePosition"_ustr ) ); if( aRelativePosition.hasValue() ) - xInnerPropertySet->setPropertyValue( "RelativePosition", Any() ); + xInnerPropertySet->setPropertyValue( u"RelativePosition"_ustr, Any() ); } } catch( const uno::Exception & ) @@ -81,7 +81,7 @@ Any WrappedAutomaticPositionProperty::getPropertyValue( const Reference< beans:: Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - Any aRelativePosition( xInnerPropertySet->getPropertyValue( "RelativePosition" ) ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue( u"RelativePosition"_ustr ) ); if( !aRelativePosition.hasValue() ) aRet <<= true; } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx index 2b047ebfaf82..1208ad539d3e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx @@ -149,7 +149,7 @@ void WrappedAxisAndGridExistenceProperty::setPropertyValue( const Any& rOuterVal { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Has axis or grid properties require boolean values"_ustr, nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -264,7 +264,7 @@ void WrappedAxisTitleExistenceProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Has axis or grid properties require boolean values"_ustr, nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -362,7 +362,7 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Has axis or grid properties require boolean values"_ustr, nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -377,10 +377,10 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue //create axis if needed xProp = AxisHelper::createAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext ); if( xProp.is() ) - xProp->setPropertyValue( "Show", uno::Any( false ) ); + xProp->setPropertyValue( u"Show"_ustr, uno::Any( false ) ); } if( xProp.is() ) - xProp->setPropertyValue( "DisplayLabels", rOuterValue ); + xProp->setPropertyValue( u"DisplayLabels"_ustr, rOuterValue ); } Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const @@ -389,7 +389,7 @@ Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans: rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() ); rtl::Reference< Axis > xProp = AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ); if( xProp.is() ) - aRet = xProp->getPropertyValue( "DisplayLabels" ); + aRet = xProp->getPropertyValue( u"DisplayLabels"_ustr ); else aRet <<= false; return aRet; diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx index 67ea51b0e913..6e09285dfd62 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx @@ -110,7 +110,7 @@ Any WrappedCharacterHeightProperty_Base::convertOuterToInnerValue( const Any& rO } WrappedCharacterHeightProperty::WrappedCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( "CharHeight", pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( u"CharHeight"_ustr, pRefSizePropProvider ) { } WrappedCharacterHeightProperty::~WrappedCharacterHeightProperty() @@ -118,7 +118,7 @@ WrappedCharacterHeightProperty::~WrappedCharacterHeightProperty() } WrappedAsianCharacterHeightProperty::WrappedAsianCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( "CharHeightAsian", pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( u"CharHeightAsian"_ustr, pRefSizePropProvider ) { } WrappedAsianCharacterHeightProperty::~WrappedAsianCharacterHeightProperty() @@ -126,7 +126,7 @@ WrappedAsianCharacterHeightProperty::~WrappedAsianCharacterHeightProperty() } WrappedComplexCharacterHeightProperty::WrappedComplexCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( "CharHeightComplex", pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( u"CharHeightComplex"_ustr, pRefSizePropProvider ) { } WrappedComplexCharacterHeightProperty::~WrappedComplexCharacterHeightProperty() diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx index d317210c3608..792bfdfadcb4 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx @@ -127,7 +127,7 @@ void WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( std::vector< WrappedDataCaptionProperty::WrappedDataCaptionProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact , tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< sal_Int32 >( "DataCaption" + : WrappedSeriesOrDiagramProperty< sal_Int32 >( u"DataCaption"_ustr , uno::Any( sal_Int32(0) ), spChart2ModelContact, ePropertyType ) { } diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx index 079d25f63bb4..1da4fe9195cb 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx @@ -66,7 +66,7 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue, { sal_Int32 nNewValue = 0; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( "GapWidth and Overlap property require value of type sal_Int32", nullptr, 0 ); + throw lang::IllegalArgumentException( u"GapWidth and Overlap property require value of type sal_Int32"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -147,7 +147,7 @@ Any WrappedBarPositionProperty_Base::getPropertyValue( const Reference< beans::X WrappedGapwidthProperty::WrappedGapwidthProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact) - : WrappedBarPositionProperty_Base( "GapWidth", "GapwidthSequence", DEFAULT_GAPWIDTH, spChart2ModelContact ) + : WrappedBarPositionProperty_Base( u"GapWidth"_ustr, u"GapwidthSequence"_ustr, DEFAULT_GAPWIDTH, spChart2ModelContact ) { } WrappedGapwidthProperty::~WrappedGapwidthProperty() @@ -156,7 +156,7 @@ WrappedGapwidthProperty::~WrappedGapwidthProperty() WrappedBarOverlapProperty::WrappedBarOverlapProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact ) - : WrappedBarPositionProperty_Base( "Overlap", "OverlapSequence", DEFAULT_OVERLAP, spChart2ModelContact ) + : WrappedBarPositionProperty_Base( u"Overlap"_ustr, u"OverlapSequence"_ustr, DEFAULT_OVERLAP, spChart2ModelContact ) { } WrappedBarOverlapProperty::~WrappedBarOverlapProperty() diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx index 0598b4fd377f..1819bb2b2c91 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx @@ -46,7 +46,7 @@ void WrappedNumberFormatProperty::setPropertyValue( const Any& rOuterValue, cons { sal_Int32 nFormat = 0; if( ! (rOuterValue >>= nFormat) ) - throw lang::IllegalArgumentException( "Property 'NumberFormat' requires value of type sal_Int32", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property 'NumberFormat' requires value of type sal_Int32"_ustr, nullptr, 0 ); if(xInnerPropertySet.is()) xInnerPropertySet->setPropertyValue(getInnerName(), convertOuterToInnerValue(rOuterValue)); diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index 6e11fbe021a2..60a026c2fcaf 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -54,7 +54,7 @@ private: } WrappedScaleTextProperty::WrappedScaleTextProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact) - : ::chart::WrappedProperty( "ScaleText" , OUString() ) + : ::chart::WrappedProperty( u"ScaleText"_ustr , OUString() ) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } @@ -70,7 +70,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R if( ! (rOuterValue >>= bNewValue) ) { if( rOuterValue.hasValue() ) - throw lang::IllegalArgumentException( "Property ScaleText requires value of type boolean", nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property ScaleText requires value of type boolean"_ustr, nullptr, 0 ); } try @@ -94,7 +94,7 @@ Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropert Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - if( xInnerPropertySet->getPropertyValue( "ReferencePageSize" ).hasValue() ) + if( xInnerPropertySet->getPropertyValue( u"ReferencePageSize"_ustr ).hasValue() ) aRet <<= true; else aRet <<= false; diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx index 5c22750dc17b..cf7a820115c3 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx @@ -37,7 +37,7 @@ void WrappedSceneProperty::addWrappedProperties( std::vector< std::unique_ptr<Wr WrappedD3DTransformMatrixProperty::WrappedD3DTransformMatrixProperty( std::shared_ptr<Chart2ModelContact> spChart2ModelContact ) - : WrappedProperty("D3DTransformMatrix","D3DTransformMatrix") + : WrappedProperty(u"D3DTransformMatrix"_ustr,u"D3DTransformMatrix"_ustr) , m_spChart2ModelContact(std::move( spChart2ModelContact )) { } diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx index 8b0b54db3d7a..0eea39683474 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx @@ -104,7 +104,7 @@ public: { PROPERTYTYPE aNewValue = PROPERTYTYPE(); if( ! (rOuterValue >>= aNewValue) ) - throw css::lang::IllegalArgumentException( "statistic property requires different type", nullptr, 0 ); + throw css::lang::IllegalArgumentException( u"statistic property requires different type"_ustr, nullptr, 0 ); if( m_ePropertyType == DIAGRAM ) { diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index 53ce90fa24f9..f40b9edd7fb2 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -100,7 +100,7 @@ public: { PROPERTYTYPE aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw css::lang::IllegalArgumentException( "spline property requires different type", nullptr, 0 ); + throw css::lang::IllegalArgumentException( u"spline property requires different type"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index e5278bb5da49..1acc5b3749d2 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -116,7 +116,7 @@ sal_Int32 lcl_getErrorBarStyle( const uno::Reference< beans::XPropertySet >& xEr { sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE; if(xErrorBarProperties.is()) - xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle; + xErrorBarProperties->getPropertyValue( u"ErrorBarStyle"_ustr ) >>= nStyle; return nStyle; } @@ -187,9 +187,9 @@ protected: { xErrorBarProperties = new ::chart::ErrorBar; //default in new and old api are different - xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::Any(false) ); - xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::Any(false) ); - xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::Any(css::chart::ErrorBarStyle::NONE) ); + xErrorBarProperties->setPropertyValue( u"ShowPositiveError"_ustr , uno::Any(false) ); + xErrorBarProperties->setPropertyValue( u"ShowNegativeError"_ustr , uno::Any(false) ); + xErrorBarProperties->setPropertyValue( u"ErrorBarStyle"_ustr , uno::Any(css::chart::ErrorBarStyle::NONE) ); xSeriesPropertySet->setPropertyValue( CHART_UNONAME_ERRORBAR_Y , uno::Any( xErrorBarProperties ) ); } return xErrorBarProperties; @@ -216,7 +216,7 @@ private: WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( "ConstantErrorLow" + : WrappedStatisticProperty< double >( u"ConstantErrorLow"_ustr , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -229,7 +229,7 @@ double WrappedConstantErrorLowProperty::getValueFromSeries( const Reference< bea if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE ) - xErrorBarProperties->getPropertyValue( "NegativeError" ) >>= aRet; + xErrorBarProperties->getPropertyValue( u"NegativeError"_ustr ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -244,7 +244,7 @@ void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans:: m_aOuterValue <<= aNewValue; if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE ) { - xErrorBarProperties->setPropertyValue( "NegativeError", m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"NegativeError"_ustr, m_aOuterValue ); } } } @@ -270,7 +270,7 @@ private: WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( "ConstantErrorHigh" + : WrappedStatisticProperty< double >( u"ConstantErrorHigh"_ustr , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -283,7 +283,7 @@ double WrappedConstantErrorHighProperty::getValueFromSeries( const Reference< be if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE ) - xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; + xErrorBarProperties->getPropertyValue( u"PositiveError"_ustr ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -298,7 +298,7 @@ void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans: m_aOuterValue <<= aNewValue; if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE ) { - xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"PositiveError"_ustr , m_aOuterValue ); } } } @@ -321,7 +321,7 @@ public: WrappedMeanValueProperty::WrappedMeanValueProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< bool >( "MeanValue", uno::Any( false ), std::move(spChart2ModelContact), ePropertyType ) + : WrappedStatisticProperty< bool >( u"MeanValue"_ustr, uno::Any( false ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -365,7 +365,7 @@ public: WrappedErrorCategoryProperty::WrappedErrorCategoryProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< css::chart::ChartErrorCategory >( "ErrorCategory" + : WrappedStatisticProperty< css::chart::ChartErrorCategory >( u"ErrorCategory"_ustr , uno::Any( css::chart::ChartErrorCategory_NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -378,7 +378,7 @@ css::chart::ChartErrorCategory WrappedErrorCategoryProperty::getValueFromSeries( if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE; - xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle; + xErrorBarProperties->getPropertyValue( u"ErrorBarStyle"_ustr ) >>= nStyle; switch(nStyle) { case css::chart::ErrorBarStyle::NONE: @@ -442,7 +442,7 @@ void WrappedErrorCategoryProperty::setValueToSeries( const Reference< beans::XPr default: break; } - xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::Any(nNewStyle) ); + xErrorBarProperties->setPropertyValue( u"ErrorBarStyle"_ustr , uno::Any(nNewStyle) ); } namespace { @@ -466,7 +466,7 @@ private: WrappedPercentageErrorProperty::WrappedPercentageErrorProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( "PercentageError" + : WrappedStatisticProperty< double >( u"PercentageError"_ustr , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -479,7 +479,7 @@ double WrappedPercentageErrorProperty::getValueFromSeries( const Reference< bean if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::RELATIVE ) - xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; + xErrorBarProperties->getPropertyValue( u"PositiveError"_ustr ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -493,8 +493,8 @@ void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::X m_aOuterValue <<= aNewValue; if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::RELATIVE ) { - xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); - xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"PositiveError"_ustr , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"NegativeError"_ustr , m_aOuterValue ); } } } @@ -520,7 +520,7 @@ private: WrappedErrorMarginProperty::WrappedErrorMarginProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( "ErrorMargin" + : WrappedStatisticProperty< double >( u"ErrorMargin"_ustr , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -533,7 +533,7 @@ double WrappedErrorMarginProperty::getValueFromSeries( const Reference< beans::X if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ERROR_MARGIN ) - xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; + xErrorBarProperties->getPropertyValue( u"PositiveError"_ustr ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -547,8 +547,8 @@ void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XProp m_aOuterValue <<= aNewValue; if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ERROR_MARGIN ) { - xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); - xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"PositiveError"_ustr , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( u"NegativeError"_ustr , m_aOuterValue ); } } } @@ -571,7 +571,7 @@ public: WrappedErrorIndicatorProperty::WrappedErrorIndicatorProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< css::chart::ChartErrorIndicatorType >( "ErrorIndicator" + : WrappedStatisticProperty< css::chart::ChartErrorIndicatorType >( u"ErrorIndicator"_ustr , uno::Any( css::chart::ChartErrorIndicatorType_NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -585,8 +585,8 @@ css::chart::ChartErrorIndicatorType WrappedErrorIndicatorProperty::getValueFromS { bool bPositive = false; bool bNegative = false; - xErrorBarProperties->getPropertyValue( "ShowPositiveError" ) >>= bPositive; - xErrorBarProperties->getPropertyValue( "ShowNegativeError" ) >>= bNegative; + xErrorBarProperties->getPropertyValue( u"ShowPositiveError"_ustr ) >>= bPositive; + xErrorBarProperties->getPropertyValue( u"ShowNegativeError"_ustr ) >>= bNegative; if( bPositive && bNegative ) aRet = css::chart::ChartErrorIndicatorType_TOP_AND_BOTTOM; @@ -621,8 +621,8 @@ void WrappedErrorIndicatorProperty::setValueToSeries( const Reference< beans::XP break; } - xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::Any(bPositive) ); - xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::Any(bNegative) ); + xErrorBarProperties->setPropertyValue( u"ShowPositiveError"_ustr , uno::Any(bPositive) ); + xErrorBarProperties->setPropertyValue( u"ShowNegativeError"_ustr , uno::Any(bNegative) ); } namespace { @@ -644,7 +644,7 @@ public: WrappedErrorBarStyleProperty::WrappedErrorBarStyleProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< sal_Int32 >( "ErrorBarStyle" + : WrappedStatisticProperty< sal_Int32 >( u"ErrorBarStyle"_ustr , uno::Any( css::chart::ErrorBarStyle::NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -656,7 +656,7 @@ sal_Int32 WrappedErrorBarStyleProperty::getValueFromSeries( const Reference< bea uno::Reference< beans::XPropertySet > xErrorBarProperties; if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { - xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nRet; + xErrorBarProperties->getPropertyValue( u"ErrorBarStyle"_ustr ) >>= nRet; } return nRet; } @@ -668,7 +668,7 @@ void WrappedErrorBarStyleProperty::setValueToSeries( const Reference< beans::XPr uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) { - xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::Any( nNewValue )); + xErrorBarProperties->setPropertyValue( u"ErrorBarStyle"_ustr , uno::Any( nNewValue )); } } @@ -690,7 +690,7 @@ public: WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< OUString >( "ErrorBarRangePositive" + : WrappedStatisticProperty< OUString >( u"ErrorBarRangePositive"_ustr , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -754,7 +754,7 @@ public: WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< OUString >( "ErrorBarRangeNegative" + : WrappedStatisticProperty< OUString >( u"ErrorBarRangeNegative"_ustr , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -818,7 +818,7 @@ public: WrappedRegressionCurvesProperty::WrappedRegressionCurvesProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< css::chart::ChartRegressionCurveType >( "RegressionCurves" + : WrappedStatisticProperty< css::chart::ChartRegressionCurveType >( u"RegressionCurves"_ustr , lcl_getRegressionDefault(), std::move(spChart2ModelContact), ePropertyType ) { } @@ -887,10 +887,10 @@ WrappedStatisticPropertySetProperty::WrappedStatisticPropertySetProperty( , tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< Reference< beans::XPropertySet > >( (ePropertySetType == PROPERTY_SET_TYPE_REGRESSION) - ? OUString("DataRegressionProperties") + ? u"DataRegressionProperties"_ustr : (ePropertySetType == PROPERTY_SET_TYPE_ERROR_BAR) - ? OUString("DataErrorProperties") - : OUString("DataMeanValueProperties") + ? u"DataErrorProperties"_ustr + : u"DataMeanValueProperties"_ustr , uno::Any(), std::move(spChart2ModelContact), ePropertyType ) , m_eType( ePropertySetType ) { diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx index 093321843018..afd0d0d7e85a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx @@ -72,7 +72,7 @@ void WrappedStockProperty::setPropertyValue( const css::uno::Any& rOuterValue, c { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "stock properties require type sal_Bool", nullptr, 0 ); + throw lang::IllegalArgumentException( u"stock properties require type sal_Bool"_ustr, nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -126,7 +126,7 @@ public: } WrappedVolumeProperty::WrappedVolumeProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact) - : WrappedStockProperty( "Volume", uno::Any(false) , spChart2ModelContact ) + : WrappedStockProperty( u"Volume"_ustr, uno::Any(false) , spChart2ModelContact ) { } @@ -166,16 +166,16 @@ rtl::Reference< ::chart::ChartTypeTemplate > WrappedVolumeProperty::getNewTempla if( bNewValue ) //add volume { if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockVolumeLowHighClose"_ustr ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockVolumeOpenLowHighClose"_ustr ); } else //remove volume { if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockLowHighClose"_ustr ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockOpenLowHighClose"_ustr ); } return xTemplate; } @@ -195,7 +195,7 @@ public: } WrappedUpDownProperty::WrappedUpDownProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact) - : WrappedStockProperty( "UpDown", uno::Any(false) , spChart2ModelContact ) + : WrappedStockProperty( u"UpDown"_ustr, uno::Any(false) , spChart2ModelContact ) { } @@ -230,16 +230,16 @@ rtl::Reference< ::chart::ChartTypeTemplate > WrappedUpDownProperty::getNewTempla if( bNewValue ) //add open series { if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockOpenLowHighClose"_ustr ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockVolumeOpenLowHighClose"_ustr ); } else //remove open series { if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockLowHighClose"_ustr ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) - xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" ); + xTemplate = xFactory->createTemplate( u"com.sun.star.chart2.template.StockVolumeLowHighClose"_ustr ); } return xTemplate; } diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index 79c45ea1d888..209300f2f682 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -216,7 +216,7 @@ void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< std:: WrappedSymbolTypeProperty::WrappedSymbolTypeProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< sal_Int32 >( "SymbolType" + : WrappedSeriesOrDiagramProperty< sal_Int32 >( u"SymbolType"_ustr , uno::Any( css::chart::ChartSymbolType::NONE ) , spChart2ModelContact , ePropertyType ) @@ -228,7 +228,7 @@ sal_Int32 WrappedSymbolTypeProperty::getValueFromSeries( const Reference< beans: sal_Int32 aRet = 0; m_aDefaultValue >>= aRet; chart2::Symbol aSymbol; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) ) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol ) ) aRet = lcl_getSymbolType( aSymbol ); return aRet; } @@ -239,10 +239,10 @@ void WrappedSymbolTypeProperty::setValueToSeries( const Reference< beans::XPrope return; chart2::Symbol aSymbol; - xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol; + xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol; lcl_setSymbolTypeToSymbol( nSymbolType, aSymbol ); - xSeriesPropertySet->setPropertyValue( "Symbol", uno::Any( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( u"Symbol"_ustr, uno::Any( aSymbol ) ); } Any WrappedSymbolTypeProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const @@ -297,7 +297,7 @@ beans::PropertyState WrappedSymbolTypeProperty::getPropertyState( const Referenc WrappedSymbolBitmapURLProperty::WrappedSymbolBitmapURLProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty<OUString>("SymbolBitmapURL", + : WrappedSeriesOrDiagramProperty<OUString>(u"SymbolBitmapURL"_ustr, uno::Any(OUString()), spChart2ModelContact, ePropertyType) { } @@ -315,13 +315,13 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( return; chart2::Symbol aSymbol; - if (xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol) + if (xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) { if (!xNewGraphicURL.isEmpty()) { Graphic aGraphic = vcl::graphic::loadFromURL(xNewGraphicURL); aSymbol.Graphic.set(aGraphic.GetXGraphic()); - xSeriesPropertySet->setPropertyValue("Symbol", uno::Any(aSymbol)); + xSeriesPropertySet->setPropertyValue(u"Symbol"_ustr, uno::Any(aSymbol)); } } } @@ -329,7 +329,7 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( WrappedSymbolBitmapProperty::WrappedSymbolBitmapProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty<uno::Reference<graphic::XGraphic>>("SymbolBitmap", + : WrappedSeriesOrDiagramProperty<uno::Reference<graphic::XGraphic>>(u"SymbolBitmap"_ustr, uno::Any(uno::Reference<graphic::XGraphic>()), spChart2ModelContact, ePropertyType) { } @@ -340,7 +340,7 @@ uno::Reference<graphic::XGraphic> WrappedSymbolBitmapProperty::getValueFromSerie m_aDefaultValue >>= xGraphic; chart2::Symbol aSymbol; - if (xSeriesPropertySet.is() && (xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol) + if (xSeriesPropertySet.is() && (xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) && aSymbol.Graphic.is()) { xGraphic = aSymbol.Graphic; @@ -356,12 +356,12 @@ void WrappedSymbolBitmapProperty::setValueToSeries( return; chart2::Symbol aSymbol; - if (xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol) + if (xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) { if (xNewGraphic.is()) { aSymbol.Graphic.set(xNewGraphic); - xSeriesPropertySet->setPropertyValue("Symbol", uno::Any(aSymbol)); + xSeriesPropertySet->setPropertyValue(u"Symbol"_ustr, uno::Any(aSymbol)); } } } @@ -389,7 +389,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) bool bFoundSize = false; try { - if( xProp->getPropertyValue( "Size100thMM" ) >>= aSize ) + if( xProp->getPropertyValue( u"Size100thMM"_ustr ) >>= aSize ) { if( aSize.Width == 0 && aSize.Height == 0 ) aSize = aDefaultSize; @@ -405,7 +405,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) if(!bFoundSize) { awt::Size aAWTPixelSize(10,10); - if( xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize ) + if( xProp->getPropertyValue( u"SizePixel"_ustr ) >>= aAWTPixelSize ) { Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height); Size aNewSize = o3tl::convert(aPixelSize, o3tl::Length::pt, o3tl::Length::mm100); @@ -430,7 +430,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) WrappedSymbolSizeProperty::WrappedSymbolSizeProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< awt::Size >( "SymbolSize" + : WrappedSeriesOrDiagramProperty< awt::Size >( u"SymbolSize"_ustr , uno::Any( awt::Size(250,250) ), spChart2ModelContact, ePropertyType ) { } @@ -440,7 +440,7 @@ awt::Size WrappedSymbolSizeProperty::getValueFromSeries( const Reference< beans: awt::Size aRet; m_aDefaultValue >>= aRet; chart2::Symbol aSymbol; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol )) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol )) aRet = aSymbol.Size; return aRet; } @@ -453,11 +453,11 @@ void WrappedSymbolSizeProperty::setValueToSeries( return; chart2::Symbol aSymbol; - if( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) + if( xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol ) { aSymbol.Size = aNewSize; lcl_correctSymbolSizeForBitmaps(aSymbol); - xSeriesPropertySet->setPropertyValue( "Symbol", uno::Any( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( u"Symbol"_ustr, uno::Any( aSymbol ) ); } } @@ -471,7 +471,7 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc { chart2::Symbol aSymbol; Reference< beans::XPropertySet > xSeriesPropertySet( xInnerPropertyState, uno::UNO_QUERY ); - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol )) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymbol )) { if( aSymbol.Style != chart2::SymbolStyle_NONE ) return beans::PropertyState_DIRECT_VALUE; @@ -487,7 +487,7 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc WrappedSymbolAndLinesProperty::WrappedSymbolAndLinesProperty( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< bool >( "Lines" + : WrappedSeriesOrDiagramProperty< bool >( u"Lines"_ustr , uno::Any( true ), spChart2ModelContact, ePropertyType ) { } @@ -506,17 +506,17 @@ void WrappedSymbolAndLinesProperty::setValueToSeries( return; drawing::LineStyle eOldLineStyle( drawing::LineStyle_SOLID ); - xSeriesPropertySet->getPropertyValue( "LineStyle" ) >>= eOldLineStyle; + xSeriesPropertySet->getPropertyValue( u"LineStyle"_ustr ) >>= eOldLineStyle; if( bDrawLines ) { //#i114298# don't overwrite dashed lines with solid lines here if( eOldLineStyle == drawing::LineStyle_NONE ) - xSeriesPropertySet->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) ); + xSeriesPropertySet->setPropertyValue( u"LineStyle"_ustr, uno::Any( drawing::LineStyle_SOLID ) ); } else { if( eOldLineStyle != drawing::LineStyle_NONE ) - xSeriesPropertySet->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ) ); + xSeriesPropertySet->setPropertyValue( u"LineStyle"_ustr, uno::Any( drawing::LineStyle_NONE ) ); } } diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx index c35a75e31a54..850e916eaf0f 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx @@ -28,7 +28,7 @@ namespace chart { WrappedTextRotationProperty::WrappedTextRotationProperty( bool bDirectState ) - : ::chart::WrappedProperty( "TextRotation" , "TextRotation" ) + : ::chart::WrappedProperty( u"TextRotation"_ustr , u"TextRotation"_ustr ) , m_bDirectState( bDirectState ) { } |