diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-19 13:48:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-19 18:12:55 +0200 |
commit | 6500106dff0f0cd86f509ffd01542aab77c21596 (patch) | |
tree | 46b3e92d783af6a48037bd11c67916846ea46158 /chart2 | |
parent | 182833b893ae4ad7430479f2dfebcc9c130cf27c (diff) |
tdf#148635 no need to init ChartDataWrapper more than once
halves the time to finish a chart2
Change-Id: Ib7f066672878f7630c2d1c90b9487a14f2048029
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133172
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 3afac39a2ce8..6050af15319f 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -577,11 +577,14 @@ void ChartDataWrapper::switchToInternalDataProvider() rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() ); if( xChartDoc.is() ) xChartDoc->createInternalDataProvider( true /*bCloneExistingData*/ ); + m_xDataAccess.clear(); initDataAccess(); } void ChartDataWrapper::initDataAccess() { + if (m_xDataAccess) + return; rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() ); if( !xChartDoc.is() ) return; |