summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-04-07 11:23:18 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2025-04-08 17:12:34 +0200
commit50190bec9963d07018c7fd490077dff7a1565143 (patch)
treebabe8ab5a225f3fa8de98f1f53a80f0b7c1f3ec0 /editeng
parentc040f9a3905d6a6abeefc643028a2bbd201a1818 (diff)
editeng a11y: Simplify AccessibleImageBullet::FireEvent
* Drop const qualifier, which removes the need to const_cast. * Don't call AccessibleImageBullet::getAccessibleContext, but just use `this` directly. Change-Id: I4949ec624e44b6330a0ca5f71f898f1d17b4bd8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183781 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx4
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 2dc9edbe76b0..204e8c641359 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -376,9 +376,9 @@ void AccessibleImageBullet::SetEditSource( SvxEditSource* pEditSource )
}
}
-void AccessibleImageBullet::FireEvent(const sal_Int16 nEventId, const uno::Any& rNewValue, const uno::Any& rOldValue ) const
+void AccessibleImageBullet::FireEvent(const sal_Int16 nEventId, const uno::Any& rNewValue, const uno::Any& rOldValue)
{
- uno::Reference < XAccessibleContext > xThis( const_cast< AccessibleImageBullet* > (this)->getAccessibleContext() );
+ uno::Reference <XAccessibleContext> xThis(this);
AccessibleEventObject aEvent(xThis, nEventId, rNewValue, rOldValue, -1);
diff --git a/editeng/source/accessibility/AccessibleImageBullet.hxx b/editeng/source/accessibility/AccessibleImageBullet.hxx
index 7715ba9af77f..eb3f24be623b 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.hxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.hxx
@@ -141,7 +141,7 @@ public:
sal_Int32 GetParagraphIndex() const { return mnParagraphIndex; }
/// Calls all Listener objects to tell them the change. Don't hold locks when calling this!
- void FireEvent(const sal_Int16 nEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue = css::uno::Any() ) const;
+ void FireEvent(const sal_Int16 nEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue = css::uno::Any());
private:
AccessibleImageBullet( const AccessibleImageBullet& ) = delete;