From beaf6001c0d020f525bb99dae4a0f6cdd16b4c99 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 29 Jun 2021 09:45:51 +0200 Subject: 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 --- chart2/source/tools/DiagramHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chart2/source/tools/DiagramHelper.cxx') 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 ); -- cgit