LibreOffice Module sc (master)  1
AccessiblePreviewTable.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 #include <scitems.hxx>
24 #include <prevwsh.hxx>
25 #include <prevloc.hxx>
26 #include <attrib.hxx>
27 #include <document.hxx>
28 #include <scresid.hxx>
29 #include <strings.hrc>
30 #include <strings.hxx>
31 
32 #include <com/sun/star/accessibility/AccessibleRole.hpp>
33 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
34 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
35 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
36 
37 #include <vcl/window.hxx>
38 #include <vcl/svapp.hxx>
39 #include <svl/hint.hxx>
41 #include <comphelper/sequence.hxx>
42 
43 using namespace ::com::sun::star;
44 using namespace ::com::sun::star::accessibility;
45 
46 //===== internal ============================================================
47 
48 ScAccessiblePreviewTable::ScAccessiblePreviewTable( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
49  ScPreviewShell* pViewShell, sal_Int32 nIndex ) :
50  ScAccessibleContextBase( rxParent, AccessibleRole::TABLE ),
51  mpViewShell( pViewShell ),
52  mnIndex( nIndex )
53 {
54  if (mpViewShell)
56 }
57 
59 {
60  if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
61  {
62  // increment refcount to prevent double call off dtor
63  osl_atomic_increment( &m_refCount );
64  dispose();
65  }
66 }
67 
69 {
70  SolarMutexGuard aGuard;
71  if (mpViewShell)
72  {
74  mpViewShell = nullptr;
75  }
76 
77  mpTableInfo.reset();
78 
80 }
81 
82 //===== SfxListener =====================================================
83 
85 {
86  const SfxHintId nId = rHint.GetId();
87  if ( nId == SfxHintId::DataChanged )
88  {
89  // column / row layout may change with any document change,
90  // so it must be invalidated
91  mpTableInfo.reset();
92  }
93  else if (nId == SfxHintId::ScAccVisAreaChanged)
94  {
95  AccessibleEventObject aEvent;
96  aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
97  aEvent.Source = uno::Reference< XAccessibleContext >(this);
98  CommitChange(aEvent);
99  }
100 
102 }
103 
104 //===== XInterface =====================================================
105 
107 {
109  return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
110 }
111 
113  throw ()
114 {
116 }
117 
119  throw ()
120 {
122 }
123 
124 //===== XAccessibleTable ================================================
125 
127 {
128  SolarMutexGuard aGuard;
129  IsObjectValid();
130 
131  FillTableInfo();
132 
133  sal_Int32 nRet = 0;
134  if ( mpTableInfo )
135  nRet = mpTableInfo->GetRows();
136  return nRet;
137 }
138 
140 {
141  SolarMutexGuard aGuard;
142  IsObjectValid();
143 
144  FillTableInfo();
145 
146  sal_Int32 nRet = 0;
147  if ( mpTableInfo )
148  nRet = mpTableInfo->GetCols();
149  return nRet;
150 }
151 
152 OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sal_Int32 nRow )
153 {
154  SolarMutexGuard aGuard;
155  FillTableInfo();
156  if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
157  throw lang::IndexOutOfBoundsException();
158 
159  return OUString();
160 }
161 
162 OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription( sal_Int32 nColumn )
163 {
164  SolarMutexGuard aGuard;
165  FillTableInfo();
166  if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
167  throw lang::IndexOutOfBoundsException();
168 
169  return OUString();
170 }
171 
172 sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
173 {
174  SolarMutexGuard aGuard;
175  IsObjectValid();
176 
177  FillTableInfo();
178 
179  sal_Int32 nRows = 1;
180  if ( !mpViewShell || !mpTableInfo || nColumn < 0 || nRow < 0 ||
181  nColumn >= mpTableInfo->GetCols() || nRow >= mpTableInfo->GetRows() )
182  throw lang::IndexOutOfBoundsException();
183 
184  const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[nColumn];
185  const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[nRow];
186 
187  if ( rColInfo.bIsHeader || rRowInfo.bIsHeader )
188  {
189  // header cells only span a single cell
190  }
191  else
192  {
194  const ScMergeAttr* pItem = rDoc.GetAttr(
195  static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE );
196  if ( pItem && pItem->GetRowMerge() > 0 )
197  nRows = pItem->GetRowMerge();
198  }
199 
200  return nRows;
201 }
202 
203 sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
204 {
205  SolarMutexGuard aGuard;
206  IsObjectValid();
207 
208  FillTableInfo();
209 
210  sal_Int32 nColumns = 1;
211  if ( !mpViewShell || !mpTableInfo || nColumn < 0 || nRow < 0 ||
212  nColumn >= mpTableInfo->GetCols() || nRow >= mpTableInfo->GetRows() )
213  throw lang::IndexOutOfBoundsException();
214 
215  const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[nColumn];
216  const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[nRow];
217 
218  if ( rColInfo.bIsHeader || rRowInfo.bIsHeader )
219  {
220  // header cells only span a single cell
221  }
222  else
223  {
225  const ScMergeAttr* pItem = rDoc.GetAttr(
226  static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE );
227  if ( pItem && pItem->GetColMerge() > 0 )
228  nColumns = pItem->GetColMerge();
229  }
230 
231  return nColumns;
232 }
233 
234 uno::Reference< XAccessibleTable > SAL_CALL ScAccessiblePreviewTable::getAccessibleRowHeaders()
235 {
237  return nullptr;
238 }
239 
240 uno::Reference< XAccessibleTable > SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnHeaders()
241 {
243  return nullptr;
244 }
245 
246 uno::Sequence< sal_Int32 > SAL_CALL ScAccessiblePreviewTable::getSelectedAccessibleRows()
247 {
248  // in the page preview, there is no selection
249  return uno::Sequence<sal_Int32>(0);
250 }
251 
252 uno::Sequence< sal_Int32 > SAL_CALL ScAccessiblePreviewTable::getSelectedAccessibleColumns()
253 {
254  // in the page preview, there is no selection
255  return uno::Sequence<sal_Int32>(0);
256 }
257 
259 {
260  // in the page preview, there is no selection
261 
262  SolarMutexGuard aGuard;
263  FillTableInfo();
264  if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
265  throw lang::IndexOutOfBoundsException();
266 
267  return false;
268 }
269 
271 {
272  // in the page preview, there is no selection
273 
274  SolarMutexGuard aGuard;
275  FillTableInfo();
276  if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
277  throw lang::IndexOutOfBoundsException();
278 
279  return false;
280 }
281 
282 uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
283 {
284  SolarMutexGuard aGuard;
285  IsObjectValid();
286 
287  FillTableInfo();
288 
289  uno::Reference<XAccessible> xRet;
290  if ( mpTableInfo && nColumn >= 0 && nRow >= 0 && nColumn < mpTableInfo->GetCols() && nRow < mpTableInfo->GetRows() )
291  {
292  // index iterates horizontally
293  long nNewIndex = nRow * mpTableInfo->GetCols() + nColumn;
294 
295  const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[nColumn];
296  const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[nRow];
297 
298  ScAddress aCellPos( static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab() );
299  if ( rColInfo.bIsHeader || rRowInfo.bIsHeader )
300  {
301  const bool bRotatedColHeader = rRowInfo.bIsHeader;
302  const bool bRotatedRowHeader = rColInfo.bIsHeader;
304  bRotatedColHeader, bRotatedRowHeader, nNewIndex));
305  xRet = pHeaderCell.get();
306  pHeaderCell->Init();
307  }
308  else
309  {
310  rtl::Reference<ScAccessiblePreviewCell> pCell(new ScAccessiblePreviewCell( this, mpViewShell, aCellPos, nNewIndex ));
311  xRet = pCell.get();
312  pCell->Init();
313  }
314  }
315 
316  if ( !xRet.is() )
317  throw lang::IndexOutOfBoundsException();
318 
319  return xRet;
320 }
321 
322 uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCaption()
323 {
325  return nullptr;
326 }
327 
328 uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleSummary()
329 {
331  return nullptr;
332 }
333 
334 sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
335 {
336  // in the page preview, there is no selection
337  SolarMutexGuard aGuard;
338  IsObjectValid();
339 
340  FillTableInfo();
341 
342  if ( !mpTableInfo || nColumn < 0 || nRow < 0 || nColumn >= mpTableInfo->GetCols() || nRow >= mpTableInfo->GetRows() )
343  throw lang::IndexOutOfBoundsException();
344 
345  // index iterates horizontally
346  return false;
347 }
348 
349 sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
350 {
351  SolarMutexGuard aGuard;
352  IsObjectValid();
353 
354  FillTableInfo();
355 
356  if ( !mpTableInfo || nColumn < 0 || nRow < 0 || nColumn >= mpTableInfo->GetCols() || nRow >= mpTableInfo->GetRows() )
357  throw lang::IndexOutOfBoundsException();
358 
359  // index iterates horizontally
360  sal_Int32 nRet = nRow * mpTableInfo->GetCols() + nColumn;
361  return nRet;
362 }
363 
364 sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRow( sal_Int32 nChildIndex )
365 {
366  SolarMutexGuard aGuard;
367  IsObjectValid();
368 
369  FillTableInfo();
370 
371  if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int32>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() )
372  throw lang::IndexOutOfBoundsException();
373 
374  sal_Int32 nRow = nChildIndex / mpTableInfo->GetCols();
375  return nRow;
376 }
377 
378 sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumn( sal_Int32 nChildIndex )
379 {
380  SolarMutexGuard aGuard;
381  IsObjectValid();
382 
383  FillTableInfo();
384 
385  if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int32>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() )
386  throw lang::IndexOutOfBoundsException();
387 
388  sal_Int32 nCol = nChildIndex % static_cast<sal_Int32>(mpTableInfo->GetCols());
389  return nCol;
390 }
391 
392 //===== XAccessibleComponent ============================================
393 
394 uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAtPoint( const awt::Point& aPoint )
395 {
396  uno::Reference<XAccessible> xRet;
397  if (containsPoint(aPoint))
398  {
399  SolarMutexGuard aGuard;
400  IsObjectValid();
401 
402  FillTableInfo();
403 
404  if ( mpTableInfo )
405  {
406  SCCOL nCols = mpTableInfo->GetCols();
407  SCROW nRows = mpTableInfo->GetRows();
408  const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo();
409  const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo();
410 
411  tools::Rectangle aScreenRect(GetBoundingBox());
412 
413  awt::Point aMovedPoint = aPoint;
414  aMovedPoint.X += aScreenRect.Left();
415  aMovedPoint.Y += aScreenRect.Top();
416 
417  if ( nCols > 0 && nRows > 0 && aMovedPoint.X >= pColInfo[0].nPixelStart && aMovedPoint.Y >= pRowInfo[0].nPixelStart )
418  {
419  SCCOL nColIndex = 0;
420  while ( nColIndex < nCols && aMovedPoint.X > pColInfo[nColIndex].nPixelEnd )
421  ++nColIndex;
422  SCROW nRowIndex = 0;
423  while ( nRowIndex < nRows && aMovedPoint.Y > pRowInfo[nRowIndex].nPixelEnd )
424  ++nRowIndex;
425  if ( nColIndex < nCols && nRowIndex < nRows )
426  {
427  try
428  {
429  xRet = getAccessibleCellAt( nRowIndex, nColIndex );
430  }
431  catch (uno::Exception&)
432  {
433  }
434  }
435  }
436  }
437  }
438 
439  return xRet;
440 }
441 
443 {
444  SolarMutexGuard aGuard;
445  IsObjectValid();
446  if (getAccessibleParent().is())
447  {
448  uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
449  if (xAccessibleComponent.is())
450  xAccessibleComponent->grabFocus();
451  }
452 }
453 
454 //===== XAccessibleContext ==============================================
455 
457 {
458  SolarMutexGuard aGuard;
459  IsObjectValid();
460 
461  FillTableInfo();
462 
463  long nRet = 0;
464  if ( mpTableInfo )
465  nRet = static_cast<sal_Int32>(mpTableInfo->GetCols()) * mpTableInfo->GetRows();
466  return nRet;
467 }
468 
469 uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleChild( sal_Int32 nIndex )
470 {
471  SolarMutexGuard aGuard;
472  IsObjectValid();
473 
474  FillTableInfo();
475 
476  uno::Reference<XAccessible> xRet;
477  if ( mpTableInfo )
478  {
479  long nColumns = mpTableInfo->GetCols();
480  if ( nColumns > 0 )
481  {
482  // nCol, nRow are within the visible table, not the document
483  long nCol = nIndex % nColumns;
484  long nRow = nIndex / nColumns;
485 
486  xRet = getAccessibleCellAt( nRow, nCol );
487  }
488  }
489 
490  if ( !xRet.is() )
491  throw lang::IndexOutOfBoundsException();
492 
493  return xRet;
494 }
495 
497 {
498  return mnIndex;
499 }
500 
501 uno::Reference< XAccessibleStateSet > SAL_CALL ScAccessiblePreviewTable::getAccessibleStateSet()
502 {
503  SolarMutexGuard aGuard;
504  uno::Reference<XAccessibleStateSet> xParentStates;
505  if (getAccessibleParent().is())
506  {
507  uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext();
508  xParentStates = xParentContext->getAccessibleStateSet();
509  }
511  if (IsDefunc(xParentStates))
512  pStateSet->AddState(AccessibleStateType::DEFUNC);
513  else
514  {
515  pStateSet->AddState(AccessibleStateType::MANAGES_DESCENDANTS);
516  pStateSet->AddState(AccessibleStateType::ENABLED);
517  pStateSet->AddState(AccessibleStateType::OPAQUE);
518  if (isShowing())
519  pStateSet->AddState(AccessibleStateType::SHOWING);
520  if (isVisible())
521  pStateSet->AddState(AccessibleStateType::VISIBLE);
522  }
523  return pStateSet;
524 }
525 
526 //===== XServiceInfo ====================================================
527 
529 {
530  return "ScAccessiblePreviewTable";
531 }
532 
533 uno::Sequence<OUString> SAL_CALL ScAccessiblePreviewTable::getSupportedServiceNames()
534 {
535  uno::Sequence< OUString > aSequence = ScAccessibleContextBase::getSupportedServiceNames();
536  sal_Int32 nOldSize(aSequence.getLength());
537  aSequence.realloc(nOldSize + 1);
538 
539  aSequence[nOldSize] = "com.sun.star.table.AccessibleTableView";
540 
541  return aSequence;
542 }
543 
544 //===== XTypeProvider ===================================================
545 
546 uno::Sequence< uno::Type > SAL_CALL ScAccessiblePreviewTable::getTypes()
547 {
549 }
550 
551 uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId()
552 {
553  return css::uno::Sequence<sal_Int8>();
554 }
555 
556 //==== internal =========================================================
557 
559 {
560  return STR_ACC_TABLE_DESCR;
561 }
562 
564 {
565  OUString sName(ScResId(STR_ACC_TABLE_NAME));
566 
567  if (mpViewShell)
568  {
569  FillTableInfo();
570 
571  if ( mpTableInfo )
572  {
573  OUString sCoreName;
574  if (mpViewShell->GetDocument().GetName( mpTableInfo->GetTab(), sCoreName ))
575  sName = sName.replaceFirst("%1", sCoreName);
576  }
577  }
578 
579  return sName;
580 }
581 
583 {
584  tools::Rectangle aCellRect(GetBoundingBox());
585  if (mpViewShell)
586  {
587  vcl::Window* pWindow = mpViewShell->GetWindow();
588  if (pWindow)
589  {
590  tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
591  aCellRect.setX(aCellRect.getX() + aRect.getX());
592  aCellRect.setY(aCellRect.getY() + aRect.getY());
593  }
594  }
595  return aCellRect;
596 }
597 
599 {
600  FillTableInfo();
601 
602  tools::Rectangle aRect;
603  if ( mpTableInfo )
604  {
605  SCCOL nColumns = mpTableInfo->GetCols();
606  SCROW nRows = mpTableInfo->GetRows();
607  if ( nColumns > 0 && nRows > 0 )
608  {
609  const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo();
610  const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo();
611 
612  aRect = tools::Rectangle( pColInfo[0].nPixelStart,
613  pRowInfo[0].nPixelStart,
614  pColInfo[nColumns-1].nPixelEnd,
615  pRowInfo[nRows-1].nPixelEnd );
616  }
617  }
618  return aRect;
619 }
620 
621 bool ScAccessiblePreviewTable::IsDefunc( const uno::Reference<XAccessibleStateSet>& rxParentStates )
622 {
623  return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
624  (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
625 }
626 
628 {
629  if ( mpViewShell && !mpTableInfo )
630  {
631  Size aOutputSize;
632  vcl::Window* pWindow = mpViewShell->GetWindow();
633  if ( pWindow )
634  aOutputSize = pWindow->GetOutputSizePixel();
635  tools::Rectangle aVisRect( Point(), aOutputSize );
636 
637  mpTableInfo.reset( new ScPreviewTableInfo );
639  }
640 }
641 
642 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
const ScPreviewLocationData & GetLocationData()
Definition: prevwsh.cxx:1177
SCCOL GetColMerge() const
Definition: attrib.hxx:69
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
void AddAccessibilityObject(SfxListener &rObject)
Definition: prevwsh.cxx:1148
SfxHintId
virtual sal_Int32 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
bool hasValue()
std::unique_ptr< ScPreviewTableInfo > mpTableInfo
ULONG m_refCount
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int32 nChildIndex) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
sal_Int16 nId
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual void SAL_CALL release() override
long getY() const
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
#define STR_ACC_TABLE_DESCR
Definition: strings.hxx:15
SfxHintId GetId() const
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
long Top() const
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
long getX() const
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
const char * sName
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int32 nChildIndex) override
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4714
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual OUString createAccessibleName() override
Return the object's current name.
virtual ~ScAccessiblePreviewTable() override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
void setY(long y)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual void SAL_CALL disposing() override
sal_Int16 SCCOL
Definition: types.hxx:22
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
unsigned char sal_Bool
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
virtual void SAL_CALL release() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
ScAccessiblePreviewTable(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, sal_Int32 nIndex)
Size GetOutputSizePixel() const
virtual void SAL_CALL acquire() override
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL grabFocus() override
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
sal_Int32 SCROW
Definition: types.hxx:18
virtual void SAL_CALL disposing() override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
void RemoveAccessibilityObject(SfxListener &rObject)
Definition: prevwsh.cxx:1156
virtual void SAL_CALL acquire() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 i) override
Return the specified child or NULL if index is invalid.
virtual OUString createAccessibleDescription() override
Return this object's description.
ScDocument & GetDocument()
Definition: prevwsh.cxx:1182
vcl::Window * GetWindow() const
long Left() const
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
SCROW GetRowMerge() const
Definition: attrib.hxx:70
void setX(long x)
void dispose()
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
int mnIndex
void AddState(sal_Int16 aState)
void GetTableInfo(const tools::Rectangle &rVisiblePixel, ScPreviewTableInfo &rInfo) const
Definition: prevloc.cxx:444
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:213
SCCOLROW nDocIndex
Definition: prevloc.hxx:47
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
AnyEventRef aEvent
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================