summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-02-15 10:14:51 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-02-16 09:10:19 +0100
commit0b3158e64e70a53528155eee38c2ea0ba1d3bf93 (patch)
treeb66cec9c23033a2e39fc5ba1255e313697121505
parent694670e13143f41e211dd0e183516d08008dd12b (diff)
svx a11y: Drop AccessibleTextHelper_Impl::GotPropertyEvent
Use `AccessibleTextHelper_Impl::FireEvent` directly instead, which is in my opinion more readable, in particular since 2 of the 3 uses were sending an `AccessibleEventId::CHILD` event, which is not really about any property. Change-Id: I446d2d7a841397b215bf099528920bcc6ee9f227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163428 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index e87232a4f6df..8dddb606876d 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -159,9 +159,6 @@ namespace accessibility
// Process event queue
void ProcessQueue();
- // syntactic sugar for FireEvent
- void GotPropertyEvent( const uno::Any& rNewValue, const sal_Int16 nEventId ) const { FireEvent( nEventId, rNewValue ); }
-
// shutdown usage of current edit source on myself and the children.
void ShutdownEditSource();
@@ -407,7 +404,7 @@ namespace accessibility
{
AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
if ( !pAccessibleCell )
- GotPropertyEvent( uno::Any(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ FireEvent(AccessibleEventId::STATE_CHANGED, uno::Any(AccessibleStateType::FOCUSED));
else // the focus event on cell should be fired on table directly
{
AccessibleTableShape* pAccTable = pAccessibleCell->GetParentTable();
@@ -768,9 +765,8 @@ namespace accessibility
// child not yet created?
if (!maParaManager.HasCreatedChild(nCurrPara))
{
- GotPropertyEvent( uno::Any( maParaManager.CreateChild( nCurrPara - mnFirstVisibleChild,
- mxFrontEnd, GetEditSource(), nCurrPara ).first ),
- AccessibleEventId::CHILD );
+ FireEvent(AccessibleEventId::CHILD, uno::Any(maParaManager.CreateChild(nCurrPara - mnFirstVisibleChild,
+ mxFrontEnd, GetEditSource(), nCurrPara).first));
}
}
}
@@ -1054,9 +1050,8 @@ namespace accessibility
// #109864# Enforce creation of this paragraph
try
{
- GotPropertyEvent( uno::Any( getAccessibleChild( aFunctor.GetParaIndex() -
- mnFirstVisibleChild + GetStartIndex() ) ),
- AccessibleEventId::CHILD );
+ FireEvent(AccessibleEventId::CHILD, uno::Any(getAccessibleChild(aFunctor.GetParaIndex() -
+ mnFirstVisibleChild + GetStartIndex())));
}
catch( const uno::Exception& )
{