LCOV - code coverage report
Current view: top level - sw/source/core/access - acctable.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 251 855 29.4 %
Date: 2014-04-11 Functions: 32 100 32.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <osl/mutex.hxx>
      21             : #include <rtl/ustrbuf.hxx>
      22             : 
      23             : #include <algorithm>
      24             : #include <list>
      25             : #include <set>
      26             : #include <com/sun/star/accessibility/AccessibleRole.hpp>
      27             : #include <com/sun/star/accessibility/AccessibleStateType.hpp>
      28             : #include <com/sun/star/accessibility/AccessibleEventId.hpp>
      29             : #include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
      30             : #include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
      31             : #include <unotools/accessiblestatesethelper.hxx>
      32             : #include <vcl/svapp.hxx>
      33             : #include <frmfmt.hxx>
      34             : #include <tabfrm.hxx>
      35             : #include <rowfrm.hxx>
      36             : #include <cellfrm.hxx>
      37             : #include <swtable.hxx>
      38             : #include <crsrsh.hxx>
      39             : #include <viscrs.hxx>
      40             : #include <hints.hxx>
      41             : #include <fesh.hxx>
      42             : #include <accfrmobjslist.hxx>
      43             : #include <accmap.hxx>
      44             : #include <access.hrc>
      45             : #include <acctable.hxx>
      46             : 
      47             : #include <layfrm.hxx>
      48             : #include <com/sun/star/accessibility/XAccessibleText.hpp>
      49             : 
      50             : #include <editeng/brushitem.hxx>
      51             : #include <swatrset.hxx>
      52             : #include <frmatr.hxx>
      53             : 
      54             : #include <comphelper/servicehelper.hxx>
      55             : #include <cppuhelper/supportsservice.hxx>
      56             : 
      57             : using namespace ::com::sun::star;
      58             : using namespace ::com::sun::star::accessibility;
      59             : using namespace ::sw::access;
      60             : 
      61             : typedef ::std::less < sal_Int32 > Int32Less_Impl;
      62             : typedef ::std::set < sal_Int32, Int32Less_Impl > Int32Set_Impl;
      63             : 
      64             : typedef ::std::pair < sal_Int32, sal_Int32 > Int32Pair_Impl;
      65             : typedef ::std::list < Int32Pair_Impl > Int32PairList_Impl;
      66             : 
      67             : const unsigned int SELECTION_WITH_NUM = 10;
      68             : 
      69           0 : class SwAccTableSelHander_Impl
      70             : {
      71             : public:
      72             :     virtual void Unselect( sal_Int32 nRowOrCol, sal_Int32 nExt ) = 0;
      73             : 
      74             : protected:
      75           0 :     ~SwAccTableSelHander_Impl() {}
      76             : };
      77             : 
      78           2 : class SwAccessibleTableData_Impl
      79             : {
      80             :     SwAccessibleMap& mrAccMap;
      81             :     Int32Set_Impl   maRows;
      82             :     Int32Set_Impl   maColumns;
      83             :     Int32PairList_Impl maExtents;   // cell extends for event processing only
      84             :     Point   maTabFrmPos;
      85             :     const SwTabFrm *mpTabFrm;
      86             :     sal_Bool mbIsInPagePreview;
      87             :     bool mbOnlyTableColumnHeader;
      88             : 
      89             :     void CollectData( const SwFrm *pFrm );
      90             :     void CollectColumnHeaderData( const SwFrm *pFrm );
      91             :     void CollectRowHeaderData( const SwFrm *pFrm );
      92             :     void CollectExtents( const SwFrm *pFrm );
      93             : 
      94             :     sal_Bool FindCell( const Point& rPos, const SwFrm *pFrm ,
      95             :                            sal_Bool bExact, const SwFrm *& rFrm ) const;
      96             : 
      97             :     void GetSelection( const Point& rTabPos, const SwRect& rArea,
      98             :                        const SwSelBoxes& rSelBoxes, const SwFrm *pFrm,
      99             :                        SwAccTableSelHander_Impl& rSelHdl,
     100             :                        sal_Bool bColumns ) const;
     101             : 
     102             :     // #i77106#
     103          44 :     inline bool IncludeRow( const SwFrm& rFrm ) const
     104             :     {
     105          44 :         return !mbOnlyTableColumnHeader ||
     106          44 :                mpTabFrm->IsInHeadline( rFrm );
     107             :     }
     108             : public:
     109             :     // #i77106# - add third optional parameter <bOnlyTableColumnHeader>, default value <false>
     110             :     SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
     111             :                                 const SwTabFrm *pTabFrm,
     112             :                                 sal_Bool bIsInPagePreview,
     113             :                                 bool bOnlyTableColumnHeader = false );
     114             : 
     115           0 :     const Int32Set_Impl& GetRows() const { return maRows; }
     116           0 :     const Int32Set_Impl& GetColumns() const { return maColumns; }
     117             : 
     118             :     inline Int32Set_Impl::const_iterator GetRowIter( sal_Int32 nRow ) const;
     119             :     inline Int32Set_Impl::const_iterator GetColumnIter( sal_Int32 nCol ) const;
     120             : 
     121             :     const SwFrm *GetCell( sal_Int32 nRow, sal_Int32 nColumn, sal_Bool bExact,
     122             :                           SwAccessibleTable *pThis ) const
     123             :         throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception);
     124             :     const SwFrm *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop,
     125             :                                          sal_Bool bExact ) const;
     126             :     inline sal_Int32 GetRowCount() const;
     127             :     inline sal_Int32 GetColumnCount() const;
     128             :     sal_Bool CompareExtents( const SwAccessibleTableData_Impl& r ) const;
     129             : 
     130             :     void GetSelection( sal_Int32 nStart, sal_Int32 nEnd,
     131             :                        const SwSelBoxes& rSelBoxes,
     132             :                           SwAccTableSelHander_Impl& rSelHdl,
     133             :                        sal_Bool bColumns ) const;
     134             : 
     135             :     void CheckRowAndCol( sal_Int32 nRow, sal_Int32 nCol,
     136             :                          SwAccessibleTable *pThis ) const
     137             :         throw(lang::IndexOutOfBoundsException );
     138             : 
     139             :     void GetRowColumnAndExtent( const SwRect& rBox,
     140             :                                   sal_Int32& rRow, sal_Int32& rColumn,
     141             :                                   sal_Int32& rRowExtent,
     142             :                                   sal_Int32& rColumnExtent ) const;
     143             : 
     144             :     const Point& GetTablePos() const { return maTabFrmPos; }
     145           9 :     void SetTablePos( const Point& rPos ) { maTabFrmPos = rPos; }
     146             : };
     147             : 
     148          33 : void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
     149             : {
     150          33 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     151          33 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     152          33 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     153         132 :     while( aIter != aEndIter )
     154             :     {
     155          66 :         const SwAccessibleChild& rLower = *aIter;
     156          66 :         const SwFrm *pLower = rLower.GetSwFrm();
     157          66 :         if( pLower )
     158             :         {
     159          66 :             if( pLower->IsRowFrm() )
     160             :             {
     161             :                 // #i77106#
     162          22 :                 if ( IncludeRow( *pLower ) )
     163             :                 {
     164          22 :                     maRows.insert( pLower->Frm().Top() - maTabFrmPos.getY() );
     165          22 :                     CollectData( pLower );
     166             :                 }
     167             :             }
     168          88 :             else if( pLower->IsCellFrm() &&
     169          44 :                      rLower.IsAccessible( mbIsInPagePreview ) )
     170             :             {
     171          44 :                 maColumns.insert( pLower->Frm().Left() - maTabFrmPos.getX() );
     172             :             }
     173             :             else
     174             :             {
     175           0 :                 CollectData( pLower );
     176             :             }
     177             :         }
     178          66 :         ++aIter;
     179             :     }
     180          33 : }
     181             : 
     182           0 : void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm )
     183             : {
     184           0 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     185           0 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     186           0 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     187           0 :     while( aIter != aEndIter )
     188             :     {
     189           0 :         const SwAccessibleChild& rLower = *aIter;
     190           0 :         const SwFrm *pLower = rLower.GetSwFrm();
     191           0 :         if( pLower )
     192             :         {
     193           0 :             if( pLower->IsRowFrm() )
     194             :             {
     195             : 
     196           0 :                 const SwTableLine* pLine = ((SwRowFrm*)pLower)->GetTabLine();
     197           0 :                 while( pLine->GetUpper() )
     198           0 :                     pLine = pLine->GetUpper()->GetUpper();
     199             : 
     200             :                 // Headerline?
     201             :                 //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine)
     202             :                 //return ;
     203             : 
     204           0 :                 maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
     205             : 
     206           0 :                 CollectRowHeaderData( pLower );
     207             : 
     208             :             }
     209           0 :             else if( pLower->IsCellFrm() &&
     210           0 :                      rLower.IsAccessible( mbIsInPagePreview ) )
     211             :             {
     212             :                 //Added by yanjun. Can't find the "GetRowHeaderFlag" function(Need vefiry).
     213             :                 //if(((SwCellFrm*)pLower)->GetRowHeaderFlag())
     214             :                 //  maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
     215             :             }
     216             :             else
     217             :             {
     218           0 :                 CollectRowHeaderData( pLower );
     219             :             }
     220             :         }
     221           0 :         ++aIter;
     222             :     }
     223           0 : }
     224             : 
     225           0 : void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm )
     226             : {
     227           0 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     228           0 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     229           0 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     230           0 :     while( aIter != aEndIter )
     231             :     {
     232           0 :         const SwAccessibleChild& rLower = *aIter;
     233           0 :         const SwFrm *pLower = rLower.GetSwFrm();
     234           0 :         if( pLower )
     235             :         {
     236           0 :             if( pLower->IsRowFrm() )
     237             :             {
     238             : 
     239           0 :                 const SwTableLine* pLine = ((SwRowFrm*)pLower)->GetTabLine();
     240           0 :                 while( pLine->GetUpper() )
     241           0 :                     pLine = pLine->GetUpper()->GetUpper();
     242             : 
     243             :                 // Headerline?
     244             :                 //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine)
     245             :                 //return ;
     246             : 
     247             :                 //if the current line is now header line, then return ;
     248           0 :                 sal_Int16 iCurrentRowIndex = mpTabFrm->GetTable()->GetTabLines().GetPos( pLine);
     249           0 :                 if(iCurrentRowIndex >= mpTabFrm->GetTable()->_GetRowsToRepeat())
     250           0 :                     return ;
     251             : 
     252           0 :                 maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
     253             : 
     254           0 :                 CollectColumnHeaderData( pLower );
     255             : 
     256             :             }
     257           0 :             else if( pLower->IsCellFrm() &&
     258           0 :                      rLower.IsAccessible( mbIsInPagePreview ) )
     259             :             {
     260           0 :                 maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
     261             :             }
     262             :             else
     263             :             {
     264           0 :                 CollectColumnHeaderData( pLower );
     265             :             }
     266             :         }
     267           0 :         ++aIter;
     268             :     }
     269             : }
     270             : 
     271          33 : void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm )
     272             : {
     273          33 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     274          33 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     275          33 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     276         132 :     while( aIter != aEndIter )
     277             :     {
     278          66 :         const SwAccessibleChild& rLower = *aIter;
     279          66 :         const SwFrm *pLower = rLower.GetSwFrm();
     280          66 :         if( pLower )
     281             :         {
     282         110 :             if( pLower->IsCellFrm() &&
     283          44 :                 rLower.IsAccessible( mbIsInPagePreview ) )
     284             :             {
     285             :                 sal_Int32 nRow, nCol;
     286          44 :                 Int32Pair_Impl aCellExtents;
     287          44 :                 GetRowColumnAndExtent( pLower->Frm(), nRow, nCol,
     288             :                                        aCellExtents.first,
     289          44 :                                        aCellExtents.second );
     290             : 
     291          44 :                 maExtents.push_back( aCellExtents );
     292             :             }
     293             :             else
     294             :             {
     295             :                 // #i77106#
     296          44 :                 if ( !pLower->IsRowFrm() ||
     297          22 :                      IncludeRow( *pLower ) )
     298             :                 {
     299          22 :                     CollectExtents( pLower );
     300             :                 }
     301             :             }
     302             :         }
     303          66 :         ++aIter;
     304             :     }
     305          33 : }
     306             : 
     307           0 : sal_Bool SwAccessibleTableData_Impl::FindCell(
     308             :         const Point& rPos, const SwFrm *pFrm, sal_Bool bExact,
     309             :         const SwFrm *& rRet ) const
     310             : {
     311           0 :     sal_Bool bFound = sal_False;
     312             : 
     313           0 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     314           0 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     315           0 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     316           0 :     while( !bFound && aIter != aEndIter )
     317             :     {
     318           0 :         const SwAccessibleChild& rLower = *aIter;
     319           0 :         const SwFrm *pLower = rLower.GetSwFrm();
     320             :         OSL_ENSURE( pLower, "child should be a frame" );
     321           0 :         if( pLower )
     322             :         {
     323           0 :             if( rLower.IsAccessible( mbIsInPagePreview ) )
     324             :             {
     325             :                 OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" );
     326           0 :                 const SwRect& rFrm = pLower->Frm();
     327           0 :                 if( rFrm.Right() >= rPos.X() && rFrm.Bottom() >= rPos.Y() )
     328             :                 {
     329             :                     // We have found the cell
     330             :                     OSL_ENSURE( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(),
     331             :                             "find frame moved to far!" );
     332           0 :                     bFound = sal_True;
     333           0 :                     if( !bExact ||
     334           0 :                         (rFrm.Top() == rPos.Y() && rFrm.Left() == rPos.Y() ) )
     335             :                     {
     336           0 :                         rRet = pLower;
     337             :                     }
     338             :                 }
     339             :             }
     340             :             else
     341             :             {
     342             :                 // #i77106#
     343           0 :                 if ( !pLower->IsRowFrm() ||
     344           0 :                      IncludeRow( *pLower ) )
     345             :                 {
     346           0 :                     bFound = FindCell( rPos, pLower, bExact, rRet );
     347             :                 }
     348             :             }
     349             :         }
     350           0 :         ++aIter;
     351             :     }
     352             : 
     353           0 :     return bFound;
     354             : }
     355             : 
     356           0 : void SwAccessibleTableData_Impl::GetSelection(
     357             :             const Point& rTabPos,
     358             :             const SwRect& rArea,
     359             :             const SwSelBoxes& rSelBoxes,
     360             :             const SwFrm *pFrm,
     361             :             SwAccTableSelHander_Impl& rSelHdl,
     362             :             sal_Bool bColumns ) const
     363             : {
     364           0 :     const SwAccessibleChildSList aList( *pFrm, mrAccMap );
     365           0 :     SwAccessibleChildSList::const_iterator aIter( aList.begin() );
     366           0 :     SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
     367           0 :     while( aIter != aEndIter )
     368             :     {
     369           0 :         const SwAccessibleChild& rLower = *aIter;
     370           0 :         const SwFrm *pLower = rLower.GetSwFrm();
     371             :         OSL_ENSURE( pLower, "child should be a frame" );
     372           0 :         const SwRect& rBox = rLower.GetBox( mrAccMap );
     373           0 :         if( pLower && rBox.IsOver( rArea ) )
     374             :         {
     375           0 :             if( rLower.IsAccessible( mbIsInPagePreview ) )
     376             :             {
     377             :                 OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" );
     378             :                 const SwCellFrm *pCFrm =
     379           0 :                         static_cast < const SwCellFrm * >( pLower );
     380             :                 SwTableBox *pBox =
     381           0 :                     const_cast< SwTableBox *>( pCFrm->GetTabBox() );
     382           0 :                 if( rSelBoxes.find( pBox ) == rSelBoxes.end() )
     383             :                 {
     384             :                     const Int32Set_Impl rRowsOrCols =
     385           0 :                         bColumns ? maColumns : maRows;
     386             : 
     387           0 :                     sal_Int32 nPos = bColumns ? (rBox.Left() - rTabPos.X())
     388           0 :                                               : (rBox.Top() - rTabPos.Y());
     389             :                     Int32Set_Impl::const_iterator aSttRowOrCol(
     390           0 :                         rRowsOrCols.lower_bound( nPos ) );
     391             :                     sal_Int32 nRowOrCol =
     392             :                         static_cast< sal_Int32 >( ::std::distance(
     393           0 :                             rRowsOrCols.begin(), aSttRowOrCol ) );
     394             : 
     395           0 :                     nPos = bColumns ? (rBox.Right() - rTabPos.X())
     396           0 :                                     : (rBox.Bottom() - rTabPos.Y());
     397             :                     Int32Set_Impl::const_iterator aEndRowOrCol(
     398           0 :                         rRowsOrCols.upper_bound( nPos ) );
     399             :                     sal_Int32 nExt =
     400             :                         static_cast< sal_Int32 >( ::std::distance(
     401           0 :                             aSttRowOrCol, aEndRowOrCol ) );
     402             : 
     403           0 :                     rSelHdl.Unselect( nRowOrCol, nExt );
     404             :                 }
     405             :             }
     406             :             else
     407             :             {
     408             :                 // #i77106#
     409           0 :                 if ( !pLower->IsRowFrm() ||
     410           0 :                      IncludeRow( *pLower ) )
     411             :                 {
     412             :                     GetSelection( rTabPos, rArea, rSelBoxes, pLower, rSelHdl,
     413           0 :                                   bColumns );
     414             :                 }
     415             :             }
     416             :         }
     417           0 :         ++aIter;
     418             :     }
     419           0 : }
     420             : 
     421           0 : const SwFrm *SwAccessibleTableData_Impl::GetCell(
     422             :         sal_Int32 nRow, sal_Int32 nColumn, sal_Bool,
     423             :         SwAccessibleTable *pThis ) const
     424             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
     425             : {
     426           0 :     CheckRowAndCol( nRow, nColumn, pThis );
     427             : 
     428           0 :     Int32Set_Impl::const_iterator aSttCol( GetColumnIter( nColumn ) );
     429           0 :     Int32Set_Impl::const_iterator aSttRow( GetRowIter( nRow ) );
     430           0 :     const SwFrm *pCellFrm = GetCellAtPos( *aSttCol, *aSttRow, sal_False );
     431             : 
     432           0 :     return pCellFrm;
     433             : }
     434             : 
     435           0 : void SwAccessibleTableData_Impl::GetSelection(
     436             :                        sal_Int32 nStart, sal_Int32 nEnd,
     437             :                        const SwSelBoxes& rSelBoxes,
     438             :                           SwAccTableSelHander_Impl& rSelHdl,
     439             :                        sal_Bool bColumns ) const
     440             : {
     441           0 :     SwRect aArea( mpTabFrm->Frm() );
     442           0 :     Point aPos( aArea.Pos() );
     443             : 
     444           0 :     const Int32Set_Impl& rRowsOrColumns = bColumns ? maColumns : maRows;
     445           0 :     if( nStart > 0 )
     446             :     {
     447           0 :         Int32Set_Impl::const_iterator aStt( rRowsOrColumns.begin() );
     448             :         ::std::advance( aStt,
     449           0 :             static_cast< Int32Set_Impl::difference_type >( nStart ) );
     450           0 :         if( bColumns )
     451           0 :             aArea.Left( *aStt + aPos.getX() );
     452             :         else
     453           0 :             aArea.Top( *aStt + aPos.getY() );
     454             :     }
     455           0 :     if( nEnd < static_cast< sal_Int32 >( rRowsOrColumns.size() ) )
     456             :     {
     457           0 :         Int32Set_Impl::const_iterator aEnd( rRowsOrColumns.begin() );
     458             :         ::std::advance( aEnd,
     459           0 :             static_cast< Int32Set_Impl::difference_type >( nEnd ) );
     460           0 :         if( bColumns )
     461           0 :             aArea.Right( *aEnd + aPos.getX() - 1 );
     462             :         else
     463           0 :             aArea.Bottom( *aEnd + aPos.getY() - 1 );
     464             :     }
     465             : 
     466           0 :     GetSelection( aPos, aArea, rSelBoxes, mpTabFrm, rSelHdl, bColumns );
     467           0 : }
     468             : 
     469           0 : const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos(
     470             :         sal_Int32 nLeft, sal_Int32 nTop, sal_Bool bExact ) const
     471             : {
     472           0 :     Point aPos( mpTabFrm->Frm().Pos() );
     473           0 :     aPos.Move( nLeft, nTop );
     474           0 :     const SwFrm *pRet = 0;
     475           0 :     FindCell( aPos, mpTabFrm, bExact, pRet );
     476             : 
     477           0 :     return pRet;
     478             : }
     479             : 
     480           2 : inline sal_Int32 SwAccessibleTableData_Impl::GetRowCount() const
     481             : {
     482           2 :     sal_Int32 count =  static_cast< sal_Int32 >( maRows.size() ) ;
     483           2 :     count = (count <=0)? 1:count;
     484           2 :     return count;
     485             : }
     486             : 
     487           2 : inline sal_Int32 SwAccessibleTableData_Impl::GetColumnCount() const
     488             : {
     489           2 :     return static_cast< sal_Int32 >( maColumns.size() );
     490             : }
     491             : 
     492           9 : sal_Bool SwAccessibleTableData_Impl::CompareExtents(
     493             :                                 const SwAccessibleTableData_Impl& rCmp ) const
     494             : {
     495           9 :     if( maExtents.size() != rCmp.maExtents.size() )
     496           0 :         return sal_False;
     497             : 
     498           9 :     return ::std::equal(maExtents.begin(), maExtents.end(), rCmp.maExtents.begin()) ? sal_True : sal_False;
     499             : }
     500             : 
     501          11 : SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
     502             :                                                         const SwTabFrm *pTabFrm,
     503             :                                                         sal_Bool bIsInPagePreview,
     504             :                                                         bool bOnlyTableColumnHeader )
     505             :     : mrAccMap( rAccMap )
     506          11 :     , maTabFrmPos( pTabFrm->Frm().Pos() )
     507             :     , mpTabFrm( pTabFrm )
     508             :     , mbIsInPagePreview( bIsInPagePreview )
     509          22 :     , mbOnlyTableColumnHeader( bOnlyTableColumnHeader )
     510             : {
     511          11 :     CollectData( mpTabFrm );
     512          11 :     CollectExtents( mpTabFrm );
     513          11 : }
     514             : 
     515           0 : inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetRowIter(
     516             :         sal_Int32 nRow ) const
     517             : {
     518           0 :     Int32Set_Impl::const_iterator aCol( GetRows().begin() );
     519           0 :     if( nRow > 0 )
     520             :     {
     521             :         ::std::advance( aCol,
     522           0 :                     static_cast< Int32Set_Impl::difference_type >( nRow ) );
     523             :     }
     524           0 :     return aCol;
     525             : }
     526             : 
     527           0 : inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetColumnIter(
     528             :         sal_Int32 nColumn ) const
     529             : {
     530           0 :     Int32Set_Impl::const_iterator aCol = GetColumns().begin();
     531           0 :     if( nColumn > 0 )
     532             :     {
     533             :         ::std::advance( aCol,
     534           0 :                     static_cast< Int32Set_Impl::difference_type >( nColumn ) );
     535             :     }
     536           0 :     return aCol;
     537             : }
     538             : 
     539           0 : void SwAccessibleTableData_Impl::CheckRowAndCol(
     540             :         sal_Int32 nRow, sal_Int32 nCol, SwAccessibleTable *pThis ) const
     541             :     throw(lang::IndexOutOfBoundsException )
     542             : {
     543           0 :     if( ( nRow < 0 || nRow >= static_cast< sal_Int32 >( maRows.size() ) ) ||
     544           0 :         ( nCol < 0 || nCol >= static_cast< sal_Int32 >( maColumns.size() ) ) )
     545             :     {
     546           0 :         uno::Reference < XAccessibleTable > xThis( pThis );
     547             :         lang::IndexOutOfBoundsException aExcept(
     548             :                OUString( "row or column index out of range" ),
     549           0 :                xThis );
     550           0 :         throw aExcept;
     551             :     }
     552           0 : }
     553             : 
     554          44 : void SwAccessibleTableData_Impl::GetRowColumnAndExtent(
     555             :         const SwRect& rBox,
     556             :         sal_Int32& rRow, sal_Int32& rColumn,
     557             :         sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const
     558             : {
     559             :     Int32Set_Impl::const_iterator aStt(
     560          44 :                 maRows.lower_bound( rBox.Top() - maTabFrmPos.Y() ) );
     561             :     Int32Set_Impl::const_iterator aEnd(
     562          44 :                 maRows.upper_bound( rBox.Bottom() - maTabFrmPos.Y() ) );
     563             :     rRow =
     564          44 :          static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) );
     565             :     rRowExtent =
     566          44 :          static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
     567             : 
     568          44 :     aStt = maColumns.lower_bound( rBox.Left() - maTabFrmPos.X() );
     569          44 :     aEnd = maColumns.upper_bound( rBox.Right() - maTabFrmPos.X() );
     570             :     rColumn =
     571          44 :          static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) );
     572             :     rColumnExtent =
     573          44 :          static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
     574          44 : }
     575             : 
     576             : class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl
     577             : {
     578             :     sal_Bool bSelected;
     579             : 
     580             : public:
     581             : 
     582             :     inline SwAccSingleTableSelHander_Impl();
     583             : 
     584           0 :     virtual ~SwAccSingleTableSelHander_Impl() {}
     585             : 
     586           0 :     inline sal_Bool IsSelected() const { return bSelected; }
     587             : 
     588             :     virtual void Unselect( sal_Int32, sal_Int32 ) SAL_OVERRIDE;
     589             : };
     590             : 
     591           0 : inline SwAccSingleTableSelHander_Impl::SwAccSingleTableSelHander_Impl() :
     592           0 :     bSelected( sal_True )
     593             : {
     594           0 : }
     595             : 
     596           0 : void SwAccSingleTableSelHander_Impl::Unselect( sal_Int32, sal_Int32 )
     597             : {
     598           0 :     bSelected = sal_False;
     599           0 : }
     600             : 
     601             : class SwAccAllTableSelHander_Impl : public SwAccTableSelHander_Impl
     602             : 
     603             : {
     604             :     ::std::vector< sal_Bool > aSelected;
     605             :     sal_Int32 nCount;
     606             : 
     607             : public:
     608             :     inline SwAccAllTableSelHander_Impl( sal_Int32 nSize );
     609             : 
     610             :     uno::Sequence < sal_Int32 > GetSelSequence();
     611             : 
     612             :     virtual void Unselect( sal_Int32 nRowOrCol, sal_Int32 nExt ) SAL_OVERRIDE;
     613             :     virtual ~SwAccAllTableSelHander_Impl();
     614             : };
     615             : 
     616           0 : SwAccAllTableSelHander_Impl::~SwAccAllTableSelHander_Impl()
     617             : {
     618           0 : }
     619             : 
     620           0 : inline SwAccAllTableSelHander_Impl::SwAccAllTableSelHander_Impl( sal_Int32 nSize ) :
     621             :     aSelected( nSize, sal_True ),
     622           0 :     nCount( nSize )
     623             : {
     624           0 : }
     625             : 
     626           0 : uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
     627             : {
     628             :     OSL_ENSURE( nCount >= 0, "underflow" );
     629           0 :     uno::Sequence < sal_Int32 > aRet( nCount );
     630           0 :     sal_Int32 *pRet = aRet.getArray();
     631           0 :     sal_Int32 nPos = 0;
     632           0 :     size_t nSize = aSelected.size();
     633           0 :     for( size_t i=0; i < nSize && nPos < nCount; i++ )
     634             :     {
     635           0 :         if( aSelected[i] )
     636             :         {
     637           0 :             *pRet++ = i;
     638           0 :             nPos++;
     639             :         }
     640             :     }
     641             : 
     642             :     OSL_ENSURE( nPos == nCount, "count is wrong" );
     643             : 
     644           0 :     return aRet;
     645             : }
     646             : 
     647           0 : void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol,
     648             :                                             sal_Int32 nExt )
     649             : {
     650             :     OSL_ENSURE( static_cast< size_t >( nRowOrCol ) < aSelected.size(),
     651             :              "index to large" );
     652             :     OSL_ENSURE( static_cast< size_t >( nRowOrCol+nExt ) <= aSelected.size(),
     653             :              "extent to large" );
     654           0 :     while( nExt )
     655             :     {
     656           0 :         if( aSelected[static_cast< size_t >( nRowOrCol )] )
     657             :         {
     658           0 :             aSelected[static_cast< size_t >( nRowOrCol )] = sal_False;
     659           0 :             nCount--;
     660             :         }
     661           0 :         nExt--;
     662           0 :         nRowOrCol++;
     663             :     }
     664           0 : }
     665             : 
     666           4 : const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const
     667             : {
     668           4 :     const SwSelBoxes *pSelBoxes = 0;
     669           4 :     const SwCrsrShell *pCSh = GetCrsrShell();
     670           4 :     if( (pCSh != NULL) && pCSh->IsTableMode() )
     671             :     {
     672           2 :         pSelBoxes = &pCSh->GetTableCrsr()->GetSelectedBoxes();
     673             :     }
     674             : 
     675           4 :     return pSelBoxes;
     676             : }
     677             : 
     678           2 : void SwAccessibleTable::FireTableChangeEvent(
     679             :         const SwAccessibleTableData_Impl& rTableData )
     680             : {
     681           2 :     AccessibleTableModelChange aModelChange;
     682           2 :     aModelChange.Type = AccessibleTableModelChangeType::UPDATE;
     683           2 :     aModelChange.FirstRow = 0;
     684           2 :     aModelChange.LastRow = rTableData.GetRowCount() - 1;
     685           2 :     aModelChange.FirstColumn = 0;
     686           2 :     aModelChange.LastColumn = rTableData.GetColumnCount() - 1;
     687             : 
     688           2 :     AccessibleEventObject aEvent;
     689           2 :     aEvent.EventId = AccessibleEventId::TABLE_MODEL_CHANGED;
     690           2 :     aEvent.NewValue <<= aModelChange;
     691             : 
     692           2 :     FireAccessibleEvent( aEvent );
     693           2 : }
     694             : 
     695           6 : const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
     696             : {
     697             :     OSL_ENSURE( nChildIndex >= 0, "Illegal child index." );
     698             :     OSL_ENSURE( nChildIndex < const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(), "Illegal child index." ); // #i77106#
     699             : 
     700           6 :     const SwTableBox* pBox = NULL;
     701             : 
     702             :     // get table box for 'our' table cell
     703           6 :     SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) );
     704           6 :     if( aCell.GetSwFrm()  )
     705             :     {
     706           6 :         const SwFrm* pChildFrm = aCell.GetSwFrm();
     707           6 :         if( (pChildFrm != NULL) && pChildFrm->IsCellFrm() )
     708             :         {
     709             :             const SwCellFrm* pCellFrm =
     710           6 :                 static_cast<const SwCellFrm*>( pChildFrm );
     711           6 :             pBox = pCellFrm->GetTabBox();
     712             :         }
     713             :     }
     714             : 
     715             :     OSL_ENSURE( pBox != NULL, "We need the table box." );
     716           6 :     return pBox;
     717             : }
     718             : 
     719           4 : sal_Bool SwAccessibleTable::IsChildSelected( sal_Int32 nChildIndex ) const
     720             : {
     721           4 :     sal_Bool bRet = sal_False;
     722           4 :     const SwSelBoxes* pSelBoxes = GetSelBoxes();
     723           4 :     if( pSelBoxes )
     724             :     {
     725           2 :         const SwTableBox* pBox = GetTableBox( nChildIndex );
     726             :         OSL_ENSURE( pBox != NULL, "We need the table box." );
     727           2 :         bRet = pSelBoxes->find( const_cast<SwTableBox*>( pBox ) ) != pSelBoxes->end();
     728             :     }
     729             : 
     730           4 :     return bRet;
     731             : }
     732             : 
     733           0 : sal_Int32 SwAccessibleTable::GetIndexOfSelectedChild(
     734             :                 sal_Int32 nSelectedChildIndex ) const
     735             : {
     736             :     // iterate over all children to n-th isAccessibleChildSelected()
     737           0 :     sal_Int32 nChildren = const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(); // #i77106#
     738           0 :     if( nSelectedChildIndex >= nChildren )
     739           0 :         return -1L;
     740             : 
     741           0 :     sal_Int32 n = 0;
     742           0 :     while( n < nChildren )
     743             :     {
     744           0 :         if( IsChildSelected( n ) )
     745             :         {
     746           0 :             if( 0 == nSelectedChildIndex )
     747           0 :                 break;
     748             :             else
     749           0 :                 --nSelectedChildIndex;
     750             :         }
     751           0 :         ++n;
     752             :     }
     753             : 
     754           0 :     return n < nChildren ? n : -1L;
     755             : }
     756             : 
     757           2 : void SwAccessibleTable::GetStates(
     758             :         ::utl::AccessibleStateSetHelper& rStateSet )
     759             : {
     760           2 :     SwAccessibleContext::GetStates( rStateSet );
     761             :     //Add resizable state to table
     762           2 :     rStateSet.AddState( AccessibleStateType::RESIZABLE );
     763             :     // MULTISELECTABLE
     764           2 :     rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
     765           2 :     SwCrsrShell* pCrsrShell = GetCrsrShell();
     766           2 :     if( pCrsrShell  )
     767           2 :         rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
     768           2 : }
     769             : 
     770           2 : SwAccessibleTable::SwAccessibleTable(
     771             :         SwAccessibleMap* pInitMap,
     772             :         const SwTabFrm* pTabFrm  ) :
     773             :     SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ),
     774           2 :     mpTableData( 0 )
     775             : {
     776           2 :     SolarMutexGuard aGuard;
     777             : 
     778           2 :     const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
     779           2 :     const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
     780             : 
     781           2 :     SetName( pFrmFmt->GetName() + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) );
     782             : 
     783           4 :     const OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )->GetFmt()->GetName() );
     784           4 :     const OUString sArg2( GetFormattedPageNumber() );
     785             : 
     786           2 :     sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
     787           4 :     UpdateTableData();
     788           2 : }
     789             : 
     790           6 : SwAccessibleTable::~SwAccessibleTable()
     791             : {
     792           2 :     SolarMutexGuard aGuard;
     793             : 
     794           2 :     delete mpTableData;
     795           4 : }
     796             : 
     797           0 : void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
     798             : {
     799           0 :     sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
     800           0 :     const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() );
     801           0 :     switch( nWhich )
     802             :     {
     803             :     case RES_NAME_CHANGED:
     804           0 :         if( pTabFrm )
     805             :         {
     806           0 :             const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
     807             :             OSL_ENSURE( pFrmFmt == GetRegisteredIn(), "invalid frame" );
     808             : 
     809           0 :             const OUString sOldName( GetName() );
     810           0 :             const OUString sNewTabName = pFrmFmt->GetName();
     811             : 
     812           0 :             SetName( sNewTabName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) );
     813             : 
     814           0 :             if( sOldName != GetName() )
     815             :             {
     816           0 :                 AccessibleEventObject aEvent;
     817           0 :                 aEvent.EventId = AccessibleEventId::NAME_CHANGED;
     818           0 :                 aEvent.OldValue <<= sOldName;
     819           0 :                 aEvent.NewValue <<= GetName();
     820           0 :                 FireAccessibleEvent( aEvent );
     821             :             }
     822             : 
     823           0 :             const OUString sOldDesc( sDesc );
     824           0 :             const OUString sArg2( GetFormattedPageNumber() );
     825             : 
     826           0 :             sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sNewTabName, &sArg2 );
     827           0 :             if( sDesc != sOldDesc )
     828             :             {
     829           0 :                 AccessibleEventObject aEvent;
     830           0 :                 aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
     831           0 :                 aEvent.OldValue <<= sOldDesc;
     832           0 :                 aEvent.NewValue <<= sDesc;
     833           0 :                 FireAccessibleEvent( aEvent );
     834           0 :             }
     835             :         }
     836           0 :         break;
     837             : 
     838             :     case RES_OBJECTDYING:
     839             :         // mba: it seems that this class intentionally does not call code in base class SwClient
     840           0 :         if( pOld && ( GetRegisteredIn() == static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) ) )
     841           0 :             GetRegisteredInNonConst()->Remove( this );
     842           0 :         break;
     843             : 
     844             :     default:
     845             :         // mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
     846           0 :         break;
     847             :     }
     848           0 : }
     849             : 
     850          87 : uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType )
     851             :     throw (uno::RuntimeException, std::exception)
     852             : {
     853          87 :     uno::Any aRet;
     854          87 :     if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) ) )
     855             :     {
     856           0 :         uno::Reference<XAccessibleTable> xThis( this );
     857           0 :            aRet <<= xThis;
     858             :     }
     859          87 :     else if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ) )
     860             :     {
     861           2 :         uno::Reference<XAccessibleSelection> xSelection( this );
     862           2 :         aRet <<= xSelection;
     863             :     }
     864          85 :     else if ( rType == ::getCppuType((uno::Reference<XAccessibleTableSelection> *)0) )
     865             :     {
     866           0 :         uno::Reference<XAccessibleTableSelection> xTableExtent( this );
     867           0 :         aRet <<= xTableExtent;
     868             :     }
     869             :     else
     870             :     {
     871          85 :         aRet = SwAccessibleContext::queryInterface(rType);
     872             :     }
     873             : 
     874          87 :     return aRet;
     875             : }
     876             : 
     877             : // XTypeProvider
     878           0 : uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
     879             :     throw(uno::RuntimeException, std::exception)
     880             : {
     881           0 :     uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() );
     882             : 
     883           0 :     sal_Int32 nIndex = aTypes.getLength();
     884           0 :     aTypes.realloc( nIndex + 2 );
     885             : 
     886           0 :     uno::Type* pTypes = aTypes.getArray();
     887           0 :     pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
     888           0 :     pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) );
     889             : 
     890           0 :     return aTypes;
     891             : }
     892             : 
     893           0 : uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId()
     894             :         throw(uno::RuntimeException, std::exception)
     895             : {
     896           0 :     return css::uno::Sequence<sal_Int8>();
     897             : }
     898             : 
     899             : // #i77106#
     900          11 : SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData()
     901             : {
     902          11 :     const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
     903          11 :     return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() );
     904             : }
     905             : 
     906           2 : void SwAccessibleTable::UpdateTableData()
     907             : {
     908             :     // #i77106# - usage of new method <CreateNewTableData()>
     909           2 :     delete mpTableData;
     910           2 :     mpTableData = CreateNewTableData();
     911           2 : }
     912             : 
     913           2 : void SwAccessibleTable::ClearTableData()
     914             : {
     915           2 :     delete mpTableData;
     916           2 :     mpTableData = 0;
     917           2 : }
     918             : 
     919           6 : OUString SAL_CALL SwAccessibleTable::getAccessibleDescription (void)
     920             :         throw (uno::RuntimeException, std::exception)
     921             : {
     922           6 :     SolarMutexGuard aGuard;
     923             : 
     924           6 :     CHECK_FOR_DEFUNC( XAccessibleContext )
     925             : 
     926           6 :     return sDesc;
     927             : }
     928             : 
     929           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowCount()
     930             :     throw (uno::RuntimeException, std::exception)
     931             : {
     932           0 :     SolarMutexGuard aGuard;
     933             : 
     934           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
     935             : 
     936           0 :     return  GetTableData().GetRowCount();
     937             : }
     938             : 
     939           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnCount(  )
     940             :     throw (uno::RuntimeException, std::exception)
     941             : {
     942           0 :     SolarMutexGuard aGuard;
     943             : 
     944           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
     945             : 
     946           0 :     return GetTableData().GetColumnCount();
     947             : }
     948             : 
     949           0 : OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription(
     950             :             sal_Int32 nRow )
     951             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
     952             : {
     953             :     // #i87532# - determine table cell in <nRow>th row and
     954             :     // in first column of row header table and return its text content.
     955           0 :     OUString sRowDesc;
     956             : 
     957           0 :     GetTableData().CheckRowAndCol(nRow, 0, this);
     958             : 
     959           0 :     uno::Reference< XAccessibleTable > xTableRowHeader = getAccessibleRowHeaders();
     960           0 :     if ( xTableRowHeader.is() )
     961             :     {
     962             :         uno::Reference< XAccessible > xRowHeaderCell =
     963           0 :                         xTableRowHeader->getAccessibleCellAt( nRow, 0 );
     964             :         OSL_ENSURE( xRowHeaderCell.is(),
     965             :                 "<SwAccessibleTable::getAccessibleRowDescription(..)> - missing row header cell -> serious issue." );
     966             :         uno::Reference< XAccessibleContext > xRowHeaderCellContext =
     967           0 :                                     xRowHeaderCell->getAccessibleContext();
     968           0 :         const sal_Int32 nCellChildCount( xRowHeaderCellContext->getAccessibleChildCount() );
     969           0 :         for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex )
     970             :         {
     971           0 :             uno::Reference< XAccessible > xChild = xRowHeaderCellContext->getAccessibleChild( nChildIndex );
     972           0 :             uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY );
     973           0 :             if ( xChildText.is() )
     974             :             {
     975           0 :                 sRowDesc = sRowDesc + xChildText->getText();
     976             :             }
     977           0 :         }
     978             :     }
     979             : 
     980           0 :     return sRowDesc;
     981             : }
     982             : 
     983           0 : OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription(
     984             :             sal_Int32 nColumn )
     985             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
     986             : {
     987             :     // #i87532# - determine table cell in first row and
     988             :     // in <nColumn>th column of column header table and return its text content.
     989           0 :     OUString sColumnDesc;
     990             : 
     991           0 :     GetTableData().CheckRowAndCol(0, nColumn, this);
     992             : 
     993           0 :     uno::Reference< XAccessibleTable > xTableColumnHeader = getAccessibleColumnHeaders();
     994           0 :     if ( xTableColumnHeader.is() )
     995             :     {
     996             :         uno::Reference< XAccessible > xColumnHeaderCell =
     997           0 :                         xTableColumnHeader->getAccessibleCellAt( 0, nColumn );
     998             :         OSL_ENSURE( xColumnHeaderCell.is(),
     999             :                 "<SwAccessibleTable::getAccessibleColumnDescription(..)> - missing column header cell -> serious issue." );
    1000             :         uno::Reference< XAccessibleContext > xColumnHeaderCellContext =
    1001           0 :                                     xColumnHeaderCell->getAccessibleContext();
    1002           0 :         const sal_Int32 nCellChildCount( xColumnHeaderCellContext->getAccessibleChildCount() );
    1003           0 :         for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex )
    1004             :         {
    1005           0 :             uno::Reference< XAccessible > xChild = xColumnHeaderCellContext->getAccessibleChild( nChildIndex );
    1006           0 :             uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY );
    1007           0 :             if ( xChildText.is() )
    1008             :             {
    1009           0 :                 sColumnDesc = sColumnDesc + xChildText->getText();
    1010             :             }
    1011           0 :         }
    1012             :     }
    1013             : 
    1014           0 :     return sColumnDesc;
    1015             : }
    1016             : 
    1017           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt(
    1018             :             sal_Int32 nRow, sal_Int32 nColumn )
    1019             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1020             : {
    1021           0 :     sal_Int32 nExtend = -1;
    1022             : 
    1023           0 :     SolarMutexGuard aGuard;
    1024             : 
    1025           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1026             : 
    1027           0 :     UpdateTableData();
    1028           0 :     GetTableData().CheckRowAndCol( nRow, nColumn, this );
    1029             : 
    1030             :     Int32Set_Impl::const_iterator aSttCol(
    1031           0 :                                     GetTableData().GetColumnIter( nColumn ) );
    1032             :     Int32Set_Impl::const_iterator aSttRow(
    1033           0 :                                     GetTableData().GetRowIter( nRow ) );
    1034           0 :     const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow,
    1035           0 :                                                          sal_False );
    1036           0 :     if( pCellFrm )
    1037             :     {
    1038           0 :         sal_Int32 nBottom = pCellFrm->Frm().Bottom();
    1039           0 :         nBottom -= GetFrm()->Frm().Top();
    1040             :         Int32Set_Impl::const_iterator aEndRow(
    1041           0 :                 GetTableData().GetRows().upper_bound( nBottom ) );
    1042             :         nExtend =
    1043           0 :              static_cast< sal_Int32 >( ::std::distance( aSttRow, aEndRow ) );
    1044             :     }
    1045             : 
    1046           0 :     return nExtend;
    1047             : }
    1048             : 
    1049           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt(
    1050             :                sal_Int32 nRow, sal_Int32 nColumn )
    1051             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1052             : {
    1053           0 :     sal_Int32 nExtend = -1;
    1054             : 
    1055           0 :     SolarMutexGuard aGuard;
    1056             : 
    1057           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1058           0 :     UpdateTableData();
    1059             : 
    1060           0 :     GetTableData().CheckRowAndCol( nRow, nColumn, this );
    1061             : 
    1062             :     Int32Set_Impl::const_iterator aSttCol(
    1063           0 :                                     GetTableData().GetColumnIter( nColumn ) );
    1064             :     Int32Set_Impl::const_iterator aSttRow(
    1065           0 :                                     GetTableData().GetRowIter( nRow ) );
    1066           0 :     const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow,
    1067           0 :                                                          sal_False );
    1068           0 :     if( pCellFrm )
    1069             :     {
    1070           0 :         sal_Int32 nRight = pCellFrm->Frm().Right();
    1071           0 :         nRight -= GetFrm()->Frm().Left();
    1072             :         Int32Set_Impl::const_iterator aEndCol(
    1073           0 :                 GetTableData().GetColumns().upper_bound( nRight ) );
    1074             :         nExtend =
    1075           0 :              static_cast< sal_Int32 >( ::std::distance( aSttCol, aEndCol ) );
    1076             :     }
    1077             : 
    1078           0 :     return nExtend;
    1079             : }
    1080             : 
    1081             : uno::Reference< XAccessibleTable > SAL_CALL
    1082           0 :         SwAccessibleTable::getAccessibleRowHeaders(  )
    1083             :     throw (uno::RuntimeException, std::exception)
    1084             : {
    1085             :     // Row headers aren't supported
    1086           0 :     return uno::Reference< XAccessibleTable >();
    1087             : }
    1088             : 
    1089             : uno::Reference< XAccessibleTable > SAL_CALL
    1090           0 :         SwAccessibleTable::getAccessibleColumnHeaders(  )
    1091             :     throw (uno::RuntimeException, std::exception)
    1092             : {
    1093             :     // #i87532# - assure that return accessible object is empty,
    1094             :     // if no column header exists.
    1095             :     SwAccessibleTableColHeaders* pTableColHeaders =
    1096           0 :         new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) );
    1097           0 :     uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders );
    1098           0 :     if ( pTableColHeaders->getAccessibleChildCount() <= 0 )
    1099             :     {
    1100           0 :         return uno::Reference< XAccessibleTable >();
    1101             :     }
    1102             : 
    1103           0 :     return xTableColumnHeaders;
    1104             : }
    1105             : 
    1106           0 : uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleRows()
    1107             :     throw (uno::RuntimeException, std::exception)
    1108             : {
    1109           0 :     SolarMutexGuard aGuard;
    1110             : 
    1111           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1112             : 
    1113           0 :     const SwSelBoxes *pSelBoxes = GetSelBoxes();
    1114           0 :     if( pSelBoxes )
    1115             :     {
    1116           0 :         sal_Int32 nRows = GetTableData().GetRowCount();
    1117           0 :         SwAccAllTableSelHander_Impl aSelRows( nRows  );
    1118             : 
    1119           0 :         GetTableData().GetSelection( 0, nRows, *pSelBoxes, aSelRows,
    1120           0 :                                       sal_False );
    1121             : 
    1122           0 :         return aSelRows.GetSelSequence();
    1123             :     }
    1124             :     else
    1125             :     {
    1126           0 :         return uno::Sequence< sal_Int32 >( 0 );
    1127           0 :     }
    1128             : }
    1129             : 
    1130           0 : uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleColumns()
    1131             :     throw (uno::RuntimeException, std::exception)
    1132             : {
    1133           0 :     SolarMutexGuard aGuard;
    1134             : 
    1135           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1136             : 
    1137           0 :     const SwSelBoxes *pSelBoxes = GetSelBoxes();
    1138           0 :     if( pSelBoxes )
    1139             :     {
    1140           0 :         sal_Int32 nCols = GetTableData().GetColumnCount();
    1141           0 :         SwAccAllTableSelHander_Impl aSelCols( nCols );
    1142             : 
    1143           0 :         GetTableData().GetSelection( 0, nCols, *pSelBoxes, aSelCols, sal_True );
    1144             : 
    1145           0 :         return aSelCols.GetSelSequence();
    1146             :     }
    1147             :     else
    1148             :     {
    1149           0 :         return uno::Sequence< sal_Int32 >( 0 );
    1150           0 :     }
    1151             : }
    1152             : 
    1153           0 : sal_Bool SAL_CALL SwAccessibleTable::isAccessibleRowSelected( sal_Int32 nRow )
    1154             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1155             : {
    1156           0 :     SolarMutexGuard aGuard;
    1157             : 
    1158           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1159             : 
    1160           0 :     GetTableData().CheckRowAndCol( nRow, 0, this );
    1161             : 
    1162             :     sal_Bool bRet;
    1163           0 :     const SwSelBoxes *pSelBoxes = GetSelBoxes();
    1164           0 :     if( pSelBoxes )
    1165             :     {
    1166           0 :         SwAccSingleTableSelHander_Impl aSelRow;
    1167           0 :         GetTableData().GetSelection( nRow, nRow+1, *pSelBoxes, aSelRow,
    1168           0 :                                      sal_False );
    1169           0 :         bRet = aSelRow.IsSelected();
    1170             :     }
    1171             :     else
    1172             :     {
    1173           0 :         bRet = sal_False;
    1174             :     }
    1175             : 
    1176           0 :     return bRet;
    1177             : }
    1178             : 
    1179           0 : sal_Bool SAL_CALL SwAccessibleTable::isAccessibleColumnSelected(
    1180             :         sal_Int32 nColumn )
    1181             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1182             : {
    1183           0 :     SolarMutexGuard aGuard;
    1184             : 
    1185           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1186             : 
    1187           0 :     GetTableData().CheckRowAndCol( 0, nColumn, this );
    1188             : 
    1189             :     sal_Bool bRet;
    1190           0 :     const SwSelBoxes *pSelBoxes = GetSelBoxes();
    1191           0 :     if( pSelBoxes )
    1192             :     {
    1193           0 :         SwAccSingleTableSelHander_Impl aSelCol;
    1194             : 
    1195           0 :         GetTableData().GetSelection( nColumn, nColumn+1, *pSelBoxes, aSelCol,
    1196           0 :                                      sal_True );
    1197           0 :         bRet = aSelCol.IsSelected();
    1198             :     }
    1199             :     else
    1200             :     {
    1201           0 :         bRet = sal_False;
    1202             :     }
    1203             : 
    1204           0 :     return bRet;
    1205             : }
    1206             : 
    1207           0 : uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCellAt(
    1208             :         sal_Int32 nRow, sal_Int32 nColumn )
    1209             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1210             : {
    1211           0 :     uno::Reference< XAccessible > xRet;
    1212             : 
    1213           0 :     SolarMutexGuard aGuard;
    1214             : 
    1215           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1216             : 
    1217             :     const SwFrm *pCellFrm =
    1218           0 :                     GetTableData().GetCell( nRow, nColumn, sal_False, this );
    1219           0 :     if( pCellFrm )
    1220           0 :         xRet = GetMap()->GetContext( pCellFrm, sal_True );
    1221             : 
    1222           0 :     return xRet;
    1223             : }
    1224             : 
    1225           0 : uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCaption()
    1226             :     throw (uno::RuntimeException, std::exception)
    1227             : {
    1228             :     // captions aren't supported
    1229           0 :     return uno::Reference< XAccessible >();
    1230             : }
    1231             : 
    1232           0 : uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleSummary()
    1233             :     throw (uno::RuntimeException, std::exception)
    1234             : {
    1235             :     // summaries aren't supported
    1236           0 :     return uno::Reference< XAccessible >();
    1237             : }
    1238             : 
    1239           0 : sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected(
    1240             :             sal_Int32 nRow, sal_Int32 nColumn )
    1241             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1242             : {
    1243           0 :     sal_Bool bRet = sal_False;
    1244             : 
    1245           0 :     SolarMutexGuard aGuard;
    1246             : 
    1247           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1248             : 
    1249             :     const SwFrm *pFrm =
    1250           0 :                     GetTableData().GetCell( nRow, nColumn, sal_False, this );
    1251           0 :     if( pFrm && pFrm->IsCellFrm() )
    1252             :     {
    1253           0 :         const SwSelBoxes *pSelBoxes = GetSelBoxes();
    1254           0 :         if( pSelBoxes )
    1255             :         {
    1256           0 :             const SwCellFrm *pCFrm = static_cast < const SwCellFrm * >( pFrm );
    1257             :             SwTableBox *pBox =
    1258           0 :                 const_cast< SwTableBox *>( pCFrm->GetTabBox() );
    1259           0 :             bRet = pSelBoxes->find( pBox ) != pSelBoxes->end();
    1260             :         }
    1261             :     }
    1262             : 
    1263           0 :     return bRet;
    1264             : }
    1265             : 
    1266           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleIndex(
    1267             :             sal_Int32 nRow, sal_Int32 nColumn )
    1268             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1269             : {
    1270           0 :     sal_Int32 nRet = -1;
    1271             : 
    1272           0 :     SolarMutexGuard aGuard;
    1273             : 
    1274           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1275             : 
    1276           0 :     SwAccessibleChild aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this ));
    1277           0 :     if ( aCell.IsValid() )
    1278             :     {
    1279           0 :         nRet = GetChildIndex( *(GetMap()), aCell );
    1280             :     }
    1281             : 
    1282           0 :     return nRet;
    1283             : }
    1284             : 
    1285           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
    1286             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1287             : {
    1288           0 :     sal_Int32 nRet = -1;
    1289             : 
    1290           0 :     SolarMutexGuard aGuard;
    1291             : 
    1292           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1293             : 
    1294             :     // #i77106#
    1295           0 :     if ( ( nChildIndex < 0 ) ||
    1296           0 :          ( nChildIndex >= getAccessibleChildCount() ) )
    1297             :     {
    1298           0 :         throw lang::IndexOutOfBoundsException();
    1299             :     }
    1300             : 
    1301           0 :     SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
    1302           0 :     if ( aCell.GetSwFrm()  )
    1303             :     {
    1304           0 :         sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top();
    1305           0 :         nTop -= GetFrm()->Frm().Top();
    1306             :         Int32Set_Impl::const_iterator aRow(
    1307           0 :                 GetTableData().GetRows().lower_bound( nTop ) );
    1308             :         nRet = static_cast< sal_Int32 >( ::std::distance(
    1309           0 :                     GetTableData().GetRows().begin(), aRow ) );
    1310             :     }
    1311             :     else
    1312             :     {
    1313             :         OSL_ENSURE( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
    1314             :                 "aCell not expected to be valid.");
    1315             : 
    1316           0 :         throw lang::IndexOutOfBoundsException();
    1317             :     }
    1318             : 
    1319           0 :     return nRet;
    1320             : }
    1321             : 
    1322           0 : sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
    1323             :         sal_Int32 nChildIndex )
    1324             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1325             : {
    1326           0 :     sal_Int32 nRet = -1;
    1327             : 
    1328           0 :     SolarMutexGuard aGuard;
    1329             : 
    1330           0 :     CHECK_FOR_DEFUNC( XAccessibleTable )
    1331             : 
    1332             :     // #i77106#
    1333           0 :     if ( ( nChildIndex < 0 ) ||
    1334           0 :          ( nChildIndex >= getAccessibleChildCount() ) )
    1335             :     {
    1336           0 :         throw lang::IndexOutOfBoundsException();
    1337             :     }
    1338             : 
    1339           0 :     SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
    1340           0 :     if ( aCell.GetSwFrm()  )
    1341             :     {
    1342           0 :         sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left();
    1343           0 :         nLeft -= GetFrm()->Frm().Left();
    1344             :         Int32Set_Impl::const_iterator aCol(
    1345           0 :                 GetTableData().GetColumns().lower_bound( nLeft ) );
    1346             :         nRet = static_cast< sal_Int32 >( ::std::distance(
    1347           0 :                     GetTableData().GetColumns().begin(), aCol ) );
    1348             :     }
    1349             :     else
    1350             :     {
    1351             :         OSL_ENSURE( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
    1352             :                 "aCell not expected to be valid.");
    1353             : 
    1354           0 :         throw lang::IndexOutOfBoundsException();
    1355             :     }
    1356             : 
    1357           0 :     return nRet;
    1358             : }
    1359             : 
    1360           0 : OUString SAL_CALL SwAccessibleTable::getImplementationName()
    1361             :         throw( uno::RuntimeException, std::exception )
    1362             : {
    1363           0 :     return OUString("com.sun.star.comp.Writer.SwAccessibleTableView");
    1364             : }
    1365             : 
    1366           0 : sal_Bool SAL_CALL SwAccessibleTable::supportsService(
    1367             :         const OUString& sTestServiceName)
    1368             :     throw (uno::RuntimeException, std::exception)
    1369             : {
    1370           0 :     return cppu::supportsService(this, sTestServiceName);
    1371             : }
    1372             : 
    1373           0 : uno::Sequence< OUString > SAL_CALL SwAccessibleTable::getSupportedServiceNames()
    1374             :         throw( uno::RuntimeException, std::exception )
    1375             : {
    1376           0 :     uno::Sequence< OUString > aRet(2);
    1377           0 :     OUString* pArray = aRet.getArray();
    1378           0 :     pArray[0] = "com.sun.star.table.AccessibleTableView";
    1379           0 :     pArray[1] = OUString( sAccessibleServiceName );
    1380           0 :     return aRet;
    1381             : }
    1382             : 
    1383           9 : void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
    1384             : {
    1385           9 :     SolarMutexGuard aGuard;
    1386             : 
    1387             :     //need to update children
    1388           9 :     SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData();
    1389           9 :     if( !pNewTableData->CompareExtents( GetTableData() ) )
    1390             :     {
    1391           0 :         delete mpTableData;
    1392           0 :         mpTableData = pNewTableData;
    1393           0 :         FireTableChangeEvent(*mpTableData);
    1394             :     }
    1395           9 :     if( HasTableData() )
    1396           9 :         GetTableData().SetTablePos( GetFrm()->Frm().Pos() );
    1397             : 
    1398           9 :     SwAccessibleContext::InvalidatePosOrSize( rOldBox );
    1399           9 : }
    1400             : 
    1401           2 : void SwAccessibleTable::Dispose( sal_Bool bRecursive )
    1402             : {
    1403           2 :     SolarMutexGuard aGuard;
    1404             : 
    1405           2 :     if( GetRegisteredIn() )
    1406           2 :         GetRegisteredInNonConst()->Remove( this );
    1407             : 
    1408           2 :     SwAccessibleContext::Dispose( bRecursive );
    1409           2 : }
    1410             : 
    1411           2 : void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
    1412             :                                       sal_Bool bRecursive )
    1413             : {
    1414           2 :     SolarMutexGuard aGuard;
    1415             : 
    1416           2 :     const SwFrm *pFrm = rChildFrmOrObj.GetSwFrm();
    1417             :     OSL_ENSURE( pFrm, "frame expected" );
    1418           2 :     if( HasTableData() )
    1419             :     {
    1420           2 :         FireTableChangeEvent( GetTableData() );
    1421           2 :         ClearTableData();
    1422             :     }
    1423             : 
    1424             :     // There are two reason why this method has been called. The first one
    1425             :     // is there is no context for pFrm. The method is then called by
    1426             :     // the map, and we have to call our superclass.
    1427             :     // The other situation is that we have been call by a call to get notified
    1428             :     // about its change. We then must not call the superclass
    1429           4 :     uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrm, sal_False ) );
    1430           2 :     if( !xAcc.is() )
    1431           2 :         SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive );
    1432           2 : }
    1433             : 
    1434           0 : void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj,
    1435             :                                                   const SwRect& rOldBox )
    1436             : {
    1437           0 :     SolarMutexGuard aGuard;
    1438             : 
    1439           0 :     if( HasTableData() )
    1440             :     {
    1441             :         OSL_ENSURE( !HasTableData() ||
    1442             :                 GetFrm()->Frm().Pos() == GetTableData().GetTablePos(),
    1443             :                 "table has invalid position" );
    1444           0 :         if( HasTableData() )
    1445             :         {
    1446           0 :             SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData(); // #i77106#
    1447           0 :             if( !pNewTableData->CompareExtents( GetTableData() ) )
    1448             :             {
    1449           0 :                 if(pNewTableData->GetRowCount()!= mpTableData->GetRowCount())
    1450             :                 {
    1451           0 :                     Int32Set_Impl::const_iterator aSttCol( GetTableData().GetColumnIter( 0 ) );
    1452           0 :                     Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( 1 ) );
    1453           0 :                     const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, sal_False );
    1454           0 :                     Int32Set_Impl::const_iterator aSttCol2( pNewTableData->GetColumnIter( 0 ) );
    1455           0 :                     Int32Set_Impl::const_iterator aSttRow2( pNewTableData->GetRowIter( 0 ) );
    1456           0 :                     const SwFrm *pCellFrm2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, sal_False );
    1457             : 
    1458           0 :                     if(pCellFrm == pCellFrm2)
    1459             :                     {
    1460           0 :                         AccessibleTableModelChange aModelChange;
    1461           0 :                         aModelChange.Type = AccessibleTableModelChangeType::UPDATE;
    1462           0 :                         aModelChange.FirstRow = 0;
    1463           0 :                         aModelChange.LastRow = mpTableData->GetRowCount() - 1;
    1464           0 :                         aModelChange.FirstColumn = 0;
    1465           0 :                         aModelChange.LastColumn = mpTableData->GetColumnCount() - 1;
    1466             : 
    1467           0 :                         AccessibleEventObject aEvent;
    1468           0 :                         aEvent.EventId = AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED;
    1469           0 :                         aEvent.NewValue <<= aModelChange;
    1470             : 
    1471           0 :                         FireAccessibleEvent( aEvent );
    1472             :                     }
    1473             :                 }
    1474             :                 else
    1475           0 :                     FireTableChangeEvent( GetTableData() );
    1476           0 :                 ClearTableData();
    1477           0 :                 mpTableData = pNewTableData;
    1478             :             }
    1479             :             else
    1480             :             {
    1481           0 :                 delete pNewTableData;
    1482             :             }
    1483             :         }
    1484             :     }
    1485             : 
    1486             :     // #i013961# - always call super class method
    1487           0 :     SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox );
    1488           0 : }
    1489             : 
    1490             : // XAccessibleSelection
    1491             : 
    1492           4 : void SAL_CALL SwAccessibleTable::selectAccessibleChild(
    1493             :     sal_Int32 nChildIndex )
    1494             :     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception )
    1495             : {
    1496           4 :     SolarMutexGuard aGuard;
    1497           4 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1498             : 
    1499           4 :     if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) ) // #i77106#
    1500           0 :         throw lang::IndexOutOfBoundsException();
    1501             : 
    1502             :     // preliminaries: get 'our' table box, and get the cursor shell
    1503           4 :     const SwTableBox* pBox = GetTableBox( nChildIndex );
    1504             :     OSL_ENSURE( pBox != NULL, "We need the table box." );
    1505             : 
    1506           4 :     SwCrsrShell* pCrsrShell = GetCrsrShell();
    1507           4 :     if( pCrsrShell == NULL )
    1508           0 :         return;
    1509             : 
    1510             :     // assure, that child, indentified by the given index, isn't already selected.
    1511           4 :     if ( IsChildSelected( nChildIndex ) )
    1512             :     {
    1513           0 :         return;
    1514             :     }
    1515             : 
    1516             :     // now we can start to do the work: check whether we already have
    1517             :     // a table selection (in 'our' table). If so, extend the
    1518             :     // selection, else select the current cell.
    1519             : 
    1520             :     // if we have a selection in a table, check if it's in the
    1521             :     // same table that we're trying to select in
    1522           4 :     const SwTableNode* pSelectedTable = pCrsrShell->IsCrsrInTbl();
    1523           4 :     if( pSelectedTable != NULL )
    1524             :     {
    1525             :         // get top-most table line
    1526           3 :         const SwTableLine* pUpper = pBox->GetUpper();
    1527           6 :         while( pUpper->GetUpper() != NULL )
    1528           0 :             pUpper = pUpper->GetUpper()->GetUpper();
    1529             :         sal_uInt16 nPos =
    1530           3 :             pSelectedTable->GetTable().GetTabLines().GetPos( pUpper );
    1531           3 :         if( nPos == USHRT_MAX )
    1532           0 :             pSelectedTable = NULL;
    1533             :     }
    1534             : 
    1535             :     // create the new selection
    1536           4 :     const SwStartNode* pStartNode = pBox->GetSttNd();
    1537           4 :     if( pSelectedTable == NULL || !pCrsrShell->GetTblCrs() )
    1538             :     {
    1539           2 :         pCrsrShell->StartAction();
    1540             :         // Set cursor into current cell. This deletes any table cursor.
    1541           2 :         SwPaM aPaM( *pStartNode );
    1542           2 :         aPaM.Move( fnMoveForward, fnGoNode );
    1543           2 :         Select( aPaM );
    1544             :         // Move cursor to the end of the table creating a selection and a table
    1545             :         // cursor.
    1546           2 :         pCrsrShell->SetMark();
    1547           2 :         pCrsrShell->MoveTable( fnTableCurr, fnTableEnd );
    1548             :         // now set the cursor into the cell again.
    1549           2 :         SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
    1550           2 :                                                     : pCrsrShell->GetCrsr();
    1551           2 :         *pPaM->GetPoint() = *pPaM->GetMark();
    1552           2 :         pCrsrShell->EndAction();
    1553             :         // we now have one cell selected!
    1554             :     }
    1555             :     else
    1556             :     {
    1557             :         // if the cursor is already in this table,
    1558             :         // expand the current selection (i.e., set
    1559             :         // point to new position; keep mark)
    1560           2 :         SwPaM aPaM( *pStartNode );
    1561           2 :         aPaM.Move( fnMoveForward, fnGoNode );
    1562           2 :         aPaM.SetMark();
    1563           2 :         const SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
    1564           2 :                                                     : pCrsrShell->GetCrsr();
    1565           2 :         *(aPaM.GetMark()) = *pPaM->GetMark();
    1566           2 :         Select( aPaM );
    1567             : 
    1568           4 :     }
    1569             : }
    1570             : 
    1571           0 : sal_Bool SAL_CALL SwAccessibleTable::isAccessibleChildSelected(
    1572             :     sal_Int32 nChildIndex )
    1573             :     throw ( lang::IndexOutOfBoundsException,
    1574             :             uno::RuntimeException, std::exception )
    1575             : {
    1576           0 :     SolarMutexGuard aGuard;
    1577           0 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1578             : 
    1579           0 :     if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) ) // #i77106#
    1580           0 :         throw lang::IndexOutOfBoundsException();
    1581             : 
    1582           0 :     return IsChildSelected( nChildIndex );
    1583             : }
    1584             : 
    1585           2 : void SAL_CALL SwAccessibleTable::clearAccessibleSelection(  )
    1586             :     throw ( uno::RuntimeException, std::exception )
    1587             : {
    1588           2 :     SolarMutexGuard aGuard;
    1589             : 
    1590           2 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1591             : 
    1592           2 :     SwCrsrShell* pCrsrShell = GetCrsrShell();
    1593           2 :     if( pCrsrShell != NULL )
    1594             :     {
    1595           2 :         pCrsrShell->StartAction();
    1596           2 :         pCrsrShell->ClearMark();
    1597           2 :         pCrsrShell->EndAction();
    1598           2 :     }
    1599           2 : }
    1600             : 
    1601           2 : void SAL_CALL SwAccessibleTable::selectAllAccessibleChildren(  )
    1602             :     throw ( uno::RuntimeException, std::exception )
    1603             : {
    1604             :     // first clear selection, then select first and last child
    1605           2 :     clearAccessibleSelection();
    1606           2 :     selectAccessibleChild( 0 );
    1607           2 :     selectAccessibleChild( getAccessibleChildCount()-1 ); // #i77106#
    1608           2 : }
    1609             : 
    1610           0 : sal_Int32 SAL_CALL SwAccessibleTable::getSelectedAccessibleChildCount(  )
    1611             :     throw ( uno::RuntimeException, std::exception )
    1612             : {
    1613           0 :     SolarMutexGuard aGuard;
    1614           0 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1615             : 
    1616             :     // iterate over all children and count isAccessibleChildSelected()
    1617           0 :     sal_Int32 nCount = 0;
    1618             : 
    1619           0 :     sal_Int32 nChildren = getAccessibleChildCount(); // #i71106#
    1620           0 :     for( sal_Int32 n = 0; n < nChildren; n++ )
    1621           0 :         if( IsChildSelected( n ) )
    1622           0 :             nCount++;
    1623             : 
    1624           0 :     return nCount;
    1625             : }
    1626             : 
    1627           0 : uno::Reference<XAccessible> SAL_CALL SwAccessibleTable::getSelectedAccessibleChild(
    1628             :     sal_Int32 nSelectedChildIndex )
    1629             :     throw ( lang::IndexOutOfBoundsException,
    1630             :             uno::RuntimeException, std::exception)
    1631             : {
    1632           0 :     SolarMutexGuard aGuard;
    1633           0 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1634             : 
    1635             :     // parameter checking (part 1): index lower 0
    1636           0 :     if( nSelectedChildIndex < 0 )
    1637           0 :         throw lang::IndexOutOfBoundsException();
    1638             : 
    1639           0 :     sal_Int32 nChildIndex = GetIndexOfSelectedChild( nSelectedChildIndex );
    1640             : 
    1641             :     // parameter checking (part 2): index higher than selected children?
    1642           0 :     if( nChildIndex < 0 )
    1643           0 :         throw lang::IndexOutOfBoundsException();
    1644             : 
    1645             :     // #i77106#
    1646           0 :     if ( nChildIndex >= getAccessibleChildCount() )
    1647             :     {
    1648           0 :         throw lang::IndexOutOfBoundsException();
    1649             :     }
    1650             : 
    1651           0 :     return getAccessibleChild( nChildIndex );
    1652             : }
    1653             : 
    1654             : // index has to be treated as global child index.
    1655           0 : void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
    1656             :     sal_Int32 nChildIndex )
    1657             :     throw ( lang::IndexOutOfBoundsException,
    1658             :             uno::RuntimeException, std::exception )
    1659             : {
    1660           0 :     SolarMutexGuard aGuard;
    1661           0 :     CHECK_FOR_DEFUNC( XAccessibleTable );
    1662             : 
    1663           0 :     SwCrsrShell* pCrsrShell = GetCrsrShell();
    1664             : 
    1665             :     // index has to be treated as global child index
    1666           0 :     if ( !pCrsrShell )
    1667           0 :         throw lang::IndexOutOfBoundsException();
    1668             : 
    1669             :     // assure, that given child index is in bounds.
    1670           0 :     if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) // #i77106#
    1671           0 :         throw lang::IndexOutOfBoundsException();
    1672             : 
    1673             :     // assure, that child, identified by the given index, is selected.
    1674           0 :     if ( !IsChildSelected( nChildIndex ) )
    1675           0 :         return;
    1676             : 
    1677           0 :     const SwTableBox* pBox = GetTableBox( nChildIndex );
    1678             :     OSL_ENSURE( pBox != NULL, "We need the table box." );
    1679             : 
    1680             :     // If we unselect point, then set cursor to mark. If we clear another
    1681             :     // selected box, then set cursor to point.
    1682             :     // reduce selection to mark.
    1683           0 :     SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
    1684           0 :                                                 : pCrsrShell->GetCrsr();
    1685             :     sal_Bool bDeselectPoint =
    1686           0 :         pBox->GetSttNd() ==
    1687           0 :             pPaM->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
    1688             : 
    1689           0 :     SwPaM aPaM( bDeselectPoint ? *pPaM->GetMark() : *pPaM->GetPoint() );
    1690             : 
    1691           0 :     pCrsrShell->StartAction();
    1692             : 
    1693             :     // Set cursor into either point or mark
    1694           0 :     Select( aPaM );
    1695             :     // Move cursor to the end of the table creating a selection and a table
    1696             :     // cursor.
    1697           0 :     pCrsrShell->SetMark();
    1698           0 :     pCrsrShell->MoveTable( fnTableCurr, fnTableEnd );
    1699             :     // now set the cursor into the cell again.
    1700           0 :     pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
    1701           0 :                                         : pCrsrShell->GetCrsr();
    1702           0 :     *pPaM->GetPoint() = *pPaM->GetMark();
    1703           0 :     pCrsrShell->EndAction();
    1704             : }
    1705             : 
    1706           1 : sal_Int32 SAL_CALL SwAccessibleTable::getBackground()
    1707             :         throw (::com::sun::star::uno::RuntimeException, std::exception)
    1708             : {
    1709           1 :     const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
    1710           1 :     sal_uInt32 crBack = rBack.GetColor().GetColor();
    1711             : 
    1712           1 :     if (COL_AUTO == crBack)
    1713             :     {
    1714           1 :         uno::Reference<XAccessible> xAccDoc = getAccessibleParent();
    1715           1 :         if (xAccDoc.is())
    1716             :         {
    1717           1 :             uno::Reference<XAccessibleComponent> xCompoentDoc(xAccDoc,uno::UNO_QUERY);
    1718           1 :             if (xCompoentDoc.is())
    1719             :             {
    1720           1 :                 crBack = (sal_uInt32)xCompoentDoc->getBackground();
    1721           1 :             }
    1722           1 :         }
    1723             :     }
    1724           1 :     return crBack;
    1725             : }
    1726             : 
    1727          10 : void SwAccessibleTable::FireSelectionEvent( )
    1728             : {
    1729          10 :     AccessibleEventObject aEvent;
    1730             : 
    1731          10 :     aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
    1732             : 
    1733             : //    int nRemove = m_vecCellRemove.size();
    1734             : //    int nAdd = m_vecCellAdd.size();
    1735             : 
    1736          10 :     VEC_CELL::iterator vi = m_vecCellRemove.begin();
    1737          21 :     for (; vi != m_vecCellRemove.end()  ; ++vi)
    1738             :     {
    1739          11 :         SwAccessibleContext *pAccCell = const_cast<SwAccessibleContext *>(*vi);
    1740             :         OSL_ASSERT(pAccCell != NULL );
    1741          11 :         pAccCell->FireAccessibleEvent(aEvent);
    1742             :     }
    1743             : 
    1744          10 :     if (m_vecCellAdd.size() <= SELECTION_WITH_NUM)
    1745             :     {
    1746          10 :         aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
    1747          10 :         vi = m_vecCellAdd.begin();
    1748          29 :         for (; vi != m_vecCellAdd.end()  ; ++vi)
    1749             :         {
    1750          19 :             SwAccessibleContext *pAccCell = const_cast<SwAccessibleContext *>(*vi);
    1751             :             OSL_ASSERT(pAccCell != NULL );
    1752          19 :             pAccCell->FireAccessibleEvent(aEvent);
    1753             :         }
    1754          20 :         return ;
    1755             :     }
    1756             :     else
    1757             :     {
    1758           0 :         aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
    1759           0 :         FireAccessibleEvent(aEvent);
    1760           0 :     }
    1761             : }
    1762             : 
    1763           5 : void SwAccessibleTable::AddSelectionCell(const SwAccessibleContext* pAccCell ,sal_Bool bAddOrRemove)
    1764             : {
    1765           5 :     if (bAddOrRemove)
    1766             :     {
    1767           3 :         m_vecCellAdd.push_back(pAccCell);
    1768             :     }
    1769             :     else
    1770             :     {
    1771           2 :         m_vecCellRemove.push_back(pAccCell);
    1772             :     }
    1773           5 : }
    1774             : 
    1775             : //=====  XAccessibleTableSelection  ============================================
    1776           0 : sal_Bool SAL_CALL SwAccessibleTable::selectRow( sal_Int32 row )
    1777             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1778             : {
    1779           0 :     SolarMutexGuard g;
    1780             : 
    1781           0 :     if( isAccessibleColumnSelected( row ) )
    1782           0 :         return sal_True;
    1783             : 
    1784             :     long lCol, lColumnCount, lChildIndex;
    1785           0 :     lColumnCount = getAccessibleColumnCount();
    1786           0 :     for(lCol = 0; lCol < lColumnCount; lCol ++)
    1787             :     {
    1788           0 :         lChildIndex = getAccessibleIndex(row, lCol);
    1789           0 :         selectAccessibleChild(lChildIndex);
    1790             :     }
    1791             : 
    1792           0 :     return sal_True;
    1793             : }
    1794           0 : sal_Bool SAL_CALL SwAccessibleTable::selectColumn( sal_Int32 column )
    1795             :     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
    1796             : {
    1797           0 :     SolarMutexGuard g;
    1798             : 
    1799           0 :     if( isAccessibleColumnSelected( column ) )
    1800           0 :         return sal_True;
    1801             : 
    1802             :     long lRow, lRowCount, lChildIndex;
    1803           0 :     lRowCount = getAccessibleRowCount();
    1804             : 
    1805           0 :     for(lRow = 0; lRow < lRowCount; lRow ++)
    1806             :     {
    1807           0 :         lChildIndex = getAccessibleIndex(lRow, column);
    1808           0 :         selectAccessibleChild(lChildIndex);
    1809             :     }
    1810           0 :     return sal_True;
    1811             : }
    1812             : 
    1813           0 : sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row )
    1814             :     throw (lang::IndexOutOfBoundsException,
    1815             :            uno::RuntimeException,
    1816             :            std::exception)
    1817             : {
    1818           0 :     SolarMutexGuard g;
    1819             : 
    1820           0 :     if( isAccessibleSelected( row , 0 ) &&  isAccessibleSelected( row , getAccessibleColumnCount()-1 ) )
    1821             :     {
    1822           0 :         SwCrsrShell* pCrsrShell = GetCrsrShell();
    1823           0 :         if( pCrsrShell != NULL )
    1824             :         {
    1825           0 :             pCrsrShell->StartAction();
    1826           0 :             pCrsrShell->ClearMark();
    1827           0 :             pCrsrShell->EndAction();
    1828           0 :             return sal_True;
    1829             :         }
    1830             :     }
    1831           0 :     return sal_True;
    1832             : }
    1833             : 
    1834           0 : sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column )
    1835             :     throw (lang::IndexOutOfBoundsException,
    1836             :            uno::RuntimeException,
    1837             :            std::exception)
    1838             : {
    1839           0 :     SolarMutexGuard g;
    1840             : 
    1841           0 :     if( isAccessibleSelected( 0 , column ) &&  isAccessibleSelected( getAccessibleRowCount()-1,column))
    1842             :     {
    1843           0 :         SwCrsrShell* pCrsrShell = GetCrsrShell();
    1844           0 :         if( pCrsrShell != NULL )
    1845             :         {
    1846           0 :             pCrsrShell->StartAction();
    1847           0 :             pCrsrShell->ClearMark();
    1848           0 :             pCrsrShell->EndAction();
    1849           0 :             return sal_True;
    1850             :         }
    1851             :     }
    1852           0 :     return sal_True;
    1853             : }
    1854             : 
    1855             : // #i77106# - implementation of class <SwAccessibleTableColHeaders>
    1856           0 : SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2,
    1857             :                                                           const SwTabFrm *pTabFrm )
    1858           0 :     : SwAccessibleTable( pMap2, pTabFrm )
    1859             : {
    1860           0 :     SolarMutexGuard aGuard;
    1861             : 
    1862           0 :     const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
    1863           0 :     const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
    1864           0 :     const OUString aName = pFrmFmt->GetName() + "-ColumnHeaders";
    1865             : 
    1866           0 :     SetName( aName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) );
    1867             : 
    1868           0 :     const OUString sArg2( GetFormattedPageNumber() );
    1869             : 
    1870           0 :     SetDesc( GetResource( STR_ACCESS_TABLE_DESC, &aName, &sArg2 ) );
    1871             : 
    1872           0 :     NotRegisteredAtAccessibleMap(); // #i85634#
    1873           0 : }
    1874             : 
    1875           0 : SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
    1876             : {
    1877           0 :     const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
    1878           0 :     return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true );
    1879             : }
    1880             : 
    1881           0 : void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ )
    1882             : {
    1883           0 : }
    1884             : 
    1885             : // XInterface
    1886           0 : uno::Any SAL_CALL SwAccessibleTableColHeaders::queryInterface( const uno::Type& aType )
    1887             :         throw (uno::RuntimeException, std::exception)
    1888             : {
    1889           0 :     return SwAccessibleTable::queryInterface( aType );
    1890             : }
    1891             : 
    1892             : // XAccessibleContext
    1893           0 : sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
    1894             :         throw (uno::RuntimeException, std::exception)
    1895             : {
    1896           0 :     SolarMutexGuard aGuard;
    1897             : 
    1898           0 :     CHECK_FOR_DEFUNC( XAccessibleContext )
    1899             : 
    1900           0 :     sal_Int32 nCount = 0;
    1901             : 
    1902           0 :     const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
    1903           0 :     const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) );
    1904           0 :     SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
    1905           0 :     while( aIter != aVisList.end() )
    1906             :     {
    1907           0 :         const SwAccessibleChild& rLower = *aIter;
    1908           0 :         if( rLower.IsAccessible( IsInPagePreview() ) )
    1909             :         {
    1910           0 :             nCount++;
    1911             :         }
    1912           0 :         else if( rLower.GetSwFrm() )
    1913             :         {
    1914             :             // There are no unaccessible SdrObjects that count
    1915           0 :             if ( !rLower.GetSwFrm()->IsRowFrm() ||
    1916           0 :                  pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) )
    1917             :             {
    1918           0 :                 nCount += SwAccessibleFrame::GetChildCount( *(GetMap()),
    1919           0 :                                                             GetVisArea(),
    1920             :                                                             rLower.GetSwFrm(),
    1921           0 :                                                             IsInPagePreview() );
    1922             :             }
    1923             :         }
    1924           0 :         ++aIter;
    1925             :     }
    1926             : 
    1927           0 :     return nCount;
    1928             : }
    1929             : 
    1930             : uno::Reference< XAccessible> SAL_CALL
    1931           0 :         SwAccessibleTableColHeaders::getAccessibleChild (sal_Int32 nIndex)
    1932             :         throw (uno::RuntimeException, lang::IndexOutOfBoundsException, std::exception)
    1933             : {
    1934           0 :     if ( nIndex < 0 || nIndex >= getAccessibleChildCount() )
    1935             :     {
    1936           0 :         throw lang::IndexOutOfBoundsException();
    1937             :     }
    1938             : 
    1939           0 :     return SwAccessibleTable::getAccessibleChild( nIndex );
    1940             : }
    1941             : 
    1942             : // XAccessibleTable
    1943             : uno::Reference< XAccessibleTable >
    1944           0 :         SAL_CALL SwAccessibleTableColHeaders::getAccessibleRowHeaders()
    1945             :         throw (uno::RuntimeException, std::exception)
    1946             : {
    1947           0 :     return uno::Reference< XAccessibleTable >();
    1948             : }
    1949             : 
    1950             : uno::Reference< XAccessibleTable >
    1951           0 :         SAL_CALL SwAccessibleTableColHeaders::getAccessibleColumnHeaders()
    1952             :         throw (uno::RuntimeException, std::exception)
    1953             : {
    1954           0 :     return uno::Reference< XAccessibleTable >();
    1955             : }
    1956             : 
    1957             : // XServiceInfo
    1958             : 
    1959           0 : OUString SAL_CALL SwAccessibleTableColHeaders::getImplementationName (void)
    1960             :         throw (uno::RuntimeException, std::exception)
    1961             : {
    1962             :     static const sal_Char sImplName[] = "com.sun.star.comp.Writer.SwAccessibleTableColumnHeadersView";
    1963           0 :     return OUString(sImplName);
    1964             : }
    1965             : 
    1966             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10