From b542d90447230e1d6705a665f3a3e524fa966b5d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 6 Jun 2023 09:59:21 +0200 Subject: tdf#155376 partially convert SvCTLOptions to officecfg When accessibility is enabled, Calc will add tens of thousands of listeners. We then spend a significant chunk of time creating SvCTLOptions objects (attached to ImpEditEngine) and adding and removing those objects from the related listener lists. But the required information is already globally cached by the officecfg module, so we can avoid that overhead and just fetch it directly from officecfg. Change-Id: I7ff55fd7c4926866eb7086812275ba8bd6e84c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152645 Tested-by: Jenkins Reviewed-by: Patrick Luby Reviewed-by: Noel Grandin --- chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 2 +- chart2/source/view/main/VLegend.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'chart2/source') diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index a0b548e43767..e885fdaef32e 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -475,7 +475,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, 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); - if (SvtCTLOptions().IsCTLFontEnabled()) + if (SvtCTLOptions::IsCTLFontEnabled()) { /* When rotation is supported for equation text boxes, use SchAlignmentTabPage::Create here. The special diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 449c3920379f..d499aae6f298 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -350,7 +350,7 @@ bool lcl_IsPieOrDonut( const rtl::Reference< Diagram >& xDiagram ) void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDrawModelWrapper, ChartModel& rModel) { //get writing mode from parent document: - if( !SvtCTLOptions().IsCTLFontEnabled() ) + if( !SvtCTLOptions::IsCTLFontEnabled() ) return; try diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index dab52a407e19..885f1acac8d6 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -807,7 +807,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe bool bSymbolsLeftSide = true; try { - if( SvtCTLOptions().IsCTLFontEnabled() ) + if( SvtCTLOptions::IsCTLFontEnabled() ) { if(xLegendProp.is()) { -- cgit