diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-03-09 11:27:17 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-03-09 17:46:55 +0100 |
commit | b86c4d962c7df4a5066ee634df88868b8bb287fe (patch) | |
tree | 03b51a337192913678152ddbf1332b2264163dfc /accessibility | |
parent | 5977d6b981dcde556450589199c06204009a4a1a (diff) |
a11y: Drop AccessibleGridControl::m_xCell
It's only used in one place and I see no need to keep
a Reference in this class, so use a local variable
instead of a class member.
Instead of disposing this single cell in
`AccessibleGridControl::disposing`,
`AccessibleGridControlTable` should take care
of disposing all of its cells, which will be
added in a following commit
(Change-Id Idffa76809cbfad746f27d18191fdfc905b64ee0e,
"Related: tdf#147742 a11y: Dispose table cells as well").
Change-Id: Ia7c84c65b45dde28850f48b12ab9558f2dc7d47c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131246
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/inc/extended/AccessibleGridControl.hxx | 3 | ||||
-rw-r--r-- | accessibility/source/extended/AccessibleGridControl.cxx | 9 |
2 files changed, 2 insertions, 10 deletions
diff --git a/accessibility/inc/extended/AccessibleGridControl.hxx b/accessibility/inc/extended/AccessibleGridControl.hxx index 6fa1a91b4919..79b4e19e47b1 100644 --- a/accessibility/inc/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/extended/AccessibleGridControl.hxx @@ -149,9 +149,6 @@ private: /** The header bar for columns (first row of the table). */ rtl::Reference<AccessibleGridControlHeader> m_xColumnHeaderBar; - /** The table cell child. */ - rtl::Reference<AccessibleGridControlTableCell> m_xCell; - /** @return The count of visible children. */ inline sal_Int32 implGetAccessibleChildCount(); }; diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 5d4ed3bc767c..81f3d121ab0f 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -57,11 +57,6 @@ void SAL_CALL AccessibleGridControl::disposing() m_xTable->dispose(); m_xTable.clear(); } - if ( m_xCell.is() ) - { - m_xCell->dispose(); - m_xCell.clear(); - } if ( m_xRowHeaderBar.is() ) { m_xRowHeaderBar->dispose(); @@ -281,8 +276,8 @@ void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNew + m_aTable.GetCurrentColumn(); if (nIndex < rCells.size() && rCells[nIndex]) { - m_xCell = rCells[nIndex]; - m_xCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); + rtl::Reference<AccessibleGridControlTableCell> xCell = rCells[nIndex]; + xCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); } } } |