LibreOffice Module svx (master) 1
accessibletableshape.cxx
Go to the documentation of this file.
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
21#include <com/sun/star/table/XMergeableCell.hpp>
22#include <com/sun/star/accessibility/AccessibleEventId.hpp>
23#include <com/sun/star/accessibility/AccessibleStateType.hpp>
24#include <com/sun/star/accessibility/AccessibleRole.hpp>
25#include <com/sun/star/drawing/XShape.hpp>
26#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
27
29#include <vcl/svapp.hxx>
30
33#include "accessiblecell.hxx"
34#include <cell.hxx>
35
36#include <algorithm>
37#include <unordered_map>
38
40#include <svx/svdotable.hxx>
41#include <com/sun/star/view/XSelectionSupplier.hpp>
42
43
44using namespace ::accessibility;
45using namespace sdr::table;
46using namespace ::com::sun::star::accessibility;
47using namespace ::com::sun::star::uno;
48using namespace ::com::sun::star::beans;
49using namespace ::com::sun::star::util;
50using namespace ::com::sun::star::lang;
51using namespace ::com::sun::star::drawing;
52using namespace ::com::sun::star::table;
53using namespace ::com::sun::star::container;
54
55namespace accessibility
56{
57
58typedef std::unordered_map< Reference< XCell >, rtl::Reference< AccessibleCell > > AccessibleCellMap;
59
60class AccessibleTableShapeImpl : public cppu::WeakImplHelper< XModifyListener >
61{
62public:
63 explicit AccessibleTableShapeImpl( AccessibleShapeTreeInfo& rShapeTreeInfo );
64
65 void init( const Reference< XAccessible>& xAccessible, const Reference< XTable >& xTable );
66 void dispose();
67
70 Reference< XAccessible > getAccessibleChild(sal_Int64 i);
72 void getColumnAndRow( sal_Int64 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow );
73
74 // XModifyListener
75 virtual void SAL_CALL modified( const EventObject& aEvent ) override;
76
77 // XEventListener
78 virtual void SAL_CALL disposing( const EventObject& Source ) override;
79
81 Reference< XTable > mxTable;
83 Reference< XAccessible> mxAccessible;
84 sal_Int32 mRowCount, mColCount;
85 //get the cached AccessibleCell from XCell
86 rtl::Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell);
89 rtl::Reference< AccessibleCell > getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn);
90};
91
92
94: mrShapeTreeInfo( rShapeTreeInfo )
95, mRowCount(0)
96, mColCount(0)
97{
98}
99
100
101void AccessibleTableShapeImpl::init( const Reference< XAccessible>& xAccessible, const Reference< XTable >& xTable )
102{
103 mxAccessible = xAccessible;
104 mxTable = xTable;
105
106 if( mxTable.is() )
107 {
108 Reference< XModifyListener > xListener( this );
109 mxTable->addModifyListener( xListener );
110 //register the listener with table model
111 Reference< css::view::XSelectionSupplier > xSelSupplier(xTable, UNO_QUERY);
112 Reference< css::view::XSelectionChangeListener > xSelListener( xAccessible, UNO_QUERY );
113 if (xSelSupplier.is())
114 xSelSupplier->addSelectionChangeListener(xSelListener);
115 mRowCount = mxTable->getRowCount();
116 mColCount = mxTable->getColumnCount();
117 }
118}
119
120
122{
123 if( mxTable.is() )
124 {
125 //remove all the cell's acc object in table's dispose.
126 for( auto& rEntry : maChildMap )
127 {
128 rEntry.second->dispose();
129 }
130 maChildMap.clear();
131 Reference< XModifyListener > xListener( this );
132 mxTable->removeModifyListener( xListener );
133 mxTable.clear();
134 }
135 mxAccessible.clear();
136}
137
138
139//get the cached AccessibleCell from XCell
141{
142 AccessibleCellMap::iterator iter( maChildMap.find( xCell ) );
143
144 if( iter != maChildMap.end() )
145 {
146 rtl::Reference< AccessibleCell > xChild( (*iter).second );
147 return xChild;
148 }
150}
151
153{
154 Reference< XCell > xCell( mxTable->getCellByPosition( nColumn, nRow ) );
156
157 if( !xChild.is() && mxTable.is() )
158 {
159 sal_Int32 nChildIndex = mxTable->getColumnCount() * nRow + nColumn;
160 CellRef xCellRef( dynamic_cast< Cell* >( xCell.get() ) );
161
162 rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCellRef, nChildIndex, mrShapeTreeInfo ) );
163
164 xAccessibleCell->Init();
165 maChildMap[xCell] = xAccessibleCell;
166
167 xChild = xAccessibleCell;
168 }
169 return xChild;
170}
171
172
173Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int64 nChildIndex)
174{
175 sal_Int32 nColumn = 0, nRow = 0;
176 getColumnAndRow( nChildIndex, nColumn, nRow );
177
178 Reference< XCell > xCell( mxTable->getCellByPosition( nColumn, nRow ) );
179 AccessibleCellMap::iterator iter( maChildMap.find( xCell ) );
180
181 if( iter != maChildMap.end() )
182 {
183 Reference< XAccessible > xChild( (*iter).second );
184 return xChild;
185 }
186 else
187 {
188 CellRef xCellRef( dynamic_cast< Cell* >( xCell.get() ) );
189
190 rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCellRef, nChildIndex, mrShapeTreeInfo ) );
191
192 xAccessibleCell->Init();
193 maChildMap[xCell] = xAccessibleCell;
194
195 return xAccessibleCell;
196 }
197}
198
199
200void AccessibleTableShapeImpl::getColumnAndRow( sal_Int64 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow )
201{
202 if( mxTable.is() )
203 {
204 const sal_Int32 nColumnCount = mxTable->getColumnCount();
205 if (nColumnCount == 0)
206 throw IndexOutOfBoundsException();
207
208 rnColumn = nChildIndex % nColumnCount;
209 rnRow = nChildIndex / nColumnCount;
210
211 if( rnRow < mxTable->getRowCount() )
212 return;
213 }
214
215 throw IndexOutOfBoundsException();
216}
217
218// XModifyListener
219void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ )
220{
221 if( !mxTable.is() )
222 return;
223
224 try
225 {
226 // structural changes may have happened to the table, validate all accessible cell instances
227 AccessibleCellMap aTempChildMap;
228 aTempChildMap.swap( maChildMap );
229
230 // first move all still existing cells to maChildMap again and update their index
231
232 const sal_Int32 nRowCount = mxTable->getRowCount();
233 const sal_Int32 nColCount = mxTable->getColumnCount();
234
235 bool bRowOrColumnChanged = false;
236 if (mRowCount != nRowCount || mColCount != nColCount )
237 {
238 bRowOrColumnChanged = true;
239 mRowCount = nRowCount;
240 mColCount = nColCount;
241 }
242 sal_Int32 nChildIndex = 0;
243
244 for( sal_Int32 nRow = 0; nRow < nRowCount; ++nRow )
245 {
246 for( sal_Int32 nCol = 0; nCol < nColCount; ++nCol )
247 {
248 Reference< XCell > xCell( mxTable->getCellByPosition( nCol, nRow ) );
249 AccessibleCellMap::iterator iter( aTempChildMap.find( xCell ) );
250
251 if( iter != aTempChildMap.end() )
252 {
253 rtl::Reference< AccessibleCell > xAccessibleCell( (*iter).second );
254 xAccessibleCell->setIndexInParent( nChildIndex );
255 xAccessibleCell->UpdateChildren();
256 // If row or column count is changed, there is split or merge, so all cell's acc name should be updated
257 if (bRowOrColumnChanged)
258 {
259 xAccessibleCell->SetAccessibleName(xAccessibleCell->getAccessibleName(), AccessibleContextBase::ManuallySet);
260 }
261 // For merged cell, add invisible & disabled state.
262 Reference< XMergeableCell > xMergedCell( mxTable->getCellByPosition( nCol, nRow ), UNO_QUERY );
263 if (xMergedCell.is() && xMergedCell->isMerged())
264 {
265 xAccessibleCell->ResetState(AccessibleStateType::VISIBLE);
266 xAccessibleCell->ResetState(AccessibleStateType::ENABLED);
267 // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
268 // xAccessibleCell->SetState(AccessibleStateType::OFFSCREEN);
269 xAccessibleCell->ResetState(AccessibleStateType::SHOWING);
270 }
271 else
272 {
273 xAccessibleCell->SetState(AccessibleStateType::VISIBLE);
274 xAccessibleCell->SetState(AccessibleStateType::ENABLED);
275 // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
276 // xAccessibleCell->ResetState(AccessibleStateType::OFFSCREEN);
277 xAccessibleCell->SetState(AccessibleStateType::SHOWING);
278 }
279
280 // move still existing cell from temporary child map to our child map
281 maChildMap[xCell] = xAccessibleCell;
282 aTempChildMap.erase( iter );
283 }
284 else
285 {
286 CellRef xCellRef( dynamic_cast< Cell* >( xCell.get() ) );
287
288 rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCellRef, nChildIndex, mrShapeTreeInfo ) );
289
290 xAccessibleCell->Init();
291 maChildMap[xCell] = xAccessibleCell;
292 }
293
294 ++nChildIndex;
295 }
296 }
297
298 // all accessible cell instances still left in aTempChildMap must be disposed
299 // as they are no longer part of the table
300
301 for( auto& rEntry : aTempChildMap )
302 {
303 rEntry.second->dispose();
304 }
305 //notify bridge to update the acc cache.
306 AccessibleTableShape *pAccTable = dynamic_cast <AccessibleTableShape *> (mxAccessible.get());
307 if (pAccTable)
308 pAccTable->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any(), -1);
309 }
310 catch( const Exception& )
311 {
312 TOOLS_WARN_EXCEPTION("svx.table", "");
313 }
314}
315
316// XEventListener
317void SAL_CALL AccessibleTableShapeImpl::disposing( const EventObject& /*Source*/ )
318{
319}
320
322: AccessibleTableShape_Base(rShapeInfo, rShapeTreeInfo)
323, mnPreviousSelectionCount(0)
324, mxImpl( new AccessibleTableShapeImpl( maShapeTreeInfo ) )
325{
326}
327
328
330{
331}
332
333
335{
336 try
337 {
338 Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
339 Reference< XTable > xTable( xSet->getPropertyValue("Model"), UNO_QUERY_THROW );
340
341 mxImpl->init( this, xTable );
342 }
343 catch( Exception& )
344 {
345 TOOLS_WARN_EXCEPTION("svx.table", "");
346 }
347
348 AccessibleTableShape_Base::Init();
349}
350
351
353{
354 SdrView* pView = maShapeTreeInfo.GetSdrView ();
355 if( pView )
356 return dynamic_cast< SvxTableController* >( pView->getSelectionController().get() );
357 else
358 return nullptr;
359}
360
361
362// XInterface
363
364
366{
368 {
369 Reference<XAccessibleTableSelection> xThis( this );
370 Any aRet;
371 aRet <<= xThis;
372 return aRet;
373 }
374 else
375 return AccessibleTableShape_Base::queryInterface( aType );
376}
377
378
379void SAL_CALL AccessibleTableShape::acquire( ) noexcept
380{
381 AccessibleTableShape_Base::acquire();
382}
383
384
385void SAL_CALL AccessibleTableShape::release( ) noexcept
386{
387 AccessibleTableShape_Base::release();
388}
389
390
391// XAccessible
392
393
395{
396 return "com.sun.star.comp.accessibility.AccessibleTableShape";
397}
398
399
401{
402 return "TableShape";
403}
404
405
407{
408 SolarMutexGuard aSolarGuard;
409 return mxImpl->mxTable.is() ? static_cast<sal_Int64>(mxImpl->mxTable->getRowCount()) * static_cast<sal_Int64>(mxImpl->mxTable->getColumnCount()) : 0;
410}
411
412
413Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleChild( sal_Int64 i )
414{
415 SolarMutexGuard aSolarGuard;
416 ThrowIfDisposed();
417
418 return mxImpl->getAccessibleChild( i );
419}
420
421
423{
424 return AccessibleRole::TABLE;
425}
426
427
429{
430 mxImpl->dispose();
431
432 // let the base do its stuff
434}
435
436
437// XAccessibleTable
438
439
441{
442 SolarMutexGuard aSolarGuard;
443 return mxImpl->mxTable.is() ? mxImpl->mxTable->getRowCount() : 0;
444}
445
446
448{
449 SolarMutexGuard aSolarGuard;
450 return mxImpl->mxTable.is() ? mxImpl->mxTable->getColumnCount() : 0;
451}
452
453
454OUString SAL_CALL AccessibleTableShape::getAccessibleRowDescription( sal_Int32 nRow )
455{
456 checkCellPosition( 0, nRow );
457 return OUString();
458}
459
460
461OUString SAL_CALL AccessibleTableShape::getAccessibleColumnDescription( sal_Int32 nColumn )
462{
463 SolarMutexGuard aSolarGuard;
464 checkCellPosition( nColumn, 0 );
465 return OUString();
466}
467
468
469sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
470{
471 SolarMutexGuard aSolarGuard;
472 checkCellPosition( nColumn, nRow );
473 if( mxImpl->mxTable.is() )
474 {
475 Reference< XMergeableCell > xCell( mxImpl->mxTable->getCellByPosition( nColumn, nRow ), UNO_QUERY );
476 if( xCell.is() )
477 return xCell->getRowSpan();
478 }
479 return 1;
480}
481
482
483sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
484{
485 SolarMutexGuard aSolarGuard;
486 checkCellPosition( nColumn, nRow );
487 if( mxImpl->mxTable.is() )
488 {
489 Reference< XMergeableCell > xCell( mxImpl->mxTable->getCellByPosition( nColumn, nRow ), UNO_QUERY );
490 if( xCell.is() )
491 return xCell->getColumnSpan();
492 }
493 return 1;
494}
495
496
497Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleRowHeaders( )
498{
499 Reference< XAccessibleTable > xRet;
500 SvxTableController* pController = getTableController();
501 if( pController )
502 {
503 if( pController->isRowHeader() )
504 {
505 xRet = new AccessibleTableHeaderShape( this, true );
506 }
507 }
508 return xRet;
509}
510
511
512Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleColumnHeaders( )
513{
514 Reference< XAccessibleTable > xRet;
515 SvxTableController* pController = getTableController();
516 if( pController )
517 {
518 if( pController->isColumnHeader() )
519 {
520 xRet = new AccessibleTableHeaderShape( this, false );
521 }
522 }
523 return xRet;
524}
525
526
527Sequence< sal_Int32 > SAL_CALL AccessibleTableShape::getSelectedAccessibleRows( )
528{
529 sal_Int32 nRow = getAccessibleRowCount();
530 ::std::vector<bool> aSelected( nRow, true );
531 sal_Int32 nCount = nRow;
532 for( sal_Int32 i = 0; i < nRow; i++ )
533 {
534 try
535 {
536 aSelected[i] = isAccessibleRowSelected( i );
537 }
538 catch( ... )
539 {
540 return Sequence< sal_Int32 >();
541 }
542
543 if( !aSelected[i] )
544 nCount--;
545 }
546 Sequence < sal_Int32 > aRet( nCount );
547 sal_Int32 *pRet = aRet.getArray();
548 sal_Int32 nPos = 0;
549 size_t nSize = aSelected.size();
550 for( size_t i=0; i < nSize && nPos < nCount; i++ )
551 {
552 if( aSelected[i] )
553 {
554 *pRet++ = i;
555 nPos++;
556 }
557 }
558
559 return aRet;
560}
561
562
564{
565 sal_Int32 nColumn = getAccessibleColumnCount();
566 ::std::vector<bool> aSelected( nColumn, true );
567 sal_Int32 nCount = nColumn;
568 for( sal_Int32 i = 0; i < nColumn; i++ )
569 {
570 try
571 {
572 aSelected[i] = isAccessibleColumnSelected( i );
573 }
574 catch( ... )
575 {
576 return Sequence< sal_Int32 >();
577 }
578
579 if( !aSelected[i] )
580 nCount--;
581 }
582 Sequence < sal_Int32 > aRet( nCount );
583 sal_Int32 *pRet = aRet.getArray();
584 sal_Int32 nPos = 0;
585 size_t nSize = aSelected.size();
586 for( size_t i=0; i < nSize && nPos < nCount; i++ )
587 {
588 if( aSelected[i] )
589 {
590 *pRet++ = i;
591 nPos++;
592 }
593 }
594
595 return aRet;
596}
597
598
600{
601 SolarMutexGuard aSolarGuard;
602 checkCellPosition( 0, nRow );
603 SvxTableController* pController = getTableController();
604 if( pController )
605 {
606 return pController->isRowSelected( nRow );
607 }
608 return false;
609}
610
611
613{
614 SolarMutexGuard aSolarGuard;
615 checkCellPosition( nColumn, 0 );
616 SvxTableController* pController = getTableController();
617 if( pController )
618 {
619 return pController->isColumnSelected( nColumn );
620 }
621 return false;
622}
623
624
625Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
626{
627 SolarMutexGuard aSolarGuard;
628 checkCellPosition( nColumn, nRow );
629
630 sal_Int32 nChildIndex = 0;
631 if( mxImpl->mxTable.is() )
632 nChildIndex = mxImpl->mxTable->getColumnCount() * nRow + nColumn;
633
634 return getAccessibleChild( nChildIndex );
635}
636
637
638Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCaption( )
639{
640 Reference< XAccessible > xRet;
641 return xRet;
642}
643
644
645Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleSummary( )
646{
647 Reference< XAccessible > xRet;
648 return xRet;
649}
650
651
652sal_Bool SAL_CALL AccessibleTableShape::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
653{
654 SolarMutexGuard aSolarGuard;
655 checkCellPosition( nColumn, nRow );
656
657 SvxTableController* pController = getTableController();
658 if( pController && pController->hasSelectedCells() )
659 {
660 CellPos aFirstPos, aLastPos;
661 pController->getSelectedCells( aFirstPos, aLastPos );
662 if( (aFirstPos.mnRow <= nRow) && (aFirstPos.mnCol <= nColumn) && (nRow <= aLastPos.mnRow) && (nColumn <= aLastPos.mnCol) )
663 return true;
664 }
665
666 return false;
667}
668
669
670sal_Int64 SAL_CALL AccessibleTableShape::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
671{
672 SolarMutexGuard aSolarGuard;
673 checkCellPosition( nColumn, nRow );
674 return mxImpl->mxTable.is() ? (static_cast<sal_Int64>(nRow) * static_cast<sal_Int64>(mxImpl->mxTable->getColumnCount()) + nColumn) : 0;
675}
676
677
678sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRow( sal_Int64 nChildIndex )
679{
680 SolarMutexGuard aSolarGuard;
681 sal_Int32 nColumn = 0, nRow = 0;
682 mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow );
683 return nRow;
684}
685
686
687sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int64 nChildIndex )
688{
689 SolarMutexGuard aSolarGuard;
690 sal_Int32 nColumn = 0, nRow = 0;
691 mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow );
692 return nColumn;
693}
694
695
696// XAccessibleSelection
697
698
699void SAL_CALL AccessibleTableShape::selectAccessibleChild( sal_Int64 nChildIndex )
700{
701 SolarMutexGuard aSolarGuard;
702 CellPos aPos;
703 mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow );
704
705 // todo, select table shape?!?
706 SvxTableController* pController = getTableController();
707 if( !pController )
708 return;
709
710 CellPos aFirstPos( aPos ), aLastPos( aPos );
711 if( pController->hasSelectedCells() )
712 {
713 pController->getSelectedCells( aFirstPos, aLastPos );
714
715 aFirstPos.mnRow = std::min( aFirstPos.mnRow, aPos.mnRow );
716 aFirstPos.mnCol = std::min( aFirstPos.mnCol, aPos.mnCol );
717 aLastPos.mnRow = std::max( aLastPos.mnRow, aPos.mnRow );
718 aLastPos.mnCol = std::max( aLastPos.mnCol, aPos.mnCol );
719 }
720 pController->setSelectedCells( aFirstPos, aLastPos );
721}
722
723
725{
726 SolarMutexGuard aSolarGuard;
727
728 if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
729 throw IndexOutOfBoundsException();
730
731 CellPos aPos;
732 mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow );
733
734 return isAccessibleSelected(aPos.mnRow, aPos.mnCol);
735}
736
737
739{
740 SolarMutexGuard aSolarGuard;
741
742 SvxTableController* pController = getTableController();
743 if( pController )
744 pController->clearSelection();
745}
746
747
749{
750 SolarMutexGuard aSolarGuard;
751
752 // todo: force selection of shape?
753 SvxTableController* pController = getTableController();
754 if( pController )
755 pController->selectAll();
756}
757
758
760{
761 SolarMutexGuard aSolarGuard;
762
763 SvxTableController* pController = getTableController();
764 if( pController && pController->hasSelectedCells() )
765 {
766 CellPos aFirstPos, aLastPos;
767 pController->getSelectedCells( aFirstPos, aLastPos );
768
769 const sal_Int32 nSelectedColumns = std::max( sal_Int32(0), aLastPos.mnCol - aFirstPos.mnCol ) + 1;
770 const sal_Int32 nSelectedRows = std::max( sal_Int32(0), aLastPos.mnRow - aFirstPos.mnRow ) + 1;
771 return static_cast<sal_Int64>(nSelectedRows) * static_cast<sal_Int64>(nSelectedColumns);
772 }
773
774 return 0;
775}
776
777
778Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex )
779{
780 SolarMutexGuard aSolarGuard;
781
782 if( nSelectedChildIndex < 0 )
783 throw IndexOutOfBoundsException();
784
785 sal_Int64 nChildIndex = GetIndexOfSelectedChild( nSelectedChildIndex );
786
787 if( nChildIndex < 0 )
788 throw IndexOutOfBoundsException();
789
790 if ( nChildIndex >= getAccessibleChildCount() )
791 {
792 throw IndexOutOfBoundsException();
793 }
794
795 return getAccessibleChild( nChildIndex );
796}
797
798
799void SAL_CALL AccessibleTableShape::deselectAccessibleChild( sal_Int64 nChildIndex )
800{
801 SolarMutexGuard aSolarGuard;
802 CellPos aPos;
803 mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow );
804
805 // todo, select table shape?!?
806 SvxTableController* pController = getTableController();
807 if( !(pController && pController->hasSelectedCells()) )
808 return;
809
810 CellPos aFirstPos, aLastPos;
811 pController->getSelectedCells( aFirstPos, aLastPos );
812
813 // create a selection where aPos is not part of anymore
814 aFirstPos.mnRow = std::min( aFirstPos.mnRow, aPos.mnRow+1 );
815 aFirstPos.mnCol = std::min( aFirstPos.mnCol, aPos.mnCol+1 );
816 aLastPos.mnRow = std::max( aLastPos.mnRow, aPos.mnRow-1 );
817 aLastPos.mnCol = std::max( aLastPos.mnCol, aPos.mnCol-1 );
818
819 // new selection may be invalid (child to deselect is not at a border of the selection but in between)
820 if( (aFirstPos.mnRow > aLastPos.mnRow) || (aFirstPos.mnCol > aLastPos.mnCol) )
821 pController->clearSelection(); // if selection is invalid, clear all
822 else
823 pController->setSelectedCells( aFirstPos, aLastPos );
824}
825
826// XAccessibleTableSelection
828{
829 SolarMutexGuard aSolarGuard;
830 SvxTableController* pController = getTableController();
831 if( !pController )
832 return false;
833 return pController->selectRow( row );
834}
835
837{
838 SolarMutexGuard aSolarGuard;
839 SvxTableController* pController = getTableController();
840 if( !pController )
841 return false;
842 return pController->selectColumn( column );
843}
844
846{
847 SolarMutexGuard aSolarGuard;
848 SvxTableController* pController = getTableController();
849 if( !pController )
850 return false;
851 return pController->deselectRow( row );
852}
853
855{
856 SolarMutexGuard aSolarGuard;
857 SvxTableController* pController = getTableController();
858 if( !pController )
859 return false;
860 return pController->deselectColumn( column );
861}
862
864 sal_Int64 nSelectedChildIndex ) const
865{
866 sal_Int64 nChildren = const_cast<AccessibleTableShape*>(this)->getAccessibleChildCount();
867
868 if( nSelectedChildIndex >= nChildren )
869 return -1;
870
871 sal_Int64 n = 0;
872 while( n < nChildren )
873 {
874 if( const_cast<AccessibleTableShape*>(this)->isAccessibleChildSelected( n ) )
875 {
876 if( 0 == nSelectedChildIndex )
877 break;
878 else
879 --nSelectedChildIndex;
880 }
881 ++n;
882 }
883
884 return n < nChildren ? n : -1;
885}
886void AccessibleTableShape::getColumnAndRow( sal_Int64 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow )
887{
888 mxImpl->getColumnAndRow(nChildIndex, rnColumn, rnRow);
889}
890
891// XSelectionChangeListener
892void SAL_CALL
893 AccessibleTableShape::disposing (const EventObject& aEvent)
894{
896}
897void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent)
898{
899 //sdr::table::CellRef xCellRef = static_cast< sdr::table::CellRef > (rEvent.Source);
900 Reference< XCell > xCell(rEvent.Source, UNO_QUERY);
901 if (!xCell.is())
902 return;
903
904 rtl::Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell );
905 if (!xAccCell.is())
906 return;
907
908 sal_Int64 nIndex = xAccCell->getAccessibleIndexInParent(),
910 bool bSelected = isAccessibleChildSelected(nIndex);
911 if (mnPreviousSelectionCount == 0 && nCount > 0 && bSelected)
912 {
913 xAccCell->SetState(AccessibleStateType::SELECTED);
914 xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED, Any(), Any(), -1);
915 }
916 else if (bSelected)
917 {
918 xAccCell->SetState(AccessibleStateType::SELECTED);
919 xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD, Any(), Any(), -1);
920 }
921 else
922 {
923 xAccCell->ResetState(AccessibleStateType::SELECTED);
924 xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE, Any(), Any(), -1);
925 }
927}
928// Get the currently active cell which is text editing
930{
932 AccessibleCell* pAccCell = nullptr;
933 SvxTableController* pController = getTableController();
934 if (pController)
935 {
936 sdr::table::SdrTableObj* pTableObj = pController->GetTableObj();
937 if ( pTableObj )
938 {
939 const sdr::table::CellRef& xCellRef (pTableObj->getActiveCell());
940 if ( xCellRef.is() )
941 {
942 try
943 {
944 CellPos rPos;
945 pTableObj->getActiveCellPos( rPos );
946 xAccCell = mxImpl->getAccessibleCell( rPos.mnRow, rPos.mnCol );
947 if ( xAccCell.is() )
948 pAccCell = xAccCell.get();
949 }
950 catch ( IndexOutOfBoundsException& ) {}
951 }
952 }
953 }
954 return pAccCell;
955}
956
957//If current active cell is in editing, the focus state should be set to internal text
958bool AccessibleTableShape::SetState (sal_Int64 aState)
959{
960 if( aState == AccessibleStateType::FOCUSED )
961 {
962 AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
963 if( pActiveAccessibleCell != nullptr )
964 return pActiveAccessibleCell->SetState(aState);
965 }
966
967 return AccessibleShape::SetState (aState);
968}
969
970//If current active cell is in editing, the focus state should be reset to internal text
971bool AccessibleTableShape::ResetState (sal_Int64 aState)
972{
973 if( aState == AccessibleStateType::FOCUSED )
974 {
975 AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
976 if( pActiveAccessibleCell != nullptr )
977 return pActiveAccessibleCell->ResetState(aState);
978 }
979
980 return AccessibleShape::ResetState (aState);
981}
982
984{
985 return AccessibleContextBase::SetState (aState);
986}
987
989{
990 return AccessibleContextBase::ResetState (aState);
991}
992
993void AccessibleTableShape::checkCellPosition( sal_Int32 nCol, sal_Int32 nRow )
994{
995 if( (nCol >= 0) && (nRow >= 0) && mxImpl->mxTable.is() && (nCol < mxImpl->mxTable->getColumnCount()) && (nRow < mxImpl->mxTable->getRowCount()) )
996 return;
997
998 throw IndexOutOfBoundsException();
999}
1000
1002{
1003 mpTable = pTable;
1004 mbRow = bRow;
1005}
1006
1008{
1009 mpTable = nullptr;
1010}
1011
1012// XAccessible
1013Reference< XAccessibleContext > SAL_CALL AccessibleTableHeaderShape::getAccessibleContext()
1014{
1015 return this;
1016}
1017
1018// XAccessibleContext
1020{
1021 return static_cast<sal_Int64>(getAccessibleRowCount()) * static_cast<sal_Int64>(getAccessibleColumnCount());
1022}
1023
1024Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleChild( sal_Int64 i )
1025{
1026 return mpTable->getAccessibleChild( i );
1027}
1028
1029Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleParent()
1030{
1031 Reference< XAccessible > XParent;
1032 return XParent;
1033}
1034
1036{
1037 return -1;
1038}
1039
1041{
1042 return mpTable->getAccessibleRole();
1043}
1044
1046{
1047 return mpTable->getAccessibleDescription();
1048}
1049
1051{
1052 return mpTable->getAccessibleName();
1053}
1054
1056{
1057 return mpTable->getAccessibleStateSet();
1058}
1059
1060Reference< XAccessibleRelationSet > SAL_CALL AccessibleTableHeaderShape::getAccessibleRelationSet()
1061{
1062 return mpTable->getAccessibleRelationSet();
1063}
1064
1066{
1067 return mpTable->getLocale();
1068}
1069
1070//XAccessibleComponent
1071sal_Bool SAL_CALL AccessibleTableHeaderShape::containsPoint ( const css::awt::Point& aPoint )
1072{
1073 return mpTable->containsPoint( aPoint );
1074}
1075
1076Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleAtPoint ( const css::awt::Point& aPoint)
1077{
1078 return mpTable->getAccessibleAtPoint( aPoint );
1079}
1080
1081css::awt::Rectangle SAL_CALL AccessibleTableHeaderShape::getBounds()
1082{
1083 return mpTable->getBounds();
1084}
1085
1087{
1088 return mpTable->getLocation();
1089}
1090
1092{
1093 return mpTable->getLocationOnScreen();
1094}
1095
1097{
1098 return mpTable->getSize();
1099}
1100
1102{
1103 return mpTable->getForeground();
1104}
1105
1107{
1108 return mpTable->getBackground();
1109}
1110
1112{
1113 mpTable->grabFocus();
1114}
1115// XAccessibleTable
1117{
1118 return mbRow ? 1 : mpTable->getAccessibleRowCount();
1119}
1120
1122{
1123 return !mbRow ? 1 : mpTable->getAccessibleColumnCount();
1124}
1125
1127{
1128 return mpTable->getAccessibleRowDescription( nRow );
1129}
1130
1132{
1133 return mpTable->getAccessibleColumnDescription( nColumn );
1134}
1135
1136sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
1137{
1138 return mpTable->getAccessibleRowExtentAt( nRow, nColumn );
1139}
1140
1141sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
1142{
1143 return mpTable->getAccessibleColumnExtentAt( nRow, nColumn );
1144}
1145
1146Reference< XAccessibleTable > SAL_CALL AccessibleTableHeaderShape::getAccessibleRowHeaders( )
1147{
1148 Reference< XAccessibleTable > xRet;
1149 return xRet;
1150}
1151
1152Reference< XAccessibleTable > SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnHeaders( )
1153{
1154 Reference< XAccessibleTable > xRet;
1155 return xRet;
1156}
1157
1159{
1160 sal_Int32 nRow = getAccessibleRowCount();
1161 ::std::vector<bool> aSelected( nRow, true );
1162 sal_Int32 nCount = nRow;
1163 for( sal_Int32 i = 0; i < nRow; i++ )
1164 {
1165 try
1166 {
1167 aSelected[i] = isAccessibleRowSelected( i );
1168 }
1169 catch( ... )
1170 {
1171 return Sequence< sal_Int32 >();
1172 }
1173
1174 if( !aSelected[i] )
1175 nCount--;
1176 }
1177 Sequence < sal_Int32 > aRet( nCount );
1178 sal_Int32 *pRet = aRet.getArray();
1179 sal_Int32 nPos = 0;
1180 size_t nSize = aSelected.size();
1181 for( size_t i=0; i < nSize && nPos < nCount; i++ )
1182 {
1183 if( aSelected[i] )
1184 {
1185 *pRet++ = i;
1186 nPos++;
1187 }
1188 }
1189
1190 return aRet;
1191}
1192
1194{
1195 sal_Int32 nColumn = getAccessibleColumnCount();
1196 ::std::vector<bool> aSelected( nColumn, true );
1197 sal_Int32 nCount = nColumn;
1198 for( sal_Int32 i = 0; i < nColumn; i++ )
1199 {
1200 try
1201 {
1202 aSelected[i] = isAccessibleColumnSelected( i );
1203 }
1204 catch( ... )
1205 {
1206 return Sequence< sal_Int32 >();
1207 }
1208
1209 if( !aSelected[i] )
1210 nCount--;
1211 }
1212 Sequence < sal_Int32 > aRet( nCount );
1213 sal_Int32 *pRet = aRet.getArray();
1214 sal_Int32 nPos = 0;
1215 size_t nSize = aSelected.size();
1216 for( size_t i=0; i < nSize && nPos < nCount; i++ )
1217 {
1218 if( aSelected[i] )
1219 {
1220 *pRet++ = i;
1221 nPos++;
1222 }
1223 }
1224
1225 return aRet;
1226}
1227
1229{
1230 return mpTable->isAccessibleRowSelected( nRow );
1231}
1232
1234{
1235 return mpTable->isAccessibleColumnSelected( nColumn );
1236}
1237
1238Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
1239{
1240 return mpTable->getAccessibleCellAt( nRow, nColumn );
1241}
1242
1243Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleCaption( )
1244{
1245 return mpTable->getAccessibleCaption();
1246}
1247
1248Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleSummary( )
1249{
1250 return mpTable->getAccessibleSummary();
1251}
1252
1253sal_Bool SAL_CALL AccessibleTableHeaderShape::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
1254{
1255 return mpTable->isAccessibleSelected( nRow, nColumn );
1256}
1257
1258sal_Int64 SAL_CALL AccessibleTableHeaderShape::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
1259{
1260 return mpTable->getAccessibleIndex( nRow, nColumn );
1261}
1262
1263sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleRow( sal_Int64 nChildIndex )
1264{
1265 return mpTable->getAccessibleRow( nChildIndex );
1266}
1267
1268sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleColumn( sal_Int64 nChildIndex )
1269{
1270 return mpTable->getAccessibleColumn( nChildIndex );
1271}
1272
1273// XAccessibleTableSelection
1275{
1276 if( mbRow )
1277 return mpTable->selectRow( row );
1278 else
1279 {
1280 mpTable->clearAccessibleSelection();
1281 sal_Int64 nIndex = mpTable->getAccessibleIndex( row, 0 );
1282 mpTable->selectAccessibleChild( nIndex );
1283 return true;
1284 }
1285}
1286
1288{
1289 if( !mbRow )
1290 return mpTable->selectColumn( column );
1291 else
1292 {
1293 mpTable->clearAccessibleSelection();
1294 sal_Int64 nIndex = mpTable->getAccessibleIndex( 0, column );
1295 mpTable->selectAccessibleChild( nIndex );
1296 return true;
1297 }
1298}
1299
1301{
1302 if( mbRow )
1303 return mpTable->unselectRow( row );
1304 else
1305 {
1306 sal_Int64 nIndex = mpTable->getAccessibleIndex( row, 0 );
1307 mpTable->deselectAccessibleChild( nIndex );
1308 return true;
1309 }
1310}
1311
1313{
1314 if( !mbRow )
1315 return mpTable->unselectColumn( column );
1316 else
1317 {
1318 sal_Int64 nIndex = mpTable->getAccessibleIndex( 0, column );
1319 mpTable->deselectAccessibleChild( nIndex );
1320 return true;
1321 }
1322}
1323}
1324
1325/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnyEventRef aEvent
const rtl::Reference< sdr::SelectionController > & getSelectionController() const
Definition: svdedxv.hxx:299
virtual bool SetState(sal_Int64 aState) override
virtual bool ResetState(sal_Int64 aState) override
virtual bool SetState(sal_Int64 aState)
virtual bool ResetState(sal_Int64 aState)
@descr This class is a container for the information specific for a single shape that is passed to th...
This class bundles all information that is passed down the tree of accessible shapes so that each sha...
virtual bool ResetState(sal_Int64 aState) override
Reset the specified state.
virtual void SAL_CALL disposing() override
This method is called from the component helper base class while disposing.
virtual bool SetState(sal_Int64 aState) override
Set the specified state.
AccessibleTableHeaderShape(AccessibleTableShape *pTable, bool bRow)
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
rtl::Reference< AccessibleTableShape > mpTable
virtual OUString SAL_CALL getAccessibleName() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Bool SAL_CALL unselectColumn(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual void SAL_CALL grabFocus() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
virtual css::awt::Point SAL_CALL getLocation() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual sal_Bool SAL_CALL selectColumn(sal_Int32 column) override
virtual css::awt::Size SAL_CALL getSize() override
virtual sal_Bool SAL_CALL selectRow(sal_Int32 row) override
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual sal_Bool SAL_CALL unselectRow(sal_Int32 row) override
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
virtual void SAL_CALL disposing(const EventObject &Source) override
virtual void SAL_CALL modified(const EventObject &aEvent) override
AccessibleTableShapeImpl(AccessibleShapeTreeInfo &rShapeTreeInfo)
void init(const Reference< XAccessible > &xAccessible, const Reference< XTable > &xTable)
rtl::Reference< AccessibleCell > getAccessibleCell(const Reference< XCell > &xCell)
Reference< XAccessible > getAccessibleChild(sal_Int64 i)
void getColumnAndRow(sal_Int64 nChildIndex, sal_Int32 &rnColumn, sal_Int32 &rnRow)
virtual sal_Bool SAL_CALL unselectRow(sal_Int32 row) override
virtual bool ResetState(sal_Int64 aState) override
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
rtl::Reference< AccessibleTableShapeImpl > mxImpl
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
virtual sal_Bool SAL_CALL selectRow(sal_Int32 row) override
sdr::table::SvxTableController * getTableController()
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual void SAL_CALL clearAccessibleSelection() override
virtual OUString CreateAccessibleBaseName() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
virtual bool SetState(sal_Int64 aState) override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
void getColumnAndRow(sal_Int64 nChildIndex, sal_Int32 &rnColumn, sal_Int32 &rnRow)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &rEvent) override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
AccessibleTableShape(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo)
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
virtual sal_Bool SAL_CALL selectColumn(sal_Int32 column) override
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
void checkCellPosition(sal_Int32 nCol, sal_Int32 nRow)
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
virtual void SAL_CALL disposing() override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
virtual void SAL_CALL release() noexcept override
virtual OUString SAL_CALL getImplementationName() override
sal_Int64 GetIndexOfSelectedChild(sal_Int64 nSelectedChildIndex) const
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nChildIndex) override
virtual void SAL_CALL selectAllAccessibleChildren() override
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual sal_Bool SAL_CALL unselectColumn(sal_Int32 column) override
virtual void SAL_CALL acquire() noexcept override
void getActiveCellPos(sdr::table::CellPos &rPos) const
Definition: svdotable.cxx:1608
const sdr::table::CellRef & getActiveCell() const
The active table has the focus or is currently edited.
Definition: svdotable.cxx:1546
bool deselectColumn(sal_Int32 column)
void getSelectedCells(CellPos &rFirstPos, CellPos &rLastPos) override
bool isColumnSelected(sal_Int32 nColumn)
sdr::table::SdrTableObj * GetTableObj()
bool selectColumn(sal_Int32 column)
virtual SVX_DLLPRIVATE bool hasSelectedCells() const override
This is a table object, and one or more of its cells are selected.
void setSelectedCells(const CellPos &rFirstPos, const CellPos &rLastPos)
bool isRowSelected(sal_Int32 nRow)
int nCount
#define TOOLS_WARN_EXCEPTION(area, stream)
sal_Int32 nIndex
sal_Int64 n
sal_uInt16 nPos
::cppu::ImplInheritanceHelper< AccessibleShape, css::accessibility::XAccessibleTable, css::view::XSelectionChangeListener > AccessibleTableShape_Base
std::unordered_map< Reference< XCell >, rtl::Reference< AccessibleCell > > AccessibleCellMap
@ Exception
Type
int i
uno::Reference< drawing::XShape > const mxShape
unsigned char sal_Bool