diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-24 10:35:33 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-24 22:00:51 +0100 |
commit | 7bdaccecdfd82fd2c6853be8d740a3a9dc466954 (patch) | |
tree | f45da569b592eeebf8612fab2d35199ce4d47dfd /toolkit/source/controls/table | |
parent | dd3fae8818d0685fb67a2fad8e0b42f3de7c2fea (diff) |
toolkit: Drop IAccessibleTable::GetWindowInstance
This method to get a vcl::Window pointer to self is
no more needed since
commit c6c471546ee82d939092da3ac25a6548145c56c9
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jan 23 17:29:32 2025 +0100
toolkit a11y: Use pointers/refs to concrete TableControl class
Use the TableControl right away instead.
Change-Id: I692b0397e6d6b74d8dd5d194d1708a796e1c4e8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180696
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'toolkit/source/controls/table')
-rw-r--r-- | toolkit/source/controls/table/AccessibleGridControlBase.cxx | 32 | ||||
-rw-r--r-- | toolkit/source/controls/table/tablecontrol.cxx | 6 |
2 files changed, 12 insertions, 26 deletions
diff --git a/toolkit/source/controls/table/AccessibleGridControlBase.cxx b/toolkit/source/controls/table/AccessibleGridControlBase.cxx index df9edea866ab..bafb961f6e56 100644 --- a/toolkit/source/controls/table/AccessibleGridControlBase.cxx +++ b/toolkit/source/controls/table/AccessibleGridControlBase.cxx @@ -392,20 +392,16 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground( ) ensureIsAlive(); Color nColor; - vcl::Window* pInst = m_aTable.GetWindowInstance(); - if ( pInst ) + if (m_aTable.IsControlForeground()) + nColor = m_aTable.GetControlForeground(); + else { - if ( pInst->IsControlForeground() ) - nColor = pInst->GetControlForeground(); + vcl::Font aFont; + if (m_aTable.IsControlFont() ) + aFont = m_aTable.GetControlFont(); else - { - vcl::Font aFont; - if ( pInst->IsControlFont() ) - aFont = pInst->GetControlFont(); - else - aFont = pInst->GetFont(); - nColor = aFont.GetColor(); - } + aFont = m_aTable.GetFont(); + nColor = aFont.GetColor(); } return sal_Int32(nColor); } @@ -416,14 +412,10 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getBackground( ) ensureIsAlive(); Color nColor; - vcl::Window* pInst = m_aTable.GetWindowInstance(); - if ( pInst ) - { - if ( pInst->IsControlBackground() ) - nColor = pInst->GetControlBackground(); - else - nColor = pInst->GetBackground().GetColor(); - } + if (m_aTable.IsControlBackground()) + nColor = m_aTable.GetControlBackground(); + else + nColor = m_aTable.GetBackground().GetColor(); return sal_Int32(nColor); } diff --git a/toolkit/source/controls/table/tablecontrol.cxx b/toolkit/source/controls/table/tablecontrol.cxx index 14cdd539f6f8..61062df11739 100644 --- a/toolkit/source/controls/table/tablecontrol.cxx +++ b/toolkit/source/controls/table/tablecontrol.cxx @@ -516,12 +516,6 @@ namespace svt::table m_pImpl->commitTableEvent( i_eventID, i_newValue, i_oldValue ); } - vcl::Window* TableControl::GetWindowInstance() - { - return this; - } - - bool TableControl::HasRowHeader() { return GetModel()->hasRowHeaders(); |