diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-10-07 11:42:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-07 16:14:54 +0200 |
commit | 8e886993f32b7db11a99bdecf06451e6de6c3842 (patch) | |
tree | 061cb656fc6ca7c8d88d51345999d569f946ba1c /editeng | |
parent | 7b6fd0f92f4acccce4bbdd79e6d0f2a65eaddbf1 (diff) |
tdf#157568 After deleting the content of a cell by pressing the delete..
.. key, Orca still speaks the content.
this reverts
commit f22cb3dfab413a2917cd810b8e1b8f644a016327
Author: Noel Grandin <noelgrandin@gmail.com>
Date: Mon Jun 12 20:02:19 2023 +0200
tdf#155376 weakly cache ScAccessibleCell
which was a nice idea, but means that we would need to have
some way of updating the ScAccessibleCell when the associated
cell data changes. Which is likely to be complicated.
So return to creating new ScAccessibleCell objects all the time,
but fix them to not leak.
Change-Id: Ie17ee5c950c9809d4c7281f93761584f75256121
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157673
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleStaticTextBase.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 954117189798..85082bc4cb21 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -121,8 +121,7 @@ namespace accessibility void SetEventSource( const uno::Reference< XAccessible >& rInterface ) { - - mxThis = rInterface; + mpThis = rInterface.get(); } void SetOffset( const Point& ); @@ -163,8 +162,8 @@ namespace accessibility // our frontend class (the one implementing the actual // interface). That's not necessarily the one containing the impl - // pointer - uno::Reference< XAccessible > mxThis; + // pointer. Note that this is not an uno::Reference to prevent ref-counting cycles and leaks. + XAccessible* mpThis; // implements our functionality, we're just an adapter (guarded by solar mutex) mutable rtl::Reference<AccessibleEditableTextPara> mxTextParagraph; @@ -207,7 +206,7 @@ namespace accessibility mxTextParagraph->Dispose(); // drop references - mxThis = nullptr; + mpThis = nullptr; mxTextParagraph.clear(); } @@ -215,7 +214,7 @@ namespace accessibility { if( !mxTextParagraph.is() ) - throw lang::DisposedException ("object has been already disposed", mxThis ); + throw lang::DisposedException ("object has been already disposed", mpThis ); // TODO: Have a different method on AccessibleEditableTextPara // that does not care about state changes @@ -273,7 +272,7 @@ namespace accessibility if( nFlatIndex < 0 ) throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds", - mxThis); + mpThis); // gratuitously accepting larger indices here, AccessibleEditableTextPara will throw eventually sal_Int32 nCurrPara, nCurrIndex, nParas, nCurrCount; @@ -305,7 +304,7 @@ namespace accessibility // not found? Out of bounds throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds", - mxThis); + mpThis); } bool AccessibleStaticTextBase_Impl::SetSelection( sal_Int32 nStartPara, sal_Int32 nStartIndex, |