summaryrefslogtreecommitdiff
path: root/accessibility/inc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-03-09 11:07:55 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-03-09 17:46:28 +0100
commit319a5b5b457c46c8a036b99d6f024517bc87be42 (patch)
treea367fadbe9f38a0a868f9c138f98a8d379e24ddb /accessibility/inc
parent63dba12b779dd4d007c8cb8cf4b967bd78077cac (diff)
a11y: Move TABLE_MODEL_CHANGED handling to table
Move the handling for the `AccessibleEventId::TABLE_MODEL_CHANGED` event of type `AccessibleTableModelChangeType::DELETE` from `AccessibleGridControl` into `AccessibleGridControlTable`. To do so, make `AccessibleGridControlBase::commitEvent` virtual and override it in `AccessibleGridControlTable`. The method already gets called from `AccessibleGridControl::commitTableEvent` where the event was handled previously. Handling the details of how cells are internally organized in a vector only in the class itself rather than in different places seems to make sense. There are currently more cases where `AccessibleGridControl` deals with the cell vector directly that will be addressed in following commits. Change-Id: I26a7737432ecb198eac00279a8242d22e3c661d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131244 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility/inc')
-rw-r--r--accessibility/inc/extended/AccessibleGridControlBase.hxx6
-rw-r--r--accessibility/inc/extended/AccessibleGridControlTable.hxx3
2 files changed, 5 insertions, 4 deletions
diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx
index 7da777d8dac2..f1b2d4b1c85f 100644
--- a/accessibility/inc/extended/AccessibleGridControlBase.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx
@@ -188,10 +188,8 @@ public:
inline ::vcl::table::AccessibleTableControlObjType getType() const;
/** Commits an event to all listeners. */
- void commitEvent(
- sal_Int16 nEventId,
- const css::uno::Any& rNewValue,
- const css::uno::Any& rOldValue );
+ virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue,
+ const css::uno::Any& rOldValue);
/** @return TRUE, if the object is not disposed or disposing. */
bool isAlive() const;
diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx
index 73c4f6a19050..bada75124257 100644
--- a/accessibility/inc/extended/AccessibleGridControlTable.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx
@@ -142,6 +142,9 @@ public:
/**@return m_pCellVector*/
std::vector< rtl::Reference<AccessibleGridControlTableCell> >& getCellVector() { return m_aCellVector;}
+ virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue,
+ const css::uno::Any& rOldValue) override;
+
private:
// internal virtual methods