summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-06 09:59:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-07 15:55:33 +0200
commitb542d90447230e1d6705a665f3a3e524fa966b5d (patch)
tree0c6a497714dd6c759ea4611528f4b70f11c8bba9 /svx
parent734d53534a6ca023e9c2eb819cde889b01818f1b (diff)
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 <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/fntctrl.cxx2
-rw-r--r--svx/source/dialog/srchdlg.cxx6
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx3
-rw-r--r--svx/source/tbxctrls/verttexttbxctrl.cxx3
5 files changed, 6 insertions, 10 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index ba372d92f0d3..69cc90171979 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -188,7 +188,7 @@ public:
mbTextInited(false)
{
m_bCJKEnabled = SvtCJKOptions::IsAnyEnabled();
- m_bCTLEnabled = SvtCTLOptions().IsCTLFontEnabled();
+ m_bCTLEnabled = SvtCTLOptions::IsCTLFontEnabled();
mxBackColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
Invalidate100PercentFontWidth();
}
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index b1c5c8477955..1e0bcd36a944 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -444,13 +444,12 @@ void SvxSearchDialog::Construct_Impl()
{
m_xJapMatchFullHalfWidthCB->hide();
}
- SvtCTLOptions aCTLOptions;
// Do not disable and hide the m_xIncludeDiacritics button.
// Include Diacritics == Not Ignore Diacritics => A does not match A-Umlaut (Diaeresis).
// Confusingly these have negated names (following the UI) but the actual
// transliteration is to *ignore* diacritics if "included" (sensitive) is
// _not_ checked.
- if(!aCTLOptions.IsCTLFontEnabled())
+ if(!SvtCTLOptions::IsCTLFontEnabled())
{
m_xIncludeDiacritics->set_active( true );
m_xIncludeKashida->set_active( true );
@@ -706,7 +705,6 @@ void SvxSearchDialog::ShowOptionalControls_Impl()
{
DBG_ASSERT( pSearchItem, "no search item" );
- SvtCTLOptions aCTLOptions;
SvtModuleOptions::EFactory eFactory = getModule(rBindings);
bool bDrawApp = eFactory == SvtModuleOptions::EFactory::DRAW;
bool bWriterApp =
@@ -724,7 +722,7 @@ void SvxSearchDialog::ShowOptionalControls_Impl()
m_xSimilarityBtn->show();
m_xSelectionBtn->show();
m_xIncludeDiacritics->show();
- m_xIncludeKashida->set_visible(aCTLOptions.IsCTLFontEnabled());
+ m_xIncludeKashida->set_visible(SvtCTLOptions::IsCTLFontEnabled());
m_xJapMatchFullHalfWidthCB->set_visible(SvtCJKOptions::IsCJKFontEnabled());
m_xJapOptionsCB->set_visible(SvtCJKOptions::IsJapaneseFindEnabled());
m_xJapOptionsBtn->set_visible(SvtCJKOptions::IsJapaneseFindEnabled());
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index ede035b9d63b..e938a0ad140d 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -894,7 +894,7 @@ namespace svx
|| ( nSlot == SID_ATTR_PARA_RIGHT_TO_LEFT )
)
{
- if ( !SvtCTLOptions().IsCTLFontEnabled() )
+ if ( !SvtCTLOptions::IsCTLFontEnabled() )
{
_rSet.DisableItem( nSlot );
nSlot = aIter.NextWhich();
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index e2c76a9800de..9ae446b50346 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -159,11 +159,10 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
}
}
- SvtCTLOptions aCTLOptions;
TransliterationFlags nFlags = TransliterationFlags::NONE;
if (!aMatchCase)
nFlags |= TransliterationFlags::IGNORE_CASE;
- if (aCTLOptions.IsCTLFontEnabled())
+ if (SvtCTLOptions::IsCTLFontEnabled())
nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL
| TransliterationFlags::IGNORE_KASHIDA_CTL;
diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx
index 480f3ccf3f71..1f36ee635619 100644
--- a/svx/source/tbxctrls/verttexttbxctrl.cxx
+++ b/svx/source/tbxctrls/verttexttbxctrl.cxx
@@ -103,8 +103,7 @@ void SAL_CALL SvxVertCTLTextTbxCtrl::statusChanged(const css::frame::FeatureStat
}
else if (rEvent.FeatureURL.Complete == ".uno:CTLFontState")
{
- SvtCTLOptions aLangOptions;
- bEnabled = m_bVisible && aLangOptions.IsCTLFontEnabled();
+ bEnabled = m_bVisible && SvtCTLOptions::IsCTLFontEnabled();
}
else
{