include/vcl/accessibletable.hxx                                  |    2 
 toolkit/inc/controls/table/tablecontrol.hxx                      |    2 
 toolkit/source/controls/table/AccessibleGridControlBase.cxx      |   32 
+++-------
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx |    2 
 toolkit/source/controls/table/tablecontrol.cxx                   |   13 ----
 5 files changed, 13 insertions(+), 38 deletions(-)

New commits:
commit 1ed642a19958e65bccd21bbb7de8f03812c23ac5
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jan 24 10:40:53 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jan 24 22:01:03 2025 +0100

    toolkit a11y: Port away from TableControl::GetFieldCharacterBounds
    
    TableControl::GetFieldCharacterBounds ignores the first
    2 params and just calls TableControl::GetCharacterBounds,
    so use the latter directly instead and drop the former.
    
    Change-Id: Ib2c799cdb5f8f8515ee771b241e1fd8567dc967d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180697
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index efb1051ce9cb..7c750c2166ef 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -80,7 +80,6 @@ public:
     virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 
_nPos ) = 0;
     virtual tools::Rectangle calcTableRect() = 0;
     virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 
_nColPos ) = 0;
-    virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 
_nColumnPos,sal_Int32 nIndex)= 0;
     virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 
_nColumnPos,const Point& _rPoint)= 0;
     virtual void FillAccessibleStateSetForCell( sal_Int64& _rStateSet, 
sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0;
     virtual OUString GetRowName(sal_Int32 _nIndex) const = 0;
diff --git a/toolkit/inc/controls/table/tablecontrol.hxx 
b/toolkit/inc/controls/table/tablecontrol.hxx
index d443c87cb2bc..390da80cb9c7 100644
--- a/toolkit/inc/controls/table/tablecontrol.hxx
+++ b/toolkit/inc/controls/table/tablecontrol.hxx
@@ -134,7 +134,6 @@ namespace svt::table
         virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, 
sal_Int32 nPos) override;
         virtual tools::Rectangle calcTableRect() override;
         virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 
_nColPos ) override;
-        virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 
_nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override;
         virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 
_nColumnPos,const Point& _rPoint) override;
         virtual void FillAccessibleStateSetForCell( sal_Int64& _rStateSet, 
sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override;
         virtual OUString GetRowName(sal_Int32 _nIndex) const override;
diff --git a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx 
b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
index 2aba147012b4..79b21c0b326a 100644
--- a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
@@ -139,7 +139,7 @@ namespace accessibility
             throw IndexOutOfBoundsException();
 
         return vcl::unohelper::ConvertToAWTRect(
-            m_aTable.GetFieldCharacterBounds(getRowPos(), getColumnPos(), 
nIndex));
+            m_aTable.GetCharacterBounds(nIndex));
     }
 
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getIndexAtPoint( const 
css::awt::Point& _aPoint )
diff --git a/toolkit/source/controls/table/tablecontrol.cxx 
b/toolkit/source/controls/table/tablecontrol.cxx
index 61062df11739..f9cdbc8ef545 100644
--- a/toolkit/source/controls/table/tablecontrol.cxx
+++ b/toolkit/source/controls/table/tablecontrol.cxx
@@ -585,13 +585,6 @@ namespace svt::table
         _rStateSet |= AccessibleStateType::ACTIVE;
     }
 
-
-    tools::Rectangle 
TableControl::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32 nIndex)
-    {
-        return GetCharacterBounds(nIndex);
-    }
-
-
     sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32,sal_Int32,const 
Point& _rPoint)
     {
         return GetIndexForPoint(_rPoint);
commit 7bdaccecdfd82fd2c6853be8d740a3a9dc466954
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jan 24 10:35:33 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jan 24 22:00:51 2025 +0100

    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.wegh...@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.wegh...@posteo.de>

diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index 6a8ee6034423..efb1051ce9cb 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -71,7 +71,6 @@ public:
             AccessibleTableControlObjType eObjType ) const= 0;
 
     // Window
-    virtual vcl::Window* GetWindowInstance()= 0;
     virtual sal_Int32 GetAccessibleControlCount() const = 0;
     virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& 
_rPoint )= 0;
     virtual sal_Int32 GetRowCount() const= 0;
diff --git a/toolkit/inc/controls/table/tablecontrol.hxx 
b/toolkit/inc/controls/table/tablecontrol.hxx
index 72bdcec4fc79..d443c87cb2bc 100644
--- a/toolkit/inc/controls/table/tablecontrol.hxx
+++ b/toolkit/inc/controls/table/tablecontrol.hxx
@@ -125,7 +125,6 @@ namespace svt::table
 
 
         // IAccessibleTable
-        virtual vcl::Window* GetWindowInstance() override;
         virtual sal_Int32 GetAccessibleControlCount() const override;
         virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const 
Point& _rPoint ) override;
         virtual sal_Int32 GetRowCount() const override;
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();

Reply via email to