summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-29 09:45:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-29 18:47:18 +0200
commitbeaf6001c0d020f525bb99dae4a0f6cdd16b4c99 (patch)
tree82ae5fe362e073a6f6a032b9859062d78f02a7ca /chart2
parent67b157e994d9bef01f6117b53fc29e1fee538715 (diff)
constructing SaveOptions just to read default version
can be a little expensive sometimes, since it loads a bunch of other stuff at the same time. So create a custom method that just loads the version Change-Id: Ic480d95c4d64c68e57faf1b52f1d102141b7e246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118047 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/tools/AxisHelper.cxx2
-rw-r--r--chart2/source/tools/DiagramHelper.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index aefa18b248b2..563f734142b1 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -1148,7 +1148,7 @@ Reference< XChartType > AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisInd
bool AxisHelper::isAxisPositioningEnabled()
{
- const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(GetODFSaneDefaultVersion());
return nCurrentVersion >= SvtSaveOptions::ODFSVER_012;
}
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 5805f929aebb..80a75f333d28 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1660,7 +1660,7 @@ bool DiagramHelper::switchDiagramPositioningToExcludingPositioning(
ChartModel& rModel, bool bResetModifiedState, bool bConvertAlsoFromAutoPositioning )
{
//return true if something was changed
- const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(GetODFSaneDefaultVersion());
if (SvtSaveOptions::ODFSVER_012 < nCurrentODFVersion)
{
uno::Reference< css::chart::XDiagramPositioning > xDiagramPositioning( rModel.getFirstDiagram(), uno::UNO_QUERY );