chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |    6 
+++---
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx |    8 
+++++---
 chart2/source/tools/DataSeriesHelper.cxx                           |    2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit df9499d520c3afccba969fb16e59a44273e57f59
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Dec 15 18:21:26 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Dec 15 21:03:55 2023 +0100

    use more getFastProperty in chart2
    
    Change-Id: Ia6511f7de33023e1e1e9e8a31ba262c7b989350c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160832
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 8ac9b33cdb08..02542a91b832 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -599,9 +599,9 @@ bool DataPointItemConverter::ApplySpecialItem(
             {
                 bool bNew = static_cast<const 
SfxBoolItem&>(rItemSet.Get(nWhichId)).GetValue();
                 bool bOld = true;
-                if( (m_xSeries->getPropertyValue("ShowCustomLeaderLines") >>= 
bOld) && bOld != bNew )
+                if( 
(m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= 
bOld) && bOld != bNew )
                 {
-                    m_xSeries->setPropertyValue("ShowCustomLeaderLines", 
uno::Any(bNew));
+                    
m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, 
uno::Any(bNew));
                     bChanged = true;
                 }
             }
@@ -765,7 +765,7 @@ void DataPointItemConverter::FillSpecialItem(
             try
             {
                 bool bValue = true;
-                if( m_xSeries->getPropertyValue( "ShowCustomLeaderLines" ) >>= 
bValue )
+                if( m_xSeries->getFastPropertyValue( 
PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
                     rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
             }
             catch (const uno::Exception&)
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 4d2e6749f1fe..9bf0883d6c94 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -25,6 +25,7 @@
 #include <ChartTypeHelper.hxx>
 #include <DataSeries.hxx>
 #include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
 #include <DiagramHelper.hxx>
 #include <Diagram.hxx>
 #include <ItemPropertyMap.hxx>
@@ -54,6 +55,7 @@
 using namespace com::sun::star;
 using namespace com::sun::star::chart2;
 using com::sun::star::uno::Reference;
+using namespace ::chart::DataSeriesProperties;
 
 namespace chart::wrapper {
 
@@ -513,9 +515,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 
nWhichId, const SfxIte
             {
                 bool bNew = static_cast<const 
SfxBoolItem&>(rItemSet.Get(nWhichId)).GetValue();
                 bool bOld = true;
-                if( (m_xSeries->getPropertyValue("ShowCustomLeaderLines") >>= 
bOld) && bOld != bNew )
+                if( 
(m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= 
bOld) && bOld != bNew )
                 {
-                    m_xSeries->setPropertyValue("ShowCustomLeaderLines", 
uno::Any(bNew));
+                    
m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, 
uno::Any(bNew));
                     bChanged = true;
                 }
             }
@@ -669,7 +671,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 
nWhichId, SfxItemSet& r
             try
             {
                 bool bValue = true;
-                if( m_xSeries->getPropertyValue( "ShowCustomLeaderLines" ) >>= 
bValue )
+                if( m_xSeries->getFastPropertyValue( 
PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
                     rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
             }
             catch (const uno::Exception&)
diff --git a/chart2/source/tools/DataSeriesHelper.cxx 
b/chart2/source/tools/DataSeriesHelper.cxx
index de88c37ecc96..136191f66ade 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -318,7 +318,7 @@ sal_Int32 getAttachedAxisIndex( const rtl::Reference< 
DataSeries > & xSeries )
     {
         if( xSeries.is() )
         {
-            xSeries->getPropertyValue( "AttachedAxisIndex" ) >>= nRet;
+            xSeries->getFastPropertyValue( PROP_DATASERIES_ATTACHED_AXIS_INDEX 
) >>= nRet;
         }
     }
     catch( const uno::Exception & )

Reply via email to