diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-06 18:28:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 08:46:21 +0200 |
commit | 1de066d04f73a0e901e875597b8244a3ecdf624c (patch) | |
tree | 4a69bed8e8d1dd22e9a317f8718940c459373474 /chart2/source/controller | |
parent | 4d97239b7a92c8dc1c1ee9a6474768ed1e744ef5 (diff) |
loplugin:ostr in chart2
Change-Id: I2985b6793a776639214a25bf9732c000b9026bfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167236
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'chart2/source/controller')
120 files changed, 1668 insertions, 1663 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index e1f583a578ee..a823cf25c003 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -94,7 +94,7 @@ bool AccessibleBase::CheckDisposeState( bool bThrowException /* default: true */ if( bThrowException && m_bIsDisposed ) { - throw lang::DisposedException("component has state DEFUNC", + throw lang::DisposedException(u"component has state DEFUNC"_ustr, static_cast< uno::XWeak * >( const_cast< AccessibleBase * >( this ))); } return m_bIsDisposed; @@ -789,7 +789,7 @@ Color AccessibleBase::getColor( eColorType eColType ) // ________ AccessibleBase::XServiceInfo ________ OUString SAL_CALL AccessibleBase::getImplementationName() { - return "AccessibleBase"; + return u"AccessibleBase"_ustr; } sal_Bool SAL_CALL AccessibleBase::supportsService( const OUString& ServiceName ) @@ -800,8 +800,8 @@ sal_Bool SAL_CALL AccessibleBase::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL AccessibleBase::getSupportedServiceNames() { return { - "com.sun.star.accessibility.Accessible", - "com.sun.star.accessibility.AccessibleContext" + u"com.sun.star.accessibility.Accessible"_ustr, + u"com.sun.star.accessibility.AccessibleContext"_ustr }; } diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx index d3b98c102f76..ddc727277978 100644 --- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx @@ -122,7 +122,7 @@ sal_Int64 AccessibleChartElement::ImplGetAccessibleChildCount() const // ________ XServiceInfo ________ OUString SAL_CALL AccessibleChartElement::getImplementationName() { - return "AccessibleChartElement"; + return u"AccessibleChartElement"_ustr; } // ________ AccessibleChartElement::XAccessibleContext (override) ________ diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx index 771698a84010..f0ebacf77a86 100644 --- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx @@ -74,7 +74,7 @@ AccessibleChartShape::~AccessibleChartShape() // ________ XServiceInfo ________ OUString AccessibleChartShape::getImplementationName() { - return "AccessibleChartShape"; + return u"AccessibleChartShape"_ustr; } // ________ XAccessibleContext ________ diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 8f01816a6504..fe83052f472b 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -266,7 +266,7 @@ void AccessibleChartView::initialize( ChartController& rNewChartController, { AccessibleElementInfo aAccInfo; - aAccInfo.m_aOID = ObjectIdentifier("ROOT"); + aAccInfo.m_aOID = ObjectIdentifier(u"ROOT"_ustr); aAccInfo.m_xChartDocument = m_xChartModel; aAccInfo.m_xChartController = m_xChartController; aAccInfo.m_xView = m_xChartView; @@ -361,7 +361,7 @@ void AccessibleChartView::initialize() { AccessibleElementInfo aAccInfo; - aAccInfo.m_aOID = ObjectIdentifier("ROOT"); + aAccInfo.m_aOID = ObjectIdentifier(u"ROOT"_ustr); aAccInfo.m_xChartDocument = m_xChartModel; aAccInfo.m_xChartController = m_xChartController; aAccInfo.m_xView = m_xChartView; 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 ) { } diff --git a/chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx b/chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx index 91307afaad3d..3e426c4e02c9 100644 --- a/chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx +++ b/chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx @@ -32,11 +32,12 @@ const sal_uInt16 CUBIC_SPLINE_POS = 0; const sal_uInt16 B_SPLINE_POS = 1; SplinePropertiesDialog::SplinePropertiesDialog(weld::Window* pParent) - : GenericDialogController(pParent, "modules/schart/ui/smoothlinesdlg.ui", "SmoothLinesDialog") - , m_xLB_Spline_Type(m_xBuilder->weld_combo_box("SplineTypeComboBox")) - , m_xMF_SplineResolution(m_xBuilder->weld_spin_button("ResolutionSpinbutton")) - , m_xFT_SplineOrder(m_xBuilder->weld_label("PolynomialsLabel")) - , m_xMF_SplineOrder(m_xBuilder->weld_spin_button("PolynomialsSpinButton")) + : GenericDialogController(pParent, u"modules/schart/ui/smoothlinesdlg.ui"_ustr, + u"SmoothLinesDialog"_ustr) + , m_xLB_Spline_Type(m_xBuilder->weld_combo_box(u"SplineTypeComboBox"_ustr)) + , m_xMF_SplineResolution(m_xBuilder->weld_spin_button(u"ResolutionSpinbutton"_ustr)) + , m_xFT_SplineOrder(m_xBuilder->weld_label(u"PolynomialsLabel"_ustr)) + , m_xMF_SplineOrder(m_xBuilder->weld_spin_button(u"PolynomialsSpinButton"_ustr)) { m_xDialog->set_title(SchResId(STR_DLG_SMOOTH_LINE_PROPERTIES)); @@ -85,11 +86,12 @@ IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox&, v } SteppedPropertiesDialog::SteppedPropertiesDialog(weld::Window* pParent) - : GenericDialogController(pParent, "modules/schart/ui/steppedlinesdlg.ui", "SteppedLinesDialog") - , m_xRB_Start(m_xBuilder->weld_radio_button("step_start_rb")) - , m_xRB_End(m_xBuilder->weld_radio_button("step_end_rb")) - , m_xRB_CenterX(m_xBuilder->weld_radio_button("step_center_x_rb")) - , m_xRB_CenterY(m_xBuilder->weld_radio_button("step_center_y_rb")) + : GenericDialogController(pParent, u"modules/schart/ui/steppedlinesdlg.ui"_ustr, + u"SteppedLinesDialog"_ustr) + , m_xRB_Start(m_xBuilder->weld_radio_button(u"step_start_rb"_ustr)) + , m_xRB_End(m_xBuilder->weld_radio_button(u"step_end_rb"_ustr)) + , m_xRB_CenterX(m_xBuilder->weld_radio_button(u"step_center_x_rb"_ustr)) + , m_xRB_CenterY(m_xBuilder->weld_radio_button(u"step_center_y_rb"_ustr)) { m_xDialog->set_title(SchResId(STR_DLG_STEPPED_LINE_PROPERTIES)); } diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx b/chart2/source/controller/dialogs/ChartResourceGroups.cxx index e1550d2766c7..a684b481c07d 100644 --- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx +++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx @@ -29,8 +29,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; Dim3DLookResourceGroup::Dim3DLookResourceGroup(weld::Builder* pBuilder) - : m_xCB_3DLook(pBuilder->weld_check_button("3dlook")) - , m_xLB_Scheme(pBuilder->weld_combo_box("3dscheme")) + : m_xCB_3DLook(pBuilder->weld_check_button(u"3dlook"_ustr)) + , m_xLB_Scheme(pBuilder->weld_combo_box(u"3dscheme"_ustr)) { m_xCB_3DLook->connect_toggled(LINK(this, Dim3DLookResourceGroup, Dim3DLookCheckHdl)); m_xLB_Scheme->connect_changed(LINK(this, Dim3DLookResourceGroup, SelectSchemeHdl)); @@ -87,7 +87,7 @@ IMPL_LINK_NOARG(Dim3DLookResourceGroup, SelectSchemeHdl, weld::ComboBox&, void) } SortByXValuesResourceGroup::SortByXValuesResourceGroup(weld::Builder* pBuilder) - : m_xCB_XValueSorting(pBuilder->weld_check_button("sort")) + : m_xCB_XValueSorting(pBuilder->weld_check_button(u"sort"_ustr)) { m_xCB_XValueSorting->connect_toggled( LINK(this, SortByXValuesResourceGroup, SortByXValuesCheckHdl)); @@ -115,10 +115,10 @@ IMPL_LINK_NOARG(SortByXValuesResourceGroup, SortByXValuesCheckHdl, weld::Togglea } StackingResourceGroup::StackingResourceGroup(weld::Builder* pBuilder) - : m_xCB_Stacked(pBuilder->weld_check_button("stack")) - , m_xRB_Stack_Y(pBuilder->weld_radio_button("ontop")) - , m_xRB_Stack_Y_Percent(pBuilder->weld_radio_button("percent")) - , m_xRB_Stack_Z(pBuilder->weld_radio_button("deep")) + : m_xCB_Stacked(pBuilder->weld_check_button(u"stack"_ustr)) + , m_xRB_Stack_Y(pBuilder->weld_radio_button(u"ontop"_ustr)) + , m_xRB_Stack_Y_Percent(pBuilder->weld_radio_button(u"percent"_ustr)) + , m_xRB_Stack_Z(pBuilder->weld_radio_button(u"deep"_ustr)) { m_xCB_Stacked->connect_toggled(LINK(this, StackingResourceGroup, StackingEnableHdl)); m_xRB_Stack_Y->connect_toggled(LINK(this, StackingResourceGroup, StackingChangeHdl)); @@ -198,9 +198,9 @@ IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl, weld::Toggleable&, voi SplineResourceGroup::SplineResourceGroup(weld::Builder* pBuilder, weld::Window* pParent) : m_pParent(pParent) - , m_xFT_LineType(pBuilder->weld_label("linetypeft")) - , m_xLB_LineType(pBuilder->weld_combo_box("linetype")) - , m_xPB_DetailsDialog(pBuilder->weld_button("properties")) + , m_xFT_LineType(pBuilder->weld_label(u"linetypeft"_ustr)) + , m_xLB_LineType(pBuilder->weld_combo_box(u"linetype"_ustr)) + , m_xPB_DetailsDialog(pBuilder->weld_button(u"properties"_ustr)) { m_xLB_LineType->connect_changed(LINK(this, SplineResourceGroup, LineTypeChangeHdl)); } diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 35284fbb6bfc..12ad91e3aa1b 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -147,7 +147,7 @@ ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService( try { - xTemplateProps->getPropertyValue( "Geometry3D" ) >>= aRet.nGeometry3D; + xTemplateProps->getPropertyValue( u"Geometry3D"_ustr ) >>= aRet.nGeometry3D; } catch( uno::Exception& ex ) { @@ -281,7 +281,7 @@ rtl::Reference< ChartTypeTemplate > ChartTypeDialogController::getCurrentTemplat } try { - xTemplateProps->setPropertyValue( "Geometry3D" , uno::Any(rParameter.nGeometry3D) ); + xTemplateProps->setPropertyValue( u"Geometry3D"_ustr , uno::Any(rParameter.nGeometry3D) ); } catch( uno::Exception & ex ) { @@ -1130,11 +1130,11 @@ void CombiColumnLineChartDialogController::showExtraControls(weld::Builder* pBui { if (!m_xFT_NumberOfLines) { - m_xFT_NumberOfLines = pBuilder->weld_label("nolinesft"); + m_xFT_NumberOfLines = pBuilder->weld_label(u"nolinesft"_ustr); } if (!m_xMF_NumberOfLines) { - m_xMF_NumberOfLines = pBuilder->weld_spin_button("nolines"); + m_xMF_NumberOfLines = pBuilder->weld_spin_button(u"nolines"_ustr); m_xMF_NumberOfLines->set_increments(1, 10); m_xMF_NumberOfLines->set_range(1, 100); @@ -1171,7 +1171,7 @@ void CombiColumnLineChartDialogController::fillExtraControls( { try { - xTemplateProps->getPropertyValue( "NumberOfLines" ) >>= nNumLines; + xTemplateProps->getPropertyValue( u"NumberOfLines"_ustr ) >>= nNumLines; } catch( const uno::Exception & ) { @@ -1192,7 +1192,7 @@ void CombiColumnLineChartDialogController::setTemplateProperties( const uno::Ref if( xTemplateProps.is() ) { sal_Int32 nNumLines = m_xMF_NumberOfLines->get_value(); - xTemplateProps->setPropertyValue( "NumberOfLines" , uno::Any(nNumLines) ); + xTemplateProps->setPropertyValue( u"NumberOfLines"_ustr , uno::Any(nNumLines) ); } } diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 30182b95eeb8..db25ada7c1ff 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -233,15 +233,15 @@ private: SeriesHeader::SeriesHeader(weld::Container* pParent, weld::Container* pColorParent) : m_aUpdateDataTimer( "SeriesHeader UpdateDataTimer" ) - , m_xBuilder1(Application::CreateBuilder(pParent, "modules/schart/ui/columnfragment.ui")) - , m_xBuilder2(Application::CreateBuilder(pColorParent, "modules/schart/ui/imagefragment.ui")) + , m_xBuilder1(Application::CreateBuilder(pParent, u"modules/schart/ui/columnfragment.ui"_ustr)) + , m_xBuilder2(Application::CreateBuilder(pColorParent, u"modules/schart/ui/imagefragment.ui"_ustr)) , m_pParent(pParent) , m_pColorParent(pColorParent) - , m_xContainer1(m_xBuilder1->weld_container("container")) - , m_xContainer2(m_xBuilder2->weld_container("container")) - , m_spSymbol(m_xBuilder1->weld_image("image")) - , m_spSeriesName(new SeriesHeaderEdit(m_xBuilder1->weld_entry("entry"))) - , m_spColorBar(m_xBuilder2->weld_image("image")) + , m_xContainer1(m_xBuilder1->weld_container(u"container"_ustr)) + , m_xContainer2(m_xBuilder2->weld_container(u"container"_ustr)) + , m_spSymbol(m_xBuilder1->weld_image(u"image"_ustr)) + , m_spSeriesName(new SeriesHeaderEdit(m_xBuilder1->weld_entry(u"entry"_ustr))) + , m_spColorBar(m_xBuilder2->weld_image(u"image"_ustr)) , m_xDevice(Application::GetDefaultDevice()) , m_nStartCol( 0 ) , m_nEndCol( 0 ) @@ -642,14 +642,14 @@ void DataBrowser::RenewTable() Color nColor; // @todo: Set "DraftColor", i.e. interpolated colors for gradients, bitmaps, etc. if( elemHeader.m_xDataSeries.is() && - ( elemHeader.m_xDataSeries->getPropertyValue( "Color" ) >>= nColor )) + ( elemHeader.m_xDataSeries->getPropertyValue( u"Color"_ustr ) >>= nColor )) spHeader->SetColor( nColor ); spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis ); spHeader->SetSeriesName( elemHeader.m_xDataSeries->getLabelForRole( elemHeader.m_xChartType.is() ? elemHeader.m_xChartType->getRoleOfSequenceForSeriesLabel() : - OUString("values-y"))); + u"values-y"_ustr)); // index is 1-based, as 0 is for the column that contains the row-numbers spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 ); spHeader->SetGetFocusHdl( aFocusLink ); @@ -1266,14 +1266,14 @@ void DataBrowser::RenewSeriesHeaders() auto spHeader = std::make_shared<impl::SeriesHeader>( m_pColumnsWin, m_pColorsWin ); Color nColor; if( elemHeader.m_xDataSeries.is() && - ( elemHeader.m_xDataSeries->getPropertyValue( "Color" ) >>= nColor )) + ( elemHeader.m_xDataSeries->getPropertyValue( u"Color"_ustr ) >>= nColor )) spHeader->SetColor( nColor ); spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis ); spHeader->SetSeriesName( elemHeader.m_xDataSeries->getLabelForRole( elemHeader.m_xChartType.is() ? elemHeader.m_xChartType->getRoleOfSequenceForSeriesLabel() : - OUString( "values-y"))); + u"values-y"_ustr)); spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 ); spHeader->SetGetFocusHdl( aFocusLink ); spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink ); diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index 938da978dd07..1db3abc60c9a 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -67,7 +67,7 @@ OUString lcl_getRole( { try { - xProp->getPropertyValue( "Role" ) >>= aResult; + xProp->getPropertyValue( u"Role"_ustr ) >>= aResult; } catch( const uno::Exception & ) { @@ -859,7 +859,7 @@ void DataBrowserModel::updateFromModel() bool bSwapXAndYAxis = false; try { - coords->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndYAxis; + coords->getPropertyValue( u"SwapXAndYAxis"_ustr ) >>= bSwapXAndYAxis; } catch( const beans::UnknownPropertyException & ) {} diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 4c888e8ed5b6..3abf2b6b0a6a 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -99,21 +99,21 @@ lcl_tRoleIndexMap lcl_createRoleIndexMap() lcl_tRoleIndexMap aMap; sal_Int32 nIndex = 0; - aMap[ "label" ] = ++nIndex; - aMap[ "categories" ] = ++nIndex; - aMap[ "values-x" ] = ++nIndex; - aMap[ "values-y" ] = ++nIndex; - aMap[ "error-bars-x" ] = ++nIndex; - aMap[ "error-bars-x-positive" ] = ++nIndex; - aMap[ "error-bars-x-negative" ] = ++nIndex; - aMap[ "error-bars-y" ] = ++nIndex; - aMap[ "error-bars-y-positive" ] = ++nIndex; - aMap[ "error-bars-y-negative" ] = ++nIndex; - aMap[ "values-first" ] = ++nIndex; - aMap[ "values-min" ] = ++nIndex; - aMap[ "values-max" ] = ++nIndex; - aMap[ "values-last" ] = ++nIndex; - aMap[ "values-size" ] = ++nIndex; + aMap[ u"label"_ustr ] = ++nIndex; + aMap[ u"categories"_ustr ] = ++nIndex; + aMap[ u"values-x"_ustr ] = ++nIndex; + aMap[ u"values-y"_ustr ] = ++nIndex; + aMap[ u"error-bars-x"_ustr ] = ++nIndex; + aMap[ u"error-bars-x-positive"_ustr ] = ++nIndex; + aMap[ u"error-bars-x-negative"_ustr ] = ++nIndex; + aMap[ u"error-bars-y"_ustr ] = ++nIndex; + aMap[ u"error-bars-y-positive"_ustr ] = ++nIndex; + aMap[ u"error-bars-y-negative"_ustr ] = ++nIndex; + aMap[ u"values-first"_ustr ] = ++nIndex; + aMap[ u"values-min"_ustr ] = ++nIndex; + aMap[ u"values-max"_ustr ] = ++nIndex; + aMap[ u"values-last"_ustr ] = ++nIndex; + aMap[ u"values-size"_ustr ] = ++nIndex; return aMap; } @@ -142,7 +142,7 @@ struct lcl_RolesWithRangeAppend { OUString aRole; Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW ); - if( xProp->getPropertyValue( "Role" ) >>= aRole ) + if( xProp->getPropertyValue( u"Role"_ustr ) >>= aRole ) { m_rDestCnt->emplace(aRole, xSeq->getSourceRangeRepresentation()); // label @@ -199,7 +199,7 @@ void lcl_SetSequenceRole( { Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY ); if( xProp.is()) - xProp->setPropertyValue( "Role" , uno::Any( rRole )); + xProp->setPropertyValue( u"Role"_ustr , uno::Any( rRole )); } Sequence< OUString > lcl_CopyExcludingValuesFirst( @@ -240,7 +240,7 @@ rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries( // without setting it as hard attribute Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme()); if( xColorScheme.is()) - xResult->setPropertyValue( "Color" , uno::Any( xColorScheme->getColorByIndex( nNewSeriesIndex ))); + xResult->setPropertyValue( u"Color"_ustr , uno::Any( xColorScheme->getColorByIndex( nNewSeriesIndex ))); std::size_t nGroupIndex=0; if( xChartType.is()) { @@ -273,7 +273,7 @@ rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries( if( xInterpreter.is()) { sal_Int32 nStockVariant; - if( xInterpreter->getChartTypeSpecificData("stock variant") >>= nStockVariant ) + if( xInterpreter->getChartTypeSpecificData(u"stock variant"_ustr) >>= nStockVariant ) { if( nStockVariant == 0 || nStockVariant == 2) { //delete "values-first" role @@ -799,7 +799,7 @@ void DialogModel::applyInterpretedData( // without setting it as hard attribute Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme()); if( xColorScheme.is()) - aSeries[nSeries]->setPropertyValue( "Color" , + aSeries[nSeries]->setPropertyValue( u"Color"_ustr , uno::Any( xColorScheme->getColorByIndex( nSeriesCounter ))); } m_xTemplate->applyStyle2( aSeries[nSeries], nGroup, nNewSeriesIndex++, nSeriesInGroup ); diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index f06c7af5e777..0178a725e384 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -81,7 +81,7 @@ OUString lcl_getDataSeriesName( std::u16string_view rObjectCID, const rtl::Refer OUString lcl_getFullSeriesName( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel ) { OUString aRet(SchResId(STR_TIP_DATASERIES)); - OUString aWildcard( "%SERIESNAME" ); + OUString aWildcard( u"%SERIESNAME"_ustr ); sal_Int32 nIndex = aRet.indexOf( aWildcard ); if( nIndex != -1 ) aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), lcl_getDataSeriesName( rObjectCID, xChartModel ) ); @@ -131,7 +131,7 @@ OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries, uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY ); if( xProp.is()) { - uno::Any aARole = xProp->getPropertyValue( "Role" ); + uno::Any aARole = xProp->getPropertyValue( u"Role"_ustr ); OUString aRole; aARole >>= aRole; @@ -199,7 +199,7 @@ OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries, aRet = aX; } - OUString aSeparator( " " ); + OUString aSeparator( u" "_ustr ); lcl_addText( aRet, aSeparator, aY ); lcl_addText( aRet, aSeparator, aY_First ); @@ -513,7 +513,7 @@ OUString ObjectNameProvider::getHelpText( std::u16string_view rObjectCID, const sal_Int32 nPointIndex = o3tl::toInt32(ObjectIdentifier::getParticleID(rObjectCID)); //replace data point index - OUString aWildcard( "%POINTNUMBER" ); + OUString aWildcard( u"%POINTNUMBER"_ustr ); sal_Int32 nIndex = aRet.indexOf( aWildcard ); if( nIndex != -1 ) { @@ -575,23 +575,23 @@ OUString ObjectNameProvider::getHelpText( std::u16string_view rObjectCID, const sal_Int32 aMovingType = css::chart2::MovingAverageType::Prior; bool bForceIntercept = false; double aInterceptValue = 0.0; - OUString aXName ("x"), aYName ("f(x)"); + OUString aXName (u"x"_ustr), aYName (u"f(x)"_ustr); const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper(); const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep(); sal_Unicode cDecSeparator = aNumDecimalSep[0]; - xCurve->getPropertyValue( "PolynomialDegree") >>= aDegree; - xCurve->getPropertyValue( "MovingAveragePeriod") >>= aPeriod; - xCurve->getPropertyValue( "MovingAverageType") >>= aMovingType; - xCurve->getPropertyValue( "ForceIntercept") >>= bForceIntercept; + xCurve->getPropertyValue( u"PolynomialDegree"_ustr) >>= aDegree; + xCurve->getPropertyValue( u"MovingAveragePeriod"_ustr) >>= aPeriod; + xCurve->getPropertyValue( u"MovingAverageType"_ustr) >>= aMovingType; + xCurve->getPropertyValue( u"ForceIntercept"_ustr) >>= bForceIntercept; if (bForceIntercept) - xCurve->getPropertyValue( "InterceptValue") >>= aInterceptValue; + xCurve->getPropertyValue( u"InterceptValue"_ustr) >>= aInterceptValue; uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); if( xEqProp.is()) { - if ( !(xEqProp->getPropertyValue( "XName") >>= aXName) ) + if ( !(xEqProp->getPropertyValue( u"XName"_ustr) >>= aXName) ) aXName = "x"; - if ( !(xEqProp->getPropertyValue( "YName") >>= aYName) ) + if ( !(xEqProp->getPropertyValue( u"YName"_ustr) >>= aYName) ) aYName = "f(x)"; } xCalculator->setRegressionProperties(aDegree, bForceIntercept, aInterceptValue, aPeriod, aMovingType); @@ -606,7 +606,7 @@ OUString ObjectNameProvider::getHelpText( std::u16string_view rObjectCID, const else { // replace formula - OUString aWildcard = "%FORMULA"; + OUString aWildcard = u"%FORMULA"_ustr; sal_Int32 nIndex = aRet.indexOf( aWildcard ); if( nIndex != -1 ) { @@ -674,7 +674,7 @@ OUString ObjectNameProvider::getHelpText( std::u16string_view rObjectCID, const const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep(); sal_Unicode cDecSeparator = aNumDecimalSep[0]; - OUString aWildcard( "%AVERAGE_VALUE" ); + OUString aWildcard( u"%AVERAGE_VALUE"_ustr ); sal_Int32 nIndex = aRet.indexOf( aWildcard ); // as the curve is constant, the value at any x-value is ok if( nIndex != -1 ) diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx index 00e9a3cc8a8c..1ae7b3377b25 100644 --- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx +++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx @@ -112,17 +112,17 @@ bool RangeSelectionHelper::chooseRange( { Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( - "InitialValue", -1, uno::Any( aCurrentRange ), + u"InitialValue"_ustr, -1, uno::Any( aCurrentRange ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "Title", -1, + u"Title"_ustr, -1, uno::Any( aUIString ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "CloseOnMouseRelease", -1, uno::Any( true ), + u"CloseOnMouseRelease"_ustr, -1, uno::Any( true ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "MultiSelectionMode", -1, uno::Any( true ), + u"MultiSelectionMode"_ustr, -1, uno::Any( true ), beans::PropertyState_DIRECT_VALUE ) }; if( m_xRangeSelectionListener.is() ) diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index a1f52f5169a5..837f3f3acc25 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -28,9 +28,10 @@ using namespace ::com::sun::star; ChartTypeDialog::ChartTypeDialog(weld::Window* pParent, rtl::Reference<::chart::ChartModel> xChartModel) - : GenericDialogController(pParent, "modules/schart/ui/charttypedialog.ui", "ChartTypeDialog") + : GenericDialogController(pParent, u"modules/schart/ui/charttypedialog.ui"_ustr, + u"ChartTypeDialog"_ustr) , m_xChartModel(std::move(xChartModel)) - , m_xContentArea(m_xBuilder->weld_container("content")) + , m_xContentArea(m_xBuilder->weld_container(u"content"_ustr)) { m_xChartTypeTabPage = std::make_unique<ChartTypeTabPage>( m_xContentArea.get(), this, m_xChartModel, false /*don't show title description*/); diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 3a1fa1386f7a..e3c540743ff0 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -285,10 +285,10 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue(const OUString& rPropertyNa else if( rPropertyName == "UnlockControllersOnExecute" ) { if( ! (rValue >>= m_bUnlockControllersOnExecute) ) - throw lang::IllegalArgumentException( "Property 'UnlockControllers' requires value of type boolean" , nullptr, 0 ); + throw lang::IllegalArgumentException( u"Property 'UnlockControllers' requires value of type boolean"_ustr , nullptr, 0 ); } else - throw beans::UnknownPropertyException( "unknown property was tried to set to chart wizard" , nullptr ); + throw beans::UnknownPropertyException( u"unknown property was tried to set to chart wizard"_ustr , nullptr ); } uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPropertyName ) @@ -325,7 +325,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope aRet <<= m_bUnlockControllersOnExecute; } else - throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard" , nullptr ); + throw beans::UnknownPropertyException( u"unknown property was tried to get from chart wizard"_ustr , nullptr ); return aRet; } diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index ee120df76fe7..a62a9d712693 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -33,15 +33,15 @@ namespace chart DataEditor::DataEditor(weld::Window* pParent, rtl::Reference<::chart::ChartModel> xChartDoc, const Reference< uno::XComponentContext > & xContext) - : GenericDialogController(pParent, "modules/schart/ui/chartdatadialog.ui", "ChartDataDialog") + : GenericDialogController(pParent, u"modules/schart/ui/chartdatadialog.ui"_ustr, u"ChartDataDialog"_ustr) , m_bReadOnly(false) , m_xChartDoc(std::move(xChartDoc)) , m_xContext(xContext) - , m_xTbxData(m_xBuilder->weld_toolbar("toolbar")) - , m_xCloseBtn(m_xBuilder->weld_button("close")) - , m_xTable(m_xBuilder->weld_container("datawindow")) - , m_xColumns(m_xBuilder->weld_container("columns")) - , m_xColors(m_xBuilder->weld_container("colorcolumns")) + , m_xTbxData(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_button(u"close"_ustr)) + , m_xTable(m_xBuilder->weld_container(u"datawindow"_ustr)) + , m_xColumns(m_xBuilder->weld_container(u"columns"_ustr)) + , m_xColors(m_xBuilder->weld_container(u"colorcolumns"_ustr)) , m_xTableCtrlParent(m_xTable->CreateChildFrame()) , m_xBrwData(VclPtr<DataBrowser>::Create(m_xTableCtrlParent, m_xColumns.get(), m_xColors.get())) { @@ -103,16 +103,16 @@ IMPL_LINK_NOARG(DataEditor, BrowserCursorMovedHdl, DataBrowser*, void) bool bIsDataValid = m_xBrwData->IsEnableItem(); - m_xTbxData->set_item_sensitive("InsertRow", bIsDataValid && m_xBrwData->MayInsertRow() ); - m_xTbxData->set_item_sensitive("InsertColumn", bIsDataValid && m_xBrwData->MayInsertColumn() ); - m_xTbxData->set_item_sensitive("InsertTextColumn", bIsDataValid && m_xBrwData->MayInsertColumn() ); - m_xTbxData->set_item_sensitive("RemoveRow", m_xBrwData->MayDeleteRow() ); - m_xTbxData->set_item_sensitive("RemoveColumn", m_xBrwData->MayDeleteColumn() ); + m_xTbxData->set_item_sensitive(u"InsertRow"_ustr, bIsDataValid && m_xBrwData->MayInsertRow() ); + m_xTbxData->set_item_sensitive(u"InsertColumn"_ustr, bIsDataValid && m_xBrwData->MayInsertColumn() ); + m_xTbxData->set_item_sensitive(u"InsertTextColumn"_ustr, bIsDataValid && m_xBrwData->MayInsertColumn() ); + m_xTbxData->set_item_sensitive(u"RemoveRow"_ustr, m_xBrwData->MayDeleteRow() ); + m_xTbxData->set_item_sensitive(u"RemoveColumn"_ustr, m_xBrwData->MayDeleteColumn() ); - m_xTbxData->set_item_sensitive("MoveLeftColumn", bIsDataValid && m_xBrwData->MayMoveLeftColumns() ); - m_xTbxData->set_item_sensitive("MoveRightColumn", bIsDataValid && m_xBrwData->MayMoveRightColumns() ); - m_xTbxData->set_item_sensitive("MoveDownRow", bIsDataValid && m_xBrwData->MayMoveDownRows() ); - m_xTbxData->set_item_sensitive("MoveUpRow", bIsDataValid && m_xBrwData->MayMoveUpRows() ); + m_xTbxData->set_item_sensitive(u"MoveLeftColumn"_ustr, bIsDataValid && m_xBrwData->MayMoveLeftColumns() ); + m_xTbxData->set_item_sensitive(u"MoveRightColumn"_ustr, bIsDataValid && m_xBrwData->MayMoveRightColumns() ); + m_xTbxData->set_item_sensitive(u"MoveDownRow"_ustr, bIsDataValid && m_xBrwData->MayMoveDownRows() ); + m_xTbxData->set_item_sensitive(u"MoveUpRow"_ustr, bIsDataValid && m_xBrwData->MayMoveUpRows() ); } // disable all modifying controls @@ -121,15 +121,15 @@ void DataEditor::SetReadOnly( bool bReadOnly ) m_bReadOnly = bReadOnly; if( m_bReadOnly ) { - m_xTbxData->set_item_sensitive("InsertRow", false); - m_xTbxData->set_item_sensitive("InsertColumn", false); - m_xTbxData->set_item_sensitive("InsertTextColumn", false); - m_xTbxData->set_item_sensitive("RemoveRow", false); - m_xTbxData->set_item_sensitive("RemoveColumn", false); - m_xTbxData->set_item_sensitive("MoveLeftColumn", false); - m_xTbxData->set_item_sensitive("MoveRightColumn", false); - m_xTbxData->set_item_sensitive("MoveUpRow", false); - m_xTbxData->set_item_sensitive("MoveDownRow", false); + m_xTbxData->set_item_sensitive(u"InsertRow"_ustr, false); + m_xTbxData->set_item_sensitive(u"InsertColumn"_ustr, false); + m_xTbxData->set_item_sensitive(u"InsertTextColumn"_ustr, false); + m_xTbxData->set_item_sensitive(u"RemoveRow"_ustr, false); + m_xTbxData->set_item_sensitive(u"RemoveColumn"_ustr, false); + m_xTbxData->set_item_sensitive(u"MoveLeftColumn"_ustr, false); + m_xTbxData->set_item_sensitive(u"MoveRightColumn"_ustr, false); + m_xTbxData->set_item_sensitive(u"MoveUpRow"_ustr, false); + m_xTbxData->set_item_sensitive(u"MoveDownRow"_ustr, false); } m_xBrwData->SetReadOnly( m_bReadOnly ); diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 25b0367f8885..be915f564990 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -76,20 +76,20 @@ sal_uInt16 DataSourceDialog::m_nLastPageId = 0; DataSourceDialog::DataSourceDialog(weld::Window * pParent, const rtl::Reference<::chart::ChartModel> & xChartDocument) - : GenericDialogController(pParent, "modules/schart/ui/datarangedialog.ui", - "DataRangeDialog") + : GenericDialogController(pParent, u"modules/schart/ui/datarangedialog.ui"_ustr, + u"DataRangeDialog"_ustr) , m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument)) , m_apDialogModel(new DialogModel(xChartDocument)) , m_bRangeChooserTabIsValid(true) , m_bDataSourceTabIsValid(true) , m_bTogglingEnabled(true) - , m_xTabControl(m_xBuilder->weld_notebook("tabcontrol")) - , m_xBtnOK(m_xBuilder->weld_button("ok")) + , m_xTabControl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , m_xBtnOK(m_xBuilder->weld_button(u"ok"_ustr)) { - m_xRangeChooserTabPage = std::make_unique<RangeChooserTabPage>(m_xTabControl->get_page("range"), this, + m_xRangeChooserTabPage = std::make_unique<RangeChooserTabPage>(m_xTabControl->get_page(u"range"_ustr), this, *m_apDialogModel, m_apDocTemplateProvider.get(), true /* bHideDescription */ ); - m_xDataSourceTabPage = std::make_unique<DataSourceTabPage>(m_xTabControl->get_page("series"), this, + m_xDataSourceTabPage = std::make_unique<DataSourceTabPage>(m_xTabControl->get_page(u"series"_ustr), this, *m_apDialogModel, m_apDocTemplateProvider.get(), true /* bHideDescription */ ); m_xTabControl->connect_enter_page(LINK(this, DataSourceDialog, ActivatePageHdl)); diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx index 6a79bac4a414..0fcdcaf164a9 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx @@ -34,17 +34,17 @@ SchAxisDlg::SchAxisDlg(weld::Window* pWindow, const InsertAxisOrGridDialogData& rInput, bool bAxisDlg) : GenericDialogController(pWindow, bAxisDlg ? - OUString("modules/schart/ui/insertaxisdlg.ui") : - OUString("modules/schart/ui/insertgriddlg.ui"), + u"modules/schart/ui/insertaxisdlg.ui"_ustr : + u"modules/schart/ui/insertgriddlg.ui"_ustr, bAxisDlg ? - OUString("InsertAxisDialog") : - OUString("InsertGridDialog")) - , m_xCbPrimaryX(m_xBuilder->weld_check_button("primaryX")) - , m_xCbPrimaryY(m_xBuilder->weld_check_button("primaryY")) - , m_xCbPrimaryZ(m_xBuilder->weld_check_button("primaryZ")) - , m_xCbSecondaryX(m_xBuilder->weld_check_button("secondaryX")) - , m_xCbSecondaryY(m_xBuilder->weld_check_button("secondaryY")) - , m_xCbSecondaryZ(m_xBuilder->weld_check_button("secondaryZ")) + u"InsertAxisDialog"_ustr : + u"InsertGridDialog"_ustr) + , m_xCbPrimaryX(m_xBuilder->weld_check_button(u"primaryX"_ustr)) + , m_xCbPrimaryY(m_xBuilder->weld_check_button(u"primaryY"_ustr)) + , m_xCbPrimaryZ(m_xBuilder->weld_check_button(u"primaryZ"_ustr)) + , m_xCbSecondaryX(m_xBuilder->weld_check_button(u"secondaryX"_ustr)) + , m_xCbSecondaryY(m_xBuilder->weld_check_button(u"secondaryY"_ustr)) + , m_xCbSecondaryZ(m_xBuilder->weld_check_button(u"secondaryZ"_ustr)) { if (bAxisDlg) { diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx index 57817d883d66..c917e4f0fb82 100644 --- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx @@ -24,7 +24,7 @@ namespace chart { DataLabelsDialog::DataLabelsDialog(weld::Window* pWindow, const SfxItemSet& rInAttrs, SvNumberFormatter* pFormatter) - : GenericDialogController(pWindow, "modules/schart/ui/dlg_DataLabel.ui", "dlg_DataLabels") + : GenericDialogController(pWindow, u"modules/schart/ui/dlg_DataLabel.ui"_ustr, u"dlg_DataLabels"_ustr) , m_apDataLabelResources(new DataLabelResources(m_xBuilder.get(), pWindow, rInAttrs)) { m_apDataLabelResources->SetNumberFormatter( pFormatter ); diff --git a/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx b/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx index 4b5e928db057..a2adef7c0f1a 100644 --- a/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx @@ -12,10 +12,10 @@ namespace chart { InsertDataTableDialog::InsertDataTableDialog(weld::Window* pWindow) - : GenericDialogController(pWindow, "modules/schart/ui/dlg_InsertDataTable.ui", - "InsertDataTableDialog") + : GenericDialogController(pWindow, u"modules/schart/ui/dlg_InsertDataTable.ui"_ustr, + u"InsertDataTableDialog"_ustr) , m_aDataTablePropertiesResources(*m_xBuilder) - , m_xCbShowDataTable(m_xBuilder->weld_check_button("showDataTable")) + , m_xCbShowDataTable(m_xBuilder->weld_check_button(u"showDataTable"_ustr)) { m_xCbShowDataTable->connect_toggled(LINK(this, InsertDataTableDialog, ShowDataTableToggle)); init(m_aData); diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx index 8ed2c1d7d650..693af9b5caae 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx @@ -40,7 +40,7 @@ InsertErrorBarsDialog::InsertErrorBarsDialog( weld::Window* pParent, const SfxItemSet& rMyAttrs, const rtl::Reference<::chart::ChartModel> & xChartDocument, ErrorBarResources::tErrorBarType eType /* = ErrorBarResources::ERROR_BAR_Y */ ) - : GenericDialogController(pParent, "modules/schart/ui/dlg_InsertErrorBars.ui", "dlg_InsertErrorBars") + : GenericDialogController(pParent, u"modules/schart/ui/dlg_InsertErrorBars.ui"_ustr, u"dlg_InsertErrorBars"_ustr) , m_apErrorBarResources( new ErrorBarResources( m_xBuilder.get(), this, rMyAttrs, /* bNoneAvailable = */ true, eType )) diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx index c55ecc3e88d6..919a99ba1ffc 100644 --- a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx @@ -25,7 +25,8 @@ namespace chart using namespace ::com::sun::star; SchLegendDlg::SchLegendDlg(weld::Window* pWindow, const uno::Reference<uno::XComponentContext>& xCC) - : GenericDialogController(pWindow, "modules/schart/ui/dlg_InsertLegend.ui", "dlg_InsertLegend") + : GenericDialogController(pWindow, u"modules/schart/ui/dlg_InsertLegend.ui"_ustr, + u"dlg_InsertLegend"_ustr) , m_xLegendPositionResources(new LegendPositionResources(*m_xBuilder, xCC)) { } diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx index 03f942945823..5e96f9ae9c73 100644 --- a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx @@ -24,7 +24,8 @@ namespace chart { SchTitleDlg::SchTitleDlg(weld::Window* pWindow, const TitleDialogData& rInput) - : GenericDialogController(pWindow, "modules/schart/ui/inserttitledlg.ui", "InsertTitleDialog") + : GenericDialogController(pWindow, u"modules/schart/ui/inserttitledlg.ui"_ustr, + u"InsertTitleDialog"_ustr) , m_xTitleResources(new TitleResources(*m_xBuilder, true)) { m_xDialog->set_title(ObjectNameProvider::getName(OBJECTTYPE_TITLE, true)); diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx index f5cfe8e3bda4..968c437c049e 100644 --- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx +++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx @@ -30,8 +30,8 @@ namespace chart using namespace ::com::sun::star; NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet) - : SfxSingleTabDialogController(pParent, &rSet, "cui/ui/formatnumberdialog.ui", "FormatNumberDialog") - , m_xContent( m_xBuilder->weld_container("content") ) + : SfxSingleTabDialogController(pParent, &rSet, u"cui/ui/formatnumberdialog.ui"_ustr, u"FormatNumberDialog"_ustr) + , m_xContent( m_xBuilder->weld_container(u"content"_ustr) ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ); diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index e885fdaef32e..f067bd2b0987 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -235,7 +235,7 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM Reference< data::XDataSequence > xSeq( aDataSeqs[i]->getValues()); Reference< XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW ); OUString aRole; - if( xProp->getPropertyValue( "Role" ) >>= aRole ) + if( xProp->getPropertyValue( u"Role"_ustr ) >>= aRole ) { if( !bXValuesFound && aRole == "values-x" ) { @@ -334,7 +334,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, const ObjectPropertiesDialogParameter* pDialogParameter, const ViewElementListProvider* pViewElementListProvider, const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier) - : SfxTabDialogController(pParent, "modules/schart/ui/attributedialog.ui", "AttributeDialog", pAttr) + : SfxTabDialogController(pParent, u"modules/schart/ui/attributedialog.ui"_ustr, u"AttributeDialog"_ustr, pAttr) , m_pParameter( pDialogParameter ) , m_pViewElementListProvider( pViewElementListProvider ) , m_pNumberFormatter(nullptr) @@ -349,55 +349,55 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, switch (pDialogParameter->getObjectType()) { case OBJECTTYPE_TITLE: - AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"transparent"_ustr, SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"alignment"_ustr, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create); if( SvtCJKOptions::IsAsianTypographyEnabled() ) - AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"asian"_ustr, SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); break; case OBJECTTYPE_LEGEND: - AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("legendpos", SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"transparent"_ustr, SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"legendpos"_ustr, SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create); if (SvtCJKOptions::IsAsianTypographyEnabled()) - AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"asian"_ustr, SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); break; case OBJECTTYPE_DATA_SERIES: case OBJECTTYPE_DATA_POINT: if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() ) - AddTabPage("options", SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create); + AddTabPage(u"options"_ustr, SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create); if( m_pParameter->ProvidesStartingAngle()) - AddTabPage("polaroptions", SchResId(STR_PAGE_OPTIONS), PolarOptionsTabPage::Create); + AddTabPage(u"polaroptions"_ustr, SchResId(STR_PAGE_OPTIONS), PolarOptionsTabPage::Create); if (m_pParameter->IsPieChartDataPoint()) - AddTabPage("datapointoption", SchResId(STR_PAGE_OPTIONS), DataPointOptionTabPage::Create); + AddTabPage(u"datapointoption"_ustr, SchResId(STR_PAGE_OPTIONS), DataPointOptionTabPage::Create); if( m_pParameter->HasGeometryProperties() ) - AddTabPage("layout", SchResId(STR_PAGE_LAYOUT), SchLayoutTabPage::Create); + AddTabPage(u"layout"_ustr, SchResId(STR_PAGE_LAYOUT), SchLayoutTabPage::Create); if(m_pParameter->HasAreaProperties()) { - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"transparent"_ustr, SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); } - AddTabPage("border", SchResId( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE ), RID_SVXPAGE_LINE); + AddTabPage(u"border"_ustr, SchResId( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE ), RID_SVXPAGE_LINE); break; case OBJECTTYPE_DATA_LABEL: case OBJECTTYPE_DATA_LABELS: - AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); - AddTabPage("datalabels", SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); + AddTabPage(u"datalabels"_ustr, SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); if( SvtCJKOptions::IsAsianTypographyEnabled() ) - AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"asian"_ustr, SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); break; @@ -405,29 +405,29 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, { if( m_pParameter->HasScaleProperties() ) { - AddTabPage("scale", SchResId(STR_PAGE_SCALE), ScaleTabPage::Create); + AddTabPage(u"scale"_ustr, SchResId(STR_PAGE_SCALE), ScaleTabPage::Create); //no positioning page for z axes so far as the tickmarks are not shown so far - AddTabPage("axispos", SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create); + AddTabPage(u"axispos"_ustr, SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create); } - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); - AddTabPage("axislabel", SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"axislabel"_ustr, SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create); if( m_pParameter->HasNumberProperties() ) - AddTabPage("numberformat", SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"numberformat"_ustr, SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); if( SvtCJKOptions::IsAsianTypographyEnabled() ) - AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"asian"_ustr, SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN); break; } case OBJECTTYPE_DATA_ERRORS_X: - AddTabPage("xerrorbar", SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create); - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"xerrorbar"_ustr, SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); break; case OBJECTTYPE_DATA_ERRORS_Y: - AddTabPage("yerrorbar", SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create); - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"yerrorbar"_ustr, SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); break; case OBJECTTYPE_DATA_ERRORS_Z: @@ -437,12 +437,12 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, case OBJECTTYPE_SUBGRID: case OBJECTTYPE_DATA_AVERAGE_LINE: case OBJECTTYPE_DATA_STOCK_RANGE: - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); break; case OBJECTTYPE_DATA_CURVE: - AddTabPage("trendline", SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create); - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"trendline"_ustr, SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); break; case OBJECTTYPE_DATA_STOCK_LOSS: @@ -451,9 +451,9 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, case OBJECTTYPE_DIAGRAM_FLOOR: case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DIAGRAM: - AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"transparent"_ustr, SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); break; case OBJECTTYPE_LEGEND_ENTRY: @@ -462,25 +462,25 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, // nothing break; case OBJECTTYPE_DATA_TABLE: - AddTabPage("datatable", SchResId(STR_DATA_TABLE), DataTableTabPage::Create); - AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"datatable"_ustr, SchResId(STR_DATA_TABLE), DataTableTabPage::Create); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); break; case OBJECTTYPE_DATA_CURVE_EQUATION: - AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); - AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); - AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); - AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("numberformat", SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT); + AddTabPage(u"border"_ustr, SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE); + AddTabPage(u"area"_ustr, SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA); + AddTabPage(u"transparent"_ustr, SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE); + AddTabPage(u"fontname"_ustr, SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"numberformat"_ustr, SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT); if (SvtCTLOptions::IsCTLFontEnabled()) { /* When rotation is supported for equation text boxes, use SchAlignmentTabPage::Create here. The special SchAlignmentTabPage::CreateWithoutRotation can be deleted. */ - AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation); + AddTabPage(u"alignment"_ustr, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation); } break; default: diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx index b742e8a22eda..4f4efb96085d 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx @@ -33,12 +33,12 @@ namespace chart ShapeFontDialog::ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr, const ViewElementListProvider* pViewElementListProvider) - : SfxTabDialogController(pParent, "modules/schart/ui/chardialog.ui", "CharDialog", pAttr) + : SfxTabDialogController(pParent, u"modules/schart/ui/chardialog.ui"_ustr, u"CharDialog"_ustr, pAttr) , m_pViewElementListProvider(pViewElementListProvider) { - AddTabPage("font", RID_SVXPAGE_CHAR_NAME); - AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("position", RID_SVXPAGE_CHAR_POSITION ); + AddTabPage(u"font"_ustr, RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"fonteffects"_ustr, RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"position"_ustr, RID_SVXPAGE_CHAR_POSITION ); } void ShapeFontDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx index 4c72d4d8126b..9af94eef04d0 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx @@ -32,19 +32,19 @@ namespace chart ShapeParagraphDialog::ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr) - : SfxTabDialogController(pParent, "modules/schart/ui/paradialog.ui", "ParagraphDialog", pAttr) + : SfxTabDialogController(pParent, u"modules/schart/ui/paradialog.ui"_ustr, u"ParagraphDialog"_ustr, pAttr) { - AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); - AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH ); + AddTabPage(u"labelTP_PARA_STD"_ustr, RID_SVXPAGE_STD_PARAGRAPH); + AddTabPage(u"labelTP_PARA_ALIGN"_ustr, RID_SVXPAGE_ALIGN_PARAGRAPH ); if (SvtCJKOptions::IsAsianTypographyEnabled()) { - AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"labelTP_PARA_ASIAN"_ustr, RID_SVXPAGE_PARA_ASIAN); } else { - RemoveTabPage("labelTP_PARA_ASIAN"); + RemoveTabPage(u"labelTP_PARA_ASIAN"_ustr); } - AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); + AddTabPage(u"labelTP_TABULATOR"_ustr, RID_SVXPAGE_TABULATOR); } void ShapeParagraphDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx index 08a783df5e45..1e5232dfc387 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.cxx +++ b/chart2/source/controller/dialogs/dlg_View3D.cxx @@ -35,20 +35,20 @@ using namespace ::com::sun::star; sal_uInt16 View3DDialog::m_nLastPageId = 0; View3DDialog::View3DDialog(weld::Window* pParent, const rtl::Reference<::chart::ChartModel> & xChartModel) - : GenericDialogController(pParent, "modules/schart/ui/3dviewdialog.ui", "3DViewDialog") + : GenericDialogController(pParent, u"modules/schart/ui/3dviewdialog.ui"_ustr, u"3DViewDialog"_ustr) , m_aControllerLocker(xChartModel) - , m_xTabControl(m_xBuilder->weld_notebook("tabcontrol")) + , m_xTabControl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) { rtl::Reference< Diagram > xSceneProperties = xChartModel->getFirstChartDiagram(); - m_xTabControl->append_page("geometry", SchResId(STR_PAGE_PERSPECTIVE)); - m_xGeometry.reset(new ThreeD_SceneGeometry_TabPage(m_xTabControl->get_page("geometry"), xSceneProperties, m_aControllerLocker)); + m_xTabControl->append_page(u"geometry"_ustr, SchResId(STR_PAGE_PERSPECTIVE)); + m_xGeometry.reset(new ThreeD_SceneGeometry_TabPage(m_xTabControl->get_page(u"geometry"_ustr), xSceneProperties, m_aControllerLocker)); - m_xTabControl->append_page("appearance", SchResId(STR_PAGE_APPEARANCE)); - m_xAppearance.reset(new ThreeD_SceneAppearance_TabPage(m_xTabControl->get_page("appearance"), xChartModel, m_aControllerLocker)); + m_xTabControl->append_page(u"appearance"_ustr, SchResId(STR_PAGE_APPEARANCE)); + m_xAppearance.reset(new ThreeD_SceneAppearance_TabPage(m_xTabControl->get_page(u"appearance"_ustr), xChartModel, m_aControllerLocker)); - m_xTabControl->append_page("illumination", SchResId(STR_PAGE_ILLUMINATION)); - m_xIllumination.reset(new ThreeD_SceneIllumination_TabPage(m_xTabControl->get_page("illumination"), m_xDialog.get(), + m_xTabControl->append_page(u"illumination"_ustr, SchResId(STR_PAGE_ILLUMINATION)); + m_xIllumination.reset(new ThreeD_SceneIllumination_TabPage(m_xTabControl->get_page(u"illumination"_ustr), m_xDialog.get(), xSceneProperties, xChartModel)); m_xTabControl->connect_enter_page(LINK(this, View3DDialog, ActivatePageHdl)); diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx index 81d933b208bc..cf25d970e99d 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.cxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx @@ -24,8 +24,8 @@ namespace chart { BarGeometryResources::BarGeometryResources(weld::Builder* pBuilder) - : m_xFT_Geometry(pBuilder->weld_label("shapeft")) - , m_xLB_Geometry(pBuilder->weld_tree_view("shape")) + : m_xFT_Geometry(pBuilder->weld_label(u"shapeft"_ustr)) + , m_xLB_Geometry(pBuilder->weld_tree_view(u"shape"_ustr)) { for (size_t i = 0; i < std::size(CHART_TYPE); ++i) m_xLB_Geometry->append_text(SchResId(CHART_TYPE[i])); diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index c3d755cf92d6..98db10ff1873 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -92,25 +92,25 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP , m_bSourceFormatForPercent(true) , m_pWindow(pParent) , m_pPool(rInAttrs.GetPool()) - , m_xCBNumber(pBuilder->weld_check_button("CB_VALUE_AS_NUMBER")) - , m_xPB_NumberFormatForValue(pBuilder->weld_button("PB_NUMBERFORMAT")) - , m_xCBPercent(pBuilder->weld_check_button("CB_VALUE_AS_PERCENTAGE")) - , m_xPB_NumberFormatForPercent(pBuilder->weld_button("PB_PERCENT_NUMBERFORMAT")) - , m_xFT_NumberFormatForPercent(pBuilder->weld_label("STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE")) - , m_xCBCategory(pBuilder->weld_check_button("CB_CATEGORY")) - , m_xCBSymbol(pBuilder->weld_check_button("CB_SYMBOL")) - , m_xCBDataSeries(pBuilder->weld_check_button("CB_DATA_SERIES_NAME")) - , m_xCBWrapText(pBuilder->weld_check_button("CB_WRAP_TEXT")) - , m_xLB_Separator(pBuilder->weld_combo_box("LB_TEXT_SEPARATOR")) - , m_xLB_LabelPlacement(pBuilder->weld_combo_box("LB_LABEL_PLACEMENT")) - , m_xBxOrientation(pBuilder->weld_widget("boxORIENTATION")) - , m_xFT_Dial(pBuilder->weld_label("CT_LABEL_DIAL")) - , m_xNF_Degrees(pBuilder->weld_metric_spin_button("NF_LABEL_DEGREES", FieldUnit::DEGREE)) - , m_xBxTextDirection(pBuilder->weld_widget("boxTXT_DIRECTION")) - , m_aLB_TextDirection(pBuilder->weld_combo_box("LB_LABEL_TEXTDIR")) + , m_xCBNumber(pBuilder->weld_check_button(u"CB_VALUE_AS_NUMBER"_ustr)) + , m_xPB_NumberFormatForValue(pBuilder->weld_button(u"PB_NUMBERFORMAT"_ustr)) + , m_xCBPercent(pBuilder->weld_check_button(u"CB_VALUE_AS_PERCENTAGE"_ustr)) + , m_xPB_NumberFormatForPercent(pBuilder->weld_button(u"PB_PERCENT_NUMBERFORMAT"_ustr)) + , m_xFT_NumberFormatForPercent(pBuilder->weld_label(u"STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE"_ustr)) + , m_xCBCategory(pBuilder->weld_check_button(u"CB_CATEGORY"_ustr)) + , m_xCBSymbol(pBuilder->weld_check_button(u"CB_SYMBOL"_ustr)) + , m_xCBDataSeries(pBuilder->weld_check_button(u"CB_DATA_SERIES_NAME"_ustr)) + , m_xCBWrapText(pBuilder->weld_check_button(u"CB_WRAP_TEXT"_ustr)) + , m_xLB_Separator(pBuilder->weld_combo_box(u"LB_TEXT_SEPARATOR"_ustr)) + , m_xLB_LabelPlacement(pBuilder->weld_combo_box(u"LB_LABEL_PLACEMENT"_ustr)) + , m_xBxOrientation(pBuilder->weld_widget(u"boxORIENTATION"_ustr)) + , m_xFT_Dial(pBuilder->weld_label(u"CT_LABEL_DIAL"_ustr)) + , m_xNF_Degrees(pBuilder->weld_metric_spin_button(u"NF_LABEL_DEGREES"_ustr, FieldUnit::DEGREE)) + , m_xBxTextDirection(pBuilder->weld_widget(u"boxTXT_DIRECTION"_ustr)) + , m_aLB_TextDirection(pBuilder->weld_combo_box(u"LB_LABEL_TEXTDIR"_ustr)) , m_xDC_Dial(new svx::DialControl) - , m_xDC_DialWin(new weld::CustomWeld(*pBuilder, "CT_DIAL", *m_xDC_Dial)) - , m_xCBCustomLeaderLines(pBuilder->weld_check_button("CB_CUSTOM_LEADER_LINES")) + , m_xDC_DialWin(new weld::CustomWeld(*pBuilder, u"CT_DIAL"_ustr, *m_xDC_Dial)) + , m_xCBCustomLeaderLines(pBuilder->weld_check_button(u"CB_CUSTOM_LEADER_LINES"_ustr)) { m_xDC_Dial->SetText(m_xFT_Dial->get_label()); diff --git a/chart2/source/controller/dialogs/res_DataTableProperties.cxx b/chart2/source/controller/dialogs/res_DataTableProperties.cxx index 327298e312d9..493be52ea5bc 100644 --- a/chart2/source/controller/dialogs/res_DataTableProperties.cxx +++ b/chart2/source/controller/dialogs/res_DataTableProperties.cxx @@ -17,10 +17,10 @@ using namespace css; namespace chart { DataTablePropertiesResources::DataTablePropertiesResources(weld::Builder& rBuilder) - : m_xCbHorizontalBorder(rBuilder.weld_check_button("horizontalBorderCB")) - , m_xCbVerticalBorder(rBuilder.weld_check_button("verticalBorderCB")) - , m_xCbOutilne(rBuilder.weld_check_button("outlineCB")) - , m_xCbKeys(rBuilder.weld_check_button("keysCB")) + : m_xCbHorizontalBorder(rBuilder.weld_check_button(u"horizontalBorderCB"_ustr)) + , m_xCbVerticalBorder(rBuilder.weld_check_button(u"verticalBorderCB"_ustr)) + , m_xCbOutilne(rBuilder.weld_check_button(u"outlineCB"_ustr)) + , m_xCbKeys(rBuilder.weld_check_button(u"keysCB"_ustr)) { } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index ae8e7cd28e2e..82c3f3ab4acc 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -96,31 +96,31 @@ ErrorBarResources::ErrorBarResources(weld::Builder* pParent, weld::DialogControl , m_pCurrentRangeChoosingField( nullptr ) , m_bHasInternalDataProvider( true ) , m_bEnableDataTableDialog( true ) - , m_xRbNone(pParent->weld_radio_button("RB_NONE")) - , m_xRbConst(pParent->weld_radio_button("RB_CONST")) - , m_xRbPercent(pParent->weld_radio_button("RB_PERCENT")) - , m_xRbFunction(pParent->weld_radio_button("RB_FUNCTION")) - , m_xRbRange(pParent->weld_radio_button("RB_RANGE")) - , m_xLbFunction(pParent->weld_combo_box("LB_FUNCTION")) - , m_xFlParameters(pParent->weld_frame("framePARAMETERS")) - , m_xBxPositive(pParent->weld_widget("boxPOSITIVE")) - , m_xMfPositive(pParent->weld_metric_spin_button("MF_POSITIVE", FieldUnit::NONE)) - , m_xEdRangePositive(pParent->weld_entry("ED_RANGE_POSITIVE")) - , m_xIbRangePositive(pParent->weld_button("IB_RANGE_POSITIVE")) - , m_xBxNegative(pParent->weld_widget("boxNEGATIVE")) - , m_xMfNegative(pParent->weld_metric_spin_button("MF_NEGATIVE", FieldUnit::NONE)) - , m_xEdRangeNegative(pParent->weld_entry("ED_RANGE_NEGATIVE")) - , m_xIbRangeNegative(pParent->weld_button("IB_RANGE_NEGATIVE")) - , m_xCbSyncPosNeg(pParent->weld_check_button("CB_SYN_POS_NEG")) - , m_xRbBoth(pParent->weld_radio_button("RB_BOTH")) - , m_xRbPositive(pParent->weld_radio_button("RB_POSITIVE")) - , m_xRbNegative(pParent->weld_radio_button("RB_NEGATIVE")) - , m_xFiBoth(pParent->weld_image("FI_BOTH")) - , m_xFiPositive(pParent->weld_image("FI_POSITIVE")) - , m_xFiNegative(pParent->weld_image("FI_NEGATIVE")) - , m_xUIStringPos(pParent->weld_label("STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS")) - , m_xUIStringNeg(pParent->weld_label("STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS")) - , m_xUIStringRbRange(pParent->weld_label("STR_CONTROLTEXT_ERROR_BARS_FROM_DATA")) + , m_xRbNone(pParent->weld_radio_button(u"RB_NONE"_ustr)) + , m_xRbConst(pParent->weld_radio_button(u"RB_CONST"_ustr)) + , m_xRbPercent(pParent->weld_radio_button(u"RB_PERCENT"_ustr)) + , m_xRbFunction(pParent->weld_radio_button(u"RB_FUNCTION"_ustr)) + , m_xRbRange(pParent->weld_radio_button(u"RB_RANGE"_ustr)) + , m_xLbFunction(pParent->weld_combo_box(u"LB_FUNCTION"_ustr)) + , m_xFlParameters(pParent->weld_frame(u"framePARAMETERS"_ustr)) + , m_xBxPositive(pParent->weld_widget(u"boxPOSITIVE"_ustr)) + , m_xMfPositive(pParent->weld_metric_spin_button(u"MF_POSITIVE"_ustr, FieldUnit::NONE)) + , m_xEdRangePositive(pParent->weld_entry(u"ED_RANGE_POSITIVE"_ustr)) + , m_xIbRangePositive(pParent->weld_button(u"IB_RANGE_POSITIVE"_ustr)) + , m_xBxNegative(pParent->weld_widget(u"boxNEGATIVE"_ustr)) + , m_xMfNegative(pParent->weld_metric_spin_button(u"MF_NEGATIVE"_ustr, FieldUnit::NONE)) + , m_xEdRangeNegative(pParent->weld_entry(u"ED_RANGE_NEGATIVE"_ustr)) + , m_xIbRangeNegative(pParent->weld_button(u"IB_RANGE_NEGATIVE"_ustr)) + , m_xCbSyncPosNeg(pParent->weld_check_button(u"CB_SYN_POS_NEG"_ustr)) + , m_xRbBoth(pParent->weld_radio_button(u"RB_BOTH"_ustr)) + , m_xRbPositive(pParent->weld_radio_button(u"RB_POSITIVE"_ustr)) + , m_xRbNegative(pParent->weld_radio_button(u"RB_NEGATIVE"_ustr)) + , m_xFiBoth(pParent->weld_image(u"FI_BOTH"_ustr)) + , m_xFiPositive(pParent->weld_image(u"FI_POSITIVE"_ustr)) + , m_xFiNegative(pParent->weld_image(u"FI_NEGATIVE"_ustr)) + , m_xUIStringPos(pParent->weld_label(u"STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS"_ustr)) + , m_xUIStringNeg(pParent->weld_label(u"STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS"_ustr)) + , m_xUIStringRbRange(pParent->weld_label(u"STR_CONTROLTEXT_ERROR_BARS_FROM_DATA"_ustr)) { if( bNoneAvailable ) m_xRbNone->connect_toggled(LINK(this, ErrorBarResources, CategoryChosen)); @@ -175,7 +175,7 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing( { try { - xProps->getPropertyValue("EnableDataTableDialog") >>= m_bEnableDataTableDialog; + xProps->getPropertyValue(u"EnableDataTableDialog"_ustr) >>= m_bEnableDataTableDialog; } catch( const uno::Exception& ) { diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 92cb4399e563..e1743886086a 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -41,10 +41,10 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder) - : m_xRbtLeft(rBuilder.weld_radio_button("left")) - , m_xRbtRight(rBuilder.weld_radio_button("right")) - , m_xRbtTop(rBuilder.weld_radio_button("top")) - , m_xRbtBottom(rBuilder.weld_radio_button("bottom")) + : m_xRbtLeft(rBuilder.weld_radio_button(u"left"_ustr)) + , m_xRbtRight(rBuilder.weld_radio_button(u"right"_ustr)) + , m_xRbtTop(rBuilder.weld_radio_button(u"top"_ustr)) + , m_xRbtBottom(rBuilder.weld_radio_button(u"bottom"_ustr)) { impl_setRadioButtonToggleHdl(); } @@ -52,11 +52,11 @@ LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder) LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder, uno::Reference< uno::XComponentContext > xCC) : m_xCC(std::move(xCC)) - , m_xCbxShow(rBuilder.weld_check_button("show")) - , m_xRbtLeft(rBuilder.weld_radio_button("left")) - , m_xRbtRight(rBuilder.weld_radio_button("right")) - , m_xRbtTop(rBuilder.weld_radio_button("top")) - , m_xRbtBottom(rBuilder.weld_radio_button("bottom")) + , m_xCbxShow(rBuilder.weld_check_button(u"show"_ustr)) + , m_xRbtLeft(rBuilder.weld_radio_button(u"left"_ustr)) + , m_xRbtRight(rBuilder.weld_radio_button(u"right"_ustr)) + , m_xRbtTop(rBuilder.weld_radio_button(u"top"_ustr)) + , m_xRbtBottom(rBuilder.weld_radio_button(u"bottom"_ustr)) { m_xCbxShow->connect_toggled( LINK( this, LegendPositionResources, PositionEnableHdl ) ); impl_setRadioButtonToggleHdl(); @@ -84,14 +84,14 @@ void LegendPositionResources::writeToResources( const rtl::Reference<::chart::Ch { //show bool bShowLegend = false; - xLegend->getPropertyValue( "Show" ) >>= bShowLegend; + xLegend->getPropertyValue( u"Show"_ustr ) >>= bShowLegend; if (m_xCbxShow) m_xCbxShow->set_active( bShowLegend ); PositionEnable(); //position chart2::LegendPosition ePos; - xLegend->getPropertyValue( "AnchorPosition" ) >>= ePos; + xLegend->getPropertyValue( u"AnchorPosition"_ustr ) >>= ePos; switch( ePos ) { case chart2::LegendPosition_LINE_START: @@ -126,7 +126,7 @@ void LegendPositionResources::writeToModel( const rtl::Reference<::chart::ChartM if( xProp.is() ) { //show - xProp->setPropertyValue( "Show" , uno::Any( bShowLegend )); + xProp->setPropertyValue( u"Show"_ustr , uno::Any( bShowLegend )); //position chart2::LegendPosition eNewPos; @@ -149,9 +149,9 @@ void LegendPositionResources::writeToModel( const rtl::Reference<::chart::ChartM eExp = css::chart::ChartLegendExpansion_WIDE; } - xProp->setPropertyValue( "AnchorPosition" , uno::Any( eNewPos )); - xProp->setPropertyValue( "Expansion" , uno::Any( eExp )); - xProp->setPropertyValue( "RelativePosition" , uno::Any()); + xProp->setPropertyValue( u"AnchorPosition"_ustr , uno::Any( eNewPos )); + xProp->setPropertyValue( u"Expansion"_ustr , uno::Any( eExp )); + xProp->setPropertyValue( u"RelativePosition"_ustr , uno::Any()); } } catch( const uno::Exception & ) diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx index 59b0f00b9b37..dda48b055320 100644 --- a/chart2/source/controller/dialogs/res_Titles.cxx +++ b/chart2/source/controller/dialogs/res_Titles.cxx @@ -24,20 +24,20 @@ namespace chart { TitleResources::TitleResources(weld::Builder& rBuilder, bool bShowSecondaryAxesTitle) - : m_xFT_Main(rBuilder.weld_label("labelMainTitle")) - , m_xFT_Sub(rBuilder.weld_label("labelSubTitle")) - , m_xEd_Main(rBuilder.weld_entry("maintitle")) - , m_xEd_Sub(rBuilder.weld_entry("subtitle")) - , m_xFT_XAxis(rBuilder.weld_label("labelPrimaryXaxis")) - , m_xFT_YAxis(rBuilder.weld_label("labelPrimaryYaxis")) - , m_xFT_ZAxis(rBuilder.weld_label("labelPrimaryZaxis")) - , m_xEd_XAxis(rBuilder.weld_entry("primaryXaxis")) - , m_xEd_YAxis(rBuilder.weld_entry("primaryYaxis")) - , m_xEd_ZAxis(rBuilder.weld_entry("primaryZaxis")) - , m_xFT_SecondaryXAxis(rBuilder.weld_label("labelSecondaryXAxis")) - , m_xFT_SecondaryYAxis(rBuilder.weld_label("labelSecondaryYAxis")) - , m_xEd_SecondaryXAxis(rBuilder.weld_entry("secondaryXaxis")) - , m_xEd_SecondaryYAxis(rBuilder.weld_entry("secondaryYaxis")) + : m_xFT_Main(rBuilder.weld_label(u"labelMainTitle"_ustr)) + , m_xFT_Sub(rBuilder.weld_label(u"labelSubTitle"_ustr)) + , m_xEd_Main(rBuilder.weld_entry(u"maintitle"_ustr)) + , m_xEd_Sub(rBuilder.weld_entry(u"subtitle"_ustr)) + , m_xFT_XAxis(rBuilder.weld_label(u"labelPrimaryXaxis"_ustr)) + , m_xFT_YAxis(rBuilder.weld_label(u"labelPrimaryYaxis"_ustr)) + , m_xFT_ZAxis(rBuilder.weld_label(u"labelPrimaryZaxis"_ustr)) + , m_xEd_XAxis(rBuilder.weld_entry(u"primaryXaxis"_ustr)) + , m_xEd_YAxis(rBuilder.weld_entry(u"primaryYaxis"_ustr)) + , m_xEd_ZAxis(rBuilder.weld_entry(u"primaryZaxis"_ustr)) + , m_xFT_SecondaryXAxis(rBuilder.weld_label(u"labelSecondaryXAxis"_ustr)) + , m_xFT_SecondaryYAxis(rBuilder.weld_label(u"labelSecondaryYAxis"_ustr)) + , m_xEd_SecondaryXAxis(rBuilder.weld_entry(u"secondaryXaxis"_ustr)) + , m_xEd_SecondaryYAxis(rBuilder.weld_entry(u"secondaryYaxis"_ustr)) { m_xFT_SecondaryXAxis->set_visible(bShowSecondaryAxesTitle); m_xFT_SecondaryYAxis->set_visible(bShowSecondaryAxesTitle); diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 3cbba1e59a28..ce8a893702d7 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -46,30 +46,30 @@ TrendlineResources::TrendlineResources(weld::Builder& rBuilder, const SfxItemSet , m_bTrendLineUnique(true) , m_pNumFormatter(nullptr) , m_nNbPoints(0) - , m_xRB_Linear(rBuilder.weld_radio_button("linear")) - , m_xRB_Logarithmic(rBuilder.weld_radio_button("logarithmic")) - , m_xRB_Exponential(rBuilder.weld_radio_button("exponential")) - , m_xRB_Power(rBuilder.weld_radio_button("power")) - , m_xRB_Polynomial(rBuilder.weld_radio_button("polynomial")) - , m_xRB_MovingAverage(rBuilder.weld_radio_button("movingAverage")) - , m_xFI_Linear(rBuilder.weld_image("imageLinear")) - , m_xFI_Logarithmic(rBuilder.weld_image("imageLogarithmic")) - , m_xFI_Exponential(rBuilder.weld_image("imageExponential")) - , m_xFI_Power(rBuilder.weld_image("imagePower")) - , m_xFI_Polynomial(rBuilder.weld_image("imagePolynomial")) - , m_xFI_MovingAverage(rBuilder.weld_image("imageMovingAverage")) - , m_xNF_Degree(rBuilder.weld_spin_button("degree")) - , m_xNF_Period(rBuilder.weld_spin_button("period")) - , m_xEE_Name(rBuilder.weld_entry("entry_name")) - , m_xFmtFld_ExtrapolateForward(rBuilder.weld_formatted_spin_button("extrapolateForward")) - , m_xFmtFld_ExtrapolateBackward(rBuilder.weld_formatted_spin_button("extrapolateBackward")) - , m_xCB_SetIntercept(rBuilder.weld_check_button("setIntercept")) - , m_xFmtFld_InterceptValue(rBuilder.weld_formatted_spin_button("interceptValue")) - , m_xCB_ShowEquation(rBuilder.weld_check_button("showEquation")) - , m_xEE_XName(rBuilder.weld_entry("entry_Xname")) - , m_xEE_YName(rBuilder.weld_entry("entry_Yname")) - , m_xCB_ShowCorrelationCoeff(rBuilder.weld_check_button("showCorrelationCoefficient")) - , m_xCB_RegressionMovingType(rBuilder.weld_combo_box("combo_moving_type")) + , m_xRB_Linear(rBuilder.weld_radio_button(u"linear"_ustr)) + , m_xRB_Logarithmic(rBuilder.weld_radio_button(u"logarithmic"_ustr)) + , m_xRB_Exponential(rBuilder.weld_radio_button(u"exponential"_ustr)) + , m_xRB_Power(rBuilder.weld_radio_button(u"power"_ustr)) + , m_xRB_Polynomial(rBuilder.weld_radio_button(u"polynomial"_ustr)) + , m_xRB_MovingAverage(rBuilder.weld_radio_button(u"movingAverage"_ustr)) + , m_xFI_Linear(rBuilder.weld_image(u"imageLinear"_ustr)) + , m_xFI_Logarithmic(rBuilder.weld_image(u"imageLogarithmic"_ustr)) + , m_xFI_Exponential(rBuilder.weld_image(u"imageExponential"_ustr)) + , m_xFI_Power(rBuilder.weld_image(u"imagePower"_ustr)) + , m_xFI_Polynomial(rBuilder.weld_image(u"imagePolynomial"_ustr)) + , m_xFI_MovingAverage(rBuilder.weld_image(u"imageMovingAverage"_ustr)) + , m_xNF_Degree(rBuilder.weld_spin_button(u"degree"_ustr)) + , m_xNF_Period(rBuilder.weld_spin_button(u"period"_ustr)) + , m_xEE_Name(rBuilder.weld_entry(u"entry_name"_ustr)) + , m_xFmtFld_ExtrapolateForward(rBuilder.weld_formatted_spin_button(u"extrapolateForward"_ustr)) + , m_xFmtFld_ExtrapolateBackward(rBuilder.weld_formatted_spin_button(u"extrapolateBackward"_ustr)) + , m_xCB_SetIntercept(rBuilder.weld_check_button(u"setIntercept"_ustr)) + , m_xFmtFld_InterceptValue(rBuilder.weld_formatted_spin_button(u"interceptValue"_ustr)) + , m_xCB_ShowEquation(rBuilder.weld_check_button(u"showEquation"_ustr)) + , m_xEE_XName(rBuilder.weld_entry(u"entry_Xname"_ustr)) + , m_xEE_YName(rBuilder.weld_entry(u"entry_Yname"_ustr)) + , m_xCB_ShowCorrelationCoeff(rBuilder.weld_check_button(u"showCorrelationCoefficient"_ustr)) + , m_xCB_RegressionMovingType(rBuilder.weld_combo_box(u"combo_moving_type"_ustr)) { FillValueSets(); @@ -133,7 +133,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } else { - m_xEE_Name->set_text(""); + m_xEE_Name->set_text(u""_ustr); } if( const SfxStringItem* pRegressionXNameItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_XNAME ) ) { @@ -142,7 +142,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } else { - m_xEE_XName->set_text("x"); + m_xEE_XName->set_text(u"x"_ustr); } if( const SfxStringItem* pRegressionYNameItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_YNAME ) ) { @@ -151,7 +151,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } else { - m_xEE_YName->set_text("f(x)"); + m_xEE_YName->set_text(u"f(x)"_ustr); } const SfxPoolItem* pPoolItem = nullptr; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index adeb27a02501..9e0127f23180 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -53,7 +53,7 @@ lcl_ModelProperties lcl_getPropertiesFromModel( rtl::Reference<::chart::ChartMod try { rtl::Reference< ::chart::Diagram > xDiagram( xModel->getFirstChartDiagram() ); - xDiagram->getPropertyValue( "D3DSceneShadeMode" ) >>= aProps.m_aShadeMode; + xDiagram->getPropertyValue( u"D3DSceneShadeMode"_ustr ) >>= aProps.m_aShadeMode; ::chart::ThreeDHelper::getRoundedEdgesAndObjectLines( xDiagram, aProps.m_nRoundedEdges, aProps.m_nObjectLines ); aProps.m_eScheme = xDiagram->detectScheme(); } @@ -69,7 +69,7 @@ void lcl_setShadeModeAtModel( rtl::Reference<::chart::ChartModel> const & xModel try { rtl::Reference< ::chart::Diagram > xDiaProp = xModel->getFirstChartDiagram(); - xDiaProp->setPropertyValue( "D3DSceneShadeMode" , uno::Any( aShadeMode )); + xDiaProp->setPropertyValue( u"D3DSceneShadeMode"_ustr , uno::Any( aShadeMode )); } catch( const uno::Exception & ) { @@ -93,12 +93,12 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage(weld::Container* , m_bUpdateOtherControls(true) , m_bCommitToModel(true) , m_rControllerLockHelper(rControllerLockHelper) - , m_xBuilder(Application::CreateBuilder(pParent, "modules/schart/ui/tp_3D_SceneAppearance.ui")) - , m_xContainer(m_xBuilder->weld_container("tp_3D_SceneAppearance")) - , m_xLB_Scheme(m_xBuilder->weld_combo_box("LB_SCHEME")) - , m_xCB_Shading(m_xBuilder->weld_check_button("CB_SHADING")) - , m_xCB_ObjectLines(m_xBuilder->weld_check_button("CB_OBJECTLINES")) - , m_xCB_RoundedEdge(m_xBuilder->weld_check_button("CB_ROUNDEDEDGE")) + , m_xBuilder(Application::CreateBuilder(pParent, u"modules/schart/ui/tp_3D_SceneAppearance.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"tp_3D_SceneAppearance"_ustr)) + , m_xLB_Scheme(m_xBuilder->weld_combo_box(u"LB_SCHEME"_ustr)) + , m_xCB_Shading(m_xBuilder->weld_check_button(u"CB_SHADING"_ustr)) + , m_xCB_ObjectLines(m_xBuilder->weld_check_button(u"CB_OBJECTLINES"_ustr)) + , m_xCB_RoundedEdge(m_xBuilder->weld_check_button(u"CB_ROUNDEDEDGE"_ustr)) { m_aCustom = m_xLB_Scheme->get_text(POS_3DSCHEME_CUSTOM); m_xLB_Scheme->remove(POS_3DSCHEME_CUSTOM); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index f368a8193a58..d6711921fda4 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -57,15 +57,15 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar , m_bAngleChangePending( false ) , m_bPerspectiveChangePending( false ) , m_rControllerLockHelper( rControllerLockHelper ) - , m_xBuilder(Application::CreateBuilder(pParent, "modules/schart/ui/tp_3D_SceneGeometry.ui")) - , m_xContainer(m_xBuilder->weld_container("tp_3DSceneGeometry")) - , m_xCbxRightAngledAxes(m_xBuilder->weld_check_button("CBX_RIGHT_ANGLED_AXES")) - , m_xMFXRotation(m_xBuilder->weld_metric_spin_button("MTR_FLD_X_ROTATION", FieldUnit::DEGREE)) - , m_xMFYRotation(m_xBuilder->weld_metric_spin_button("MTR_FLD_Y_ROTATION", FieldUnit::DEGREE)) - , m_xFtZRotation(m_xBuilder->weld_label("FT_Z_ROTATION")) - , m_xMFZRotation(m_xBuilder->weld_metric_spin_button("MTR_FLD_Z_ROTATION", FieldUnit::DEGREE)) - , m_xCbxPerspective(m_xBuilder->weld_check_button("CBX_PERSPECTIVE")) - , m_xMFPerspective(m_xBuilder->weld_metric_spin_button("MTR_FLD_PERSPECTIVE", FieldUnit::PERCENT)) + , m_xBuilder(Application::CreateBuilder(pParent, u"modules/schart/ui/tp_3D_SceneGeometry.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"tp_3DSceneGeometry"_ustr)) + , m_xCbxRightAngledAxes(m_xBuilder->weld_check_button(u"CBX_RIGHT_ANGLED_AXES"_ustr)) + , m_xMFXRotation(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_X_ROTATION"_ustr, FieldUnit::DEGREE)) + , m_xMFYRotation(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_Y_ROTATION"_ustr, FieldUnit::DEGREE)) + , m_xFtZRotation(m_xBuilder->weld_label(u"FT_Z_ROTATION"_ustr)) + , m_xMFZRotation(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_Z_ROTATION"_ustr, FieldUnit::DEGREE)) + , m_xCbxPerspective(m_xBuilder->weld_check_button(u"CBX_PERSPECTIVE"_ustr)) + , m_xMFPerspective(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_PERSPECTIVE"_ustr, FieldUnit::PERCENT)) { double fXAngle, fYAngle, fZAngle; m_xDiagram->getRotationAngle( fXAngle, fYAngle, fZAngle ); @@ -99,12 +99,12 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar m_xMFZRotation->connect_value_changed( aAngleEditedLink ); drawing::ProjectionMode aProjectionMode = drawing::ProjectionMode_PERSPECTIVE; - m_xDiagram->getPropertyValue( "D3DScenePerspective" ) >>= aProjectionMode; + m_xDiagram->getPropertyValue( u"D3DScenePerspective"_ustr ) >>= aProjectionMode; m_xCbxPerspective->set_active( aProjectionMode == drawing::ProjectionMode_PERSPECTIVE ); m_xCbxPerspective->connect_toggled( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveToggled )); sal_Int32 nPerspectivePercentage = 20; - m_xDiagram->getPropertyValue( "Perspective" ) >>= nPerspectivePercentage; + m_xDiagram->getPropertyValue( u"Perspective"_ustr ) >>= nPerspectivePercentage; m_xMFPerspective->set_value(nPerspectivePercentage, FieldUnit::PERCENT); m_aPerspectiveTimer.SetTimeout(nTimeout); @@ -116,7 +116,7 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar if (ChartTypeHelper::isSupportingRightAngledAxes(m_xDiagram->getChartTypeByIndex(0))) { bool bRightAngledAxes = false; - m_xDiagram->getPropertyValue( "RightAngledAxes" ) >>= bRightAngledAxes; + m_xDiagram->getPropertyValue( u"RightAngledAxes"_ustr ) >>= bRightAngledAxes; m_xCbxRightAngledAxes->connect_toggled( LINK( this, ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled )); m_xCbxRightAngledAxes->set_active( bRightAngledAxes ); RightAngledAxesToggled(*m_xCbxRightAngledAxes); @@ -189,8 +189,8 @@ void ThreeD_SceneGeometry_TabPage::applyPerspectiveToModel() try { - m_xDiagram->setPropertyValue( "D3DScenePerspective" , uno::Any( aMode )); - m_xDiagram->setPropertyValue( "Perspective" , uno::Any( static_cast<sal_Int32>(m_xMFPerspective->get_value(FieldUnit::PERCENT)) )); + m_xDiagram->setPropertyValue( u"D3DScenePerspective"_ustr , uno::Any( aMode )); + m_xDiagram->setPropertyValue( u"Perspective"_ustr , uno::Any( static_cast<sal_Int32>(m_xMFPerspective->get_value(FieldUnit::PERCENT)) )); } catch( const uno::Exception & ) { @@ -233,7 +233,7 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled, weld::Togg m_xMFXRotation->set_value(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nXRotation), ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes())), FieldUnit::DEGREE); m_xMFYRotation->set_value(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nYRotation), ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes())), FieldUnit::DEGREE); - m_xMFZRotation->set_text(""); + m_xMFZRotation->set_text(u""_ustr); lcl_SetMetricFieldLimits( *m_xMFXRotation, static_cast<sal_Int64>(ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes())); lcl_SetMetricFieldLimits( *m_xMFYRotation, static_cast<sal_Int64>(ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes())); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 2650e56fe8a4..3d258e8e70f5 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -157,7 +157,7 @@ namespace Color nResult; try { - xSceneProperties->getPropertyValue("D3DSceneAmbientColor") >>= nResult; + xSceneProperties->getPropertyValue(u"D3DSceneAmbientColor"_ustr) >>= nResult; } catch( const uno::Exception & ) { @@ -172,7 +172,7 @@ namespace { try { - xSceneProperties->setPropertyValue("D3DSceneAmbientColor", + xSceneProperties->setPropertyValue(u"D3DSceneAmbientColor"_ustr, uno::Any( rColor )); } catch( const uno::Exception & ) @@ -192,25 +192,25 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Contain , m_aModelChangeListener( LINK( this, ThreeD_SceneIllumination_TabPage, fillControlsFromModel ) ) , m_xChartModel( xChartModel ) , m_pTopLevel(pTopLevel) - , m_xBuilder(Application::CreateBuilder(pParent, "modules/schart/ui/tp_3D_SceneIllumination.ui")) - , m_xContainer(m_xBuilder->weld_container("tp_3D_SceneIllumination")) - , m_aBtn_Light1(m_xBuilder->weld_toggle_button("BTN_LIGHT_1")) - , m_aBtn_Light2(m_xBuilder->weld_toggle_button("BTN_LIGHT_2")) - , m_aBtn_Light3(m_xBuilder->weld_toggle_button("BTN_LIGHT_3")) - , m_aBtn_Light4(m_xBuilder->weld_toggle_button("BTN_LIGHT_4")) - , m_aBtn_Light5(m_xBuilder->weld_toggle_button("BTN_LIGHT_5")) - , m_aBtn_Light6(m_xBuilder->weld_toggle_button("BTN_LIGHT_6")) - , m_aBtn_Light7(m_xBuilder->weld_toggle_button("BTN_LIGHT_7")) - , m_aBtn_Light8(m_xBuilder->weld_toggle_button("BTN_LIGHT_8")) - , m_xLB_LightSource(new ColorListBox(m_xBuilder->weld_menu_button("LB_LIGHTSOURCE"), [this]{ return m_pTopLevel; })) - , m_xBtn_LightSource_Color(m_xBuilder->weld_button("BTN_LIGHTSOURCE_COLOR")) - , m_xLB_AmbientLight(new ColorListBox(m_xBuilder->weld_menu_button("LB_AMBIENTLIGHT"), [this]{ return m_pTopLevel; })) - , m_xBtn_AmbientLight_Color(m_xBuilder->weld_button("BTN_AMBIENT_COLOR")) - , m_xHoriScale(m_xBuilder->weld_scale("hori")) - , m_xVertScale(m_xBuilder->weld_scale("vert")) - , m_xBtn_Corner(m_xBuilder->weld_button("corner")) + , m_xBuilder(Application::CreateBuilder(pParent, u"modules/schart/ui/tp_3D_SceneIllumination.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"tp_3D_SceneIllumination"_ustr)) + , m_aBtn_Light1(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_1"_ustr)) + , m_aBtn_Light2(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_2"_ustr)) + , m_aBtn_Light3(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_3"_ustr)) + , m_aBtn_Light4(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_4"_ustr)) + , m_aBtn_Light5(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_5"_ustr)) + , m_aBtn_Light6(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_6"_ustr)) + , m_aBtn_Light7(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_7"_ustr)) + , m_aBtn_Light8(m_xBuilder->weld_toggle_button(u"BTN_LIGHT_8"_ustr)) + , m_xLB_LightSource(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_LIGHTSOURCE"_ustr), [this]{ return m_pTopLevel; })) + , m_xBtn_LightSource_Color(m_xBuilder->weld_button(u"BTN_LIGHTSOURCE_COLOR"_ustr)) + , m_xLB_AmbientLight(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_AMBIENTLIGHT"_ustr), [this]{ return m_pTopLevel; })) + , m_xBtn_AmbientLight_Color(m_xBuilder->weld_button(u"BTN_AMBIENT_COLOR"_ustr)) + , m_xHoriScale(m_xBuilder->weld_scale(u"hori"_ustr)) + , m_xVertScale(m_xBuilder->weld_scale(u"vert"_ustr)) + , m_xBtn_Corner(m_xBuilder->weld_button(u"corner"_ustr)) , m_xPreview(new Svx3DLightControl) - , m_xPreviewWnd(new weld::CustomWeld(*m_xBuilder, "CTL_LIGHT_PREVIEW", *m_xPreview)) + , m_xPreviewWnd(new weld::CustomWeld(*m_xBuilder, u"CTL_LIGHT_PREVIEW"_ustr, *m_xPreview)) , m_xCtl_Preview(new SvxLightCtl3D(*m_xPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner)) { m_pLightSourceInfoList.reset(new LightSourceInfo[8]); diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 79976618341c..396086bb46a6 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -31,30 +31,30 @@ namespace chart { SchAxisLabelTabPage::SchAxisLabelTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_axisLabel.ui", "AxisLabelTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_axisLabel.ui"_ustr, u"AxisLabelTabPage"_ustr, &rInAttrs) , m_bShowStaggeringControls( true ) , m_nInitialDegrees( 0 ) , m_bHasInitialDegrees( true ) , m_bInitialStacking( false ) , m_bHasInitialStacking( true ) , m_bComplexCategories( false ) - , m_xCbShowDescription(m_xBuilder->weld_check_button("showlabelsCB")) - , m_xFlOrder(m_xBuilder->weld_label("orderL")) - , m_xRbSideBySide(m_xBuilder->weld_radio_button("tile")) - , m_xRbUpDown(m_xBuilder->weld_radio_button("odd")) - , m_xRbDownUp(m_xBuilder->weld_radio_button("even")) - , m_xRbAuto(m_xBuilder->weld_radio_button("auto")) - , m_xFlTextFlow(m_xBuilder->weld_label("textflowL")) - , m_xCbTextOverlap(m_xBuilder->weld_check_button("overlapCB")) - , m_xCbTextBreak(m_xBuilder->weld_check_button("breakCB")) - , m_xFtABCD(m_xBuilder->weld_label("labelABCD")) - , m_xFtRotate(m_xBuilder->weld_label("degreeL")) - , m_xNfRotate(m_xBuilder->weld_metric_spin_button("OrientDegree", FieldUnit::DEGREE)) - , m_xCbStacked(m_xBuilder->weld_check_button("stackedCB")) - , m_xFtTextDirection(m_xBuilder->weld_label("textdirL")) - , m_aLbTextDirection(m_xBuilder->weld_combo_box("textdirLB")) + , m_xCbShowDescription(m_xBuilder->weld_check_button(u"showlabelsCB"_ustr)) + , m_xFlOrder(m_xBuilder->weld_label(u"orderL"_ustr)) + , m_xRbSideBySide(m_xBuilder->weld_radio_button(u"tile"_ustr)) + , m_xRbUpDown(m_xBuilder->weld_radio_button(u"odd"_ustr)) + , m_xRbDownUp(m_xBuilder->weld_radio_button(u"even"_ustr)) + , m_xRbAuto(m_xBuilder->weld_radio_button(u"auto"_ustr)) + , m_xFlTextFlow(m_xBuilder->weld_label(u"textflowL"_ustr)) + , m_xCbTextOverlap(m_xBuilder->weld_check_button(u"overlapCB"_ustr)) + , m_xCbTextBreak(m_xBuilder->weld_check_button(u"breakCB"_ustr)) + , m_xFtABCD(m_xBuilder->weld_label(u"labelABCD"_ustr)) + , m_xFtRotate(m_xBuilder->weld_label(u"degreeL"_ustr)) + , m_xNfRotate(m_xBuilder->weld_metric_spin_button(u"OrientDegree"_ustr, FieldUnit::DEGREE)) + , m_xCbStacked(m_xBuilder->weld_check_button(u"stackedCB"_ustr)) + , m_xFtTextDirection(m_xBuilder->weld_label(u"textdirL"_ustr)) + , m_aLbTextDirection(m_xBuilder->weld_combo_box(u"textdirLB"_ustr)) , m_xCtrlDial(new svx::DialControl) - , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialCtrl", *m_xCtrlDial)) + , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, u"dialCtrl"_ustr, *m_xCtrlDial)) { m_xCtrlDial->SetText(m_xFtABCD->get_label()); m_xCtrlDial->SetLinkedField(m_xNfRotate.get()); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 2e3988267c77..2faddaad81dd 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -33,26 +33,26 @@ namespace chart { AxisPositionsTabPage::AxisPositionsTabPage(weld::Container* pPage, weld::DialogController* pController,const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_AxisPositions.ui", "tp_AxisPositions", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_AxisPositions.ui"_ustr, u"tp_AxisPositions"_ustr, &rInAttrs) , m_pNumFormatter(nullptr) , m_bCrossingAxisIsCategoryAxis(false) , m_bSupportAxisPositioning(false) , m_bSupportCategoryPositioning(false) - , m_xFL_AxisLine(m_xBuilder->weld_frame("FL_AXIS_LINE")) - , m_xLB_CrossesAt(m_xBuilder->weld_combo_box("LB_CROSSES_OTHER_AXIS_AT")) - , m_xED_CrossesAt(m_xBuilder->weld_formatted_spin_button("EDT_CROSSES_OTHER_AXIS_AT")) - , m_xED_CrossesAtCategory(m_xBuilder->weld_combo_box( "EDT_CROSSES_OTHER_AXIS_AT_CATEGORY")) - , m_xFL_Position(m_xBuilder->weld_frame("FL_POSITION")) - , m_xRB_On(m_xBuilder->weld_radio_button("RB_ON")) - , m_xRB_Between(m_xBuilder->weld_radio_button("RB_BETWEEN")) - , m_xFL_Labels(m_xBuilder->weld_frame("FL_LABELS")) - , m_xLB_PlaceLabels(m_xBuilder->weld_combo_box("LB_PLACE_LABELS")) - , m_xCB_TicksInner(m_xBuilder->weld_check_button("CB_TICKS_INNER")) - , m_xCB_TicksOuter(m_xBuilder->weld_check_button("CB_TICKS_OUTER")) - , m_xCB_MinorInner(m_xBuilder->weld_check_button("CB_MINOR_INNER")) - , m_xCB_MinorOuter(m_xBuilder->weld_check_button("CB_MINOR_OUTER")) - , m_xBxPlaceTicks(m_xBuilder->weld_widget("boxPLACE_TICKS")) - , m_xLB_PlaceTicks(m_xBuilder->weld_combo_box("LB_PLACE_TICKS")) + , m_xFL_AxisLine(m_xBuilder->weld_frame(u"FL_AXIS_LINE"_ustr)) + , m_xLB_CrossesAt(m_xBuilder->weld_combo_box(u"LB_CROSSES_OTHER_AXIS_AT"_ustr)) + , m_xED_CrossesAt(m_xBuilder->weld_formatted_spin_button(u"EDT_CROSSES_OTHER_AXIS_AT"_ustr)) + , m_xED_CrossesAtCategory(m_xBuilder->weld_combo_box( u"EDT_CROSSES_OTHER_AXIS_AT_CATEGORY"_ustr)) + , m_xFL_Position(m_xBuilder->weld_frame(u"FL_POSITION"_ustr)) + , m_xRB_On(m_xBuilder->weld_radio_button(u"RB_ON"_ustr)) + , m_xRB_Between(m_xBuilder->weld_radio_button(u"RB_BETWEEN"_ustr)) + , m_xFL_Labels(m_xBuilder->weld_frame(u"FL_LABELS"_ustr)) + , m_xLB_PlaceLabels(m_xBuilder->weld_combo_box(u"LB_PLACE_LABELS"_ustr)) + , m_xCB_TicksInner(m_xBuilder->weld_check_button(u"CB_TICKS_INNER"_ustr)) + , m_xCB_TicksOuter(m_xBuilder->weld_check_button(u"CB_TICKS_OUTER"_ustr)) + , m_xCB_MinorInner(m_xBuilder->weld_check_button(u"CB_MINOR_INNER"_ustr)) + , m_xCB_MinorOuter(m_xBuilder->weld_check_button(u"CB_MINOR_OUTER"_ustr)) + , m_xBxPlaceTicks(m_xBuilder->weld_widget(u"boxPLACE_TICKS"_ustr)) + , m_xLB_PlaceTicks(m_xBuilder->weld_combo_box(u"LB_PLACE_TICKS"_ustr)) { m_xLB_CrossesAt->connect_changed(LINK(this, AxisPositionsTabPage, CrossesAtSelectHdl)); m_xLB_PlaceLabels->connect_changed(LINK(this, AxisPositionsTabPage, PlaceLabelsSelectHdl)); @@ -176,7 +176,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) else { m_xED_CrossesAtCategory->set_active(-1); - m_xED_CrossesAt->set_text(""); + m_xED_CrossesAt->set_text(u""_ustr); } } else diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index b301a9794d5d..b92caf4902e9 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::chart2; ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogController* pController, rtl::Reference<::chart::ChartModel> xChartModel, bool bShowDescription) - : OWizardPage(pPage, pController, "modules/schart/ui/tp_ChartType.ui", "tp_ChartType") + : OWizardPage(pPage, pController, u"modules/schart/ui/tp_ChartType.ui"_ustr, u"tp_ChartType"_ustr) , m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(m_xBuilder.get()) ) , m_pStackingResourceGroup( new StackingResourceGroup(m_xBuilder.get()) ) , m_pSplineResourceGroup( new SplineResourceGroup(m_xBuilder.get(), pController->getDialog()) ) @@ -52,10 +52,10 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle , m_pCurrentMainType(nullptr) , m_nChangingCalls(0) , m_aTimerTriggeredControllerLock( m_xChartModel ) - , m_xFT_ChooseType(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD")) - , m_xMainTypeList(m_xBuilder->weld_tree_view("charttype")) - , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin", true))) - , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, "subtype", *m_xSubTypeList)) + , m_xFT_ChooseType(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr)) + , m_xMainTypeList(m_xBuilder->weld_tree_view(u"charttype"_ustr)) + , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) + , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList)) { Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(Size(150, 50), MapMode(MapUnit::MapAppFont))); m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height()); @@ -85,7 +85,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle { try { - xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes; + xProps->getPropertyValue(u"EnableComplexChartTypes"_ustr) >>= bEnableComplexChartTypes; } catch( const uno::Exception& ) { @@ -114,7 +114,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle for (auto const& elem : m_aChartTypeDialogControllerList) { - m_xMainTypeList->append("", elem->getName(), elem->getImage()); + m_xMainTypeList->append(u""_ustr, elem->getName(), elem->getImage()); elem->setChangeListener( this ); } diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx index 3594e3e8ffeb..0bd8f6831f27 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.cxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx @@ -23,7 +23,7 @@ namespace chart { DataLabelsTabPage::DataLabelsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_DataLabel.ui", "tp_DataLabel", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_DataLabel.ui"_ustr, u"tp_DataLabel"_ustr, &rInAttrs) , m_aDataLabelResources(m_xBuilder.get(), pController->getDialog(), rInAttrs) { } diff --git a/chart2/source/controller/dialogs/tp_DataPointOption.cxx b/chart2/source/controller/dialogs/tp_DataPointOption.cxx index 4c824287206c..c7bdebde8370 100644 --- a/chart2/source/controller/dialogs/tp_DataPointOption.cxx +++ b/chart2/source/controller/dialogs/tp_DataPointOption.cxx @@ -27,9 +27,9 @@ namespace chart DataPointOptionTabPage::DataPointOptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_DataPointOption.ui", - "tp_DataPointOption", &rInAttrs) - , m_xCBHideLegendEntry(m_xBuilder->weld_check_button("CB_LEGEND_ENTRY_HIDDEN")) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_DataPointOption.ui"_ustr, + u"tp_DataPointOption"_ustr, &rInAttrs) + , m_xCBHideLegendEntry(m_xBuilder->weld_check_button(u"CB_LEGEND_ENTRY_HIDDEN"_ustr)) { } diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index fe4ba0981599..fdd7c9a83b62 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -105,7 +105,7 @@ OUString lcl_GetSelectedRolesRange( const weld::TreeView& rRoleListBox ) OUString lcl_GetSequenceNameForLabel(const ::chart::SeriesEntry* pEntry) { - OUString aResult("values-y"); + OUString aResult(u"values-y"_ustr); if (pEntry && pEntry->m_xChartType.is()) aResult = pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel(); return aResult; @@ -160,28 +160,28 @@ DataSourceTabPage::DataSourceTabPage(weld::Container* pPage, weld::DialogControl DialogModel & rDialogModel, ChartTypeTemplateProvider* pTemplateProvider, bool bHideDescription /* = false */) - : ::vcl::OWizardPage(pPage, pController, "modules/schart/ui/tp_DataSource.ui", "tp_DataSource") + : ::vcl::OWizardPage(pPage, pController, u"modules/schart/ui/tp_DataSource.ui"_ustr, u"tp_DataSource"_ustr) , m_pTemplateProvider(pTemplateProvider) , m_rDialogModel(rDialogModel) , m_pCurrentRangeChoosingField( nullptr ) , m_bIsDirty( false ) , m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController)) - , m_xFT_CAPTION(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD")) - , m_xFT_SERIES(m_xBuilder->weld_label("FT_SERIES")) - , m_xLB_SERIES(m_xBuilder->weld_tree_view("LB_SERIES")) - , m_xBTN_ADD(m_xBuilder->weld_button("BTN_ADD")) - , m_xBTN_REMOVE(m_xBuilder->weld_button("BTN_REMOVE")) - , m_xBTN_UP(m_xBuilder->weld_button("BTN_UP")) - , m_xBTN_DOWN(m_xBuilder->weld_button("BTN_DOWN")) - , m_xFT_ROLE(m_xBuilder->weld_label("FT_ROLE")) - , m_xLB_ROLE(m_xBuilder->weld_tree_view("LB_ROLE")) - , m_xFT_RANGE(m_xBuilder->weld_label("FT_RANGE")) - , m_xEDT_RANGE(m_xBuilder->weld_entry("EDT_RANGE")) - , m_xIMB_RANGE_MAIN(m_xBuilder->weld_button("IMB_RANGE_MAIN")) - , m_xFT_CATEGORIES(m_xBuilder->weld_label("FT_CATEGORIES")) - , m_xFT_DATALABELS(m_xBuilder->weld_label("FT_DATALABELS")) - , m_xEDT_CATEGORIES(m_xBuilder->weld_entry("EDT_CATEGORIES")) - , m_xIMB_RANGE_CAT(m_xBuilder->weld_button("IMB_RANGE_CAT")) + , m_xFT_CAPTION(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr)) + , m_xFT_SERIES(m_xBuilder->weld_label(u"FT_SERIES"_ustr)) + , m_xLB_SERIES(m_xBuilder->weld_tree_view(u"LB_SERIES"_ustr)) + , m_xBTN_ADD(m_xBuilder->weld_button(u"BTN_ADD"_ustr)) + , m_xBTN_REMOVE(m_xBuilder->weld_button(u"BTN_REMOVE"_ustr)) + , m_xBTN_UP(m_xBuilder->weld_button(u"BTN_UP"_ustr)) + , m_xBTN_DOWN(m_xBuilder->weld_button(u"BTN_DOWN"_ustr)) + , m_xFT_ROLE(m_xBuilder->weld_label(u"FT_ROLE"_ustr)) + , m_xLB_ROLE(m_xBuilder->weld_tree_view(u"LB_ROLE"_ustr)) + , m_xFT_RANGE(m_xBuilder->weld_label(u"FT_RANGE"_ustr)) + , m_xEDT_RANGE(m_xBuilder->weld_entry(u"EDT_RANGE"_ustr)) + , m_xIMB_RANGE_MAIN(m_xBuilder->weld_button(u"IMB_RANGE_MAIN"_ustr)) + , m_xFT_CATEGORIES(m_xBuilder->weld_label(u"FT_CATEGORIES"_ustr)) + , m_xFT_DATALABELS(m_xBuilder->weld_label(u"FT_DATALABELS"_ustr)) + , m_xEDT_CATEGORIES(m_xBuilder->weld_entry(u"EDT_CATEGORIES"_ustr)) + , m_xIMB_RANGE_CAT(m_xBuilder->weld_button(u"IMB_RANGE_CAT"_ustr)) { m_xLB_SERIES->set_size_request(m_xLB_SERIES->get_approximate_digit_width() * 25, m_xLB_SERIES->get_height_rows(10)); @@ -510,7 +510,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, weld::Button&, voi OUString aUIStr(SchResId(STR_DATA_SELECT_RANGE_FOR_SERIES)); // replace role - OUString aReplacement( "%VALUETYPE" ); + OUString aReplacement( u"%VALUETYPE"_ustr ); sal_Int32 nIndex = aUIStr.indexOf( aReplacement ); if( nIndex != -1 ) { @@ -833,10 +833,10 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) // "$Sheet1.$A$1" aRange = xNewSeq->getSourceRangeRepresentation(); Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( "Role" , uno::Any( lcl_aLabelRole )); + xProp->setPropertyValue( u"Role"_ustr , uno::Any( lcl_aLabelRole )); //Labels should always include hidden cells, regardless of the setting chosen - xProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true)); + xProp->setPropertyValue( u"IncludeHiddenCells"_ustr, uno::Any(true)); xLabeledSeq->setLabel( xNewSeq ); } } @@ -868,7 +868,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) aRange = xNewSeq->getSourceRangeRepresentation(); Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( "Role" , uno::Any( aSelectedRole )); + xProp->setPropertyValue( u"Role"_ustr , uno::Any( aSelectedRole )); if( !xLabeledSeq.is()) { if( aSelectedRole == aSequenceNameForLabel ) diff --git a/chart2/source/controller/dialogs/tp_DataTable.cxx b/chart2/source/controller/dialogs/tp_DataTable.cxx index e6982b4a5067..acf447501483 100644 --- a/chart2/source/controller/dialogs/tp_DataTable.cxx +++ b/chart2/source/controller/dialogs/tp_DataTable.cxx @@ -13,8 +13,8 @@ namespace chart { DataTableTabPage::DataTableTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_DataTable.ui", "DataTableTabPage", - &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_DataTable.ui"_ustr, + u"DataTableTabPage"_ustr, &rInAttrs) , m_aDataTablePropertiesResources(*m_xBuilder) { } diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx index 927bf1130a43..8c63332e5e7d 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx @@ -25,7 +25,7 @@ namespace chart { ErrorBarsTabPage::ErrorBarsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_ErrorBars.ui", "tp_ErrorBars", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_ErrorBars.ui"_ustr, u"tp_ErrorBars"_ustr, &rInAttrs) , m_aErrorBarResources(m_xBuilder.get(), pController, rInAttrs, /* bNoneAvailable = */ false) { } diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 21a889bf854f..6c059cec7795 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -28,10 +28,10 @@ namespace chart { SchLegendPosTabPage::SchLegendPosTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_LegendPosition.ui", "tp_LegendPosition", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_LegendPosition.ui"_ustr, u"tp_LegendPosition"_ustr, &rInAttrs) , m_aLegendPositionResources(*m_xBuilder) - , m_aLbTextDirection(m_xBuilder->weld_combo_box("LB_LEGEND_TEXTDIR")) - , m_xCBLegendNoOverlay(m_xBuilder->weld_check_button("CB_NO_OVERLAY")) + , m_aLbTextDirection(m_xBuilder->weld_combo_box(u"LB_LEGEND_TEXTDIR"_ustr)) + , m_xCBLegendNoOverlay(m_xBuilder->weld_check_button(u"CB_NO_OVERLAY"_ustr)) { } diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 7c2c4d942e66..e9f1d1b957d7 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -29,7 +29,7 @@ namespace chart { SchLayoutTabPage::SchLayoutTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_ChartType.ui", "tp_ChartType", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_ChartType.ui"_ustr, u"tp_ChartType"_ustr, &rInAttrs) { m_pGeometryResources.reset(new BarGeometryResources(m_xBuilder.get())); } diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index ad7b2b6f0f3e..cb646e3266be 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -28,14 +28,14 @@ namespace chart { PolarOptionsTabPage::PolarOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_PolarOptions.ui", "tp_PolarOptions", &rInAttrs) - , m_xCB_Clockwise(m_xBuilder->weld_check_button("CB_CLOCKWISE")) - , m_xFL_StartingAngle(m_xBuilder->weld_frame("frameANGLE")) - , m_xNF_StartingAngle(m_xBuilder->weld_metric_spin_button("NF_STARTING_ANGLE", FieldUnit::DEGREE)) - , m_xFL_PlotOptions(m_xBuilder->weld_frame("framePLOT_OPTIONS")) - , m_xCB_IncludeHiddenCells(m_xBuilder->weld_check_button("CB_INCLUDE_HIDDEN_CELLS_POLAR")) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_PolarOptions.ui"_ustr, u"tp_PolarOptions"_ustr, &rInAttrs) + , m_xCB_Clockwise(m_xBuilder->weld_check_button(u"CB_CLOCKWISE"_ustr)) + , m_xFL_StartingAngle(m_xBuilder->weld_frame(u"frameANGLE"_ustr)) + , m_xNF_StartingAngle(m_xBuilder->weld_metric_spin_button(u"NF_STARTING_ANGLE"_ustr, FieldUnit::DEGREE)) + , m_xFL_PlotOptions(m_xBuilder->weld_frame(u"framePLOT_OPTIONS"_ustr)) + , m_xCB_IncludeHiddenCells(m_xBuilder->weld_check_button(u"CB_INCLUDE_HIDDEN_CELLS_POLAR"_ustr)) , m_xAngleDial(new svx::DialControl) - , m_xAngleDialWin(new weld::CustomWeld(*m_xBuilder, "CT_ANGLE_DIAL", *m_xAngleDial)) + , m_xAngleDialWin(new weld::CustomWeld(*m_xBuilder, u"CT_ANGLE_DIAL"_ustr, *m_xAngleDial)) { m_xAngleDial->SetLinkedField(m_xNF_StartingAngle.get()); } diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index a88f6a826e0b..d5d4a621d8cf 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -62,26 +62,26 @@ using ::com::sun::star::uno::Sequence; RangeChooserTabPage::RangeChooserTabPage(weld::Container* pPage, weld::DialogController* pController, DialogModel & rDialogModel, ChartTypeTemplateProvider* pTemplateProvider, bool bHideDescription /* = false */) - : OWizardPage(pPage, pController, "modules/schart/ui/tp_RangeChooser.ui", "tp_RangeChooser") + : OWizardPage(pPage, pController, u"modules/schart/ui/tp_RangeChooser.ui"_ustr, u"tp_RangeChooser"_ustr) , m_nChangingControlCalls(0) , m_bIsDirty(false) , m_pTemplateProvider(pTemplateProvider) , m_rDialogModel( rDialogModel ) , m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController)) - , m_xFT_Caption(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD")) - , m_xED_Range(m_xBuilder->weld_entry("ED_RANGE")) - , m_xIB_Range(m_xBuilder->weld_button("IB_RANGE")) - , m_xRB_Rows(m_xBuilder->weld_radio_button("RB_DATAROWS")) - , m_xRB_Columns(m_xBuilder->weld_radio_button("RB_DATACOLS")) - , m_xCB_FirstRowAsLabel(m_xBuilder->weld_check_button("CB_FIRST_ROW_ASLABELS")) - , m_xCB_FirstColumnAsLabel(m_xBuilder->weld_check_button("CB_FIRST_COLUMN_ASLABELS")) - , m_xFTTitle(m_xBuilder->weld_label("STR_PAGE_DATA_RANGE")) - , m_xFL_TimeBased(m_xBuilder->weld_widget("separator1")) - , m_xCB_TimeBased(m_xBuilder->weld_check_button("CB_TIME_BASED")) - , m_xFT_TimeStart(m_xBuilder->weld_label("label1")) - , m_xEd_TimeStart(m_xBuilder->weld_entry("ED_TIME_BASED_START")) - , m_xFT_TimeEnd(m_xBuilder->weld_label("label2")) - , m_xEd_TimeEnd(m_xBuilder->weld_entry("ED_TIME_BASED_END")) + , m_xFT_Caption(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr)) + , m_xED_Range(m_xBuilder->weld_entry(u"ED_RANGE"_ustr)) + , m_xIB_Range(m_xBuilder->weld_button(u"IB_RANGE"_ustr)) + , m_xRB_Rows(m_xBuilder->weld_radio_button(u"RB_DATAROWS"_ustr)) + , m_xRB_Columns(m_xBuilder->weld_radio_button(u"RB_DATACOLS"_ustr)) + , m_xCB_FirstRowAsLabel(m_xBuilder->weld_check_button(u"CB_FIRST_ROW_ASLABELS"_ustr)) + , m_xCB_FirstColumnAsLabel(m_xBuilder->weld_check_button(u"CB_FIRST_COLUMN_ASLABELS"_ustr)) + , m_xFTTitle(m_xBuilder->weld_label(u"STR_PAGE_DATA_RANGE"_ustr)) + , m_xFL_TimeBased(m_xBuilder->weld_widget(u"separator1"_ustr)) + , m_xCB_TimeBased(m_xBuilder->weld_check_button(u"CB_TIME_BASED"_ustr)) + , m_xFT_TimeStart(m_xBuilder->weld_label(u"label1"_ustr)) + , m_xEd_TimeStart(m_xBuilder->weld_entry(u"ED_TIME_BASED_START"_ustr)) + , m_xFT_TimeEnd(m_xBuilder->weld_label(u"label2"_ustr)) + , m_xEd_TimeEnd(m_xBuilder->weld_entry(u"ED_TIME_BASED_END"_ustr)) { m_xFT_Caption->set_visible(!bHideDescription); @@ -216,7 +216,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls() { aArguments.realloc( aArguments.getLength() + 1 ); aArguments.getArray()[aArguments.getLength() - 1] = - beans::PropertyValue( "TimeBased", -1, uno::Any(bTimeBased), + beans::PropertyValue( u"TimeBased"_ustr, -1, uno::Any(bTimeBased), beans::PropertyState_DIRECT_VALUE ); } @@ -227,7 +227,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls() m_rDialogModel.setTemplate( m_xCurrentChartTypeTemplate ); aArguments.realloc( aArguments.getLength() + 1 ); aArguments.getArray()[aArguments.getLength() - 1] = - beans::PropertyValue( "CellRangeRepresentation" , -1, + beans::PropertyValue( u"CellRangeRepresentation"_ustr , -1, uno::Any( m_aLastValidRangeString ), beans::PropertyState_DIRECT_VALUE ); m_rDialogModel.setData( aArguments ); diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index b8c9f0598357..8d7ce3d9ff58 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -54,7 +54,7 @@ void lcl_setValue(weld::FormattedSpinButton& rFmtField, double fValue) } ScaleTabPage::ScaleTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_Scale.ui", "tp_Scale", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_Scale.ui"_ustr, u"tp_Scale"_ustr, &rInAttrs) , fMin(0.0) , fMax(0.0) , fStepMain(0.0) @@ -67,31 +67,31 @@ ScaleTabPage::ScaleTabPage(weld::Container* pPage, weld::DialogController* pCont , m_bAllowDateAxis(false) , pNumFormatter(nullptr) , m_bShowAxisOrigin(false) - , m_xCbxReverse(m_xBuilder->weld_check_button("CBX_REVERSE")) - , m_xCbxLogarithm(m_xBuilder->weld_check_button("CBX_LOGARITHM")) - , m_xBxType(m_xBuilder->weld_widget("boxTYPE")) - , m_xLB_AxisType(m_xBuilder->weld_combo_box("LB_AXIS_TYPE")) - , m_xBxMinMax(m_xBuilder->weld_widget("gridMINMAX")) - , m_xFmtFldMin(m_xBuilder->weld_formatted_spin_button("EDT_MIN")) - , m_xCbxAutoMin(m_xBuilder->weld_check_button("CBX_AUTO_MIN")) - , m_xFmtFldMax(m_xBuilder->weld_formatted_spin_button("EDT_MAX")) - , m_xCbxAutoMax(m_xBuilder->weld_check_button("CBX_AUTO_MAX")) - , m_xBxResolution(m_xBuilder->weld_widget("boxRESOLUTION")) - , m_xLB_TimeResolution(m_xBuilder->weld_combo_box("LB_TIME_RESOLUTION")) - , m_xCbx_AutoTimeResolution(m_xBuilder->weld_check_button("CBX_AUTO_TIME_RESOLUTION")) - , m_xTxtMain(m_xBuilder->weld_label("TXT_STEP_MAIN")) - , m_xFmtFldStepMain(m_xBuilder->weld_formatted_spin_button("EDT_STEP_MAIN")) - , m_xMt_MainDateStep(m_xBuilder->weld_spin_button("MT_MAIN_DATE_STEP")) - , m_xLB_MainTimeUnit(m_xBuilder->weld_combo_box("LB_MAIN_TIME_UNIT")) - , m_xCbxAutoStepMain(m_xBuilder->weld_check_button("CBX_AUTO_STEP_MAIN")) - , m_xTxtHelpCount(m_xBuilder->weld_label("TXT_STEP_HELP_COUNT")) - , m_xTxtHelp(m_xBuilder->weld_label("TXT_STEP_HELP")) - , m_xMtStepHelp(m_xBuilder->weld_spin_button("MT_STEPHELP")) - , m_xLB_HelpTimeUnit(m_xBuilder->weld_combo_box("LB_HELP_TIME_UNIT")) - , m_xCbxAutoStepHelp(m_xBuilder->weld_check_button("CBX_AUTO_STEP_HELP")) - , m_xFmtFldOrigin(m_xBuilder->weld_formatted_spin_button("EDT_ORIGIN")) - , m_xCbxAutoOrigin(m_xBuilder->weld_check_button("CBX_AUTO_ORIGIN")) - , m_xBxOrigin(m_xBuilder->weld_widget("boxORIGIN")) + , m_xCbxReverse(m_xBuilder->weld_check_button(u"CBX_REVERSE"_ustr)) + , m_xCbxLogarithm(m_xBuilder->weld_check_button(u"CBX_LOGARITHM"_ustr)) + , m_xBxType(m_xBuilder->weld_widget(u"boxTYPE"_ustr)) + , m_xLB_AxisType(m_xBuilder->weld_combo_box(u"LB_AXIS_TYPE"_ustr)) + , m_xBxMinMax(m_xBuilder->weld_widget(u"gridMINMAX"_ustr)) + , m_xFmtFldMin(m_xBuilder->weld_formatted_spin_button(u"EDT_MIN"_ustr)) + , m_xCbxAutoMin(m_xBuilder->weld_check_button(u"CBX_AUTO_MIN"_ustr)) + , m_xFmtFldMax(m_xBuilder->weld_formatted_spin_button(u"EDT_MAX"_ustr)) + , m_xCbxAutoMax(m_xBuilder->weld_check_button(u"CBX_AUTO_MAX"_ustr)) + , m_xBxResolution(m_xBuilder->weld_widget(u"boxRESOLUTION"_ustr)) + , m_xLB_TimeResolution(m_xBuilder->weld_combo_box(u"LB_TIME_RESOLUTION"_ustr)) + , m_xCbx_AutoTimeResolution(m_xBuilder->weld_check_button(u"CBX_AUTO_TIME_RESOLUTION"_ustr)) + , m_xTxtMain(m_xBuilder->weld_label(u"TXT_STEP_MAIN"_ustr)) + , m_xFmtFldStepMain(m_xBuilder->weld_formatted_spin_button(u"EDT_STEP_MAIN"_ustr)) + , m_xMt_MainDateStep(m_xBuilder->weld_spin_button(u"MT_MAIN_DATE_STEP"_ustr)) + , m_xLB_MainTimeUnit(m_xBuilder->weld_combo_box(u"LB_MAIN_TIME_UNIT"_ustr)) + , m_xCbxAutoStepMain(m_xBuilder->weld_check_button(u"CBX_AUTO_STEP_MAIN"_ustr)) + , m_xTxtHelpCount(m_xBuilder->weld_label(u"TXT_STEP_HELP_COUNT"_ustr)) + , m_xTxtHelp(m_xBuilder->weld_label(u"TXT_STEP_HELP"_ustr)) + , m_xMtStepHelp(m_xBuilder->weld_spin_button(u"MT_STEPHELP"_ustr)) + , m_xLB_HelpTimeUnit(m_xBuilder->weld_combo_box(u"LB_HELP_TIME_UNIT"_ustr)) + , m_xCbxAutoStepHelp(m_xBuilder->weld_check_button(u"CBX_AUTO_STEP_HELP"_ustr)) + , m_xFmtFldOrigin(m_xBuilder->weld_formatted_spin_button(u"EDT_ORIGIN"_ustr)) + , m_xCbxAutoOrigin(m_xBuilder->weld_check_button(u"CBX_AUTO_ORIGIN"_ustr)) + , m_xBxOrigin(m_xBuilder->weld_widget(u"boxORIGIN"_ustr)) { m_xCbxAutoMin->connect_toggled(LINK(this, ScaleTabPage, EnableValueHdl)); m_xCbxAutoMax->connect_toggled(LINK(this, ScaleTabPage, EnableValueHdl)); diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 3ffbc3642e9c..ee6dabc07a6f 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -31,26 +31,26 @@ namespace chart { SchOptionTabPage::SchOptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_SeriesToAxis.ui", "TP_OPTIONS", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_SeriesToAxis.ui"_ustr, u"TP_OPTIONS"_ustr, &rInAttrs) , m_nAllSeriesAxisIndex(0) , m_bProvidesSecondaryYAxis(true) , m_bProvidesOverlapAndGapWidth(false) , m_bProvidesBarConnectors(false) - , m_xGrpAxis(m_xBuilder->weld_widget("frameGrpAxis")) - , m_xRbtAxis1(m_xBuilder->weld_radio_button("RBT_OPT_AXIS_1")) - , m_xRbtAxis2(m_xBuilder->weld_radio_button("RBT_OPT_AXIS_2")) - , m_xGrpBar(m_xBuilder->weld_widget("frameSettings")) - , m_xMTGap(m_xBuilder->weld_metric_spin_button("MT_GAP", FieldUnit::PERCENT)) - , m_xMTOverlap(m_xBuilder->weld_metric_spin_button("MT_OVERLAP", FieldUnit::PERCENT)) - , m_xCBConnect(m_xBuilder->weld_check_button("CB_CONNECTOR")) - , m_xCBAxisSideBySide(m_xBuilder->weld_check_button("CB_BARS_SIDE_BY_SIDE")) - , m_xGrpPlotOptions(m_xBuilder->weld_widget("frameFL_PLOT_OPTIONS")) - , m_xGridPlotOptions(m_xBuilder->weld_widget("gridPLOT_OPTIONS")) - , m_xRB_DontPaint(m_xBuilder->weld_radio_button("RB_DONT_PAINT")) - , m_xRB_AssumeZero(m_xBuilder->weld_radio_button("RB_ASSUME_ZERO")) - , m_xRB_ContinueLine(m_xBuilder->weld_radio_button("RB_CONTINUE_LINE")) - , m_xCBIncludeHiddenCells(m_xBuilder->weld_check_button("CB_INCLUDE_HIDDEN_CELLS")) - , m_xCBHideLegendEntry(m_xBuilder->weld_check_button("CB_LEGEND_ENTRY_HIDDEN")) + , m_xGrpAxis(m_xBuilder->weld_widget(u"frameGrpAxis"_ustr)) + , m_xRbtAxis1(m_xBuilder->weld_radio_button(u"RBT_OPT_AXIS_1"_ustr)) + , m_xRbtAxis2(m_xBuilder->weld_radio_button(u"RBT_OPT_AXIS_2"_ustr)) + , m_xGrpBar(m_xBuilder->weld_widget(u"frameSettings"_ustr)) + , m_xMTGap(m_xBuilder->weld_metric_spin_button(u"MT_GAP"_ustr, FieldUnit::PERCENT)) + , m_xMTOverlap(m_xBuilder->weld_metric_spin_button(u"MT_OVERLAP"_ustr, FieldUnit::PERCENT)) + , m_xCBConnect(m_xBuilder->weld_check_button(u"CB_CONNECTOR"_ustr)) + , m_xCBAxisSideBySide(m_xBuilder->weld_check_button(u"CB_BARS_SIDE_BY_SIDE"_ustr)) + , m_xGrpPlotOptions(m_xBuilder->weld_widget(u"frameFL_PLOT_OPTIONS"_ustr)) + , m_xGridPlotOptions(m_xBuilder->weld_widget(u"gridPLOT_OPTIONS"_ustr)) + , m_xRB_DontPaint(m_xBuilder->weld_radio_button(u"RB_DONT_PAINT"_ustr)) + , m_xRB_AssumeZero(m_xBuilder->weld_radio_button(u"RB_ASSUME_ZERO"_ustr)) + , m_xRB_ContinueLine(m_xBuilder->weld_radio_button(u"RB_CONTINUE_LINE"_ustr)) + , m_xCBIncludeHiddenCells(m_xBuilder->weld_check_button(u"CB_INCLUDE_HIDDEN_CELLS"_ustr)) + , m_xCBHideLegendEntry(m_xBuilder->weld_check_button(u"CB_LEGEND_ENTRY_HIDDEN"_ustr)) { m_xRbtAxis1->connect_toggled(LINK(this, SchOptionTabPage, EnableHdl)); m_xRbtAxis2->connect_toggled(LINK(this, SchOptionTabPage, EnableHdl)); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index f3380042eb13..11a3795fb3cd 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -31,14 +31,14 @@ namespace chart SchAlignmentTabPage::SchAlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs, bool bWithRotation) - : SfxTabPage(pPage, pController, "modules/schart/ui/titlerotationtabpage.ui", "TitleRotationTabPage", &rInAttrs) - , m_xFtRotate(m_xBuilder->weld_label("degreeL")) - , m_xNfRotate(m_xBuilder->weld_metric_spin_button("OrientDegree", FieldUnit::DEGREE)) - , m_xCbStacked(m_xBuilder->weld_check_button("stackedCB")) - , m_xFtABCD(m_xBuilder->weld_label("labelABCD")) - , m_aLbTextDirection(m_xBuilder->weld_combo_box("textdirLB")) + : SfxTabPage(pPage, pController, u"modules/schart/ui/titlerotationtabpage.ui"_ustr, u"TitleRotationTabPage"_ustr, &rInAttrs) + , m_xFtRotate(m_xBuilder->weld_label(u"degreeL"_ustr)) + , m_xNfRotate(m_xBuilder->weld_metric_spin_button(u"OrientDegree"_ustr, FieldUnit::DEGREE)) + , m_xCbStacked(m_xBuilder->weld_check_button(u"stackedCB"_ustr)) + , m_xFtABCD(m_xBuilder->weld_label(u"labelABCD"_ustr)) + , m_aLbTextDirection(m_xBuilder->weld_combo_box(u"textdirLB"_ustr)) , m_xCtrlDial(new svx::DialControl) - , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialCtrl", *m_xCtrlDial)) + , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, u"dialCtrl"_ustr, *m_xCtrlDial)) { m_xCtrlDial->SetLinkedField(m_xNfRotate.get()); m_xCtrlDial->SetText(m_xFtABCD->get_label()); diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx index fe25959bdd51..cace8a073b87 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.cxx +++ b/chart2/source/controller/dialogs/tp_Trendline.cxx @@ -23,7 +23,7 @@ namespace chart { TrendlineTabPage::TrendlineTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "modules/schart/ui/tp_Trendline.ui", "TP_TRENDLINE", &rInAttrs) + : SfxTabPage(pPage, pController, u"modules/schart/ui/tp_Trendline.ui"_ustr, u"TP_TRENDLINE"_ustr, &rInAttrs) , m_aTrendlineResources(*m_xBuilder, rInAttrs) { } diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index 4e813b4593fa..480bf3fe20b6 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -34,16 +34,16 @@ using namespace ::com::sun::star::chart2; TitlesAndObjectsTabPage::TitlesAndObjectsTabPage(weld::Container* pPage, weld::DialogController* pController, rtl::Reference<::chart::ChartModel> xChartModel, const uno::Reference< uno::XComponentContext >& xContext ) - : OWizardPage(pPage, pController, "modules/schart/ui/wizelementspage.ui", "WizElementsPage") + : OWizardPage(pPage, pController, u"modules/schart/ui/wizelementspage.ui"_ustr, u"WizElementsPage"_ustr) , m_xTitleResources(new TitleResources(*m_xBuilder, false)) , m_xLegendPositionResources(new LegendPositionResources(*m_xBuilder, xContext)) , m_xChartModel(std::move(xChartModel)) , m_xCC(xContext) , m_bCommitToModel(true) , m_aTimerTriggeredControllerLock( m_xChartModel ) - , m_xCB_Grid_X(m_xBuilder->weld_check_button("x")) - , m_xCB_Grid_Y(m_xBuilder->weld_check_button("y")) - , m_xCB_Grid_Z(m_xBuilder->weld_check_button("z")) + , m_xCB_Grid_X(m_xBuilder->weld_check_button(u"x"_ustr)) + , m_xCB_Grid_Y(m_xBuilder->weld_check_button(u"y"_ustr)) + , m_xCB_Grid_Z(m_xBuilder->weld_check_button(u"z"_ustr)) { m_xTitleResources->connect_changed( LINK( this, TitlesAndObjectsTabPage, ChangeEditHdl )); m_xLegendPositionResources->SetChangeHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index c91eb41dbe97..4876b5ab3ac6 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -98,7 +98,7 @@ AxisItemConverter::AxisItemConverter( xChartDoc, GraphicObjectType::LineProperties )); m_aConverters.emplace_back( - new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); + new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, u"ReferencePageSize"_ustr)); m_xAxis = dynamic_cast<::chart::Axis*>(rPropertySet.get()); assert(m_xAxis); @@ -335,7 +335,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_POSITION: { css::chart::ChartAxisPosition eAxisPos( css::chart::ChartAxisPosition_ZERO ); - GetPropertySet()->getPropertyValue( "CrossoverPosition" ) >>= eAxisPos; + GetPropertySet()->getPropertyValue( u"CrossoverPosition"_ustr ) >>= eAxisPos; rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(eAxisPos) ) ); } break; @@ -343,7 +343,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_POSITION_VALUE: { double fValue = 0.0; - if( GetPropertySet()->getPropertyValue( "CrossoverValue" ) >>= fValue ) + if( GetPropertySet()->getPropertyValue( u"CrossoverValue"_ustr ) >>= fValue ) rOutItemSet.Put( SvxDoubleItem( fValue, SCHATTR_AXIS_POSITION_VALUE ) ); } break; @@ -372,7 +372,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_LABEL_POSITION: { css::chart::ChartAxisLabelPosition ePos( css::chart::ChartAxisLabelPosition_NEAR_AXIS ); - GetPropertySet()->getPropertyValue( "LabelPosition" ) >>= ePos; + GetPropertySet()->getPropertyValue( u"LabelPosition"_ustr ) >>= ePos; rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(ePos) ) ); } break; @@ -380,7 +380,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_MARK_POSITION: { css::chart::ChartAxisMarkPosition ePos( css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS ); - GetPropertySet()->getPropertyValue( "MarkPosition" ) >>= ePos; + GetPropertySet()->getPropertyValue( u"MarkPosition"_ustr ) >>= ePos; rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(ePos) ) ); } break; @@ -390,7 +390,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI // convert double to int (times 100) double fVal = 0; - if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal ) + if( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fVal ) { rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >( ::rtl::math::round( fVal * 100.0 )) ) )); @@ -727,11 +727,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet double fValue = 0.0; if( aValue >>= fValue ) { - xCrossingMainAxis->setPropertyValue( "CrossoverPosition" , uno::Any( css::chart::ChartAxisPosition_VALUE )); - xCrossingMainAxis->setPropertyValue( "CrossoverValue" , uno::Any( fValue )); + xCrossingMainAxis->setPropertyValue( u"CrossoverPosition"_ustr , uno::Any( css::chart::ChartAxisPosition_VALUE )); + xCrossingMainAxis->setPropertyValue( u"CrossoverValue"_ustr , uno::Any( fValue )); } else - xCrossingMainAxis->setPropertyValue( "CrossoverPosition" , uno::Any( css::chart::ChartAxisPosition_START )); + xCrossingMainAxis->setPropertyValue( u"CrossoverPosition"_ustr , uno::Any( css::chart::ChartAxisPosition_START )); } } } @@ -746,11 +746,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet static_cast<css::chart::ChartAxisPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue()); css::chart::ChartAxisPosition eOldAxisPos( css::chart::ChartAxisPosition_ZERO ); - bool bPropExisted = ( GetPropertySet()->getPropertyValue( "CrossoverPosition" ) >>= eOldAxisPos ); + bool bPropExisted = ( GetPropertySet()->getPropertyValue( u"CrossoverPosition"_ustr ) >>= eOldAxisPos ); if( !bPropExisted || ( eOldAxisPos != eAxisPos )) { - GetPropertySet()->setPropertyValue( "CrossoverPosition" , uno::Any( eAxisPos )); + GetPropertySet()->setPropertyValue( u"CrossoverPosition"_ustr , uno::Any( eAxisPos )); bChangedOtherwise = true; //move the parallel axes to the other side if necessary @@ -761,7 +761,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet if( xParallelAxis.is() ) { css::chart::ChartAxisPosition eOtherPos; - if( xParallelAxis->getPropertyValue( "CrossoverPosition" ) >>= eOtherPos ) + if( xParallelAxis->getPropertyValue( u"CrossoverPosition"_ustr ) >>= eOtherPos ) { if( eOtherPos == eAxisPos ) { @@ -769,7 +769,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet (eAxisPos==css::chart::ChartAxisPosition_START) ? css::chart::ChartAxisPosition_END : css::chart::ChartAxisPosition_START; - xParallelAxis->setPropertyValue( "CrossoverPosition" , uno::Any( eOppositePos )); + xParallelAxis->setPropertyValue( u"CrossoverPosition"_ustr , uno::Any( eOppositePos )); } } } @@ -783,11 +783,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet double fValue = static_cast< const SvxDoubleItem & >( rItemSet.Get( nWhichId )).GetValue(); double fOldValue = 0.0; - bool bPropExisted = ( GetPropertySet()->getPropertyValue( "CrossoverValue" ) >>= fOldValue ); + bool bPropExisted = ( GetPropertySet()->getPropertyValue( u"CrossoverValue"_ustr ) >>= fOldValue ); if( !bPropExisted || ( fOldValue != fValue )) { - GetPropertySet()->setPropertyValue( "CrossoverValue" , uno::Any( fValue )); + GetPropertySet()->setPropertyValue( u"CrossoverValue"_ustr , uno::Any( fValue )); bChangedOtherwise = true; //keep old and new settings for axis positioning in sync somehow @@ -830,11 +830,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet static_cast<css::chart::ChartAxisLabelPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue()); css::chart::ChartAxisLabelPosition eOldPos( css::chart::ChartAxisLabelPosition_NEAR_AXIS ); - bool bPropExisted = ( GetPropertySet()->getPropertyValue( "LabelPosition" ) >>= eOldPos ); + bool bPropExisted = ( GetPropertySet()->getPropertyValue( u"LabelPosition"_ustr ) >>= eOldPos ); if( !bPropExisted || ( eOldPos != ePos )) { - GetPropertySet()->setPropertyValue( "LabelPosition" , uno::Any( ePos )); + GetPropertySet()->setPropertyValue( u"LabelPosition"_ustr , uno::Any( ePos )); bChangedOtherwise = true; //move the parallel axes to the other side if necessary @@ -845,7 +845,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet if( xParallelAxis.is() ) { css::chart::ChartAxisLabelPosition eOtherPos; - if( xParallelAxis->getPropertyValue( "LabelPosition" ) >>= eOtherPos ) + if( xParallelAxis->getPropertyValue( u"LabelPosition"_ustr ) >>= eOtherPos ) { if( eOtherPos == ePos ) { @@ -853,7 +853,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet (ePos==css::chart::ChartAxisLabelPosition_OUTSIDE_START) ? css::chart::ChartAxisLabelPosition_OUTSIDE_END : css::chart::ChartAxisLabelPosition_OUTSIDE_START; - xParallelAxis->setPropertyValue( "LabelPosition" , uno::Any( eOppositePos )); + xParallelAxis->setPropertyValue( u"LabelPosition"_ustr , uno::Any( eOppositePos )); } } } @@ -868,11 +868,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet static_cast<css::chart::ChartAxisMarkPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue()); css::chart::ChartAxisMarkPosition eOldPos( css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS ); - bool bPropExisted = ( GetPropertySet()->getPropertyValue( "MarkPosition" ) >>= eOldPos ); + bool bPropExisted = ( GetPropertySet()->getPropertyValue( u"MarkPosition"_ustr ) >>= eOldPos ); if( !bPropExisted || ( eOldPos != ePos )) { - GetPropertySet()->setPropertyValue( "MarkPosition" , uno::Any( ePos )); + GetPropertySet()->setPropertyValue( u"MarkPosition"_ustr , uno::Any( ePos )); bChangedOtherwise = true; } } @@ -883,11 +883,11 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet double fVal = toDegrees(rItemSet.Get(SCHATTR_TEXT_DEGREES).GetValue()); double fOldVal = 0.0; bool bPropExisted = - ( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldVal ); + ( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fOldVal ); if( ! bPropExisted || fOldVal != fVal ) { - GetPropertySet()->setPropertyValue( "TextRotation" , uno::Any( fVal )); + GetPropertySet()->setPropertyValue( u"TextRotation"_ustr , uno::Any( fVal )); bChangedOtherwise = true; } } diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index a338ae70b4b8..a924d6db1803 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -142,21 +142,21 @@ void CharacterPropertyItemConverter::FillSpecialItem( SvxUnderlineItem aItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE); bool bModified = false; - uno::Any aValue( GetPropertySet()->getPropertyValue( "CharUnderline" )); + uno::Any aValue( GetPropertySet()->getPropertyValue( u"CharUnderline"_ustr )); if( aValue.hasValue()) { aItem.PutValue( aValue, MID_TL_STYLE ); bModified = true; } - aValue = GetPropertySet()->getPropertyValue( "CharUnderlineHasColor" ); + aValue = GetPropertySet()->getPropertyValue( u"CharUnderlineHasColor"_ustr ); if( aValue.hasValue() && *o3tl::doAccess<bool>(aValue) ) { aItem.PutValue( aValue, MID_TL_HASCOLOR ); bModified = true; } - aValue = GetPropertySet()->getPropertyValue( "CharUnderlineColor" ); + aValue = GetPropertySet()->getPropertyValue( u"CharUnderlineColor"_ustr ); if( aValue.hasValue()) { aItem.PutValue( aValue, MID_TL_COLOR ); @@ -173,21 +173,21 @@ void CharacterPropertyItemConverter::FillSpecialItem( SvxOverlineItem aItem( LINESTYLE_NONE, EE_CHAR_OVERLINE ); bool bModified = false; - uno::Any aValue( GetPropertySet()->getPropertyValue( "CharOverline" ) ); + uno::Any aValue( GetPropertySet()->getPropertyValue( u"CharOverline"_ustr ) ); if ( aValue.hasValue() ) { aItem.PutValue( aValue, MID_TL_STYLE ); bModified = true; } - aValue = GetPropertySet()->getPropertyValue( "CharOverlineHasColor" ); + aValue = GetPropertySet()->getPropertyValue( u"CharOverlineHasColor"_ustr ); if ( aValue.hasValue() && *o3tl::doAccess<bool>(aValue) ) { aItem.PutValue( aValue, MID_TL_HASCOLOR ); bModified = true; } - aValue = GetPropertySet()->getPropertyValue( "CharOverlineColor" ); + aValue = GetPropertySet()->getPropertyValue( u"CharOverlineColor"_ustr ); if ( aValue.hasValue() ) { aItem.PutValue( aValue, MID_TL_COLOR ); @@ -377,27 +377,27 @@ bool CharacterPropertyItemConverter::ApplySpecialItem( if( rItem.QueryValue( aValue, MID_TL_STYLE )) { - if( aValue != GetPropertySet()->getPropertyValue( "CharUnderline" )) + if( aValue != GetPropertySet()->getPropertyValue( u"CharUnderline"_ustr )) { - GetPropertySet()->setPropertyValue( "CharUnderline" , aValue ); + GetPropertySet()->setPropertyValue( u"CharUnderline"_ustr , aValue ); bChanged = true; } } if( rItem.QueryValue( aValue, MID_TL_COLOR )) { - if( aValue != GetPropertySet()->getPropertyValue( "CharUnderlineColor" )) + if( aValue != GetPropertySet()->getPropertyValue( u"CharUnderlineColor"_ustr )) { - GetPropertySet()->setPropertyValue( "CharUnderlineColor" , aValue ); + GetPropertySet()->setPropertyValue( u"CharUnderlineColor"_ustr , aValue ); bChanged = true; } } if( rItem.QueryValue( aValue, MID_TL_HASCOLOR )) { - if( aValue != GetPropertySet()->getPropertyValue( "CharUnderlineHasColor" )) + if( aValue != GetPropertySet()->getPropertyValue( u"CharUnderlineHasColor"_ustr )) { - GetPropertySet()->setPropertyValue( "CharUnderlineHasColor" , aValue ); + GetPropertySet()->setPropertyValue( u"CharUnderlineHasColor"_ustr , aValue ); bChanged = true; } } @@ -410,27 +410,27 @@ bool CharacterPropertyItemConverter::ApplySpecialItem( if ( rItem.QueryValue( aValue, MID_TL_STYLE ) ) { - if ( aValue != GetPropertySet()->getPropertyValue( "CharOverline" ) ) + if ( aValue != GetPropertySet()->getPropertyValue( u"CharOverline"_ustr ) ) { - GetPropertySet()->setPropertyValue( "CharOverline" , aValue ); + GetPropertySet()->setPropertyValue( u"CharOverline"_ustr , aValue ); bChanged = true; } } if ( rItem.QueryValue( aValue, MID_TL_COLOR ) ) { - if ( aValue != GetPropertySet()->getPropertyValue( "CharOverlineColor" ) ) + if ( aValue != GetPropertySet()->getPropertyValue( u"CharOverlineColor"_ustr ) ) { - GetPropertySet()->setPropertyValue( "CharOverlineColor" , aValue ); + GetPropertySet()->setPropertyValue( u"CharOverlineColor"_ustr , aValue ); bChanged = true; } } if ( rItem.QueryValue( aValue, MID_TL_HASCOLOR ) ) { - if ( aValue != GetPropertySet()->getPropertyValue( "CharOverlineHasColor" ) ) + if ( aValue != GetPropertySet()->getPropertyValue( u"CharOverlineHasColor"_ustr ) ) { - GetPropertySet()->setPropertyValue( "CharOverlineHasColor" , aValue ); + GetPropertySet()->setPropertyValue( u"CharOverlineHasColor"_ustr , aValue ); bChanged = true; } } diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 571f98a56952..cc00f5f300ba 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -106,7 +106,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe bool bChanged = false; if( !xPropertySet.is() ) return bChanged; - OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : OUString( "PercentageNumberFormat" ); + OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : u"PercentageNumberFormat"_ustr; sal_uInt16 nSourceWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE; if( rItemSet.GetItemState( nSourceWhich ) != SfxItemState::SET ) @@ -153,7 +153,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte bool bChanged = false; if( !xPropertySet.is() ) return bChanged; - OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : OUString( "PercentageNumberFormat" ); + OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : u"PercentageNumberFormat"_ustr; sal_uInt16 nFormatWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE; if( rItemSet.GetItemState( nWhichId ) != SfxItemState::SET ) @@ -230,7 +230,7 @@ DataPointItemConverter::DataPointItemConverter( { m_aConverters.emplace_back( new GraphicPropertyItemConverter( rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, eMapTo )); - m_aConverters.emplace_back( new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); + m_aConverters.emplace_back( new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, u"ReferencePageSize"_ustr)); if( bDataSeries ) { assert(dynamic_cast<DataSeries*>(rPropertySet.get())); @@ -379,20 +379,20 @@ bool DataPointItemConverter::ApplySpecialItem( try { OUString aOldValue; - GetPropertySet()->getPropertyValue( "LabelSeparator" ) >>= aOldValue; + GetPropertySet()->getPropertyValue( u"LabelSeparator"_ustr ) >>= aOldValue; if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get())); if( aOldValue != aNewValue || - DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelSeparator" , uno::Any( aOldValue ) ) ) + DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, u"LabelSeparator"_ustr , uno::Any( aOldValue ) ) ) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "LabelSeparator" , uno::Any( aNewValue ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, u"LabelSeparator"_ustr , uno::Any( aNewValue ) ); bChanged = true; } } else if( aOldValue != aNewValue ) { - GetPropertySet()->setPropertyValue( "LabelSeparator" , uno::Any( aNewValue )); + GetPropertySet()->setPropertyValue( u"LabelSeparator"_ustr , uno::Any( aNewValue )); bChanged = true; } } @@ -410,20 +410,20 @@ bool DataPointItemConverter::ApplySpecialItem( { bool bNew = static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue(); bool bOld = false; - GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld; + GetPropertySet()->getPropertyValue( u"TextWordWrap"_ustr ) >>= bOld; if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get())); if( bOld!=bNew || - DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) ) + DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, u"TextWordWrap"_ustr, uno::Any( bOld ) ) ) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "TextWordWrap", uno::Any( bNew ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, u"TextWordWrap"_ustr, uno::Any( bNew ) ); bChanged = true; } } else if( bOld!=bNew ) { - GetPropertySet()->setPropertyValue( "TextWordWrap", uno::Any( bNew )); + GetPropertySet()->setPropertyValue( u"TextWordWrap"_ustr, uno::Any( bNew )); bChanged = true; } } @@ -442,22 +442,22 @@ bool DataPointItemConverter::ApplySpecialItem( sal_Int32 nNew = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue(); sal_Int32 nOld = -1; RelativePosition aCustomLabelPosition; - GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld; + GetPropertySet()->getPropertyValue(u"LabelPlacement"_ustr) >>= nOld; if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get())); if( nOld!=nNew || - DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelPlacement" , uno::Any( nOld ) ) ) + DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, u"LabelPlacement"_ustr , uno::Any( nOld ) ) ) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "LabelPlacement" , uno::Any( nNew ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, u"LabelPlacement"_ustr , uno::Any( nNew ) ); bChanged = true; } } - else if( nOld!=nNew || (GetPropertySet()->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition) ) + else if( nOld!=nNew || (GetPropertySet()->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition) ) { - GetPropertySet()->setPropertyValue("LabelPlacement", uno::Any(nNew)); - GetPropertySet()->setPropertyValue("CustomLabelPosition", uno::Any()); - GetPropertySet()->setPropertyValue("CustomLabelSize", uno::Any()); + GetPropertySet()->setPropertyValue(u"LabelPlacement"_ustr, uno::Any(nNew)); + GetPropertySet()->setPropertyValue(u"CustomLabelPosition"_ustr, uno::Any()); + GetPropertySet()->setPropertyValue(u"CustomLabelSize"_ustr, uno::Any()); bChanged = true; } } @@ -475,7 +475,7 @@ bool DataPointItemConverter::ApplySpecialItem( rItemSet.Get( nWhichId )).GetValue(); chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol; + GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol; sal_Int32 nOldStyle = lcl_getSymbolStyleForSymbol( aSymbol ); if( nStyle != nOldStyle ) @@ -502,9 +502,9 @@ bool DataPointItemConverter::ApplySpecialItem( } if( bDeleteSymbol ) - GetPropertySet()->setPropertyValue( "Symbol" , uno::Any()); + GetPropertySet()->setPropertyValue( u"Symbol"_ustr , uno::Any()); else - GetPropertySet()->setPropertyValue( "Symbol" , uno::Any( aSymbol )); + GetPropertySet()->setPropertyValue( u"Symbol"_ustr , uno::Any( aSymbol )); bChanged = true; } } @@ -516,14 +516,14 @@ bool DataPointItemConverter::ApplySpecialItem( rItemSet.Get( nWhichId )).GetSize(); chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol; + GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol; if( aSize.getWidth() != aSymbol.Size.Width || aSize.getHeight() != aSymbol.Size.Height ) { aSymbol.Size.Width = aSize.getWidth(); aSymbol.Size.Height = aSize.getHeight(); - GetPropertySet()->setPropertyValue( "Symbol" , uno::Any( aSymbol )); + GetPropertySet()->setPropertyValue( u"Symbol"_ustr , uno::Any( aSymbol )); bChanged = true; } } @@ -542,11 +542,11 @@ bool DataPointItemConverter::ApplySpecialItem( { aXGraphicAny <<= xGraphic; chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol; + GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol; if( aSymbol.Graphic != xGraphic ) { aSymbol.Graphic = xGraphic; - GetPropertySet()->setPropertyValue( "Symbol" , uno::Any( aSymbol )); + GetPropertySet()->setPropertyValue( u"Symbol"_ustr , uno::Any( aSymbol )); bChanged = true; } } @@ -559,11 +559,11 @@ bool DataPointItemConverter::ApplySpecialItem( double fValue = toDegrees(rItemSet.Get(SCHATTR_TEXT_DEGREES).GetValue()); double fOldValue = 0.0; bool bPropExisted = - ( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldValue ); + ( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fOldValue ); if( ! bPropExisted || fOldValue != fValue ) { - GetPropertySet()->setPropertyValue( "TextRotation" , uno::Any( fValue )); + GetPropertySet()->setPropertyValue( u"TextRotation"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -659,7 +659,7 @@ void DataPointItemConverter::FillSpecialItem( case SCHATTR_PERCENT_NUMBERFORMAT_VALUE: { sal_Int32 nKey = 0; - if( !(GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ) >>= nKey) ) + if( !(GetPropertySet()->getPropertyValue( u"PercentageNumberFormat"_ustr ) >>= nKey) ) nKey = m_nPercentNumberFormat; rOutItemSet.Put( SfxUInt32Item( nWhichId, nKey )); } @@ -691,7 +691,7 @@ void DataPointItemConverter::FillSpecialItem( { TOOLS_WARN_EXCEPTION("chart2", ""); } - bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ).hasValue() && !bUseSourceFormat; + bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue( u"PercentageNumberFormat"_ustr ).hasValue() && !bUseSourceFormat; rOutItemSet.Put( SfxBoolItem( nWhichId, ! bNumberFormatIsSet )); } break; @@ -701,7 +701,7 @@ void DataPointItemConverter::FillSpecialItem( try { OUString aValue; - GetPropertySet()->getPropertyValue( "LabelSeparator" ) >>= aValue; + GetPropertySet()->getPropertyValue( u"LabelSeparator"_ustr ) >>= aValue; rOutItemSet.Put( SfxStringItem( nWhichId, aValue )); } catch( const uno::Exception& ) @@ -716,7 +716,7 @@ void DataPointItemConverter::FillSpecialItem( try { bool bValue = false; - GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bValue; + GetPropertySet()->getPropertyValue( u"TextWordWrap"_ustr ) >>= bValue; rOutItemSet.Put( SfxBoolItem( nWhichId, bValue )); } catch( const uno::Exception& ) @@ -732,9 +732,9 @@ void DataPointItemConverter::FillSpecialItem( { sal_Int32 nPlacement=0; RelativePosition aCustomLabelPosition; - if( !m_bOverwriteLabelsForAttributedDataPointsAlso && (GetPropertySet()->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition) ) + if( !m_bOverwriteLabelsForAttributedDataPointsAlso && (GetPropertySet()->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition) ) rOutItemSet.Put(SfxInt32Item(nWhichId, css::chart::DataLabelPlacement::CUSTOM)); - else if( GetPropertySet()->getPropertyValue( "LabelPlacement" ) >>= nPlacement ) + else if( GetPropertySet()->getPropertyValue( u"LabelPlacement"_ustr ) >>= nPlacement ) rOutItemSet.Put( SfxInt32Item( nWhichId, nPlacement )); else if( m_aAvailableLabelPlacements.hasElements() ) rOutItemSet.Put( SfxInt32Item( nWhichId, m_aAvailableLabelPlacements[0] )); @@ -776,7 +776,7 @@ void DataPointItemConverter::FillSpecialItem( case SCHATTR_STYLE_SYMBOL: { chart2::Symbol aSymbol; - if( GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol ) + if( GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol ) rOutItemSet.Put( SfxInt32Item( nWhichId, lcl_getSymbolStyleForSymbol( aSymbol ) )); } break; @@ -784,7 +784,7 @@ void DataPointItemConverter::FillSpecialItem( case SCHATTR_SYMBOL_SIZE: { chart2::Symbol aSymbol; - if( GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol ) + if( GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol ) rOutItemSet.Put( SvxSizeItem( nWhichId, Size( aSymbol.Size.Width, aSymbol.Size.Height ) )); } @@ -793,7 +793,7 @@ void DataPointItemConverter::FillSpecialItem( case SCHATTR_SYMBOL_BRUSH: { chart2::Symbol aSymbol; - if(( GetPropertySet()->getPropertyValue( "Symbol" ) >>= aSymbol ) + if(( GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= aSymbol ) && aSymbol.Graphic.is() ) { rOutItemSet.Put( SvxBrushItem( Graphic( aSymbol.Graphic ), GPOS_MM, SCHATTR_SYMBOL_BRUSH )); @@ -805,7 +805,7 @@ void DataPointItemConverter::FillSpecialItem( { double fValue = 0; - if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fValue ) + if( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fValue ) { rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >( ::rtl::math::round( fValue * 100.0 ) ) ))); diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx index 33e09062a9a7..48efdee3a38d 100644 --- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx @@ -46,8 +46,8 @@ void lcl_getErrorValues( const uno::Reference< beans::XPropertySet > & xErrorBar try { - xErrorBarProp->getPropertyValue( "PositiveError" ) >>= rOutPosError; - xErrorBarProp->getPropertyValue( "NegativeError" ) >>= rOutNegError; + xErrorBarProp->getPropertyValue( u"PositiveError"_ustr ) >>= rOutPosError; + xErrorBarProp->getPropertyValue( u"NegativeError"_ustr ) >>= rOutNegError; } catch( const uno::Exception & ) { @@ -64,8 +64,8 @@ void lcl_getErrorIndicatorValues( try { - xErrorBarProp->getPropertyValue( "ShowPositiveError" ) >>= rOutShowPosError; - xErrorBarProp->getPropertyValue( "ShowNegativeError" ) >>= rOutShowNegError; + xErrorBarProp->getPropertyValue( u"ShowPositiveError"_ustr ) >>= rOutShowPosError; + xErrorBarProp->getPropertyValue( u"ShowNegativeError"_ustr ) >>= rOutShowNegError; } catch( const uno::Exception & ) { @@ -170,7 +170,7 @@ bool ErrorBarItemConverter::ApplySpecialItem( nStyle = css::chart::ErrorBarStyle::FROM_DATA; break; } - xErrorBarProp->setPropertyValue( "ErrorBarStyle" , uno::Any( nStyle )); + xErrorBarProp->setPropertyValue( u"ErrorBarStyle"_ustr , uno::Any( nStyle )); bChanged = true; } } @@ -191,8 +191,8 @@ bool ErrorBarItemConverter::ApplySpecialItem( if( ! ( ::rtl::math::approxEqual( fPos, fValue ) && ::rtl::math::approxEqual( fNeg, fValue ))) { - xErrorBarProp->setPropertyValue( "PositiveError" , uno::Any( fValue )); - xErrorBarProp->setPropertyValue( "NegativeError" , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"PositiveError"_ustr , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"NegativeError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -208,7 +208,7 @@ bool ErrorBarItemConverter::ApplySpecialItem( if( ! ::rtl::math::approxEqual( fPos, fValue )) { - GetPropertySet()->setPropertyValue( "PositiveError" , uno::Any( fValue )); + GetPropertySet()->setPropertyValue( u"PositiveError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -226,7 +226,7 @@ bool ErrorBarItemConverter::ApplySpecialItem( if( ! ::rtl::math::approxEqual( fNeg, fValue )) { - xErrorBarProp->setPropertyValue( "NegativeError" , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"NegativeError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -249,8 +249,8 @@ bool ErrorBarItemConverter::ApplySpecialItem( if( bShowPos != bNewIndPos || bShowNeg != bNewIndNeg ) { - xErrorBarProp->setPropertyValue( "ShowPositiveError" , uno::Any( bNewIndPos )); - xErrorBarProp->setPropertyValue( "ShowNegativeError" , uno::Any( bNewIndNeg )); + xErrorBarProp->setPropertyValue( u"ShowPositiveError"_ustr , uno::Any( bNewIndPos )); + xErrorBarProp->setPropertyValue( u"ShowNegativeError"_ustr , uno::Any( bNewIndNeg )); bChanged = true; } } @@ -327,7 +327,7 @@ void ErrorBarItemConverter::FillSpecialItem( uno::Reference< beans::XPropertySet > xErrorBarProp( GetPropertySet()); sal_Int32 nStyle = 0; - if( xErrorBarProp->getPropertyValue( "ErrorBarStyle" ) >>= nStyle ) + if( xErrorBarProp->getPropertyValue( u"ErrorBarStyle"_ustr ) >>= nStyle ) { switch( nStyle ) { diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index ac0b961ba2e4..b67872d3d0e3 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -217,7 +217,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( case XATTR_FILLBMP_STRETCH: { drawing::BitmapMode aMode = drawing::BitmapMode_REPEAT; - if( GetPropertySet()->getPropertyValue( "FillBitmapMode" ) >>= aMode ) + if( GetPropertySet()->getPropertyValue( u"FillBitmapMode"_ustr ) >>= aMode ) { rOutItemSet.Put( XFillBmpTileItem( aMode == drawing::BitmapMode_REPEAT )); rOutItemSet.Put( XFillBmpStretchItem( aMode == drawing::BitmapMode_STRETCH )); @@ -232,8 +232,8 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "TransparencyGradientName" ) - : OUString( "FillTransparenceGradientName" ); + ? u"TransparencyGradientName"_ustr + : u"FillTransparenceGradientName"_ustr; uno::Any aValue( GetPropertySet()->getPropertyValue( aPropName )); if( aValue.hasValue()) @@ -242,7 +242,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( aItem.PutValue( aValue, MID_NAME ); lcl_SetContentForNamedProperty( - m_xNamedPropertyTableFactory, "com.sun.star.drawing.TransparencyGradientTable" , + m_xNamedPropertyTableFactory, u"com.sun.star.drawing.TransparencyGradientTable"_ustr , aItem, MID_FILLGRADIENT ); // this is important to enable the item @@ -267,8 +267,8 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "GradientStepCount" ) - : OUString( "FillGradientStepCount" ); + ? u"GradientStepCount"_ustr + : u"FillGradientStepCount"_ustr; uno::Any aValue( GetPropertySet()->getPropertyValue( aPropName ) ); if( hasLongOrShortValue(aValue) ) @@ -283,14 +283,14 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "BorderDashName" ) - : OUString( "LineDashName" ); + ? u"BorderDashName"_ustr + : u"LineDashName"_ustr; XLineDashItem aItem; aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ), MID_NAME ); lcl_SetContentForNamedProperty( - m_xNamedPropertyTableFactory, "com.sun.star.drawing.DashTable" , + m_xNamedPropertyTableFactory, u"com.sun.star.drawing.DashTable"_ustr , aItem, MID_LINEDASH ); // translate model name to UI-name for predefined entries, so @@ -309,14 +309,14 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "GradientName" ) - : OUString( "FillGradientName" ); + ? u"GradientName"_ustr + : u"FillGradientName"_ustr; XFillGradientItem aItem; aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ), MID_NAME ); lcl_SetContentForNamedProperty( - m_xNamedPropertyTableFactory, "com.sun.star.drawing.GradientTable" , + m_xNamedPropertyTableFactory, u"com.sun.star.drawing.GradientTable"_ustr , aItem, MID_FILLGRADIENT ); // translate model name to UI-name for predefined entries, so @@ -335,14 +335,14 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "HatchName" ) - : OUString( "FillHatchName" ); + ? u"HatchName"_ustr + : u"FillHatchName"_ustr; XFillHatchItem aItem; aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ), MID_NAME ); lcl_SetContentForNamedProperty( - m_xNamedPropertyTableFactory, "com.sun.star.drawing.HatchTable" , + m_xNamedPropertyTableFactory, u"com.sun.star.drawing.HatchTable"_ustr , aItem, MID_FILLHATCH ); // translate model name to UI-name for predefined entries, so @@ -360,10 +360,10 @@ void GraphicPropertyItemConverter::FillSpecialItem( if( lcl_supportsFillProperties( m_GraphicObjectType )) { XFillBitmapItem aItem; - aItem.PutValue( GetPropertySet()->getPropertyValue( "FillBitmapName" ), MID_NAME ); + aItem.PutValue( GetPropertySet()->getPropertyValue( u"FillBitmapName"_ustr ), MID_NAME ); lcl_SetContentForNamedProperty( - m_xNamedPropertyTableFactory, "com.sun.star.drawing.BitmapTable" , + m_xNamedPropertyTableFactory, u"com.sun.star.drawing.BitmapTable"_ustr , aItem, MID_BITMAP ); // translate model name to UI-name for predefined entries, so @@ -383,10 +383,10 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "BorderTransparency" ) + ? u"BorderTransparency"_ustr : (m_GraphicObjectType == GraphicObjectType::LineDataPoint) - ? OUString( "Transparency" ) - : OUString( "LineTransparence" ); + ? u"Transparency"_ustr + : u"LineTransparence"_ustr; XLineTransparenceItem aItem; aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ), 0 ); @@ -402,8 +402,8 @@ void GraphicPropertyItemConverter::FillSpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "Transparency" ) - : OUString( "FillTransparence" ); + ? u"Transparency"_ustr + : u"FillTransparence"_ustr; XFillTransparenceItem aItem; aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ), 0 ); @@ -469,8 +469,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "TransparencyGradientName" ) - : OUString( "FillTransparenceGradientName" ); + ? u"TransparencyGradientName"_ustr + : u"FillTransparenceGradientName"_ustr; const XFillFloatTransparenceItem & rItem = static_cast< const XFillFloatTransparenceItem & >( @@ -520,8 +520,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "GradientStepCount" ) - : OUString( "FillGradientStepCount" ); + ? u"GradientStepCount"_ustr + : u"FillGradientStepCount"_ustr; sal_Int16 nStepCount = static_cast< const XGradientStepCountItem & >( rItemSet.Get( nWhichId )).GetValue(); @@ -540,8 +540,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "BorderDashName" ) - : OUString( "LineDashName" ); + ? u"BorderDashName"_ustr + : u"LineDashName"_ustr; const XLineDashItem & rItem = static_cast< const XLineDashItem & >( @@ -572,8 +572,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "GradientName" ) - : OUString( "FillGradientName" ); + ? u"GradientName"_ustr + : u"FillGradientName"_ustr; const XFillGradientItem & rItem = static_cast< const XFillGradientItem & >( @@ -605,8 +605,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "HatchName" ) - : OUString( "FillHatchName" ); + ? u"HatchName"_ustr + : u"FillHatchName"_ustr; const XFillHatchItem & rItem = static_cast< const XFillHatchItem & >( @@ -642,7 +642,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( if( rItem.QueryValue( aValue, MID_NAME )) { - if( aValue != GetPropertySet()->getPropertyValue( "FillBitmapName" )) + if( aValue != GetPropertySet()->getPropertyValue( u"FillBitmapName"_ustr )) { // add Bitmap to list uno::Any aBitmap; @@ -652,7 +652,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( aValue <<= PropertyHelper::addBitmapUniqueNameToTable( aBitmap, m_xNamedPropertyTableFactory, aPreferredName ); - GetPropertySet()->setPropertyValue( "FillBitmapName" , aValue ); + GetPropertySet()->setPropertyValue( u"FillBitmapName"_ustr , aValue ); bChanged = true; } } @@ -666,10 +666,10 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "BorderTransparency" ) + ? u"BorderTransparency"_ustr : (m_GraphicObjectType == GraphicObjectType::LineDataPoint) - ? OUString( "Transparency" ) - : OUString( "LineTransparence" ); + ? u"Transparency"_ustr + : u"LineTransparence"_ustr; const XLineTransparenceItem & rItem = static_cast< const XLineTransparenceItem & >( @@ -705,8 +705,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( { OUString aPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "Transparency" ) - : OUString( "FillTransparence" ); + ? u"Transparency"_ustr + : u"FillTransparence"_ustr; const XFillTransparenceItem & rItem = static_cast< const XFillTransparenceItem & >( @@ -728,8 +728,8 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( // if linear or no transparence is set, delete the gradient OUString aTransGradPropName = (m_GraphicObjectType == GraphicObjectType::FilledDataPoint) - ? OUString( "TransparencyGradientName" ) - : OUString( "FillTransparenceGradientName" ); + ? u"TransparencyGradientName"_ustr + : u"FillTransparenceGradientName"_ustr; GetPropertySet()->setPropertyValue( aTransGradPropName, uno::Any( OUString() )); diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx index 255445764b04..a431efc34349 100644 --- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx @@ -49,7 +49,7 @@ LegendItemConverter::LegendItemConverter( GraphicObjectType::LineAndFillProperties )); m_aConverters.emplace_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool, pRefSize, - "ReferencePageSize" )); + u"ReferencePageSize"_ustr )); } LegendItemConverter::~LegendItemConverter() @@ -100,10 +100,10 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe { bool bShow = pShowItem->GetValue(); bool bWasShown = true; - if( ! (GetPropertySet()->getPropertyValue( "Show" ) >>= bWasShown) || + if( ! (GetPropertySet()->getPropertyValue( u"Show"_ustr ) >>= bWasShown) || ( bWasShown != bShow )) { - GetPropertySet()->setPropertyValue( "Show" , uno::Any( bShow )); + GetPropertySet()->setPropertyValue( u"Show"_ustr , uno::Any( bShow )); bChanged = true; } } @@ -134,12 +134,12 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe try { chart2::LegendPosition eOldPos; - if( ! ( GetPropertySet()->getPropertyValue( "AnchorPosition" ) >>= eOldPos ) || + if( ! ( GetPropertySet()->getPropertyValue( u"AnchorPosition"_ustr ) >>= eOldPos ) || ( eOldPos != eNewPos )) { - GetPropertySet()->setPropertyValue( "AnchorPosition" , uno::Any( eNewPos )); - GetPropertySet()->setPropertyValue( "Expansion" , uno::Any( eExpansion )); - GetPropertySet()->setPropertyValue( "RelativePosition" , uno::Any()); + GetPropertySet()->setPropertyValue( u"AnchorPosition"_ustr , uno::Any( eNewPos )); + GetPropertySet()->setPropertyValue( u"Expansion"_ustr , uno::Any( eExpansion )); + GetPropertySet()->setPropertyValue( u"RelativePosition"_ustr , uno::Any()); bChanged = true; } } @@ -156,10 +156,10 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe { bool bOverlay = !pNoOverlayItem->GetValue(); bool bOldOverlay = false; - if(!(GetPropertySet()->getPropertyValue("Overlay") >>= bOldOverlay) || + if(!(GetPropertySet()->getPropertyValue(u"Overlay"_ustr) >>= bOldOverlay) || (bOldOverlay != bOverlay)) { - GetPropertySet()->setPropertyValue("Overlay", uno::Any(bOverlay)); + GetPropertySet()->setPropertyValue(u"Overlay"_ustr, uno::Any(bOverlay)); bChanged = true; } } @@ -179,21 +179,21 @@ void LegendItemConverter::FillSpecialItem( case SCHATTR_LEGEND_SHOW: { bool bShow = true; - GetPropertySet()->getPropertyValue( "Show" ) >>= bShow; + GetPropertySet()->getPropertyValue( u"Show"_ustr ) >>= bShow; rOutItemSet.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, bShow) ); } break; case SCHATTR_LEGEND_POS: { chart2::LegendPosition eLegendPos( chart2::LegendPosition_LINE_END ); - GetPropertySet()->getPropertyValue( "AnchorPosition" ) >>= eLegendPos; + GetPropertySet()->getPropertyValue( u"AnchorPosition"_ustr ) >>= eLegendPos; rOutItemSet.Put( SfxInt32Item(SCHATTR_LEGEND_POS, static_cast<sal_Int32>(eLegendPos) ) ); } break; case SCHATTR_LEGEND_NO_OVERLAY: { bool bOverlay = false; - GetPropertySet()->getPropertyValue("Overlay") >>= bOverlay; + GetPropertySet()->getPropertyValue(u"Overlay"_ustr) >>= bOverlay; rOutItemSet.Put(SfxBoolItem(SCHATTR_LEGEND_NO_OVERLAY, !bOverlay)); } break; diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx index da521d874df6..684c6fc1cdd5 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx @@ -169,84 +169,84 @@ bool RegressionCurveItemConverter::ApplySpecialItem( case SCHATTR_REGRESSION_DEGREE: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "PolynomialDegree"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"PolynomialDegree"_ustr); } break; case SCHATTR_REGRESSION_PERIOD: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "MovingAveragePeriod"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"MovingAveragePeriod"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "ExtrapolateForward"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"ExtrapolateForward"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "ExtrapolateBackward"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"ExtrapolateBackward"_ustr); } break; case SCHATTR_REGRESSION_SET_INTERCEPT: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xProperties, "ForceIntercept"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xProperties, u"ForceIntercept"_ustr); } break; case SCHATTR_REGRESSION_INTERCEPT_VALUE: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "InterceptValue"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"InterceptValue"_ustr); } break; case SCHATTR_REGRESSION_CURVE_NAME: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xProperties, "CurveName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xProperties, u"CurveName"_ustr); } break; case SCHATTR_REGRESSION_MOVING_TYPE: { uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "MovingAverageType"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"MovingAverageType"_ustr); } break; case SCHATTR_REGRESSION_SHOW_EQUATION: { uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, "ShowEquation"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, u"ShowEquation"_ustr); } break; case SCHATTR_REGRESSION_XNAME: { uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, "XName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, u"XName"_ustr); } break; case SCHATTR_REGRESSION_YNAME: { uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, "YName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, u"YName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_COEFF: { uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, "ShowCorrelationCoefficient"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, u"ShowCorrelationCoefficient"_ustr); } break; @@ -274,73 +274,73 @@ void RegressionCurveItemConverter::FillSpecialItem(sal_uInt16 nWhichId, SfxItemS case SCHATTR_REGRESSION_DEGREE: { - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "PolynomialDegree"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"PolynomialDegree"_ustr); } break; case SCHATTR_REGRESSION_PERIOD: { - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "MovingAveragePeriod"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"MovingAveragePeriod"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD: { - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, "ExtrapolateForward"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, u"ExtrapolateForward"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD: { - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, "ExtrapolateBackward"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, u"ExtrapolateBackward"_ustr); } break; case SCHATTR_REGRESSION_SET_INTERCEPT: { - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xProperties, "ForceIntercept"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xProperties, u"ForceIntercept"_ustr); } break; case SCHATTR_REGRESSION_INTERCEPT_VALUE: { - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, "InterceptValue"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, u"InterceptValue"_ustr); } break; case SCHATTR_REGRESSION_CURVE_NAME: { - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xProperties, "CurveName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xProperties, u"CurveName"_ustr); } break; case SCHATTR_REGRESSION_MOVING_TYPE: { - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "MovingAverageType"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"MovingAverageType"_ustr); } break; case SCHATTR_REGRESSION_SHOW_EQUATION: { - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), "ShowEquation"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), u"ShowEquation"_ustr); } break; case SCHATTR_REGRESSION_XNAME: { - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), "XName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), u"XName"_ustr); } break; case SCHATTR_REGRESSION_YNAME: { - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), "YName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), u"YName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_COEFF: { - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), "ShowCorrelationCoefficient"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xCurve->getEquationProperties(), u"ShowCorrelationCoefficient"_ustr); } break; } diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx index 9b10afd4f79d..239bf2ecadf9 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx @@ -58,7 +58,7 @@ RegressionEquationItemConverter::RegressionEquationItemConverter( GraphicObjectType::LineAndFillProperties )); m_aConverters.emplace_back( - new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); + new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, u"ReferencePageSize"_ustr)); } RegressionEquationItemConverter::~RegressionEquationItemConverter() diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx index 653e7bf20e5a..da74846568b4 100644 --- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx @@ -94,12 +94,12 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( uno::Sequence< sal_Int32 > aBarPositionSequence; if( xChartType.is() ) { - if( xChartType->getPropertyValue( "OverlapSequence" ) >>= aBarPositionSequence ) + if( xChartType->getPropertyValue( u"OverlapSequence"_ustr ) >>= aBarPositionSequence ) { if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() ) m_nBarOverlap = aBarPositionSequence[nAxisIndex]; } - if( xChartType->getPropertyValue( "GapwidthSequence" ) >>= aBarPositionSequence ) + if( xChartType->getPropertyValue( u"GapwidthSequence"_ustr ) >>= aBarPositionSequence ) { if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() ) m_nGapWidth = aBarPositionSequence[nAxisIndex]; @@ -110,19 +110,19 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( m_bSupportingBarConnectors = ChartTypeHelper::isSupportingBarConnectors( xChartType, nDimensionCount ); if( m_bSupportingBarConnectors && xDiagram.is() ) { - xDiagram->getPropertyValue( "ConnectBars" ) >>= m_bConnectBars; + xDiagram->getPropertyValue( u"ConnectBars"_ustr ) >>= m_bConnectBars; } m_bSupportingAxisSideBySide = ChartTypeHelper::isSupportingAxisSideBySide( xChartType, nDimensionCount ); if( m_bSupportingAxisSideBySide && xDiagram.is() ) { - xDiagram->getPropertyValue( "GroupBarsPerAxis" ) >>= m_bGroupBarsPerAxis; + xDiagram->getPropertyValue( u"GroupBarsPerAxis"_ustr ) >>= m_bGroupBarsPerAxis; } m_bSupportingStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType ); if( m_bSupportingStartingAngle ) { - xDiagram->getPropertyValue( "StartingAngle" ) >>= m_nStartingAngle; + xDiagram->getPropertyValue( u"StartingAngle"_ustr ) >>= m_nStartingAngle; } m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ); @@ -134,17 +134,17 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( try { //test whether the data provider offers this property - xProp->getPropertyValue( "IncludeHiddenCells" ); + xProp->getPropertyValue( u"IncludeHiddenCells"_ustr ); //if not exception is thrown the property is offered m_bSupportingPlottingOfHiddenCells = true; - xDiagram->getPropertyValue( "IncludeHiddenCells" ) >>= m_bIncludeHiddenCells; + xDiagram->getPropertyValue( u"IncludeHiddenCells"_ustr ) >>= m_bIncludeHiddenCells; } catch( const beans::UnknownPropertyException& ) { } } - m_bHideLegendEntry = !xDataSeries->getPropertyValue("ShowLegendEntry").get<bool>(); + m_bHideLegendEntry = !xDataSeries->getPropertyValue(u"ShowLegendEntry"_ustr).get<bool>(); } catch( const uno::Exception & ) { @@ -198,7 +198,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf sal_Int32& rBarPosition = ( nWhichId == SCHATTR_BAR_OVERLAP ) ? m_nBarOverlap : m_nGapWidth; rBarPosition = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue(); - OUString aPropName("GapwidthSequence" ); + OUString aPropName(u"GapwidthSequence"_ustr ); if( nWhichId == SCHATTR_BAR_OVERLAP ) aPropName = "OverlapSequence"; @@ -238,10 +238,10 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf bool bOldConnectBars = false; rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() ); if( xDiagramProperties.is() && - (xDiagramProperties->getPropertyValue( "ConnectBars" ) >>= bOldConnectBars) && + (xDiagramProperties->getPropertyValue( u"ConnectBars"_ustr ) >>= bOldConnectBars) && bOldConnectBars != m_bConnectBars ) { - xDiagramProperties->setPropertyValue( "ConnectBars" , uno::Any(m_bConnectBars) ); + xDiagramProperties->setPropertyValue( u"ConnectBars"_ustr , uno::Any(m_bConnectBars) ); bChanged = true; } } @@ -257,10 +257,10 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf bool bOldGroupBarsPerAxis = true; rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() ); if( xDiagramProperties.is() && - (xDiagramProperties->getPropertyValue( "GroupBarsPerAxis" ) >>= bOldGroupBarsPerAxis) && + (xDiagramProperties->getPropertyValue( u"GroupBarsPerAxis"_ustr ) >>= bOldGroupBarsPerAxis) && bOldGroupBarsPerAxis != m_bGroupBarsPerAxis ) { - xDiagramProperties->setPropertyValue( "GroupBarsPerAxis" , uno::Any(m_bGroupBarsPerAxis) ); + xDiagramProperties->setPropertyValue( u"GroupBarsPerAxis"_ustr , uno::Any(m_bGroupBarsPerAxis) ); bChanged = true; } } @@ -275,7 +275,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() ); if( xDiagramProperties.is() ) { - xDiagramProperties->setPropertyValue( "StartingAngle" , uno::Any(m_nStartingAngle) ); + xDiagramProperties->setPropertyValue( u"StartingAngle"_ustr , uno::Any(m_nStartingAngle) ); bChanged = true; } } @@ -312,7 +312,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() ); if( xDiagramProperties.is() ) { - xDiagramProperties->setPropertyValue( "MissingValueTreatment" , uno::Any( nNew )); + xDiagramProperties->setPropertyValue( u"MissingValueTreatment"_ustr , uno::Any( nNew )); bChanged = true; } } @@ -342,7 +342,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf bool bHideLegendEntry = static_cast<const SfxBoolItem &>(rItemSet.Get(nWhichId)).GetValue(); if (bHideLegendEntry != m_bHideLegendEntry) { - GetPropertySet()->setPropertyValue("ShowLegendEntry", css::uno::Any(!bHideLegendEntry)); + GetPropertySet()->setPropertyValue(u"ShowLegendEntry"_ustr, css::uno::Any(!bHideLegendEntry)); } } break; diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index c725972c249b..e8703926c5a7 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -73,8 +73,8 @@ void lcl_getErrorValues( const uno::Reference< beans::XPropertySet > & xErrorBar try { - xErrorBarProp->getPropertyValue( "PositiveError" ) >>= rOutPosError; - xErrorBarProp->getPropertyValue( "NegativeError" ) >>= rOutNegError; + xErrorBarProp->getPropertyValue( u"PositiveError"_ustr ) >>= rOutPosError; + xErrorBarProp->getPropertyValue( u"NegativeError"_ustr ) >>= rOutNegError; } catch( const uno::Exception & ) { @@ -91,8 +91,8 @@ void lcl_getErrorIndicatorValues( try { - xErrorBarProp->getPropertyValue( "ShowPositiveError" ) >>= rOutShowPosError; - xErrorBarProp->getPropertyValue( "ShowNegativeError" ) >>= rOutShowNegError; + xErrorBarProp->getPropertyValue( u"ShowPositiveError"_ustr ) >>= rOutShowPosError; + xErrorBarProp->getPropertyValue( u"ShowNegativeError"_ustr ) >>= rOutShowNegError; } catch( const uno::Exception & ) { @@ -312,7 +312,7 @@ bool StatisticsItemConverter::ApplySpecialItem( uno::Any( xErrorBarProp )); } - xErrorBarProp->setPropertyValue( "ErrorBarStyle" , uno::Any( nStyle )); + xErrorBarProp->setPropertyValue( u"ErrorBarStyle"_ustr , uno::Any( nStyle )); bChanged = true; } } @@ -339,8 +339,8 @@ bool StatisticsItemConverter::ApplySpecialItem( ! ( ::rtl::math::approxEqual( fPos, fValue ) && ::rtl::math::approxEqual( fNeg, fValue ))) { - xErrorBarProp->setPropertyValue( "PositiveError" , uno::Any( fValue )); - xErrorBarProp->setPropertyValue( "NegativeError" , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"PositiveError"_ustr , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"NegativeError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -364,7 +364,7 @@ bool StatisticsItemConverter::ApplySpecialItem( if( bOldHasErrorBar && ! ::rtl::math::approxEqual( fPos, fValue )) { - xErrorBarProp->setPropertyValue( "PositiveError" , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"PositiveError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -387,7 +387,7 @@ bool StatisticsItemConverter::ApplySpecialItem( if( bOldHasErrorBar && ! ::rtl::math::approxEqual( fNeg, fValue )) { - xErrorBarProp->setPropertyValue( "NegativeError" , uno::Any( fValue )); + xErrorBarProp->setPropertyValue( u"NegativeError"_ustr , uno::Any( fValue )); bChanged = true; } } @@ -435,84 +435,84 @@ bool StatisticsItemConverter::ApplySpecialItem( case SCHATTR_REGRESSION_DEGREE: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "PolynomialDegree"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"PolynomialDegree"_ustr); } break; case SCHATTR_REGRESSION_PERIOD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "MovingAveragePeriod"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"MovingAveragePeriod"_ustr); } break; case SCHATTR_REGRESSION_MOVING_TYPE: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, "MovingAverageType"); + bChanged = lclConvertToPropertySet<sal_Int32, SfxInt32Item>(rItemSet, nWhichId, xProperties, u"MovingAverageType"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "ExtrapolateForward"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"ExtrapolateForward"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "ExtrapolateBackward"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"ExtrapolateBackward"_ustr); } break; case SCHATTR_REGRESSION_SET_INTERCEPT: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xProperties, "ForceIntercept"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xProperties, u"ForceIntercept"_ustr); } break; case SCHATTR_REGRESSION_INTERCEPT_VALUE: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, "InterceptValue"); + bChanged = lclConvertToPropertySet<double, SvxDoubleItem>(rItemSet, nWhichId, xProperties, u"InterceptValue"_ustr); } break; case SCHATTR_REGRESSION_CURVE_NAME: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xProperties, "CurveName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xProperties, u"CurveName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_EQUATION: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, "ShowEquation"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, u"ShowEquation"_ustr); } break; case SCHATTR_REGRESSION_XNAME: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, "XName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, u"XName"_ustr); } break; case SCHATTR_REGRESSION_YNAME: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, "YName"); + bChanged = lclConvertToPropertySet<OUString, SfxStringItem>(rItemSet, nWhichId, xEqProp, u"YName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_COEFF: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), &rItemSet )); - bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, "ShowCorrelationCoefficient"); + bChanged = lclConvertToPropertySet<bool, SfxBoolItem>(rItemSet, nWhichId, xEqProp, u"ShowCorrelationCoefficient"_ustr); } break; @@ -538,8 +538,8 @@ bool StatisticsItemConverter::ApplySpecialItem( ( bShowPos != bNewIndPos || bShowNeg != bNewIndNeg )) { - xErrorBarProp->setPropertyValue( "ShowPositiveError" , uno::Any( bNewIndPos )); - xErrorBarProp->setPropertyValue( "ShowNegativeError" , uno::Any( bNewIndNeg )); + xErrorBarProp->setPropertyValue( u"ShowPositiveError"_ustr , uno::Any( bNewIndPos )); + xErrorBarProp->setPropertyValue( u"ShowNegativeError"_ustr , uno::Any( bNewIndNeg )); bChanged = true; } } @@ -626,7 +626,7 @@ void StatisticsItemConverter::FillSpecialItem( if( xErrorBarProp.is() ) { sal_Int32 nStyle = 0; - if( xErrorBarProp->getPropertyValue( "ErrorBarStyle" ) >>= nStyle ) + if( xErrorBarProp->getPropertyValue( u"ErrorBarStyle"_ustr ) >>= nStyle ) { switch( nStyle ) { @@ -723,84 +723,84 @@ void StatisticsItemConverter::FillSpecialItem( { uno::Reference<beans::XPropertySet> xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "PolynomialDegree"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"PolynomialDegree"_ustr); } break; case SCHATTR_REGRESSION_PERIOD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "MovingAveragePeriod"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"MovingAveragePeriod"_ustr); } break; case SCHATTR_REGRESSION_MOVING_TYPE: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "MovingAverageType"); + lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, u"MovingAverageType"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, "ExtrapolateForward"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, u"ExtrapolateForward"_ustr); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, "ExtrapolateBackward"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, u"ExtrapolateBackward"_ustr); } break; case SCHATTR_REGRESSION_SET_INTERCEPT: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xProperties, "ForceIntercept"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xProperties, u"ForceIntercept"_ustr); } break; case SCHATTR_REGRESSION_INTERCEPT_VALUE: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, "InterceptValue"); + lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, u"InterceptValue"_ustr); } break; case SCHATTR_REGRESSION_CURVE_NAME: { uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xProperties, "CurveName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xProperties, u"CurveName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_EQUATION: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, "ShowEquation"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, u"ShowEquation"_ustr); } break; case SCHATTR_REGRESSION_XNAME: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xEqProp, "XName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xEqProp, u"XName"_ustr); } break; case SCHATTR_REGRESSION_YNAME: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xEqProp, "YName"); + lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xEqProp, u"YName"_ustr); } break; case SCHATTR_REGRESSION_SHOW_COEFF: { uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); - lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, "ShowCorrelationCoefficient"); + lclConvertToItemSet<bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, u"ShowCorrelationCoefficient"_ustr); } break; diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index a8838f3b24e0..cd70c5a22368 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -101,7 +101,7 @@ bool numberFormatFromItemToPropertySet( if (!xPropertySet.is()) return bChanged; - OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : OUString("PercentageNumberFormat"); + OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : u"PercentageNumberFormat"_ustr; sal_uInt16 nSourceWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE; if (rItemSet.GetItemState(nSourceWhich) != SfxItemState::SET) @@ -149,7 +149,7 @@ bool useSourceFormatFromItemToPropertySet( bool bChanged = false; if (!xPropertySet.is()) return bChanged; - OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : OUString("PercentageNumberFormat"); + OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : u"PercentageNumberFormat"_ustr; sal_uInt16 nFormatWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE; if (rItemSet.GetItemState(nWhichId) != SfxItemState::SET) @@ -208,7 +208,7 @@ TextLabelItemConverter::TextLabelItemConverter( mbForbidPercentValue(true), m_xSeries(xSeries) { - maConverters.emplace_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); + maConverters.emplace_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, u"ReferencePageSize"_ustr)); rtl::Reference< Diagram > xDiagram(xChartModel->getFirstChartDiagram()); rtl::Reference< ChartType > xChartType(xDiagram->getChartTypeOfSeries(xSeries)); @@ -323,20 +323,20 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte try { OUString aOldValue; - GetPropertySet()->getPropertyValue("LabelSeparator") >>= aOldValue; + GetPropertySet()->getPropertyValue(u"LabelSeparator"_ustr) >>= aOldValue; if (mbDataSeries) { rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get())); if (aOldValue != aNewValue || - DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelSeparator", uno::Any(aOldValue))) + DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, u"LabelSeparator"_ustr, uno::Any(aOldValue))) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "LabelSeparator", uno::Any(aNewValue)); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, u"LabelSeparator"_ustr, uno::Any(aNewValue)); bChanged = true; } } else if (aOldValue != aNewValue) { - GetPropertySet()->setPropertyValue("LabelSeparator", uno::Any(aNewValue)); + GetPropertySet()->setPropertyValue(u"LabelSeparator"_ustr, uno::Any(aNewValue)); bChanged = true; } } @@ -353,20 +353,20 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte { bool bNew = static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId )).GetValue(); bool bOld = false; - GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld; + GetPropertySet()->getPropertyValue( u"TextWordWrap"_ustr ) >>= bOld; if( mbDataSeries ) { rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(GetPropertySet().get()) ); if( bOld!=bNew || - DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) ) + DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, u"TextWordWrap"_ustr, uno::Any( bOld ) ) ) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "TextWordWrap", uno::Any( bNew ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, u"TextWordWrap"_ustr, uno::Any( bNew ) ); bChanged = true; } } else if( bOld!=bNew ) { - GetPropertySet()->setPropertyValue( "TextWordWrap", uno::Any( bNew )); + GetPropertySet()->setPropertyValue( u"TextWordWrap"_ustr, uno::Any( bNew )); bChanged = true; } } @@ -383,22 +383,22 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte sal_Int32 nNew = static_cast<const SfxInt32Item&>(rItemSet.Get(nWhichId)).GetValue(); sal_Int32 nOld = -1; RelativePosition aCustomLabelPosition; - GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld; + GetPropertySet()->getPropertyValue(u"LabelPlacement"_ustr) >>= nOld; if (mbDataSeries) { rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get())); if (nOld != nNew || - DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelPlacement", uno::Any(nOld))) + DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, u"LabelPlacement"_ustr, uno::Any(nOld))) { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "LabelPlacement", uno::Any(nNew)); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, u"LabelPlacement"_ustr, uno::Any(nNew)); bChanged = true; } } - else if (nOld != nNew || (GetPropertySet()->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition)) + else if (nOld != nNew || (GetPropertySet()->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition)) { - GetPropertySet()->setPropertyValue("LabelPlacement", uno::Any(nNew)); - GetPropertySet()->setPropertyValue("CustomLabelPosition", uno::Any()); - GetPropertySet()->setPropertyValue("CustomLabelSize", uno::Any()); + GetPropertySet()->setPropertyValue(u"LabelPlacement"_ustr, uno::Any(nNew)); + GetPropertySet()->setPropertyValue(u"CustomLabelPosition"_ustr, uno::Any()); + GetPropertySet()->setPropertyValue(u"CustomLabelSize"_ustr, uno::Any()); bChanged = true; } } @@ -415,7 +415,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte rItemSet.Get(nWhichId)).GetValue(); chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol; + GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol; sal_Int32 nOldStyle = getSymbolStyleForSymbol(aSymbol); if (nStyle != nOldStyle) @@ -442,9 +442,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte } if (bDeleteSymbol) - GetPropertySet()->setPropertyValue("Symbol", uno::Any()); + GetPropertySet()->setPropertyValue(u"Symbol"_ustr, uno::Any()); else - GetPropertySet()->setPropertyValue("Symbol", uno::Any(aSymbol)); + GetPropertySet()->setPropertyValue(u"Symbol"_ustr, uno::Any(aSymbol)); bChanged = true; } } @@ -455,14 +455,14 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte rItemSet.Get(nWhichId)).GetSize(); chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol; + GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol; if (aSize.getWidth() != aSymbol.Size.Width || aSize.getHeight() != aSymbol.Size.Height) { aSymbol.Size.Width = aSize.getWidth(); aSymbol.Size.Height = aSize.getHeight(); - GetPropertySet()->setPropertyValue("Symbol", uno::Any(aSymbol)); + GetPropertySet()->setPropertyValue(u"Symbol"_ustr, uno::Any(aSymbol)); bChanged = true; } } @@ -480,11 +480,11 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte { aXGraphicAny <<= xGraphic; chart2::Symbol aSymbol; - GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol; + GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol; if (aSymbol.Graphic != xGraphic) { aSymbol.Graphic = xGraphic; - GetPropertySet()->setPropertyValue("Symbol", uno::Any(aSymbol)); + GetPropertySet()->setPropertyValue(u"Symbol"_ustr, uno::Any(aSymbol)); bChanged = true; } } @@ -498,11 +498,11 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte rItemSet.Get(nWhichId)).GetValue().get()) / 100.0; double fOldValue = 0.0; bool bPropExisted = - (GetPropertySet()->getPropertyValue("TextRotation") >>= fOldValue); + (GetPropertySet()->getPropertyValue(u"TextRotation"_ustr) >>= fOldValue); if (!bPropExisted || fOldValue != fValue) { - GetPropertySet()->setPropertyValue("TextRotation", uno::Any(fValue)); + GetPropertySet()->setPropertyValue(u"TextRotation"_ustr, uno::Any(fValue)); bChanged = true; } } @@ -572,7 +572,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r case SCHATTR_PERCENT_NUMBERFORMAT_VALUE: { sal_Int32 nKey = 0; - if (!(GetPropertySet()->getPropertyValue("PercentageNumberFormat") >>= nKey)) + if (!(GetPropertySet()->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nKey)) nKey = mnPercentNumberFormat; rOutItemSet.Put(SfxUInt32Item(nWhichId, nKey)); } @@ -603,7 +603,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r { TOOLS_WARN_EXCEPTION("chart2", ""); } - bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue() && !bUseSourceFormat; + bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue(u"PercentageNumberFormat"_ustr).hasValue() && !bUseSourceFormat; rOutItemSet.Put(SfxBoolItem(nWhichId, !bNumberFormatIsSet)); } break; @@ -612,7 +612,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r try { OUString aValue; - GetPropertySet()->getPropertyValue("LabelSeparator") >>= aValue; + GetPropertySet()->getPropertyValue(u"LabelSeparator"_ustr) >>= aValue; rOutItemSet.Put(SfxStringItem(nWhichId, aValue)); } catch (const uno::Exception&) @@ -626,7 +626,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r try { bool bValue = false; - GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bValue; + GetPropertySet()->getPropertyValue( u"TextWordWrap"_ustr ) >>= bValue; rOutItemSet.Put( SfxBoolItem( nWhichId, bValue )); } catch( const uno::Exception& ) @@ -641,9 +641,9 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r { sal_Int32 nPlacement = 0; RelativePosition aCustomLabelPosition; - if (!mbDataSeries && (GetPropertySet()->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition)) + if (!mbDataSeries && (GetPropertySet()->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition)) rOutItemSet.Put(SfxInt32Item(nWhichId, css::chart::DataLabelPlacement::CUSTOM)); - else if (GetPropertySet()->getPropertyValue("LabelPlacement") >>= nPlacement) + else if (GetPropertySet()->getPropertyValue(u"LabelPlacement"_ustr) >>= nPlacement) rOutItemSet.Put(SfxInt32Item(nWhichId, nPlacement)); else if (maAvailableLabelPlacements.hasElements()) rOutItemSet.Put(SfxInt32Item(nWhichId, maAvailableLabelPlacements[0])); @@ -681,14 +681,14 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r case SCHATTR_STYLE_SYMBOL: { chart2::Symbol aSymbol; - if (GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol) + if (GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) rOutItemSet.Put(SfxInt32Item(nWhichId, getSymbolStyleForSymbol(aSymbol))); } break; case SCHATTR_SYMBOL_SIZE: { chart2::Symbol aSymbol; - if (GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol) + if (GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) rOutItemSet.Put( SvxSizeItem(nWhichId, Size(aSymbol.Size.Width, aSymbol.Size.Height))); } @@ -696,7 +696,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r case SCHATTR_SYMBOL_BRUSH: { chart2::Symbol aSymbol; - if ((GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol) + if ((GetPropertySet()->getPropertyValue(u"Symbol"_ustr) >>= aSymbol) && aSymbol.Graphic.is()) { rOutItemSet.Put( @@ -708,7 +708,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r { double fValue = 0; - if (GetPropertySet()->getPropertyValue("TextRotation") >>= fValue) + if (GetPropertySet()->getPropertyValue(u"TextRotation"_ustr) >>= fValue) { rOutItemSet.Put( SdrAngleItem(SCHATTR_TEXT_DEGREES, Degree100(static_cast<sal_Int32>(rtl::math::round(fValue * 100.0))))); diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx index 1327a0a0d91b..004309868dbe 100644 --- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx @@ -75,7 +75,7 @@ FormattedStringsConverter::FormattedStringsConverter( if( bHasRefSize ) m_aConverters.emplace_back( new CharacterPropertyItemConverter( - xProp, rItemPool, pRefSize, "ReferencePageSize", xParentProp)); + xProp, rItemPool, pRefSize, u"ReferencePageSize"_ustr, xParentProp)); else m_aConverters.emplace_back( new CharacterPropertyItemConverter( xProp, rItemPool )); } @@ -171,11 +171,11 @@ bool TitleItemConverter::ApplySpecialItem( rItemSet.Get( nWhichId )).GetValue().get()) / 100.0; double fOldVal = 0.0; bool bPropExisted = - ( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldVal ); + ( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fOldVal ); if( ! bPropExisted || fOldVal != fVal ) { - GetPropertySet()->setPropertyValue( "TextRotation" , uno::Any( fVal )); + GetPropertySet()->setPropertyValue( u"TextRotation"_ustr , uno::Any( fVal )); bChanged = true; } } @@ -195,7 +195,7 @@ void TitleItemConverter::FillSpecialItem( // convert double to int (times 100) double fVal = 0; - if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal ) + if( GetPropertySet()->getPropertyValue( u"TextRotation"_ustr ) >>= fVal ) { rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >( ::rtl::math::round( fVal * 100.0 ) ) ))); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 2bd0bf549e89..6504c3efd981 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -248,42 +248,42 @@ OUString ChartController::GetContextName() uno::Any aAny = getSelection(); if (!aAny.hasValue()) - return "Chart"; + return u"Chart"_ustr; OUString aCID; aAny >>= aCID; if (aCID.isEmpty()) - return "Chart"; + return u"Chart"_ustr; ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID); switch (eObjectID) { case OBJECTTYPE_DATA_SERIES: - return "Series"; + return u"Series"_ustr; case OBJECTTYPE_DATA_ERRORS_X: case OBJECTTYPE_DATA_ERRORS_Y: case OBJECTTYPE_DATA_ERRORS_Z: - return "ErrorBar"; + return u"ErrorBar"_ustr; case OBJECTTYPE_AXIS: - return "Axis"; + return u"Axis"_ustr; case OBJECTTYPE_GRID: - return "Grid"; + return u"Grid"_ustr; case OBJECTTYPE_DIAGRAM: { rtl::Reference<ChartType> xChartType = getChartType(getChartModel()); if (xChartType.is() && xChartType->getChartType() == "com.sun.star.chart2.PieChartType") - return "ChartElements"; + return u"ChartElements"_ustr; break; } case OBJECTTYPE_DATA_CURVE: case OBJECTTYPE_DATA_AVERAGE_LINE: - return "Trendline"; + return u"Trendline"_ustr; default: break; } - return "Chart"; + return u"Chart"_ustr; } // private methods @@ -401,23 +401,23 @@ void SAL_CALL ChartController::attachFrame( try { uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue( "LayoutManager" ) >>= xLayoutManager; + xPropSet->getPropertyValue( u"LayoutManager"_ustr ) >>= xLayoutManager; if ( xLayoutManager.is() ) { xLayoutManager->lock(); - xLayoutManager->requestElement( "private:resource/menubar/menubar" ); + xLayoutManager->requestElement( u"private:resource/menubar/menubar"_ustr ); //@todo: createElement should become unnecessary, remove when #i79198# is fixed - xLayoutManager->createElement( "private:resource/toolbar/standardbar" ); - xLayoutManager->requestElement( "private:resource/toolbar/standardbar" ); + xLayoutManager->createElement( u"private:resource/toolbar/standardbar"_ustr ); + xLayoutManager->requestElement( u"private:resource/toolbar/standardbar"_ustr ); //@todo: createElement should become unnecessary, remove when #i79198# is fixed - xLayoutManager->createElement( "private:resource/toolbar/toolbar" ); - xLayoutManager->requestElement( "private:resource/toolbar/toolbar" ); + xLayoutManager->createElement( u"private:resource/toolbar/toolbar"_ustr ); + xLayoutManager->requestElement( u"private:resource/toolbar/toolbar"_ustr ); // #i12587# support for shapes in chart - xLayoutManager->createElement( "private:resource/toolbar/drawbar" ); - xLayoutManager->requestElement( "private:resource/toolbar/drawbar" ); + xLayoutManager->createElement( u"private:resource/toolbar/drawbar"_ustr ); + xLayoutManager->requestElement( u"private:resource/toolbar/drawbar"_ustr ); - xLayoutManager->requestElement( "private:resource/statusbar/statusbar" ); + xLayoutManager->requestElement( u"private:resource/statusbar/statusbar"_ustr ); xLayoutManager->unlock(); // add as listener to get notified when @@ -949,8 +949,8 @@ void SAL_CALL ChartController::layoutEvent( Reference< frame::XLayoutManager > xLM( aSource.Source, uno::UNO_QUERY ); if( xLM.is()) { - xLM->createElement( "private:resource/statusbar/statusbar" ); - xLM->requestElement( "private:resource/statusbar/statusbar" ); + xLM->createElement( u"private:resource/statusbar/statusbar"_ustr ); + xLM->requestElement( u"private:resource/statusbar/statusbar"_ustr ); } } } @@ -1281,26 +1281,26 @@ void SAL_CALL ChartController::dispatch( if( xPropSet.is() ) { uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue( "LayoutManager" ) >>= xLayoutManager; + xPropSet->getPropertyValue( u"LayoutManager"_ustr ) >>= xLayoutManager; if ( xLayoutManager.is() ) { - bool bIsVisible( xLayoutManager->isElementVisible( "private:resource/statusbar/statusbar" )); + bool bIsVisible( xLayoutManager->isElementVisible( u"private:resource/statusbar/statusbar"_ustr )); if( bIsVisible ) { - xLayoutManager->hideElement( "private:resource/statusbar/statusbar" ); - xLayoutManager->destroyElement( "private:resource/statusbar/statusbar" ); + xLayoutManager->hideElement( u"private:resource/statusbar/statusbar"_ustr ); + xLayoutManager->destroyElement( u"private:resource/statusbar/statusbar"_ustr ); } else { - xLayoutManager->createElement( "private:resource/statusbar/statusbar" ); - xLayoutManager->showElement( "private:resource/statusbar/statusbar" ); + xLayoutManager->createElement( u"private:resource/statusbar/statusbar"_ustr ); + xLayoutManager->showElement( u"private:resource/statusbar/statusbar"_ustr ); } // @todo: update menu state (checkmark next to "Statusbar"). } } } else if( aCommand == "ChangeTheme" ) - comphelper::dispatchCommand(".uno:ChangeTheme", getFrame(), rArgs); + comphelper::dispatchCommand(u".uno:ChangeTheme"_ustr, getFrame(), rArgs); } void SAL_CALL ChartController::addStatusListener( @@ -1580,69 +1580,69 @@ const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommand { static const o3tl::sorted_vector< OUString > s_AvailableCommands { // commands for container forward - "AddDirect", "NewDoc", "Open", - "Save", "SaveAs", "SendMail", - "EditDoc", "ExportDirectToPDF", "PrintDefault", + u"AddDirect"_ustr, u"NewDoc"_ustr, u"Open"_ustr, + u"Save"_ustr, u"SaveAs"_ustr, u"SendMail"_ustr, + u"EditDoc"_ustr, u"ExportDirectToPDF"_ustr, u"PrintDefault"_ustr, // own commands - "Cut", "Copy", "Paste", - "DataRanges", "DiagramData", + u"Cut"_ustr, u"Copy"_ustr, u"Paste"_ustr, + u"DataRanges"_ustr, u"DiagramData"_ustr, // insert objects - "InsertMenuTitles", "InsertTitles", - "InsertMenuLegend", "InsertLegend", "DeleteLegend", - "InsertMenuDataLabels", - "InsertMenuAxes", "InsertRemoveAxes", "InsertMenuGrids", - "InsertSymbol", - "InsertTrendlineEquation", "InsertTrendlineEquationAndR2", - "InsertR2Value", "DeleteR2Value", - "InsertMenuTrendlines", "InsertTrendline", - "InsertMenuMeanValues", "InsertMeanValue", - "InsertMenuXErrorBars", "InsertXErrorBars", - "InsertMenuYErrorBars", "InsertYErrorBars", - "InsertDataLabels", "InsertDataLabel", - "DeleteTrendline", "DeleteMeanValue", "DeleteTrendlineEquation", - "DeleteXErrorBars", "DeleteYErrorBars", - "DeleteDataLabels", "DeleteDataLabel", - "InsertMenuDataTable", - "InsertDataTable", "DeleteDataTable", + u"InsertMenuTitles"_ustr, u"InsertTitles"_ustr, + u"InsertMenuLegend"_ustr, u"InsertLegend"_ustr, u"DeleteLegend"_ustr, + u"InsertMenuDataLabels"_ustr, + u"InsertMenuAxes"_ustr, u"InsertRemoveAxes"_ustr, u"InsertMenuGrids"_ustr, + u"InsertSymbol"_ustr, + u"InsertTrendlineEquation"_ustr, u"InsertTrendlineEquationAndR2"_ustr, + u"InsertR2Value"_ustr, u"DeleteR2Value"_ustr, + u"InsertMenuTrendlines"_ustr, u"InsertTrendline"_ustr, + u"InsertMenuMeanValues"_ustr, u"InsertMeanValue"_ustr, + u"InsertMenuXErrorBars"_ustr, u"InsertXErrorBars"_ustr, + u"InsertMenuYErrorBars"_ustr, u"InsertYErrorBars"_ustr, + u"InsertDataLabels"_ustr, u"InsertDataLabel"_ustr, + u"DeleteTrendline"_ustr, u"DeleteMeanValue"_ustr, u"DeleteTrendlineEquation"_ustr, + u"DeleteXErrorBars"_ustr, u"DeleteYErrorBars"_ustr, + u"DeleteDataLabels"_ustr, u"DeleteDataLabel"_ustr, + u"InsertMenuDataTable"_ustr, + u"InsertDataTable"_ustr, u"DeleteDataTable"_ustr, //format objects - "FormatSelection", "FontDialog", "TransformDialog", - "DiagramType", "View3D", - "Forward", "Backward", - "MainTitle", "SubTitle", - "XTitle", "YTitle", "ZTitle", - "SecondaryXTitle", "SecondaryYTitle", - "AllTitles", "Legend", - "DiagramAxisX", "DiagramAxisY", "DiagramAxisZ", - "DiagramAxisA", "DiagramAxisB", "DiagramAxisAll", - "DiagramGridXMain", "DiagramGridYMain", "DiagramGridZMain", - "DiagramGridXHelp", "DiagramGridYHelp", "DiagramGridZHelp", - "DiagramGridAll", - "DiagramWall", "DiagramFloor", "DiagramArea", + u"FormatSelection"_ustr, u"FontDialog"_ustr, u"TransformDialog"_ustr, + u"DiagramType"_ustr, u"View3D"_ustr, + u"Forward"_ustr, u"Backward"_ustr, + u"MainTitle"_ustr, u"SubTitle"_ustr, + u"XTitle"_ustr, u"YTitle"_ustr, u"ZTitle"_ustr, + u"SecondaryXTitle"_ustr, u"SecondaryYTitle"_ustr, + u"AllTitles"_ustr, u"Legend"_ustr, + u"DiagramAxisX"_ustr, u"DiagramAxisY"_ustr, u"DiagramAxisZ"_ustr, + u"DiagramAxisA"_ustr, u"DiagramAxisB"_ustr, u"DiagramAxisAll"_ustr, + u"DiagramGridXMain"_ustr, u"DiagramGridYMain"_ustr, u"DiagramGridZMain"_ustr, + u"DiagramGridXHelp"_ustr, u"DiagramGridYHelp"_ustr, u"DiagramGridZHelp"_ustr, + u"DiagramGridAll"_ustr, + u"DiagramWall"_ustr, u"DiagramFloor"_ustr, u"DiagramArea"_ustr, //context menu - format objects entries - "FormatWall", "FormatFloor", "FormatChartArea", - "FormatLegend", + u"FormatWall"_ustr, u"FormatFloor"_ustr, u"FormatChartArea"_ustr, + u"FormatLegend"_ustr, - "FormatAxis", "FormatTitle", - "FormatDataSeries", "FormatDataPoint", - "ResetAllDataPoints", "ResetDataPoint", - "FormatDataLabels", "FormatDataLabel", - "FormatMeanValue", "FormatTrendline", "FormatTrendlineEquation", - "FormatXErrorBars", "FormatYErrorBars", - "FormatStockLoss", "FormatStockGain", + u"FormatAxis"_ustr, u"FormatTitle"_ustr, + u"FormatDataSeries"_ustr, u"FormatDataPoint"_ustr, + u"ResetAllDataPoints"_ustr, u"ResetDataPoint"_ustr, + u"FormatDataLabels"_ustr, u"FormatDataLabel"_ustr, + u"FormatMeanValue"_ustr, u"FormatTrendline"_ustr, u"FormatTrendlineEquation"_ustr, + u"FormatXErrorBars"_ustr, u"FormatYErrorBars"_ustr, + u"FormatStockLoss"_ustr, u"FormatStockGain"_ustr, - "FormatMajorGrid", "InsertMajorGrid", "DeleteMajorGrid", - "FormatMinorGrid", "InsertMinorGrid", "DeleteMinorGrid", - "InsertAxis", "DeleteAxis", "InsertAxisTitle", + u"FormatMajorGrid"_ustr, u"InsertMajorGrid"_ustr, u"DeleteMajorGrid"_ustr, + u"FormatMinorGrid"_ustr, u"InsertMinorGrid"_ustr, u"DeleteMinorGrid"_ustr, + u"InsertAxis"_ustr, u"DeleteAxis"_ustr, u"InsertAxisTitle"_ustr, // toolbar commands - "ToggleGridHorizontal", "ToggleGridVertical", "ToggleLegend", "ScaleText", - "NewArrangement", "Update", - "DefaultColors", "BarWidth", "NumberOfLines", - "ArrangeRow", - "StatusBarVisible", - "ChartElementSelector"}; + u"ToggleGridHorizontal"_ustr, u"ToggleGridVertical"_ustr, u"ToggleLegend"_ustr, u"ScaleText"_ustr, + u"NewArrangement"_ustr, u"Update"_ustr, + u"DefaultColors"_ustr, u"BarWidth"_ustr, u"NumberOfLines"_ustr, + u"ArrangeRow"_ustr, + u"StatusBarVisible"_ustr, + u"ChartElementSelector"_ustr}; return s_AvailableCommands; } diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index b3455ad49e04..3ec8b62c1ecb 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -178,19 +178,19 @@ void ChartController::executeDispatch_OpenInsertDataTableDialog() { uno::Reference<beans::XPropertySet> xProperties(xDataTable, uno::UNO_QUERY); - uno::Any aAny = xProperties->getPropertyValue("HBorder"); + uno::Any aAny = xProperties->getPropertyValue(u"HBorder"_ustr); if (aAny.has<bool>()) aData.mbHorizontalBorders = aAny.get<bool>(); - aAny = xProperties->getPropertyValue("VBorder"); + aAny = xProperties->getPropertyValue(u"VBorder"_ustr); if (aAny.has<bool>()) aData.mbVerticalBorders = aAny.get<bool>(); - aAny = xProperties->getPropertyValue("Outline"); + aAny = xProperties->getPropertyValue(u"Outline"_ustr); if (aAny.has<bool>()) aData.mbOutline = aAny.get<bool>(); - aAny = xProperties->getPropertyValue("Keys"); + aAny = xProperties->getPropertyValue(u"Keys"_ustr); if (aAny.has<bool>()) aData.mbKeys = aAny.get<bool>(); } @@ -224,10 +224,10 @@ void ChartController::executeDispatch_OpenInsertDataTableDialog() if (rDialogData.mbShow && xDataTable.is()) { uno::Reference<beans::XPropertySet> xProperties(xDataTable, uno::UNO_QUERY); - xProperties->setPropertyValue("HBorder" , uno::Any(rDialogData.mbHorizontalBorders)); - xProperties->setPropertyValue("VBorder" , uno::Any(rDialogData.mbVerticalBorders)); - xProperties->setPropertyValue("Outline" , uno::Any(rDialogData.mbOutline)); - xProperties->setPropertyValue("Keys" , uno::Any(rDialogData.mbKeys)); + xProperties->setPropertyValue(u"HBorder"_ustr , uno::Any(rDialogData.mbHorizontalBorders)); + xProperties->setPropertyValue(u"VBorder"_ustr , uno::Any(rDialogData.mbVerticalBorders)); + xProperties->setPropertyValue(u"Outline"_ustr , uno::Any(rDialogData.mbOutline)); + xProperties->setPropertyValue(u"Keys"_ustr , uno::Any(rDialogData.mbKeys)); bChanged = true; } @@ -644,10 +644,10 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 ) ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_CURVE_EQUATION )), m_xUndoManager ); - xEqProp->setPropertyValue( "ShowEquation", uno::Any( true )); - xEqProp->setPropertyValue( "XName", uno::Any( OUString("x") )); - xEqProp->setPropertyValue( "YName", uno::Any( OUString("f(x)") )); - xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( bInsertR2 )); + xEqProp->setPropertyValue( u"ShowEquation"_ustr, uno::Any( true )); + xEqProp->setPropertyValue( u"XName"_ustr, uno::Any( u"x"_ustr )); + xEqProp->setPropertyValue( u"YName"_ustr, uno::Any( u"f(x)"_ustr )); + xEqProp->setPropertyValue( u"ShowCorrelationCoefficient"_ustr, uno::Any( bInsertR2 )); aUndoGuard.commit(); } } @@ -662,7 +662,7 @@ void ChartController::executeDispatch_InsertR2Value() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_CURVE_EQUATION )), m_xUndoManager ); - xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( true )); + xEqProp->setPropertyValue( u"ShowCorrelationCoefficient"_ustr, uno::Any( true )); aUndoGuard.commit(); } } @@ -677,7 +677,7 @@ void ChartController::executeDispatch_DeleteR2Value() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_CURVE_EQUATION )), m_xUndoManager ); - xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( false )); + xEqProp->setPropertyValue( u"ShowCorrelationCoefficient"_ustr, uno::Any( false )); aUndoGuard.commit(); } } diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 600d46b434d0..bc8e65409130 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -78,7 +78,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) //#i77362 change notification for changes on additional shapes are missing if( m_xChartView.is() ) - m_xChartView->setPropertyValue( "SdrViewIsInEditMode", uno::Any(true) ); + m_xChartView->setPropertyValue( u"SdrViewIsInEditMode"_ustr, uno::Any(true) ); auto pChartWindow(GetChartWindow()); @@ -122,7 +122,7 @@ bool ChartController::EndTextEdit() //#i77362 change notification for changes on additional shapes are missing if( m_xChartView.is() ) - m_xChartView->setPropertyValue( "SdrViewIsInEditMode", uno::Any(false) ); + m_xChartView->setPropertyValue( u"SdrViewIsInEditMode"_ustr, uno::Any(false) ); SdrObject* pTextObject = m_pDrawViewWrapper->getTextEditObject(); if(!pTextObject) diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 5774ff1350d4..67ea64a11fb9 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -191,9 +191,9 @@ void ChartController::executeDispatch_NewArrangement() ControllerLockGuardUNO aCtlLockGuard( xModel ); // diagram - xDiagram->setPropertyToDefault( "RelativeSize"); - xDiagram->setPropertyToDefault( "RelativePosition"); - xDiagram->setPropertyToDefault( "PosSizeExcludeAxes"); + xDiagram->setPropertyToDefault( u"RelativeSize"_ustr); + xDiagram->setPropertyToDefault( u"RelativePosition"_ustr); + xDiagram->setPropertyToDefault( u"PosSizeExcludeAxes"_ustr); // 3d rotation xDiagram->set3DSettingsToDefault(); @@ -202,9 +202,9 @@ void ChartController::executeDispatch_NewArrangement() rtl::Reference< Legend > xLegend = xDiagram->getLegend2(); if( xLegend.is()) { - xLegend->setPropertyToDefault( "RelativePosition"); - xLegend->setPropertyToDefault( "RelativeSize"); - xLegend->setPropertyToDefault( "AnchorPosition"); + xLegend->setPropertyToDefault( u"RelativePosition"_ustr); + xLegend->setPropertyToDefault( u"RelativeSize"_ustr); + xLegend->setPropertyToDefault( u"AnchorPosition"_ustr); } // titles @@ -216,7 +216,7 @@ void ChartController::executeDispatch_NewArrangement() TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( eType ), xModel ); if( xTitleState.is()) - xTitleState->setPropertyToDefault( "RelativePosition"); + xTitleState->setPropertyToDefault( u"RelativePosition"_ustr); } // regression curve equations @@ -356,13 +356,13 @@ void ChartController::impl_PasteGraphic( m_aSelection.setSelection( xGraphicShape ); m_aSelection.applySelection( m_pDrawViewWrapper.get() ); } - xGraphicShape->SvxShape::setPropertyValue( "Graphic", uno::Any( xGraphic )); + xGraphicShape->SvxShape::setPropertyValue( u"Graphic"_ustr, uno::Any( xGraphic )); awt::Size aGraphicSize( 1000, 1000 ); bool bGotGraphicSize = false; try { - bGotGraphicSize = xGraphicShape->SvxShape::getPropertyValue( "Size100thMM") >>= aGraphicSize; + bGotGraphicSize = xGraphicShape->SvxShape::getPropertyValue( u"Size100thMM"_ustr) >>= aGraphicSize; } catch (css::beans::UnknownPropertyException& ) {} @@ -373,7 +373,7 @@ void ChartController::impl_PasteGraphic( bool bGotSizePixel = false; try { - bGotSizePixel = xGraphicShape->SvxShape::getPropertyValue( "SizePixel") >>= aGraphicSize; + bGotSizePixel = xGraphicShape->SvxShape::getPropertyValue( u"SizePixel"_ustr) >>= aGraphicSize; } catch (css::beans::UnknownPropertyException& ) {} @@ -466,14 +466,14 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons xTextShape->setString( rString ); float fCharHeight = 10.0; - xTextShape->SvxShape::setPropertyValue( "TextAutoGrowHeight", uno::Any( true ) ); - xTextShape->SvxShape::setPropertyValue( "TextAutoGrowWidth", uno::Any( true ) ); - xTextShape->SvxShape::setPropertyValue( "CharHeight", uno::Any( fCharHeight ) ); - xTextShape->SvxShape::setPropertyValue( "CharHeightAsian", uno::Any( fCharHeight ) ); - xTextShape->SvxShape::setPropertyValue( "CharHeightComplex", uno::Any( fCharHeight ) ); - xTextShape->SvxShape::setPropertyValue( "TextVerticalAdjust", uno::Any( drawing::TextVerticalAdjust_CENTER ) ); - xTextShape->SvxShape::setPropertyValue( "TextHorizontalAdjust", uno::Any( drawing::TextHorizontalAdjust_CENTER ) ); - xTextShape->SvxShape::setPropertyValue( "CharFontName", uno::Any( OUString("Albany") ) ); + xTextShape->SvxShape::setPropertyValue( u"TextAutoGrowHeight"_ustr, uno::Any( true ) ); + xTextShape->SvxShape::setPropertyValue( u"TextAutoGrowWidth"_ustr, uno::Any( true ) ); + xTextShape->SvxShape::setPropertyValue( u"CharHeight"_ustr, uno::Any( fCharHeight ) ); + xTextShape->SvxShape::setPropertyValue( u"CharHeightAsian"_ustr, uno::Any( fCharHeight ) ); + xTextShape->SvxShape::setPropertyValue( u"CharHeightComplex"_ustr, uno::Any( fCharHeight ) ); + xTextShape->SvxShape::setPropertyValue( u"TextVerticalAdjust"_ustr, uno::Any( drawing::TextVerticalAdjust_CENTER ) ); + xTextShape->SvxShape::setPropertyValue( u"TextHorizontalAdjust"_ustr, uno::Any( drawing::TextHorizontalAdjust_CENTER ) ); + xTextShape->SvxShape::setPropertyValue( u"CharFontName"_ustr, uno::Any( u"Albany"_ustr ) ); xTextShape->setPosition( rPosition ); @@ -639,7 +639,7 @@ bool ChartController::executeDispatch_Delete() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Delete, SchResId( STR_OBJECT_LEGEND )), m_xUndoManager ); - xLegend->setPropertyValue( "Show", uno::Any( false )); + xLegend->setPropertyValue( u"Show"_ustr, uno::Any( false )); bReturn = true; aUndoGuard.commit(); } @@ -712,10 +712,10 @@ bool ChartController::executeDispatch_Delete() m_xUndoManager ); { ControllerLockGuardUNO aCtlLockGuard( xModel ); - xEqProp->setPropertyValue( "ShowEquation", uno::Any( false )); - xEqProp->setPropertyValue( "XName", uno::Any( OUString("x") )); - xEqProp->setPropertyValue( "YName", uno::Any( OUString("f(x)") )); - xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( false )); + xEqProp->setPropertyValue( u"ShowEquation"_ustr, uno::Any( false )); + xEqProp->setPropertyValue( u"XName"_ustr, uno::Any( u"x"_ustr )); + xEqProp->setPropertyValue( u"YName"_ustr, uno::Any( u"f(x)"_ustr )); + xEqProp->setPropertyValue( u"ShowCorrelationCoefficient"_ustr, uno::Any( false )); } bReturn = true; aUndoGuard.commit(); @@ -748,7 +748,7 @@ bool ChartController::executeDispatch_Delete() { ControllerLockGuardUNO aCtlLockGuard( xModel ); xErrorBarProp->setPropertyValue( - "ErrorBarStyle", + u"ErrorBarStyle"_ustr, uno::Any( css::chart::ErrorBarStyle::NONE )); } bReturn = true; @@ -846,9 +846,9 @@ void ChartController::executeDispatch_ToggleLegend() try { bool bShow = false; - if( xLegendProp->getPropertyValue( "Show") >>= bShow ) + if( xLegendProp->getPropertyValue( u"Show"_ustr) >>= bShow ) { - xLegendProp->setPropertyValue( "Show", uno::Any( ! bShow )); + xLegendProp->setPropertyValue( u"Show"_ustr, uno::Any( ! bShow )); bChanged = true; } } @@ -945,7 +945,7 @@ void ChartController::executeDispatch_FillColor(sal_uInt32 nColor) Reference< beans::XPropertySet > xPointProperties( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) ); if( xPointProperties.is() ) - xPointProperties->setPropertyValue( "FillColor", uno::Any( nColor ) ); + xPointProperties->setPropertyValue( u"FillColor"_ustr, uno::Any( nColor ) ); } } catch( const uno::Exception& ) @@ -980,7 +980,7 @@ void ChartController::executeDispatch_FillGradient(std::u16string_view sJSONGrad xChartModel, aPrefferedName); - xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName)); + xPropSet->setPropertyValue(u"FillGradientName"_ustr, css::uno::Any(aNewName)); } } } @@ -1011,7 +1011,7 @@ void ChartController::executeDispatch_LineColor(sal_uInt32 nColor) } if( xPropSet.is() ) - xPropSet->setPropertyValue( "LineColor", css::uno::Any( Color(ColorTransparency, nColor) ) ); + xPropSet->setPropertyValue( u"LineColor"_ustr, css::uno::Any( Color(ColorTransparency, nColor) ) ); } } catch( const uno::Exception& ) @@ -1041,7 +1041,7 @@ void ChartController::executeDispatch_LineWidth(sal_uInt32 nWidth) } if( xPropSet.is() ) - xPropSet->setPropertyValue( "LineWidth", css::uno::Any( nWidth ) ); + xPropSet->setPropertyValue( u"LineWidth"_ustr, css::uno::Any( nWidth ) ); } } catch( const uno::Exception& ) @@ -1092,7 +1092,7 @@ void ChartController::executeDispatch_LOKPieSegmentDragging( int nOffset ) Reference< beans::XPropertySet > xPointProperties( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) ); if( xPointProperties.is() ) - xPointProperties->setPropertyValue( "Offset", uno::Any( nOffset / 100.0 ) ); + xPointProperties->setPropertyValue( u"Offset"_ustr, uno::Any( nOffset / 100.0 ) ); } } catch( const uno::Exception & ) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 375c2824a8a1..d8f5662ab882 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -146,13 +146,13 @@ void lcl_insertMenuCommand( const uno::Reference< awt::XPopupMenu > & xMenu, sal_Int16 nId, const OUString & rCommand ) { - xMenu->insertItem( nId, "", 0, -1 ); + xMenu->insertItem( nId, u""_ustr, 0, -1 ); xMenu->setCommand( nId, rCommand ); } OUString lcl_getFormatCommandForObjectCID( std::u16string_view rCID ) { - OUString aDispatchCommand( ".uno:FormatSelection" ); + OUString aDispatchCommand( u".uno:FormatSelection"_ustr ); ObjectType eObjectType = ObjectIdentifier::getObjectType( rCID ); @@ -275,7 +275,7 @@ void SAL_CALL ChartController::setPosSize( { "ScaleYNumerator", uno::Any( nScaleYNumerator ) }, { "ScaleYDenominator", uno::Any( nScaleYDenominator ) } })); - m_xChartView->setPropertyValue( "ZoomFactors", uno::Any( aZoomFactors )); + m_xChartView->setPropertyValue( u"ZoomFactors"_ustr, uno::Any( aZoomFactors )); } //a correct work area is at least necessary for correct values in the position and size dialog and for dragging area @@ -480,7 +480,7 @@ void ChartController::execute_Paint(vcl::RenderContext& rRenderContext, const to aResolution.Height = pChartWindow->GetSizePixel().Height(); } } - m_xChartView->setPropertyValue( "Resolution", uno::Any( aResolution )); + m_xChartView->setPropertyValue( u"Resolution"_ustr, uno::Any( aResolution )); } if (m_xChartView.is()) @@ -1024,9 +1024,9 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) sal_Int16 nUniqueId = 1; if (eObjectType != OBJECTTYPE_DATA_TABLE) { - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Cut" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Copy" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Paste" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:Cut"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:Copy"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:Paste"_ustr ); xPopupMenu->insertSeparator( -1 ); } @@ -1035,7 +1035,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) ); lcl_insertMenuCommand( xPopupMenu, nUniqueId++, aFormatCommand ); if (eObjectType == OBJECTTYPE_TITLE && m_pDrawViewWrapper->IsTextEdit()) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FontDialog" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FontDialog"_ustr ); //some commands for dataseries and points: @@ -1085,17 +1085,17 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( bIsPoint ) { if( bHasDataLabelAtPoint ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabel" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatDataLabel"_ustr ); if( !bHasDataLabelAtPoint ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabel" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertDataLabel"_ustr ); else - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabel" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteDataLabel"_ustr ); if( bSelectedPointIsFormatted ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetDataPoint" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:ResetDataPoint"_ustr ); xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataSeries" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatDataSeries"_ustr ); } rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) ); @@ -1104,12 +1104,12 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) try { bool bJapaneseStyle = false; - xChartType->getPropertyValue( "Japanese" ) >>= bJapaneseStyle; + xChartType->getPropertyValue( u"Japanese"_ustr ) >>= bJapaneseStyle; if( bJapaneseStyle ) { - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatStockLoss"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatStockGain"_ustr ); } } catch( const uno::Exception & ) @@ -1119,68 +1119,68 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) } if( bHasDataLabelsAtSeries ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabels" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatDataLabels"_ustr ); if( bHasEquation ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatTrendlineEquation"_ustr ); if( xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMeanValue" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatMeanValue"_ustr ); if( bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatXErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatXErrorBars"_ustr ); if( bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatYErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatYErrorBars"_ustr ); xPopupMenu->insertSeparator( -1 ); if( !bHasDataLabelsAtSeries ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabels" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertDataLabels"_ustr ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendline" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertTrendline"_ustr ); if( !xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMeanValue" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertMeanValue"_ustr ); if( !bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertXErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertXErrorBars"_ustr ); if( !bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertYErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertYErrorBars"_ustr ); if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabels" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteDataLabels"_ustr ); if( bHasEquation ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteTrendlineEquation"_ustr ); if( xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMeanValue" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteMeanValue"_ustr ); if( bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteXErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteXErrorBars"_ustr ); if( bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteYErrorBars" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteYErrorBars"_ustr ); if( bHasFormattedDataPointsOtherThanSelected ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetAllDataPoints" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:ResetAllDataPoints"_ustr ); xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId, ".uno:ArrangeRow" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId, u".uno:ArrangeRow"_ustr ); rtl::Reference< VCLXPopupMenu > xArrangePopupMenu = new VCLXPopupMenu(); sal_Int16 nSubId = nUniqueId + 1; - lcl_insertMenuCommand( xArrangePopupMenu, nSubId++, ".uno:Forward" ); - lcl_insertMenuCommand( xArrangePopupMenu, nSubId, ".uno:Backward" ); + lcl_insertMenuCommand( xArrangePopupMenu, nSubId++, u".uno:Forward"_ustr ); + lcl_insertMenuCommand( xArrangePopupMenu, nSubId, u".uno:Backward"_ustr ); xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu ); nUniqueId = nSubId; ++nUniqueId; } else if( eObjectType == OBJECTTYPE_DATA_CURVE ) { - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendline" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquation" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquationAndR2" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteTrendline"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatTrendlineEquation"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertTrendlineEquation"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertTrendlineEquationAndR2"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertR2Value"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteTrendlineEquation"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteR2Value"_ustr ); } else if( eObjectType == OBJECTTYPE_DATA_CURVE_EQUATION ) { - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertR2Value"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteR2Value"_ustr ); } //some commands for axes: and grids @@ -1201,44 +1201,44 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) bool bHasTitle = !TitleHelper::getCompleteString( xAxis->getTitleObject2() ).isEmpty(); if( eObjectType != OBJECTTYPE_AXIS && bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatAxis" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatAxis"_ustr ); if( eObjectType != OBJECTTYPE_GRID && bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMajorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatMajorGrid"_ustr ); if( eObjectType != OBJECTTYPE_SUBGRID && bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMinorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatMinorGrid"_ustr ); xPopupMenu->insertSeparator( -1 ); if( eObjectType != OBJECTTYPE_AXIS && !bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxis" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertAxis"_ustr ); if( eObjectType != OBJECTTYPE_GRID && !bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMajorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertMajorGrid"_ustr ); if( eObjectType != OBJECTTYPE_SUBGRID && !bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMinorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertMinorGrid"_ustr ); if( !bHasTitle ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxisTitle" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertAxisTitle"_ustr ); if( bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteAxis" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteAxis"_ustr ); if( bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMajorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteMajorGrid"_ustr ); if( bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMinorGrid" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteMinorGrid"_ustr ); if (bIsAxisVisible) - lcl_insertMenuCommand(xPopupMenu, nUniqueId++, ".uno:InsertDataTable"); + lcl_insertMenuCommand(xPopupMenu, nUniqueId++, u".uno:InsertDataTable"_ustr); } } else if (eObjectType == OBJECTTYPE_DATA_TABLE) { - lcl_insertMenuCommand(xPopupMenu, nUniqueId++, ".uno:DeleteDataTable"); + lcl_insertMenuCommand(xPopupMenu, nUniqueId++, u".uno:DeleteDataTable"_ustr); } if( eObjectType == OBJECTTYPE_DATA_STOCK_LOSS ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatStockGain"_ustr ); else if( eObjectType == OBJECTTYPE_DATA_STOCK_GAIN ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:FormatStockLoss"_ustr ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:TransformDialog" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:TransformDialog"_ustr ); if( eObjectType == OBJECTTYPE_PAGE || eObjectType == OBJECTTYPE_DIAGRAM || eObjectType == OBJECTTYPE_DIAGRAM_WALL @@ -1248,30 +1248,30 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( eObjectType != OBJECTTYPE_UNKNOWN ) xPopupMenu->insertSeparator( -1 ); bool bHasLegend = LegendHelper::hasLegend( xDiagram ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTitles" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertTitles"_ustr ); if( !bHasLegend ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertLegend" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertRemoveAxes" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertLegend"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:InsertRemoveAxes"_ustr ); if( bHasLegend ) - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteLegend" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DeleteLegend"_ustr ); } xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramType" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DataRanges" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramData" ); - lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:View3D" ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DiagramType"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DataRanges"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:DiagramData"_ustr ); + lcl_insertMenuCommand( xPopupMenu, nUniqueId++, u".uno:View3D"_ustr ); } css::uno::Sequence< css::uno::Any > aArgs{ - css::uno::Any(comphelper::makePropertyValue( "IsContextMenu", true )), - css::uno::Any(comphelper::makePropertyValue( "Frame", m_xFrame )), - css::uno::Any(comphelper::makePropertyValue( "Value", aMenuName )) + css::uno::Any(comphelper::makePropertyValue( u"IsContextMenu"_ustr, true )), + css::uno::Any(comphelper::makePropertyValue( u"Frame"_ustr, m_xFrame )), + css::uno::Any(comphelper::makePropertyValue( u"Value"_ustr, aMenuName )) }; css::uno::Reference< css::frame::XPopupMenuController > xPopupController( m_xCC->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.comp.framework.ResourceMenuController", aArgs, m_xCC ), css::uno::UNO_QUERY ); + u"com.sun.star.comp.framework.ResourceMenuController"_ustr, aArgs, m_xCC ), css::uno::UNO_QUERY ); if ( !xPopupController.is() || !xPopupMenu.is() ) return; @@ -1564,7 +1564,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) rtl::Reference< ChartModel > xChartModel = getChartModel(); if(xChartModel.is()) { - OUString aDump = xChartModel->dump("shapes"); + OUString aDump = xChartModel->dump(u"shapes"_ustr); SAL_WARN("chart2", aDump); } } @@ -1589,8 +1589,8 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) uno::Sequence< beans::PropertyValue > aArgs; xDispatchHelper->executeDispatch( uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), - ".uno:TerminateInplaceActivation", - "_parent", + u".uno:TerminateInplaceActivation"_ustr, + u"_parent"_ustr, frame::FrameSearchFlag::PARENT, aArgs ); bReturn = true; @@ -1783,8 +1783,8 @@ bool ChartController::impl_moveOrResizeObject( chart2::RelativePosition aRelPos; chart2::RelativeSize aRelSize; - bool bDeterminePos = !(xObjProp->getPropertyValue( "RelativePosition") >>= aRelPos); - bool bDetermineSize = !bNeedResize || !(xObjProp->getPropertyValue( "RelativeSize") >>= aRelSize); + bool bDeterminePos = !(xObjProp->getPropertyValue( u"RelativePosition"_ustr) >>= aRelPos); + bool bDetermineSize = !bNeedResize || !(xObjProp->getPropertyValue( u"RelativeSize"_ustr) >>= aRelSize); if( ( bDeterminePos || bDetermineSize ) && ( aRefSize.Width > 0 && aRefSize.Height > 0 ) ) @@ -1836,9 +1836,9 @@ bool ChartController::impl_moveOrResizeObject( eActionType, ObjectNameProvider::getName( eObjectType )), m_xUndoManager ); { ControllerLockGuardUNO aCLGuard( xChartModel ); - xObjProp->setPropertyValue( "RelativePosition", uno::Any( aRelPos )); + xObjProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any( aRelPos )); if( bNeedResize || (eObjectType == OBJECTTYPE_DIAGRAM) )//Also set an explicit size at the diagram when an explicit position is set - xObjProp->setPropertyValue( "RelativeSize", uno::Any( aRelSize )); + xObjProp->setPropertyValue( u"RelativeSize"_ustr, uno::Any( aRelSize )); } aUndoGuard.commit(); } @@ -1862,7 +1862,7 @@ bool ChartController::impl_DragDataPoint( std::u16string_view rCID, double fAddi uno::Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex( nDataPointIndex )); double fOffset = 0.0; if( xPointProp.is() && - (xPointProp->getPropertyValue( "Offset" ) >>= fOffset ) && + (xPointProp->getPropertyValue( u"Offset"_ustr ) >>= fOffset ) && (( fAdditionalOffset > 0.0 && fOffset < 1.0 ) || (fOffset > 0.0)) ) { fOffset += fAdditionalOffset; @@ -1870,7 +1870,7 @@ bool ChartController::impl_DragDataPoint( std::u16string_view rCID, double fAddi fOffset = 1.0; else if( fOffset < 0.0 ) fOffset = 0.0; - xPointProp->setPropertyValue( "Offset", uno::Any( fOffset )); + xPointProp->setPropertyValue( u"Offset"_ustr, uno::Any( fOffset )); bResult = true; } } diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 60ab7eb0ed2d..c2879e60d35d 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -53,7 +53,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi , m_bInPaint(false) , m_pViewShellWindow( nullptr ) { - set_id("chart_window"); + set_id(u"chart_window"_ustr); SetHelpId( HID_SCH_WIN_DOCUMENT ); SetMapMode( MapMode(MapUnit::Map100thMM) ); adjustHighContrastMode(); diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index c16a0e45be37..e84d4877b5e9 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -72,9 +72,9 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( const util::URL & rURL ) { static const o3tl::sorted_vector< OUString > s_aContainerDocumentCommands { - "AddDirect", "NewDoc", "Open", - "Save", "SaveAs", "SendMail", - "EditDoc", "ExportDirectToPDF", "PrintDefault"}; + u"AddDirect"_ustr, u"NewDoc"_ustr, u"Open"_ustr, + u"Save"_ustr, u"SaveAs"_ustr, u"SendMail"_ustr, + u"EditDoc"_ustr, u"ExportDirectToPDF"_ustr, u"PrintDefault"_ustr}; Reference< frame::XDispatch > xResult; tDispatchMap::const_iterator aIt( m_aCachedDispatches.find( rURL.Complete )); @@ -92,10 +92,10 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( rtl::Reference<CommandDispatch> pDispatch = new UndoCommandDispatch( m_xContext, xModel ); xResult.set( pDispatch ); pDispatch->initialize(); - m_aCachedDispatches[ ".uno:Undo" ].set( xResult ); - m_aCachedDispatches[ ".uno:Redo" ].set( xResult ); - m_aCachedDispatches[ ".uno:GetUndoStrings" ].set( xResult ); - m_aCachedDispatches[ ".uno:GetRedoStrings" ].set( xResult ); + m_aCachedDispatches[ u".uno:Undo"_ustr ].set( xResult ); + m_aCachedDispatches[ u".uno:Redo"_ustr ].set( xResult ); + m_aCachedDispatches[ u".uno:GetUndoStrings"_ustr ].set( xResult ); + m_aCachedDispatches[ u".uno:GetRedoStrings"_ustr ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } else if( xModel.is() && ( rURL.Path == "Context" || rURL.Path == "ModifiedStatus" ) ) @@ -104,8 +104,8 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( rtl::Reference<CommandDispatch> pDispatch = new StatusBarCommandDispatch( m_xContext, xModel, xSelSupp ); xResult.set( pDispatch ); pDispatch->initialize(); - m_aCachedDispatches[ ".uno:Context" ].set( xResult ); - m_aCachedDispatches[ ".uno:ModifiedStatus" ].set( xResult ); + m_aCachedDispatches[ u".uno:Context"_ustr ].set( xResult ); + m_aCachedDispatches[ u".uno:ModifiedStatus"_ustr ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } else if( xModel.is() && @@ -178,7 +178,7 @@ Reference< frame::XDispatch > CommandDispatchContainer::getContainerDispatchForU { Reference< frame::XDispatchProvider > xDispProv( xFrame->getCreator(), uno::UNO_QUERY ); if( xDispProv.is()) - xResult.set( xDispProv->queryDispatch( rURL, "_self", 0 )); + xResult.set( xDispProv->queryDispatch( rURL, u"_self"_ustr, 0 )); } } return xResult; diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 8d7bc490e569..787968b3f13b 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -66,9 +66,9 @@ bool lcl_isStatusBarVisible( const Reference< frame::XController > & xController if( xPropSet.is() ) { uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue( "LayoutManager" ) >>= xLayoutManager; + xPropSet->getPropertyValue( u"LayoutManager"_ustr ) >>= xLayoutManager; if ( xLayoutManager.is() ) - bIsStatusBarVisible = xLayoutManager->isElementVisible( "private:resource/statusbar/statusbar" ); + bIsStatusBarVisible = xLayoutManager->isElementVisible( u"private:resource/statusbar/statusbar"_ustr ); } } return bIsStatusBarVisible; @@ -294,8 +294,8 @@ void ControllerState::update( ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel ); if( xEquationProperties.is() ) { - xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value; - xEquationProperties->getPropertyValue( "MayHaveCorrelationCoefficient" ) >>= bMayHaveR2; + xEquationProperties->getPropertyValue( u"ShowCorrelationCoefficient"_ustr ) >>= bHasR2Value; + xEquationProperties->getPropertyValue( u"MayHaveCorrelationCoefficient"_ustr ) >>= bMayHaveR2; } } catch(const uno::RuntimeException&) @@ -543,7 +543,7 @@ void ControllerCommandDispatch::updateCommandAvailability() { try { - xProps->getPropertyValue("EnableDataTableDialog") >>= bEnableDataTableDialog; + xProps->getPropertyValue(u"EnableDataTableDialog"_ustr) >>= bEnableDataTableDialog; } catch( const uno::Exception& ) { @@ -561,157 +561,157 @@ void ControllerCommandDispatch::updateCommandAvailability() } // edit commands - m_aCommandAvailability[ ".uno:Cut" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsDeleteableObjectSelected; - m_aCommandAvailability[ ".uno:Copy" ] = bControllerStateIsValid && m_apControllerState->bHasSelectedObject; - m_aCommandAvailability[ ".uno:Paste" ] = bIsWritable; + m_aCommandAvailability[ u".uno:Cut"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsDeleteableObjectSelected; + m_aCommandAvailability[ u".uno:Copy"_ustr ] = bControllerStateIsValid && m_apControllerState->bHasSelectedObject; + m_aCommandAvailability[ u".uno:Paste"_ustr ] = bIsWritable; // toolbar commands - m_aCommandAvailability[ ".uno:ToggleGridHorizontal" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] <<= bModelStateIsValid && m_apModelState->bHasMainYGrid; - m_aCommandAvailability[ ".uno:ToggleGridVertical" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleGridVertical" ] <<= bModelStateIsValid && m_apModelState->bHasMainXGrid; - - m_aCommandAvailability[ ".uno:ToggleLegend" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleLegend" ] <<= bModelStateIsValid && m_apModelState->bHasLegend; - - m_aCommandAvailability[ ".uno:NewArrangement" ] = bIsWritable; - m_aCommandAvailability[ ".uno:Update" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DefaultColors" ] = bIsWritable; - m_aCommandAvailability[ ".uno:BarWidth" ] = bIsWritable; - m_aCommandAvailability[ ".uno:NumberOfLines" ] = bIsWritable; - m_aCommandAvailability[ ".uno:ArrangeRow" ] = + m_aCommandAvailability[ u".uno:ToggleGridHorizontal"_ustr ] = bIsWritable; + m_aCommandArguments[ u".uno:ToggleGridHorizontal"_ustr ] <<= bModelStateIsValid && m_apModelState->bHasMainYGrid; + m_aCommandAvailability[ u".uno:ToggleGridVertical"_ustr ] = bIsWritable; + m_aCommandArguments[ u".uno:ToggleGridVertical"_ustr ] <<= bModelStateIsValid && m_apModelState->bHasMainXGrid; + + m_aCommandAvailability[ u".uno:ToggleLegend"_ustr ] = bIsWritable; + m_aCommandArguments[ u".uno:ToggleLegend"_ustr ] <<= bModelStateIsValid && m_apModelState->bHasLegend; + + m_aCommandAvailability[ u".uno:NewArrangement"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:Update"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DefaultColors"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:BarWidth"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:NumberOfLines"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:ArrangeRow"_ustr ] = bShapeContext || ( bIsWritable && bControllerStateIsValid && ( m_apControllerState->bMayMoveSeriesForward || m_apControllerState->bMayMoveSeriesBackward ) ); // insert objects - m_aCommandAvailability[ ".uno:InsertTitles" ] = m_aCommandAvailability[ ".uno:InsertMenuTitles" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertLegend" ] = m_aCommandAvailability[ ".uno:InsertMenuLegend" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteLegend" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertMenuDataLabels" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertRemoveAxes" ] = m_aCommandAvailability[ ".uno:InsertMenuAxes" ] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ ".uno:InsertMenuGrids" ] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && bControllerStateIsValid && m_apControllerState->bMayAddMenuTrendline; - m_aCommandAvailability[ ".uno:InsertMenuMeanValues" ] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ ".uno:InsertMenuXErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ ".uno:InsertMenuYErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsTextObject; - m_aCommandAvailability[ ".uno:InsertMenuDataTable" ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertTitles"_ustr ] = m_aCommandAvailability[ u".uno:InsertMenuTitles"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertLegend"_ustr ] = m_aCommandAvailability[ u".uno:InsertMenuLegend"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteLegend"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertMenuDataLabels"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertRemoveAxes"_ustr ] = m_aCommandAvailability[ u".uno:InsertMenuAxes"_ustr ] = bIsWritable && m_apModelState->bSupportsAxes; + m_aCommandAvailability[ u".uno:InsertMenuGrids"_ustr ] = bIsWritable && m_apModelState->bSupportsAxes; + m_aCommandAvailability[ u".uno:InsertMenuTrendlines"_ustr ] = bIsWritable && m_apModelState->bSupportsStatistics && bControllerStateIsValid && m_apControllerState->bMayAddMenuTrendline; + m_aCommandAvailability[ u".uno:InsertMenuMeanValues"_ustr ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ u".uno:InsertMenuXErrorBars"_ustr ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ u".uno:InsertMenuYErrorBars"_ustr ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ u".uno:InsertSymbol"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsTextObject; + m_aCommandAvailability[ u".uno:InsertMenuDataTable"_ustr ] = bIsWritable; // format objects bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsFormateableObjectSelected; - m_aCommandAvailability[ ".uno:FormatSelection" ] = bFormatObjectAvailable && !bIsTextEdit; - m_aCommandAvailability[ ".uno:FontDialog" ] = bFormatObjectAvailable && bIsTextEdit; - m_aCommandAvailability[ ".uno:FormatAxis" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatTitle" ] = bFormatObjectAvailable && !bIsTextEdit; - m_aCommandAvailability[ ".uno:FormatDataSeries" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatDataPoint" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatDataLabels" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatDataLabel" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatXErrorBars; - m_aCommandAvailability[ ".uno:FormatYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatYErrorBars; - m_aCommandAvailability[ ".uno:FormatMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatMeanValue; - m_aCommandAvailability[ ".uno:FormatTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendline; - m_aCommandAvailability[ ".uno:FormatTrendlineEquation" ] = bFormatObjectAvailable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendlineEquation; - m_aCommandAvailability[ ".uno:FormatStockLoss" ] = bFormatObjectAvailable; - m_aCommandAvailability[ ".uno:FormatStockGain" ] = bFormatObjectAvailable; - - m_aCommandAvailability[ ".uno:DiagramType" ] = bIsWritable; - m_aCommandAvailability[ ".uno:Legend" ] = bIsWritable && m_apModelState->bHasLegend; - m_aCommandAvailability[ ".uno:DiagramWall" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasWall; - m_aCommandAvailability[ ".uno:DiagramArea" ] = bIsWritable; - - m_aCommandAvailability[ ".uno:TransformDialog" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bHasSelectedObject && m_apControllerState->bIsPositionableObject; + m_aCommandAvailability[ u".uno:FormatSelection"_ustr ] = bFormatObjectAvailable && !bIsTextEdit; + m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = bFormatObjectAvailable && bIsTextEdit; + m_aCommandAvailability[ u".uno:FormatAxis"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatTitle"_ustr ] = bFormatObjectAvailable && !bIsTextEdit; + m_aCommandAvailability[ u".uno:FormatDataSeries"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatDataPoint"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatDataLabels"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatDataLabel"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatXErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatXErrorBars; + m_aCommandAvailability[ u".uno:FormatYErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatYErrorBars; + m_aCommandAvailability[ u".uno:FormatMeanValue"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatMeanValue; + m_aCommandAvailability[ u".uno:FormatTrendline"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendline; + m_aCommandAvailability[ u".uno:FormatTrendlineEquation"_ustr ] = bFormatObjectAvailable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendlineEquation; + m_aCommandAvailability[ u".uno:FormatStockLoss"_ustr ] = bFormatObjectAvailable; + m_aCommandAvailability[ u".uno:FormatStockGain"_ustr ] = bFormatObjectAvailable; + + m_aCommandAvailability[ u".uno:DiagramType"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:Legend"_ustr ] = bIsWritable && m_apModelState->bHasLegend; + m_aCommandAvailability[ u".uno:DiagramWall"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasWall; + m_aCommandAvailability[ u".uno:DiagramArea"_ustr ] = bIsWritable; + + m_aCommandAvailability[ u".uno:TransformDialog"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bHasSelectedObject && m_apControllerState->bIsPositionableObject; // 3d commands - m_aCommandAvailability[ ".uno:View3D" ] = bIsWritable && bModelStateIsValid && m_apModelState->bIsThreeD; - m_aCommandAvailability[ ".uno:DiagramFloor" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasFloor; + m_aCommandAvailability[ u".uno:View3D"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bIsThreeD; + m_aCommandAvailability[ u".uno:DiagramFloor"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasFloor; //some more format commands with different ui text - m_aCommandAvailability[ ".uno:FormatWall" ] = m_aCommandAvailability[ ".uno:DiagramWall" ]; - m_aCommandAvailability[ ".uno:FormatFloor" ] = m_aCommandAvailability[ ".uno:DiagramFloor" ]; - m_aCommandAvailability[ ".uno:FormatChartArea" ] = m_aCommandAvailability[ ".uno:DiagramArea" ]; - m_aCommandAvailability[ ".uno:FormatLegend" ] = m_aCommandAvailability[ ".uno:Legend" ]; + m_aCommandAvailability[ u".uno:FormatWall"_ustr ] = m_aCommandAvailability[ u".uno:DiagramWall"_ustr ]; + m_aCommandAvailability[ u".uno:FormatFloor"_ustr ] = m_aCommandAvailability[ u".uno:DiagramFloor"_ustr ]; + m_aCommandAvailability[ u".uno:FormatChartArea"_ustr ] = m_aCommandAvailability[ u".uno:DiagramArea"_ustr ]; + m_aCommandAvailability[ u".uno:FormatLegend"_ustr ] = m_aCommandAvailability[ u".uno:Legend"_ustr ]; // depending on own data and ability to create new data provider - m_aCommandAvailability[".uno:DataRanges"] = bIsWritable && bModelStateIsValid && !m_apModelState->bHasDataFromPivotTable + m_aCommandAvailability[u".uno:DataRanges"_ustr] = bIsWritable && bModelStateIsValid && !m_apModelState->bHasDataFromPivotTable && ((m_apModelState->bHasOwnData && bCanCreateDataProvider) || !m_apModelState->bHasOwnData); - m_aCommandAvailability[ ".uno:DiagramData" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && bEnableDataTableDialog; + m_aCommandAvailability[ u".uno:DiagramData"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && bEnableDataTableDialog; // titles - m_aCommandAvailability[ ".uno:MainTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainTitle; - m_aCommandAvailability[ ".uno:SubTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSubTitle; - m_aCommandAvailability[ ".uno:XTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxisTitle; - m_aCommandAvailability[ ".uno:YTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxisTitle; - m_aCommandAvailability[ ".uno:ZTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxisTitle; - m_aCommandAvailability[ ".uno:SecondaryXTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryXAxisTitle; - m_aCommandAvailability[ ".uno:SecondaryYTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryYAxisTitle; - m_aCommandAvailability[ ".uno:AllTitles" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyTitle(); + m_aCommandAvailability[ u".uno:MainTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainTitle; + m_aCommandAvailability[ u".uno:SubTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSubTitle; + m_aCommandAvailability[ u".uno:XTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxisTitle; + m_aCommandAvailability[ u".uno:YTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxisTitle; + m_aCommandAvailability[ u".uno:ZTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxisTitle; + m_aCommandAvailability[ u".uno:SecondaryXTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryXAxisTitle; + m_aCommandAvailability[ u".uno:SecondaryYTitle"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryYAxisTitle; + m_aCommandAvailability[ u".uno:AllTitles"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyTitle(); // text - m_aCommandAvailability[ ".uno:ScaleText" ] = bIsWritable && bModelStateIsValid ; - m_aCommandArguments[ ".uno:ScaleText" ] <<= bModelStateIsValid && m_apModelState->bHasAutoScaledText; + m_aCommandAvailability[ u".uno:ScaleText"_ustr ] = bIsWritable && bModelStateIsValid ; + m_aCommandArguments[ u".uno:ScaleText"_ustr ] <<= bModelStateIsValid && m_apModelState->bHasAutoScaledText; // axes - m_aCommandAvailability[ ".uno:DiagramAxisX" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxis; - m_aCommandAvailability[ ".uno:DiagramAxisY" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxis; - m_aCommandAvailability[ ".uno:DiagramAxisZ" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxis; - m_aCommandAvailability[ ".uno:DiagramAxisA" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasAAxis; - m_aCommandAvailability[ ".uno:DiagramAxisB" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasBAxis; - m_aCommandAvailability[ ".uno:DiagramAxisAll" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyAxis(); + m_aCommandAvailability[ u".uno:DiagramAxisX"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxis; + m_aCommandAvailability[ u".uno:DiagramAxisY"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxis; + m_aCommandAvailability[ u".uno:DiagramAxisZ"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxis; + m_aCommandAvailability[ u".uno:DiagramAxisA"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasAAxis; + m_aCommandAvailability[ u".uno:DiagramAxisB"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasBAxis; + m_aCommandAvailability[ u".uno:DiagramAxisAll"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyAxis(); // grids // note: x and y are swapped in the commands! - m_aCommandAvailability[ ".uno:DiagramGridYMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainXGrid; - m_aCommandAvailability[ ".uno:DiagramGridXMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainYGrid; - m_aCommandAvailability[ ".uno:DiagramGridZMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainZGrid; - m_aCommandAvailability[ ".uno:DiagramGridYHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpXGrid; - m_aCommandAvailability[ ".uno:DiagramGridXHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpYGrid; - m_aCommandAvailability[ ".uno:DiagramGridZHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpZGrid; - m_aCommandAvailability[ ".uno:DiagramGridAll" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyGrid(); + m_aCommandAvailability[ u".uno:DiagramGridYMain"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainXGrid; + m_aCommandAvailability[ u".uno:DiagramGridXMain"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainYGrid; + m_aCommandAvailability[ u".uno:DiagramGridZMain"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainZGrid; + m_aCommandAvailability[ u".uno:DiagramGridYHelp"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpXGrid; + m_aCommandAvailability[ u".uno:DiagramGridXHelp"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpYGrid; + m_aCommandAvailability[ u".uno:DiagramGridZHelp"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpZGrid; + m_aCommandAvailability[ u".uno:DiagramGridAll"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyGrid(); // series arrangement - m_aCommandAvailability[ ".uno:Forward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Forward" ) : + m_aCommandAvailability[ u".uno:Forward"_ustr ] = ( bShapeContext ? isShapeControllerCommandAvailable( u".uno:Forward"_ustr ) : ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward && bEnableDataTableDialog ) ); - m_aCommandAvailability[ ".uno:Backward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Backward" ) : + m_aCommandAvailability[ u".uno:Backward"_ustr ] = ( bShapeContext ? isShapeControllerCommandAvailable( u".uno:Backward"_ustr ) : ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward && bEnableDataTableDialog ) ); - m_aCommandAvailability[ ".uno:InsertDataLabels" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertDataLabel" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue; - m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline; + m_aCommandAvailability[ u".uno:InsertDataLabels"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertDataLabel"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertMeanValue"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue; + m_aCommandAvailability[ u".uno:InsertTrendline"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline; const bool bInsertTrendlineEquation = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation; - m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bInsertTrendlineEquation; - m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = bInsertTrendlineEquation && m_apControllerState->bMayAddR2Value; - m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value + m_aCommandAvailability[ u".uno:InsertTrendlineEquation"_ustr ] = bInsertTrendlineEquation; + m_aCommandAvailability[ u".uno:InsertTrendlineEquationAndR2"_ustr ] = bInsertTrendlineEquation && m_apControllerState->bMayAddR2Value; + m_aCommandAvailability[ u".uno:InsertR2Value"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value && !m_apControllerState->bMayAddTrendlineEquation; - m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value; - - m_aCommandAvailability[ ".uno:InsertXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars; - m_aCommandAvailability[ ".uno:InsertYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddYErrorBars; - - m_aCommandAvailability[ ".uno:DeleteDataLabels" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteDataLabel" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendline; - m_aCommandAvailability[ ".uno:DeleteTrendlineEquation" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendlineEquation; - m_aCommandAvailability[ ".uno:DeleteMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteMeanValue; - m_aCommandAvailability[ ".uno:DeleteXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteXErrorBars; - m_aCommandAvailability[ ".uno:DeleteYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteYErrorBars; - - m_aCommandAvailability[ ".uno:ResetDataPoint" ] = bIsWritable; - m_aCommandAvailability[ ".uno:ResetAllDataPoints" ] = bIsWritable; - - m_aCommandAvailability[ ".uno:InsertAxis" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteAxis" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertAxisTitle" ] = bIsWritable; - m_aCommandAvailability[ ".uno:FormatMajorGrid" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertMajorGrid" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteMajorGrid" ] = bIsWritable; - m_aCommandAvailability[ ".uno:FormatMinorGrid" ] = bIsWritable; - m_aCommandAvailability[ ".uno:InsertMinorGrid" ] = bIsWritable; - m_aCommandAvailability[ ".uno:DeleteMinorGrid" ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteR2Value"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value; + + m_aCommandAvailability[ u".uno:InsertXErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars; + m_aCommandAvailability[ u".uno:InsertYErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddYErrorBars; + + m_aCommandAvailability[ u".uno:DeleteDataLabels"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteDataLabel"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteTrendline"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendline; + m_aCommandAvailability[ u".uno:DeleteTrendlineEquation"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendlineEquation; + m_aCommandAvailability[ u".uno:DeleteMeanValue"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteMeanValue; + m_aCommandAvailability[ u".uno:DeleteXErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteXErrorBars; + m_aCommandAvailability[ u".uno:DeleteYErrorBars"_ustr ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteYErrorBars; + + m_aCommandAvailability[ u".uno:ResetDataPoint"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:ResetAllDataPoints"_ustr ] = bIsWritable; + + m_aCommandAvailability[ u".uno:InsertAxis"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteAxis"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertAxisTitle"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:FormatMajorGrid"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertMajorGrid"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteMajorGrid"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:FormatMinorGrid"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:InsertMinorGrid"_ustr ] = bIsWritable; + m_aCommandAvailability[ u".uno:DeleteMinorGrid"_ustr ] = bIsWritable; // data table - m_aCommandAvailability[ ".uno:InsertDataTable" ] = bIsWritable && bModelStateIsValid && !m_apModelState->bDataTable; - m_aCommandAvailability[ ".uno:DeleteDataTable" ] = bIsWritable && bModelStateIsValid && m_apModelState->bDataTable; + m_aCommandAvailability[ u".uno:InsertDataTable"_ustr ] = bIsWritable && bModelStateIsValid && !m_apModelState->bDataTable; + m_aCommandAvailability[ u".uno:DeleteDataTable"_ustr ] = bIsWritable && bModelStateIsValid && m_apModelState->bDataTable; } bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand ) @@ -748,7 +748,7 @@ void ControllerCommandDispatch::fireStatusEvent( { uno::Any aArg; aArg <<= Reference< frame::XController >(m_xChartController); - fireStatusEventForURL( ".uno:ChartElementSelector", aArg, true, xSingleListener ); + fireStatusEventForURL( u".uno:ChartElementSelector"_ustr, aArg, true, xSingleListener ); } if( rURL.isEmpty() ) @@ -764,7 +764,7 @@ void ControllerCommandDispatch::fireStatusEvent( if( rURL.isEmpty() || rURL == ".uno:StatusBarVisible" ) { bool bIsStatusBarVisible( lcl_isStatusBarVisible( m_xChartController )); - fireStatusEventForURL( ".uno:StatusBarVisible", uno::Any( bIsStatusBarVisible ), true, xSingleListener ); + fireStatusEventForURL( u".uno:StatusBarVisible"_ustr, uno::Any( bIsStatusBarVisible ), true, xSingleListener ); } } diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx index 5bd85faaf959..f5145d276c99 100644 --- a/chart2/source/controller/main/DragMethod_PieSegment.cxx +++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx @@ -117,7 +117,7 @@ bool DragMethod_PieSegment::EndSdrDrag(bool /*bCopy*/) Reference< beans::XPropertySet > xPointProperties( ObjectIdentifier::getObjectPropertySet( m_aObjectCID, xChartModel ) ); if( xPointProperties.is() ) - xPointProperties->setPropertyValue( "Offset", uno::Any( m_fAdditionalOffset+m_fInitialOffset )); + xPointProperties->setPropertyValue( u"Offset"_ustr, uno::Any( m_fAdditionalOffset+m_fInitialOffset )); } } catch( const uno::Exception & ) diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index 6172a25edad2..6e496dbe1c4e 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -82,7 +82,7 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWr if( ChartTypeHelper::isSupportingRightAngledAxes( xDiagram->getChartTypeByIndex( 0 ) ) ) - xDiagram->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes; + xDiagram->getPropertyValue(u"RightAngledAxes"_ustr) >>= m_bRightAngledAxes; if(m_bRightAngledAxes) { if( m_eRotationDirection==ROTATIONDIRECTION_Z ) diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index d538108ae8e9..f342b3538aad 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -51,8 +51,8 @@ constexpr OUStringLiteral lcl_aServiceName } SelectorListBox::SelectorListBox(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/schart/ui/combobox.ui", "ComboBox") - , m_xWidget(m_xBuilder->weld_combo_box("combobox")) + : InterimItemWindow(pParent, u"modules/schart/ui/combobox.ui"_ustr, u"ComboBox"_ustr) + , m_xWidget(m_xBuilder->weld_combo_box(u"combobox"_ustr)) , m_bReleaseFocus(true) { InitControlBase(m_xWidget.get()); @@ -251,7 +251,7 @@ sal_Bool SAL_CALL ElementSelectorToolbarController::supportsService( const OUStr css::uno::Sequence< OUString > SAL_CALL ElementSelectorToolbarController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } ElementSelectorToolbarController::ElementSelectorToolbarController() { diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 3a215ac99522..f2d130aa014c 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -74,8 +74,8 @@ void lcl_getChildOIDs( Reference< beans::XPropertySetInfo > xInfo( xShapeProp->getPropertySetInfo()); OUString aName; if( xInfo.is() && - xInfo->hasPropertyByName( "Name") && - (xShapeProp->getPropertyValue( "Name") >>= aName ) && + xInfo->hasPropertyByName( u"Name"_ustr) && + (xShapeProp->getPropertyValue( u"Name"_ustr) >>= aName ) && !aName.isEmpty() && ::chart::ObjectIdentifier::isCID( aName )) { @@ -369,7 +369,7 @@ void ObjectHierarchy::createDataSeriesTree( xErrorBarProp.is()) { sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE; - if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && + if( ( xErrorBarProp->getPropertyValue( u"ErrorBarStyle"_ustr) >>= nStyle ) && ( nStyle != css::chart::ErrorBarStyle::NONE ) ) { aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent( @@ -381,7 +381,7 @@ void ObjectHierarchy::createDataSeriesTree( xErrorBarProp.is()) { sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE; - if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && + if( ( xErrorBarProp->getPropertyValue( u"ErrorBarStyle"_ustr) >>= nStyle ) && ( nStyle != css::chart::ErrorBarStyle::NONE ) ) { aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent( @@ -531,7 +531,7 @@ ObjectHierarchy::~ObjectHierarchy() ObjectIdentifier ObjectHierarchy::getRootNodeOID() { - return ObjectIdentifier( "ROOT" ); + return ObjectIdentifier( u"ROOT"_ustr ); } bool ObjectHierarchy::isRootNode( const ObjectIdentifier& rOID ) diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 8cad36404fdc..dbb5368686ae 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -57,7 +57,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.TopLeft(); aRelativePosition.Primary = (double(aPos.X())+double(aObjectRect.getOpenWidth())/2.0)/double(aPageRect.getOpenWidth()); aRelativePosition.Secondary = (double(aPos.Y())+double(aObjectRect.getOpenHeight())/2.0)/double(aPageRect.getOpenHeight()); - xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xObjectProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); } else if( eObjectType == OBJECTTYPE_DATA_LABEL ) { @@ -66,7 +66,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType aAbsolutePosition.Primary = double(rOldPositionAndSize.X) / double(aPageRect.getOpenWidth()); aAbsolutePosition.Secondary = double(rOldPositionAndSize.Y) / double(aPageRect.getOpenHeight()); - if( xObjectProp->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition ) + if( xObjectProp->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition ) { aAbsolutePosition.Primary -= aCustomLabelPosition.Primary; aAbsolutePosition.Secondary -= aCustomLabelPosition.Secondary; @@ -75,7 +75,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType //the anchor point at the data label object is top/left Point aPos = aObjectRect.TopLeft(); double fRotation = 0.0; - xObjectProp->getPropertyValue("TextRotation") >>= fRotation; + xObjectProp->getPropertyValue(u"TextRotation"_ustr) >>= fRotation; if( fRotation == 90.0 ) aPos = aObjectRect.BottomLeft(); else if( fRotation == 270.0 ) @@ -83,7 +83,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType aCustomLabelPosition.Primary = double(aPos.X()) / double(aPageRect.getOpenWidth()) - aAbsolutePosition.Primary; aCustomLabelPosition.Secondary = double(aPos.Y()) / double(aPageRect.getOpenHeight()) - aAbsolutePosition.Secondary; - xObjectProp->setPropertyValue("CustomLabelPosition", uno::Any(aCustomLabelPosition)); + xObjectProp->setPropertyValue(u"CustomLabelPosition"_ustr, uno::Any(aCustomLabelPosition)); } else if( eObjectType==OBJECTTYPE_DATA_CURVE_EQUATION ) { @@ -94,11 +94,11 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.TopLeft(); aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getOpenWidth()); aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getOpenHeight()); - xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xObjectProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); } else if(eObjectType==OBJECTTYPE_LEGEND) { - xObjectProp->setPropertyValue( "Expansion", uno::Any(css::chart::ChartLegendExpansion_CUSTOM)); + xObjectProp->setPropertyValue( u"Expansion"_ustr, uno::Any(css::chart::ChartLegendExpansion_CUSTOM)); chart2::RelativePosition aRelativePosition; chart2::RelativeSize aRelativeSize; Point aAnchor = aObjectRect.TopLeft(); @@ -110,7 +110,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType static_cast< double >( aAnchor.Y()) / static_cast< double >( aPageRect.getOpenHeight()); - xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xObjectProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); aRelativeSize.Primary = static_cast< double >( aObjectRect.getOpenWidth()) / @@ -123,7 +123,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType if (aRelativeSize.Secondary > 1.0) aRelativeSize.Secondary = 1.0; - xObjectProp->setPropertyValue( "RelativeSize", uno::Any(aRelativeSize) ); + xObjectProp->setPropertyValue( u"RelativeSize"_ustr, uno::Any(aRelativeSize) ); } else if(eObjectType==OBJECTTYPE_DIAGRAM || eObjectType==OBJECTTYPE_DIAGRAM_WALL || eObjectType==OBJECTTYPE_DIAGRAM_FLOOR) { @@ -136,7 +136,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.Center(); aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getOpenWidth()); aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getOpenHeight()); - xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) ); + xObjectProp->setPropertyValue( u"RelativePosition"_ustr, uno::Any(aRelativePosition) ); //set size: RelativeSize aRelativeSize; @@ -144,7 +144,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType //and in the middle of the page aRelativeSize.Primary = double(aObjectRect.getOpenWidth())/double(aPageRect.getOpenWidth()); aRelativeSize.Secondary = double(aObjectRect.getOpenHeight())/double(aPageRect.getOpenHeight()); - xObjectProp->setPropertyValue( "RelativeSize", uno::Any(aRelativeSize) ); + xObjectProp->setPropertyValue( u"RelativeSize"_ustr, uno::Any(aRelativeSize) ); } else return false; diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx index e3c1f038b0ac..863436c3bab0 100644 --- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx +++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx @@ -69,14 +69,14 @@ void StatusBarCommandDispatch::fireStatusEvent( { uno::Any aArg; aArg <<= ObjectNameProvider::getSelectedObjectText( m_aSelectedOID.getObjectCID(), m_xChartModel ); - fireStatusEventForURL( ".uno:Context", aArg, true, xSingleListener ); + fireStatusEventForURL( u".uno:Context"_ustr, aArg, true, xSingleListener ); } if( bFireModified ) { uno::Any aArg; if( m_bIsModified ) - aArg <<= OUString("*"); - fireStatusEventForURL( ".uno:ModifiedStatus", aArg, true, xSingleListener ); + aArg <<= u"*"_ustr; + fireStatusEventForURL( u".uno:ModifiedStatus"_ustr, aArg, true, xSingleListener ); } } diff --git a/chart2/source/controller/main/ToolbarController.cxx b/chart2/source/controller/main/ToolbarController.cxx index 17df7c7c8b14..de04e4c91b4d 100644 --- a/chart2/source/controller/main/ToolbarController.cxx +++ b/chart2/source/controller/main/ToolbarController.cxx @@ -97,7 +97,7 @@ void ChartToolbarController::update() OUString ChartToolbarController::getImplementationName() { - return "org.libreoffice.chart2.Chart2ToolboxController"; + return u"org.libreoffice.chart2.Chart2ToolboxController"_ustr; } sal_Bool ChartToolbarController::supportsService(OUString const & ServiceName) @@ -107,7 +107,7 @@ sal_Bool ChartToolbarController::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> ChartToolbarController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } } diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx index c90fac3f4045..1c5c760f93f5 100644 --- a/chart2/source/controller/main/UndoCommandDispatch.cxx +++ b/chart2/source/controller/main/UndoCommandDispatch.cxx @@ -75,13 +75,13 @@ void UndoCommandDispatch::fireStatusEvent( aRedoStrings <<= m_xUndoManager->getAllRedoActionTitles(); if( bFireAll || rURL == ".uno:Undo" ) - fireStatusEventForURL( ".uno:Undo", aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener ); + fireStatusEventForURL( u".uno:Undo"_ustr, aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener ); if( bFireAll || rURL == ".uno:Redo" ) - fireStatusEventForURL( ".uno:Redo", aRedoState, m_xUndoManager->isRedoPossible(), xSingleListener ); + fireStatusEventForURL( u".uno:Redo"_ustr, aRedoState, m_xUndoManager->isRedoPossible(), xSingleListener ); if( bFireAll || rURL == ".uno:GetUndoStrings" ) - fireStatusEventForURL( ".uno:GetUndoStrings", aUndoStrings, true, xSingleListener ); + fireStatusEventForURL( u".uno:GetUndoStrings"_ustr, aUndoStrings, true, xSingleListener ); if( bFireAll || rURL == ".uno:GetRedoStrings" ) - fireStatusEventForURL( ".uno:GetRedoStrings", aRedoStrings, true, xSingleListener ); + fireStatusEventForURL( u".uno:GetRedoStrings"_ustr, aRedoStrings, true, xSingleListener ); } // ____ XDispatch ____ diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx index 081322b09408..a0483a22b6ed 100644 --- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx +++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx @@ -56,9 +56,9 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( try { const ::comphelper::NamedValueCollection aArguments (rArguments); - Reference<css::frame::XFrame> xFrame (aArguments.getOrDefault("Frame", Reference<css::frame::XFrame>())); - Reference<css::awt::XWindow> xParentWindow (aArguments.getOrDefault("ParentWindow", Reference<css::awt::XWindow>())); - Reference<css::frame::XController> xController (aArguments.getOrDefault("Controller", Reference<css::frame::XController>())); + Reference<css::frame::XFrame> xFrame (aArguments.getOrDefault(u"Frame"_ustr, Reference<css::frame::XFrame>())); + Reference<css::awt::XWindow> xParentWindow (aArguments.getOrDefault(u"ParentWindow"_ustr, Reference<css::awt::XWindow>())); + Reference<css::frame::XController> xController (aArguments.getOrDefault(u"Controller"_ustr, Reference<css::frame::XController>())); weld::Widget* pParent(nullptr); if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get())) @@ -66,21 +66,21 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( if (!pParent) throw RuntimeException( - "PanelFactory::createUIElement called without ParentWindow", + u"PanelFactory::createUIElement called without ParentWindow"_ustr, nullptr); if ( ! xFrame.is()) throw RuntimeException( - "PanelFactory::createUIElement called without Frame", + u"PanelFactory::createUIElement called without Frame"_ustr, nullptr); if (!xController.is()) throw RuntimeException( - "ChartPanelFactory::createUIElement called without Controller", + u"ChartPanelFactory::createUIElement called without Controller"_ustr, nullptr); ChartController* pController = dynamic_cast<ChartController*>(xController.get()); if (!pController) throw RuntimeException( - "ChartPanelFactory::createUIElement called without valid ChartController", + u"ChartPanelFactory::createUIElement called without valid ChartController"_ustr, nullptr); std::unique_ptr<PanelLayout> xPanel; @@ -114,7 +114,7 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetRuntimeException( - "ChartPanelFactory::createUIElement exception", + u"ChartPanelFactory::createUIElement exception"_ustr, nullptr, anyEx ); } @@ -123,7 +123,7 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( OUString ChartPanelFactory::getImplementationName() { - return "org.libreoffice.comp.chart2.sidebar.ChartPanelFactory"; + return u"org.libreoffice.comp.chart2.sidebar.ChartPanelFactory"_ustr; } sal_Bool ChartPanelFactory::supportsService(OUString const & ServiceName) @@ -133,7 +133,7 @@ sal_Bool ChartPanelFactory::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> ChartPanelFactory::getSupportedServiceNames() { - return { "com.sun.star.ui.UIElementFactory" }; + return { u"com.sun.star.ui.UIElementFactory"_ustr }; } } // end of namespace chart::sidebar diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index cb660661c140..189ed77fd762 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -36,7 +36,7 @@ namespace { SvxColorToolBoxControl* getColorToolBoxControl(const ToolbarUnoDispatcher& rColorDispatch) { - css::uno::Reference<css::frame::XToolbarController> xController = rColorDispatch.GetControllerForCommand(".uno:FillColor"); + css::uno::Reference<css::frame::XToolbarController> xController = rColorDispatch.GetControllerForCommand(u".uno:FillColor"_ustr); SvxColorToolBoxControl* pToolBoxColorControl = dynamic_cast<SvxColorToolBoxControl*>(xController.get()); return pToolBoxColorControl; } @@ -123,7 +123,7 @@ XFillGradientItem getXGradientForName(const css::uno::Reference<css::frame::XMod { css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY); css::uno::Reference<css::container::XNameAccess> xNameAccess( - xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY); + xFact->createInstance(u"com.sun.star.drawing.GradientTable"_ustr), css::uno::UNO_QUERY); if (!xNameAccess.is()) return XFillGradientItem(); @@ -145,7 +145,7 @@ XFillFloatTransparenceItem getXTransparencyGradientForName(const css::uno::Refer { css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY); css::uno::Reference<css::container::XNameAccess> xNameAccess( - xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), css::uno::UNO_QUERY); + xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), css::uno::UNO_QUERY); if (!xNameAccess.is()) return XFillFloatTransparenceItem(); @@ -262,9 +262,9 @@ std::unique_ptr<PanelLayout> ChartAreaPanel::Create( ChartController* pController) { if (pParent == nullptr) - throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); + throw css::lang::IllegalArgumentException(u"no parent Window given to ChartAxisPanel::Create"_ustr, nullptr, 0); if (!rxFrame.is()) - throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", nullptr, 1); + throw css::lang::IllegalArgumentException(u"no XFrame given to ChartAxisPanel::Create"_ustr, nullptr, 1); return std::make_unique<ChartAreaPanel>(pParent, rxFrame, pController); } @@ -278,7 +278,7 @@ ChartAreaPanel::ChartAreaPanel(weld::Widget* pParent, mxSelectionListener(new ChartSidebarSelectionListener(this)), mbUpdate(true), mbModelValid(true), - maFillColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), "FillColor") + maFillColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), u"FillColor"_ustr) { std::vector<ObjectType> aAcceptedTypes { OBJECTTYPE_PAGE, OBJECTTYPE_DIAGRAM, OBJECTTYPE_DATA_SERIES, OBJECTTYPE_DATA_POINT, @@ -313,7 +313,7 @@ void ChartAreaPanel::setFillTransparence(const XFillTransparenceItem& rItem) if (!xPropSet.is()) return; - xPropSet->setPropertyValue("FillTransparence", css::uno::Any(rItem.GetValue())); + xPropSet->setPropertyValue(u"FillTransparence"_ustr, css::uno::Any(rItem.GetValue())); } void ChartAreaPanel::setFillFloatTransparence( @@ -326,7 +326,7 @@ void ChartAreaPanel::setFillFloatTransparence( if (!rItem.IsEnabled()) { - xPropSet->setPropertyValue("FillTransparenceGradientName", css::uno::Any(OUString())); + xPropSet->setPropertyValue(u"FillTransparenceGradientName"_ustr, css::uno::Any(OUString())); return; } @@ -334,7 +334,7 @@ void ChartAreaPanel::setFillFloatTransparence( css::uno::Any aGradientVal; rItem.QueryValue(aGradientVal, MID_FILLGRADIENT); OUString aNewName = PropertyHelper::addTransparencyGradientUniqueNameToTable(aGradientVal, mxModel, aName); - xPropSet->setPropertyValue("FillTransparenceGradientName", css::uno::Any(aNewName)); + xPropSet->setPropertyValue(u"FillTransparenceGradientName"_ustr, css::uno::Any(aNewName)); } void ChartAreaPanel::setFillStyle(const XFillStyleItem& rItem) @@ -344,7 +344,7 @@ void ChartAreaPanel::setFillStyle(const XFillStyleItem& rItem) if (!xPropSet.is()) return; - xPropSet->setPropertyValue("FillStyle", css::uno::Any(rItem.GetValue())); + xPropSet->setPropertyValue(u"FillStyle"_ustr, css::uno::Any(rItem.GetValue())); } void ChartAreaPanel::setFillStyleAndColor(const XFillStyleItem* pStyleItem, @@ -355,8 +355,8 @@ void ChartAreaPanel::setFillStyleAndColor(const XFillStyleItem* pStyleItem, return; if (pStyleItem) - xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); - xPropSet->setPropertyValue("FillColor", css::uno::Any(rColorItem.GetValue())); + xPropSet->setPropertyValue(u"FillStyle"_ustr, css::uno::Any(pStyleItem->GetValue())); + xPropSet->setPropertyValue(u"FillColor"_ustr, css::uno::Any(rColorItem.GetValue())); } void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, @@ -368,13 +368,13 @@ void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, return; if (pStyleItem) - xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); + xPropSet->setPropertyValue(u"FillStyle"_ustr, css::uno::Any(pStyleItem->GetValue())); const OUString& aName = rGradientItem.GetName(); css::uno::Any aGradientVal; rGradientItem.QueryValue(aGradientVal, MID_FILLGRADIENT); OUString aNewName = PropertyHelper::addGradientUniqueNameToTable(aGradientVal, mxModel, aName); - xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName)); + xPropSet->setPropertyValue(u"FillGradientName"_ustr, css::uno::Any(aNewName)); } void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, @@ -386,8 +386,8 @@ void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, return; if (pStyleItem) - xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); - xPropSet->setPropertyValue("FillHatchName", css::uno::Any(rHatchItem.GetValue())); + xPropSet->setPropertyValue(u"FillStyle"_ustr, css::uno::Any(pStyleItem->GetValue())); + xPropSet->setPropertyValue(u"FillHatchName"_ustr, css::uno::Any(rHatchItem.GetValue())); } void ChartAreaPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, @@ -399,13 +399,13 @@ void ChartAreaPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, return; if (pStyleItem) - xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); + xPropSet->setPropertyValue(u"FillStyle"_ustr, css::uno::Any(pStyleItem->GetValue())); css::uno::Any aBitmap; rBitmapItem.QueryValue(aBitmap, MID_BITMAP); const OUString& aPreferredName = rBitmapItem.GetName(); aBitmap <<= PropertyHelper::addBitmapUniqueNameToTable(aBitmap, mxModel, aPreferredName); - xPropSet->setPropertyValue("FillBitmapName", aBitmap); + xPropSet->setPropertyValue(u"FillBitmapName"_ustr, aBitmap); } void ChartAreaPanel::setFillUseBackground(const XFillStyleItem* pStyleItem, @@ -428,43 +428,43 @@ void ChartAreaPanel::updateData() return; SolarMutexGuard aGuard; - if (xInfo->hasPropertyByName("FillStyle")) + if (xInfo->hasPropertyByName(u"FillStyle"_ustr)) { css::drawing::FillStyle eFillStyle = css::drawing::FillStyle_SOLID; - xPropSet->getPropertyValue("FillStyle") >>= eFillStyle; + xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle; XFillStyleItem aFillStyleItem(eFillStyle); updateFillStyle(false, true, &aFillStyleItem); } - if (xInfo->hasPropertyByName("FillTransparence")) + if (xInfo->hasPropertyByName(u"FillTransparence"_ustr)) { sal_uInt16 nFillTransparence = 0; - xPropSet->getPropertyValue("FillTransparence") >>= nFillTransparence; + xPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nFillTransparence; SfxUInt16Item aTransparenceItem(0, nFillTransparence); updateFillTransparence(false, true, &aTransparenceItem); } - if (xInfo->hasPropertyByName("FillGradientName")) + if (xInfo->hasPropertyByName(u"FillGradientName"_ustr)) { OUString aGradientName; - xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; + xPropSet->getPropertyValue(u"FillGradientName"_ustr) >>= aGradientName; XFillGradientItem aGradientItem = getXGradientForName(mxModel, aGradientName); updateFillGradient(false, true, &aGradientItem); } - if (xInfo->hasPropertyByName("FillHatchName")) + if (xInfo->hasPropertyByName(u"FillHatchName"_ustr)) { OUString aHatchName; - xPropSet->getPropertyValue("FillHatchName") >>= aHatchName; + xPropSet->getPropertyValue(u"FillHatchName"_ustr) >>= aHatchName; XHatch aHatch = getXHatchFromName(mxModel, aHatchName); XFillHatchItem aHatchItem(aHatchName, aHatch); updateFillHatch(false, true, &aHatchItem); } - if (xInfo->hasPropertyByName("FillBitmapName")) + if (xInfo->hasPropertyByName(u"FillBitmapName"_ustr)) { OUString aBitmapName; - xPropSet->getPropertyValue("FillBitmapName") >>= aBitmapName; + xPropSet->getPropertyValue(u"FillBitmapName"_ustr) >>= aBitmapName; GraphicObject aBitmap = getXBitmapFromName(mxModel, aBitmapName); XFillBitmapItem aBitmapItem(aBitmapName, aBitmap); std::unique_ptr<XFillBitmapItem> pBitmapItem; @@ -482,21 +482,21 @@ void ChartAreaPanel::updateData() updateFillBitmap(false, true, pBitmapItem ? pBitmapItem.get() : &aBitmapItem); } - if (xInfo->hasPropertyByName("FillTransparenceGradientName")) + if (xInfo->hasPropertyByName(u"FillTransparenceGradientName"_ustr)) { OUString aFillFloatTransparenceName; - xPropSet->getPropertyValue("FillTransparenceGradientName") >>= aFillFloatTransparenceName; + xPropSet->getPropertyValue(u"FillTransparenceGradientName"_ustr) >>= aFillFloatTransparenceName; XFillFloatTransparenceItem aFillFloatTransparenceItem = getXTransparencyGradientForName(mxModel, aFillFloatTransparenceName); updateFillFloatTransparence(false, true, &aFillFloatTransparenceItem); maFillColorWrapper.updateData(); } - if (xInfo->hasPropertyByName("FillColor")) + if (xInfo->hasPropertyByName(u"FillColor"_ustr)) { sal_uInt32 nFillColor = 0; - xPropSet->getPropertyValue("FillColor") >>= nFillColor; - XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor)); + xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; + XFillColorItem aFillColorItem(u""_ustr, Color(ColorTransparency, nFillColor)); updateFillColor(true, &aFillColorItem); } } diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx index 48a4620684b3..7554d164f11f 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx @@ -43,7 +43,7 @@ bool isLabelShown(const rtl::Reference<::chart::ChartModel>& xModel, if (!xAxis.is()) return false; - uno::Any aAny = xAxis->getPropertyValue("DisplayLabels"); + uno::Any aAny = xAxis->getPropertyValue(u"DisplayLabels"_ustr); if (!aAny.hasValue()) return false; @@ -60,7 +60,7 @@ void setLabelShown(const rtl::Reference<::chart::ChartModel>& xModel, if (!xAxis.is()) return; - xAxis->setPropertyValue("DisplayLabels", css::uno::Any(bVisible)); + xAxis->setPropertyValue(u"DisplayLabels"_ustr, css::uno::Any(bVisible)); } struct AxisLabelPosMap @@ -84,7 +84,7 @@ sal_Int32 getLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel, if (!xAxis.is()) return 0; - uno::Any aAny = xAxis->getPropertyValue("LabelPosition"); + uno::Any aAny = xAxis->getPropertyValue(u"LabelPosition"_ustr); if (!aAny.hasValue()) return 0; @@ -114,7 +114,7 @@ void setLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel, ePos = i.ePos; } - xAxis->setPropertyValue("LabelPosition", css::uno::Any(ePos)); + xAxis->setPropertyValue(u"LabelPosition"_ustr, css::uno::Any(ePos)); } bool isReverse(const rtl::Reference<::chart::ChartModel>& xModel, @@ -178,7 +178,7 @@ void setAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel, if (!xAxis.is()) return; - xAxis->setPropertyValue("TextRotation", css::uno::Any(nVal)); + xAxis->setPropertyValue(u"TextRotation"_ustr, css::uno::Any(nVal)); } double getAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel, @@ -190,7 +190,7 @@ double getAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel, if (!xAxis.is()) return 0; - css::uno::Any aAny = xAxis->getPropertyValue("TextRotation"); + css::uno::Any aAny = xAxis->getPropertyValue(u"TextRotation"_ustr); double nVal = 0; aAny >>= nVal; return nVal; @@ -201,12 +201,12 @@ double getAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel, ChartAxisPanel::ChartAxisPanel( weld::Widget* pParent, ChartController* pController) - : PanelLayout(pParent, "ChartAxisPanel", "modules/schart/ui/sidebaraxis.ui") - , mxCBShowLabel(m_xBuilder->weld_check_button("checkbutton_show_label")) - , mxCBReverse(m_xBuilder->weld_check_button("checkbutton_reverse")) - , mxLBLabelPos(m_xBuilder->weld_combo_box("comboboxtext_label_position")) - , mxGridLabel(m_xBuilder->weld_widget("label_props")) - , mxNFRotation(m_xBuilder->weld_metric_spin_button("spinbutton1", FieldUnit::DEGREE)) + : PanelLayout(pParent, u"ChartAxisPanel"_ustr, u"modules/schart/ui/sidebaraxis.ui"_ustr) + , mxCBShowLabel(m_xBuilder->weld_check_button(u"checkbutton_show_label"_ustr)) + , mxCBReverse(m_xBuilder->weld_check_button(u"checkbutton_reverse"_ustr)) + , mxLBLabelPos(m_xBuilder->weld_combo_box(u"comboboxtext_label_position"_ustr)) + , mxGridLabel(m_xBuilder->weld_widget(u"label_props"_ustr)) + , mxNFRotation(m_xBuilder->weld_metric_spin_button(u"spinbutton1"_ustr, FieldUnit::DEGREE)) , mxModel(pController->getChartModel()) , mxModifyListener(new ChartSidebarModifyListener(this)) , mxSelectionListener(new ChartSidebarSelectionListener(this, OBJECTTYPE_AXIS)) @@ -272,7 +272,7 @@ std::unique_ptr<PanelLayout> ChartAxisPanel::Create ( ChartController* pController) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ChartAxisPanel::Create"_ustr, nullptr, 0); return std::make_unique<ChartAxisPanel>(pParent, pController); } diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index f5c79133434c..5e6e60d9017f 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -157,7 +157,7 @@ namespace { css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY); css::uno::Reference<css::container::XNameAccess> xNameAccess( - xFact->createInstance("com.sun.star.drawing.DashTable"), + xFact->createInstance(u"com.sun.star.drawing.DashTable"_ustr), css::uno::UNO_QUERY ); if(xNameAccess.is()) { @@ -184,12 +184,12 @@ void ChartLineStyleWrapper::updateData() aEvent.IsEnabled = true; aEvent.FeatureURL = aUrl; - aEvent.State = xPropSet->getPropertyValue("LineStyle"); + aEvent.State = xPropSet->getPropertyValue(u"LineStyle"_ustr); mpControl->statusChanged(aEvent); aUrl.Complete = ".uno:LineDash"; - auto aLineDashName = xPropSet->getPropertyValue("LineDashName"); + auto aLineDashName = xPropSet->getPropertyValue(u"LineDashName"_ustr); OUString aDashName; aLineDashName >>= aDashName; css::uno::Any aLineDash = getLineDash(mxModel, aDashName); @@ -213,7 +213,7 @@ bool ChartLineStyleWrapper::operator()(std::u16string_view rCommand, const css:: if (rCommand == u".uno:XLineStyle") { - xPropSet->setPropertyValue("LineStyle", rValue); + xPropSet->setPropertyValue(u"LineStyle"_ustr, rValue); return true; } else if (rCommand == u".uno:LineDash") @@ -224,9 +224,9 @@ bool ChartLineStyleWrapper::operator()(std::u16string_view rCommand, const css:: aDashItem.QueryValue(aAny, MID_LINEDASH); OUString aDashName = PropertyHelper::addLineDashUniqueNameToTable(aAny, mxModel, - ""); - xPropSet->setPropertyValue("LineDash", aAny); - xPropSet->setPropertyValue("LineDashName", css::uno::Any(aDashName)); + u""_ustr); + xPropSet->setPropertyValue(u"LineDash"_ustr, aAny); + xPropSet->setPropertyValue(u"LineDashName"_ustr, css::uno::Any(aDashName)); return true; } return false; diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 1e5e6e9403fa..3e64c0c4b8f8 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -79,7 +79,7 @@ bool isLegendVisible(const css::uno::Reference<css::frame::XModel>& xModel) try { bool bShow = false; - if( xLegendProp->getPropertyValue( "Show") >>= bShow ) + if( xLegendProp->getPropertyValue( u"Show"_ustr) >>= bShow ) { return bShow; } @@ -116,7 +116,7 @@ bool isLegendOverlay(const css::uno::Reference<css::frame::XModel>& xModel) try { bool bOverlay = false; - if(xLegendProp->getPropertyValue("Overlay") >>= bOverlay) + if(xLegendProp->getPropertyValue(u"Overlay"_ustr) >>= bOverlay) { return bOverlay; } @@ -139,7 +139,7 @@ void setLegendOverlay(const css::uno::Reference<css::frame::XModel>& xModel, boo if (!xLegendProp.is()) return; - xLegendProp->setPropertyValue("Overlay", css::uno::Any(bOverlay)); + xLegendProp->setPropertyValue(u"Overlay"_ustr, css::uno::Any(bOverlay)); } bool isTitleVisible(const rtl::Reference<::chart::ChartModel>& xModel, TitleHelper::eTitleType eTitle) @@ -148,7 +148,7 @@ bool isTitleVisible(const rtl::Reference<::chart::ChartModel>& xModel, TitleHelp if (!xTitle.is()) return false; - css::uno::Any aAny = xTitle->getPropertyValue("Visible"); + css::uno::Any aAny = xTitle->getPropertyValue(u"Visible"_ustr); bool bVisible = aAny.get<bool>(); return bVisible; } @@ -240,7 +240,7 @@ sal_Int32 getLegendPos(const css::uno::Reference<css::frame::XModel>& xModel) return -1; chart2::LegendPosition eLegendPos = chart2::LegendPosition_LINE_END; - xLegendProp->getPropertyValue("AnchorPosition") >>= eLegendPos; + xLegendProp->getPropertyValue(u"AnchorPosition"_ustr) >>= eLegendPos; switch(eLegendPos) { case chart2::LegendPosition_LINE_START: @@ -288,42 +288,42 @@ void setLegendPos(const css::uno::Reference<css::frame::XModel>& xModel, sal_Int assert(false); } - xLegendProp->setPropertyValue("AnchorPosition", css::uno::Any(eLegendPos)); - xLegendProp->setPropertyValue("Expansion", css::uno::Any(eExpansion)); - xLegendProp->setPropertyValue("RelativePosition", uno::Any()); + xLegendProp->setPropertyValue(u"AnchorPosition"_ustr, css::uno::Any(eLegendPos)); + xLegendProp->setPropertyValue(u"Expansion"_ustr, css::uno::Any(eExpansion)); + xLegendProp->setPropertyValue(u"RelativePosition"_ustr, uno::Any()); } } ChartElementsPanel::ChartElementsPanel( weld::Widget* pParent, ChartController* pController) - : PanelLayout(pParent, "ChartElementsPanel", "modules/schart/ui/sidebarelements.ui") - , mxCBTitle(m_xBuilder->weld_check_button("checkbutton_title")) - , mxEditTitle(m_xBuilder->weld_entry("edit_title")) - , mxCBSubtitle(m_xBuilder->weld_check_button("checkbutton_subtitle")) - , mxEditSubtitle(m_xBuilder->weld_entry("edit_subtitle")) - , mxCBXAxis(m_xBuilder->weld_check_button("checkbutton_x_axis")) - , mxCBXAxisTitle(m_xBuilder->weld_check_button("checkbutton_x_axis_title")) - , mxCBYAxis(m_xBuilder->weld_check_button("checkbutton_y_axis")) - , mxCBYAxisTitle(m_xBuilder->weld_check_button("checkbutton_y_axis_title")) - , mxCBZAxis(m_xBuilder->weld_check_button("checkbutton_z_axis")) - , mxCBZAxisTitle(m_xBuilder->weld_check_button("checkbutton_z_axis_title")) - , mxCB2ndXAxis(m_xBuilder->weld_check_button("checkbutton_2nd_x_axis")) - , mxCB2ndXAxisTitle(m_xBuilder->weld_check_button("checkbutton_2nd_x_axis_title")) - , mxCB2ndYAxis(m_xBuilder->weld_check_button("checkbutton_2nd_y_axis")) - , mxCB2ndYAxisTitle(m_xBuilder->weld_check_button("checkbutton_2nd_y_axis_title")) - , mxCBLegend(m_xBuilder->weld_check_button("checkbutton_legend")) - , mxCBLegendNoOverlay(m_xBuilder->weld_check_button("checkbutton_no_overlay")) - , mxCBGridVerticalMajor(m_xBuilder->weld_check_button("checkbutton_gridline_vertical_major")) - , mxCBGridHorizontalMajor(m_xBuilder->weld_check_button("checkbutton_gridline_horizontal_major")) - , mxCBGridVerticalMinor(m_xBuilder->weld_check_button("checkbutton_gridline_vertical_minor")) - , mxCBGridHorizontalMinor(m_xBuilder->weld_check_button("checkbutton_gridline_horizontal_minor")) - , mxTextTitle(m_xBuilder->weld_label("text_title")) - , mxTextSubTitle(m_xBuilder->weld_label("text_subtitle")) - , mxLBAxis(m_xBuilder->weld_label("label_axes")) - , mxLBGrid(m_xBuilder->weld_label("label_gri")) - , mxLBLegendPosition(m_xBuilder->weld_combo_box("comboboxtext_legend")) - , mxBoxLegend(m_xBuilder->weld_widget("box_legend")) + : PanelLayout(pParent, u"ChartElementsPanel"_ustr, u"modules/schart/ui/sidebarelements.ui"_ustr) + , mxCBTitle(m_xBuilder->weld_check_button(u"checkbutton_title"_ustr)) + , mxEditTitle(m_xBuilder->weld_entry(u"edit_title"_ustr)) + , mxCBSubtitle(m_xBuilder->weld_check_button(u"checkbutton_subtitle"_ustr)) + , mxEditSubtitle(m_xBuilder->weld_entry(u"edit_subtitle"_ustr)) + , mxCBXAxis(m_xBuilder->weld_check_button(u"checkbutton_x_axis"_ustr)) + , mxCBXAxisTitle(m_xBuilder->weld_check_button(u"checkbutton_x_axis_title"_ustr)) + , mxCBYAxis(m_xBuilder->weld_check_button(u"checkbutton_y_axis"_ustr)) + , mxCBYAxisTitle(m_xBuilder->weld_check_button(u"checkbutton_y_axis_title"_ustr)) + , mxCBZAxis(m_xBuilder->weld_check_button(u"checkbutton_z_axis"_ustr)) + , mxCBZAxisTitle(m_xBuilder->weld_check_button(u"checkbutton_z_axis_title"_ustr)) + , mxCB2ndXAxis(m_xBuilder->weld_check_button(u"checkbutton_2nd_x_axis"_ustr)) + , mxCB2ndXAxisTitle(m_xBuilder->weld_check_button(u"checkbutton_2nd_x_axis_title"_ustr)) + , mxCB2ndYAxis(m_xBuilder->weld_check_button(u"checkbutton_2nd_y_axis"_ustr)) + , mxCB2ndYAxisTitle(m_xBuilder->weld_check_button(u"checkbutton_2nd_y_axis_title"_ustr)) + , mxCBLegend(m_xBuilder->weld_check_button(u"checkbutton_legend"_ustr)) + , mxCBLegendNoOverlay(m_xBuilder->weld_check_button(u"checkbutton_no_overlay"_ustr)) + , mxCBGridVerticalMajor(m_xBuilder->weld_check_button(u"checkbutton_gridline_vertical_major"_ustr)) + , mxCBGridHorizontalMajor(m_xBuilder->weld_check_button(u"checkbutton_gridline_horizontal_major"_ustr)) + , mxCBGridVerticalMinor(m_xBuilder->weld_check_button(u"checkbutton_gridline_vertical_minor"_ustr)) + , mxCBGridHorizontalMinor(m_xBuilder->weld_check_button(u"checkbutton_gridline_horizontal_minor"_ustr)) + , mxTextTitle(m_xBuilder->weld_label(u"text_title"_ustr)) + , mxTextSubTitle(m_xBuilder->weld_label(u"text_subtitle"_ustr)) + , mxLBAxis(m_xBuilder->weld_label(u"label_axes"_ustr)) + , mxLBGrid(m_xBuilder->weld_label(u"label_gri"_ustr)) + , mxLBLegendPosition(m_xBuilder->weld_combo_box(u"comboboxtext_legend"_ustr)) + , mxBoxLegend(m_xBuilder->weld_widget(u"box_legend"_ustr)) , mxModel(pController->getChartModel()) , mxListener(new ChartSidebarModifyListener(this)) , mbModelValid(true) @@ -527,7 +527,7 @@ std::unique_ptr<PanelLayout> ChartElementsPanel::Create ( ChartController* pController) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ChartElementsPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ChartElementsPanel::Create"_ustr, nullptr, 0); return std::make_unique<ChartElementsPanel>(pParent, pController); } diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx index c9430791b3c9..87be2b47d185 100644 --- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx +++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx @@ -55,7 +55,7 @@ bool showPositiveError(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return false; - css::uno::Any aAny = xPropSet->getPropertyValue("ShowPositiveError"); + css::uno::Any aAny = xPropSet->getPropertyValue(u"ShowPositiveError"_ustr); if (!aAny.hasValue()) return false; @@ -74,7 +74,7 @@ bool showNegativeError(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return false; - css::uno::Any aAny = xPropSet->getPropertyValue("ShowNegativeError"); + css::uno::Any aAny = xPropSet->getPropertyValue(u"ShowNegativeError"_ustr); if (!aAny.hasValue()) return false; @@ -93,7 +93,7 @@ void setShowPositiveError(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return; - xPropSet->setPropertyValue("ShowPositiveError", css::uno::Any(bShow)); + xPropSet->setPropertyValue(u"ShowPositiveError"_ustr, css::uno::Any(bShow)); } void setShowNegativeError(const rtl::Reference<::chart::ChartModel>& xModel, @@ -105,7 +105,7 @@ void setShowNegativeError(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return; - xPropSet->setPropertyValue("ShowNegativeError", css::uno::Any(bShow)); + xPropSet->setPropertyValue(u"ShowNegativeError"_ustr, css::uno::Any(bShow)); } struct ErrorBarTypeMap @@ -133,7 +133,7 @@ sal_Int32 getTypePos(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return 0; - css::uno::Any aAny = xPropSet->getPropertyValue("ErrorBarStyle"); + css::uno::Any aAny = xPropSet->getPropertyValue(u"ErrorBarStyle"_ustr); if (!aAny.hasValue()) return 0; @@ -166,7 +166,7 @@ void setTypePos(const rtl::Reference<::chart::ChartModel>& xModel, nApi = i.nApi; } - xPropSet->setPropertyValue("ErrorBarStyle", css::uno::Any(nApi)); + xPropSet->setPropertyValue(u"ErrorBarStyle"_ustr, css::uno::Any(nApi)); } double getValue(const rtl::Reference<::chart::ChartModel>& xModel, @@ -178,7 +178,7 @@ double getValue(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return 0; - OUString aName = "PositiveError"; + OUString aName = u"PositiveError"_ustr; if (eDir == ErrorBarDirection::NEGATIVE) aName = "NegativeError"; @@ -202,7 +202,7 @@ void setValue(const rtl::Reference<::chart::ChartModel>& xModel, if (!xPropSet.is()) return; - OUString aName = "PositiveError"; + OUString aName = u"PositiveError"_ustr; if (eDir == ErrorBarDirection::NEGATIVE) aName = "NegativeError"; @@ -235,13 +235,13 @@ OUString getCID(const rtl::Reference<::chart::ChartModel>& xModel) } ChartErrorBarPanel::ChartErrorBarPanel(weld::Widget* pParent, ChartController* pController) - : PanelLayout(pParent, "ChartErrorBarPanel", "modules/schart/ui/sidebarerrorbar.ui") - , mxRBPosAndNeg(m_xBuilder->weld_radio_button("radiobutton_positive_negative")) - , mxRBPos(m_xBuilder->weld_radio_button("radiobutton_positive")) - , mxRBNeg(m_xBuilder->weld_radio_button("radiobutton_negative")) - , mxLBType(m_xBuilder->weld_combo_box("comboboxtext_type")) - , mxMFPos(m_xBuilder->weld_spin_button("spinbutton_pos")) - , mxMFNeg(m_xBuilder->weld_spin_button("spinbutton_neg")) + : PanelLayout(pParent, u"ChartErrorBarPanel"_ustr, u"modules/schart/ui/sidebarerrorbar.ui"_ustr) + , mxRBPosAndNeg(m_xBuilder->weld_radio_button(u"radiobutton_positive_negative"_ustr)) + , mxRBPos(m_xBuilder->weld_radio_button(u"radiobutton_positive"_ustr)) + , mxRBNeg(m_xBuilder->weld_radio_button(u"radiobutton_negative"_ustr)) + , mxLBType(m_xBuilder->weld_combo_box(u"comboboxtext_type"_ustr)) + , mxMFPos(m_xBuilder->weld_spin_button(u"spinbutton_pos"_ustr)) + , mxMFNeg(m_xBuilder->weld_spin_button(u"spinbutton_neg"_ustr)) , mxModel(pController->getChartModel()) , mxListener(new ChartSidebarModifyListener(this)) , mbModelValid(true) @@ -341,7 +341,7 @@ std::unique_ptr<PanelLayout> ChartErrorBarPanel::Create ( ChartController* pController) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ChartErrorBarPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ChartErrorBarPanel::Create"_ustr, nullptr, 0); return std::make_unique<ChartErrorBarPanel>(pParent, pController); } diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index 46cec9695f4d..daa9f0645cfc 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -33,14 +33,14 @@ namespace { SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const ToolbarUnoDispatcher& rToolBoxColor) { - css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineStyle"); + css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(u".uno:XLineStyle"_ustr); SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get()); return pToolBoxLineStyleControl; } SvxColorToolBoxControl* getColorToolBoxControl(const ToolbarUnoDispatcher& rToolBoxLineStyle) { - css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxLineStyle.GetControllerForCommand(".uno:XLineColor"); + css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxLineStyle.GetControllerForCommand(u".uno:XLineColor"_ustr); SvxColorToolBoxControl* pToolBoxColorControl = dynamic_cast<SvxColorToolBoxControl*>(xController.get()); return pToolBoxColorControl; } @@ -109,9 +109,9 @@ std::unique_ptr<PanelLayout> ChartLinePanel::Create( ChartController* pController) { if (pParent == nullptr) - throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); + throw css::lang::IllegalArgumentException(u"no parent Window given to ChartAxisPanel::Create"_ustr, nullptr, 0); if (!rxFrame.is()) - throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", nullptr, 1); + throw css::lang::IllegalArgumentException(u"no XFrame given to ChartAxisPanel::Create"_ustr, nullptr, 1); return std::make_unique<ChartLinePanel>(pParent, rxFrame, pController); } @@ -125,7 +125,7 @@ ChartLinePanel::ChartLinePanel(weld::Widget* pParent, mxSelectionListener(new ChartSidebarSelectionListener(this)), mbUpdate(true), mbModelValid(true), - maLineColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), "LineColor"), + maLineColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), u"LineColor"_ustr), maLineStyleWrapper(mxModel, getLineStyleToolBoxControl(*mxLineStyleDispatch)) { disableArrowHead(); @@ -171,12 +171,12 @@ void ChartLinePanel::updateData() return; sal_uInt16 nLineTransparence = 0; - xPropSet->getPropertyValue("LineTransparence") >>= nLineTransparence; + xPropSet->getPropertyValue(u"LineTransparence"_ustr) >>= nLineTransparence; XLineTransparenceItem aLineTransparenceItem(nLineTransparence); updateLineTransparence(false, true, &aLineTransparenceItem); sal_uInt32 nWidth = 0; - xPropSet->getPropertyValue("LineWidth") >>= nWidth; + xPropSet->getPropertyValue(u"LineWidth"_ustr) >>= nWidth; XLineWidthItem aWidthItem(nWidth); updateLineWidth(false, true, &aWidthItem); @@ -240,7 +240,7 @@ void ChartLinePanel::setLineTransparency(const XLineTransparenceItem& rItem) return; PreventUpdate aPreventUpdate(mbUpdate); - xPropSet->setPropertyValue("LineTransparence", css::uno::Any(rItem.GetValue())); + xPropSet->setPropertyValue(u"LineTransparence"_ustr, css::uno::Any(rItem.GetValue())); } void ChartLinePanel::setLineWidth(const XLineWidthItem& rItem) @@ -252,7 +252,7 @@ void ChartLinePanel::setLineWidth(const XLineWidthItem& rItem) return; PreventUpdate aPreventUpdate(mbUpdate); - xPropSet->setPropertyValue("LineWidth", css::uno::Any(rItem.GetValue())); + xPropSet->setPropertyValue(u"LineWidth"_ustr, css::uno::Any(rItem.GetValue())); } void ChartLinePanel::updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem) diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 9e94ac005ecb..bfa8bb73b268 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -93,7 +93,7 @@ sal_Int32 getDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xMode if (!xSeries.is()) return 0; - css::uno::Any aAny = xSeries->getPropertyValue("LabelPlacement"); + css::uno::Any aAny = xSeries->getPropertyValue(u"LabelPlacement"_ustr); if (!aAny.hasValue()) return 0; @@ -128,7 +128,7 @@ void setDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xModel, } } - xSeries->setPropertyValue("LabelPlacement", css::uno::Any(nApi)); + xSeries->setPropertyValue(u"LabelPlacement"_ustr, css::uno::Any(nApi)); } bool isTrendlineVisible(const rtl::Reference<::chart::ChartModel>& xModel, @@ -274,17 +274,17 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) ChartSeriesPanel::ChartSeriesPanel( weld::Widget* pParent, ChartController* pController) - : PanelLayout(pParent, "ChartSeriesPanel", "modules/schart/ui/sidebarseries.ui") - , mxCBLabel(m_xBuilder->weld_check_button("checkbutton_label")) - , mxCBTrendline(m_xBuilder->weld_check_button("checkbutton_trendline")) - , mxCBXError(m_xBuilder->weld_check_button("checkbutton_x_error")) - , mxCBYError(m_xBuilder->weld_check_button("checkbutton_y_error")) - , mxRBPrimaryAxis(m_xBuilder->weld_radio_button("radiobutton_primary_axis")) - , mxRBSecondaryAxis(m_xBuilder->weld_radio_button("radiobutton_secondary_axis")) - , mxBoxLabelPlacement(m_xBuilder->weld_widget("datalabel_box")) - , mxLBLabelPlacement(m_xBuilder->weld_combo_box("comboboxtext_label")) - , mxFTSeriesName(m_xBuilder->weld_label("label_series_name")) - , mxFTSeriesTemplate(m_xBuilder->weld_label("label_series_tmpl")) + : PanelLayout(pParent, u"ChartSeriesPanel"_ustr, u"modules/schart/ui/sidebarseries.ui"_ustr) + , mxCBLabel(m_xBuilder->weld_check_button(u"checkbutton_label"_ustr)) + , mxCBTrendline(m_xBuilder->weld_check_button(u"checkbutton_trendline"_ustr)) + , mxCBXError(m_xBuilder->weld_check_button(u"checkbutton_x_error"_ustr)) + , mxCBYError(m_xBuilder->weld_check_button(u"checkbutton_y_error"_ustr)) + , mxRBPrimaryAxis(m_xBuilder->weld_radio_button(u"radiobutton_primary_axis"_ustr)) + , mxRBSecondaryAxis(m_xBuilder->weld_radio_button(u"radiobutton_secondary_axis"_ustr)) + , mxBoxLabelPlacement(m_xBuilder->weld_widget(u"datalabel_box"_ustr)) + , mxLBLabelPlacement(m_xBuilder->weld_combo_box(u"comboboxtext_label"_ustr)) + , mxFTSeriesName(m_xBuilder->weld_label(u"label_series_name"_ustr)) + , mxFTSeriesTemplate(m_xBuilder->weld_label(u"label_series_tmpl"_ustr)) , mxModel(pController->getChartModel()) , mxListener(new ChartSidebarModifyListener(this)) , mxSelectionListener(new ChartSidebarSelectionListener(this, OBJECTTYPE_DATA_SERIES)) @@ -370,7 +370,7 @@ std::unique_ptr<PanelLayout> ChartSeriesPanel::Create ( ChartController* pController) { if (pParent == nullptr) - throw lang::IllegalArgumentException("no parent Window given to ChartSeriesPanel::Create", nullptr, 0); + throw lang::IllegalArgumentException(u"no parent Window given to ChartSeriesPanel::Create"_ustr, nullptr, 0); return std::make_unique<ChartSeriesPanel>(pParent, pController); } diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx index 40423aa62ea1..2328298d8ba2 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.cxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx @@ -38,7 +38,7 @@ using namespace css::uno; namespace chart::sidebar { ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* pController) - : PanelLayout(pParent, "ChartTypePanel", "modules/schart/ui/sidebartype.ui") + : PanelLayout(pParent, u"ChartTypePanel"_ustr, u"modules/schart/ui/sidebartype.ui"_ustr) , mxListener(new ChartSidebarModifyListener(this)) , mbModelValid(true) , m_pDim3DLookResourceGroup(new Dim3DLookResourceGroup(m_xBuilder.get())) @@ -52,9 +52,9 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* , m_pCurrentMainType(nullptr) , m_nChangingCalls(0) , m_aTimerTriggeredControllerLock(m_xChartModel) - , m_xMainTypeList(m_xBuilder->weld_combo_box("cmb_chartType")) - , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin", true))) - , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, "subtype", *m_xSubTypeList)) + , m_xMainTypeList(m_xBuilder->weld_combo_box(u"cmb_chartType"_ustr)) + , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) + , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList)) { Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel( Size(120, 40), MapMode(MapUnit::MapAppFont))); @@ -75,7 +75,7 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* { try { - xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes; + xProps->getPropertyValue(u"EnableComplexChartTypes"_ustr) >>= bEnableComplexChartTypes; } catch (const uno::Exception&) { @@ -103,7 +103,7 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* for (auto const& elem : m_aChartTypeDialogControllerList) { - m_xMainTypeList->append("", elem->getName(), elem->getImage()); + m_xMainTypeList->append(u""_ustr, elem->getName(), elem->getImage()); elem->setChangeListener(this); } diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx index c75f15c3885c..2f10a38412f7 100644 --- a/chart2/source/controller/uitest/uiobject.cxx +++ b/chart2/source/controller/uitest/uiobject.cxx @@ -33,7 +33,7 @@ ChartUIObject::ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow, StringMap ChartUIObject::get_state() { StringMap aMap; - aMap["CID"] = maCID; + aMap[u"CID"_ustr] = maCID; return aMap; } @@ -46,7 +46,7 @@ void ChartUIObject::execute(const OUString& rAction, std::unique_ptr<UIObject> pWindow = mxChartWindow->GetUITestFactory()(mxChartWindow.get()); StringMap aParams; - aParams["NAME"] = maCID; + aParams[u"NAME"_ustr] = maCID; pWindow->execute(rAction, aParams); } else if (rAction == "COMMAND") @@ -55,12 +55,12 @@ void ChartUIObject::execute(const OUString& rAction, std::unique_ptr<UIObject> pWindow = mxChartWindow->GetUITestFactory()(mxChartWindow.get()); StringMap aParams; - aParams["NAME"] = maCID; - pWindow->execute("SELECT", aParams); + aParams[u"NAME"_ustr] = maCID; + pWindow->execute(u"SELECT"_ustr, aParams); - auto itr = rParameters.find("COMMAND"); + auto itr = rParameters.find(u"COMMAND"_ustr); if (itr == rParameters.end()) - throw css::uno::RuntimeException("missing COMMAND parameter"); + throw css::uno::RuntimeException(u"missing COMMAND parameter"_ustr); maCommands.emplace_back(new OUString(itr->second)); OUString* pCommand = maCommands.rbegin()->get(); @@ -92,7 +92,7 @@ std::set<OUString> ChartUIObject::get_children() const OUString ChartUIObject::get_type() const { - return "ChartUIObject for type: "; + return u"ChartUIObject for type: "_ustr; } bool ChartUIObject::equals(const UIObject& rOther) const @@ -119,7 +119,7 @@ StringMap ChartWindowUIObject::get_state() css::uno::Any aAny = pController->getSelection(); OUString aSelectedObject; aAny >>= aSelectedObject; - aMap["SelectedObject"] = aSelectedObject; + aMap[u"SelectedObject"_ustr] = aSelectedObject; } return aMap; @@ -130,9 +130,9 @@ void ChartWindowUIObject::execute(const OUString& rAction, { if (rAction == "SELECT") { - auto itr = rParameters.find("NAME"); + auto itr = rParameters.find(u"NAME"_ustr); if (itr == rParameters.end()) - throw css::uno::RuntimeException("Missing Parameter 'NAME' for action 'SELECT'"); + throw css::uno::RuntimeException(u"Missing Parameter 'NAME' for action 'SELECT'"_ustr); const OUString& rName = itr->second; @@ -151,7 +151,7 @@ std::unique_ptr<UIObject> ChartWindowUIObject::get_child(const OUString& rID) if (chart::ObjectIdentifier::isCID(rID)) return std::unique_ptr<UIObject>(new ChartUIObject(mxChartWindow, rID)); - throw css::uno::RuntimeException("unknown child"); + throw css::uno::RuntimeException(u"unknown child"_ustr); } namespace { @@ -202,7 +202,7 @@ std::unique_ptr<UIObject> ChartWindowUIObject::create(vcl::Window* pWindow) OUString ChartWindowUIObject::get_name() const { - return "ChartWindowUIObject"; + return u"ChartWindowUIObject"_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |