LibreOffice Module sc (master)  1
AccessibleCell.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 <memory>
21 #include <string_view>
22 
23 #include <sal/config.h>
24 
25 #include <AccessibleCell.hxx>
26 #include <scitems.hxx>
27 #include <AccessibleText.hxx>
28 #include <AccessibleDocument.hxx>
29 #include <tabvwsh.hxx>
30 #include <comphelper/sequence.hxx>
31 #include <document.hxx>
32 #include <attrib.hxx>
33 #include <editsrc.hxx>
34 #include <dociter.hxx>
35 #include <markdata.hxx>
36 #include <cellvalue.hxx>
37 #include <formulaiter.hxx>
38 #include <validat.hxx>
39 
42 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
43 #include <com/sun/star/accessibility/AccessibleRelationType.hpp>
44 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
45 #include <editeng/brushitem.hxx>
46 #include <vcl/svapp.hxx>
47 
49 
50 using namespace ::com::sun::star;
51 using namespace ::com::sun::star::accessibility;
52 
54  const uno::Reference<XAccessible>& rxParent,
55  ScTabViewShell* pViewShell,
56  const ScAddress& rCellAddress,
57  sal_Int32 nIndex,
58  ScSplitPos eSplitPos,
59  ScAccessibleDocument* pAccDoc)
60 {
62  rxParent, pViewShell, rCellAddress, nIndex, eSplitPos, pAccDoc));
63  x->Init();
64  return x;
65 }
66 
68  const uno::Reference<XAccessible>& rxParent,
69  ScTabViewShell* pViewShell,
70  const ScAddress& rCellAddress,
71  sal_Int32 nIndex,
72  ScSplitPos eSplitPos,
73  ScAccessibleDocument* pAccDoc)
74  :
75  ScAccessibleCellBase(rxParent, GetDocument(pViewShell), rCellAddress, nIndex),
76  ::accessibility::AccessibleStaticTextBase(CreateEditSource(pViewShell, rCellAddress, eSplitPos)),
77  mpViewShell(pViewShell),
78  mpAccDoc(pAccDoc),
79  meSplitPos(eSplitPos)
80 {
81  if (pViewShell)
82  pViewShell->AddAccessibilityObject(*this);
83 }
84 
86 {
87  if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
88  {
89  // increment refcount to prevent double call off dtor
90  osl_atomic_increment( &m_refCount );
91  // call dispose to inform object which have a weak reference to this object
92  dispose();
93  }
94 }
95 
97 {
99 
100  SetEventSource(this);
101 }
102 
104 {
105  SolarMutexGuard aGuard;
106  // dispose in AccessibleStaticTextBase
107  Dispose();
108 
109  if (mpViewShell)
110  {
112  mpViewShell = nullptr;
113  }
114  mpAccDoc = nullptr;
115 
117 }
118 
119  //===== XInterface =====================================================
120 
122 
123  //===== XTypeProvider ===================================================
124 
125 IMPLEMENT_FORWARD_XTYPEPROVIDER3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
126 
127  //===== XAccessibleComponent ============================================
128 
129 uno::Reference< XAccessible > SAL_CALL ScAccessibleCell::getAccessibleAtPoint(
130  const awt::Point& rPoint )
131 {
132  return AccessibleStaticTextBase::getAccessibleAtPoint(rPoint);
133 }
134 
136 {
137  SolarMutexGuard aGuard;
138  IsObjectValid();
139  if (getAccessibleParent().is() && mpViewShell)
140  {
141  uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
142  if (xAccessibleComponent.is())
143  {
144  xAccessibleComponent->grabFocus();
146  }
147  }
148 }
149 
151 {
152  tools::Rectangle aCellRect(GetBoundingBox());
153  if (mpViewShell)
154  {
156  if (pWindow)
157  {
158  tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
159  aCellRect.setX(aCellRect.getX() + aRect.getX());
160  aCellRect.setY(aCellRect.getY() + aRect.getY());
161  }
162  }
163  return aCellRect;
164 }
165 
167 {
168  tools::Rectangle aCellRect;
169  if (mpViewShell)
170  {
171  tools::Long nSizeX, nSizeY;
173  maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
174  aCellRect.SetSize(Size(nSizeX, nSizeY));
176 
178  if (pWindow)
179  {
181  aRect.Move(-aRect.Left(), -aRect.Top());
182  aCellRect = aRect.Intersection(aCellRect);
183  }
184 
185  /* #i19430# Gnopernicus reads text partly if it sticks out of the cell
186  boundaries. This leads to wrong results in cases where the cell
187  text is rotated, because rotation is not taken into account when
188  calculating the visible part of the text. In these cases we will
189  simply expand the cell size to the width of the unrotated text. */
190  if (mpDoc)
191  {
193  if( pItem && (pItem->GetValue() != 0_deg100) )
194  {
196  if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) )
197  aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) );
198  }
199  }
200  }
201  if (aCellRect.IsEmpty())
202  aCellRect.SetPos(Point(-1, -1));
203  return aCellRect;
204 }
205 
206  //===== XAccessibleContext ==============================================
207 
208 sal_Int32 SAL_CALL
210 {
211  return AccessibleStaticTextBase::getAccessibleChildCount();
212 }
213 
214 uno::Reference< XAccessible > SAL_CALL
216 {
217  return AccessibleStaticTextBase::getAccessibleChild(nIndex);
218 }
219 
220 uno::Reference<XAccessibleStateSet> SAL_CALL
222 {
223  SolarMutexGuard aGuard;
224  uno::Reference<XAccessibleStateSet> xParentStates;
225  if (getAccessibleParent().is())
226  {
227  uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext();
228  xParentStates = xParentContext->getAccessibleStateSet();
229  }
231  if (IsDefunc(xParentStates))
232  pStateSet->AddState(AccessibleStateType::DEFUNC);
233  else
234  {
235  if (IsFormulaMode())
236  {
237  pStateSet->AddState(AccessibleStateType::ENABLED);
238  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
239  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
240  if (IsOpaque())
241  pStateSet->AddState(AccessibleStateType::OPAQUE);
242  pStateSet->AddState(AccessibleStateType::SELECTABLE);
243  if (IsSelected())
244  pStateSet->AddState(AccessibleStateType::SELECTED);
245  if (isShowing())
246  pStateSet->AddState(AccessibleStateType::SHOWING);
247  pStateSet->AddState(AccessibleStateType::TRANSIENT);
248  if (isVisible())
249  pStateSet->AddState(AccessibleStateType::VISIBLE);
250  return pStateSet;
251  }
252  if (IsEditable(xParentStates))
253  {
254  pStateSet->AddState(AccessibleStateType::EDITABLE);
255  pStateSet->AddState(AccessibleStateType::RESIZABLE);
256  }
257  pStateSet->AddState(AccessibleStateType::ENABLED);
258  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
259  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
260  pStateSet->AddState(AccessibleStateType::FOCUSABLE);
261  if (IsOpaque())
262  pStateSet->AddState(AccessibleStateType::OPAQUE);
263  pStateSet->AddState(AccessibleStateType::SELECTABLE);
264  if (IsSelected())
265  pStateSet->AddState(AccessibleStateType::SELECTED);
266  if (isShowing())
267  pStateSet->AddState(AccessibleStateType::SHOWING);
268  pStateSet->AddState(AccessibleStateType::TRANSIENT);
269  if (isVisible())
270  pStateSet->AddState(AccessibleStateType::VISIBLE);
271  }
272  return pStateSet;
273 }
274 
275 uno::Reference<XAccessibleRelationSet> SAL_CALL
277 {
278  SolarMutexGuard aGuard;
279  IsObjectValid();
281  if (mpAccDoc)
282  pRelationSet = mpAccDoc->GetRelationSet(&maCellAddress);
283  if (!pRelationSet)
284  pRelationSet = new utl::AccessibleRelationSetHelper();
285  FillDependents(pRelationSet.get());
286  FillPrecedents(pRelationSet.get());
287  return pRelationSet;
288 }
289 
290  //===== XServiceInfo ====================================================
291 
293 {
294  return "ScAccessibleCell";
295 }
296 
297 uno::Sequence< OUString> SAL_CALL
299 {
300  const css::uno::Sequence<OUString> vals { "com.sun.star.sheet.AccessibleCell" };
302 }
303 
304  //==== internal =========================================================
305 
307  const uno::Reference<XAccessibleStateSet>& rxParentStates)
308 {
309  return ScAccessibleContextBase::IsDefunc() || (mpDoc == nullptr) || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
310  (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
311 }
312 
314  const uno::Reference<XAccessibleStateSet>& rxParentStates)
315 {
316  bool bEditable(true);
317  if (rxParentStates.is() && !rxParentStates->contains(AccessibleStateType::EDITABLE) &&
318  mpDoc)
319  {
320  // here I have to test whether the protection of the table should influence this cell.
322  if (pItem)
323  bEditable = !pItem->GetProtection();
324  }
325  return bEditable;
326 }
327 
329 {
330  // test whether there is a background color
331  bool bOpaque(true);
332  if (mpDoc)
333  {
335  if (pItem)
336  bOpaque = pItem->GetColor() != COL_TRANSPARENT;
337  }
338  return bOpaque;
339 }
340 
342 {
343  if (IsFormulaMode())
344  {
345  const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
346  if (pSheet)
347  {
348  return pSheet->IsScAddrFormulaSel(maCellAddress);
349  }
350  return false;
351  }
352 
353  bool bResult(false);
354  if (mpViewShell)
355  {
356  const ScMarkData& rMarkdata = mpViewShell->GetViewData().GetMarkData();
357  bResult = rMarkdata.IsCellMarked(maCellAddress.Col(), maCellAddress.Row());
358  }
359  return bResult;
360 }
361 
363 {
364  ScDocument* pDoc = nullptr;
365  if (pViewShell)
366  pDoc = &pViewShell->GetViewData().GetDocument();
367  return pDoc;
368 }
369 
370 ::std::unique_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
371 {
372  if (IsFormulaMode())
373  {
374  return ::std::unique_ptr< SvxEditSource >();
375  }
376  ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::make_unique<ScAccessibleCellTextData>(pViewShell, aCell, eSplitPos, this)));
377 
378  return pEditSource;
379 }
380 
382 {
383  if (!mpDoc)
384  return;
385 
386  ScRange aRange(0, 0, maCellAddress.Tab(), mpDoc->MaxCol(), mpDoc->MaxRow(), maCellAddress.Tab());
387  ScCellIterator aCellIter(*mpDoc, aRange);
388 
389  for (bool bHasCell = aCellIter.first(); bHasCell; bHasCell = aCellIter.next())
390  {
391  if (aCellIter.getType() == CELLTYPE_FORMULA)
392  {
393  bool bFound = false;
394  ScDetectiveRefIter aIter(*mpDoc, aCellIter.getFormulaCell());
395  ScRange aRef;
396  while ( !bFound && aIter.GetNextRef( aRef ) )
397  {
398  if (aRef.In(maCellAddress))
399  bFound = true;
400  }
401  if (bFound)
402  AddRelation(aCellIter.GetPos(), AccessibleRelationType::CONTROLLER_FOR, pRelationSet);
403  }
404  }
405 }
406 
408 {
409  if (!mpDoc)
410  return;
411 
413  if (aCell.meType == CELLTYPE_FORMULA)
414  {
415  ScFormulaCell* pCell = aCell.mpFormula;
416  ScDetectiveRefIter aIter(*mpDoc, pCell);
417  ScRange aRef;
418  while ( aIter.GetNextRef( aRef ) )
419  {
420  AddRelation( aRef, AccessibleRelationType::CONTROLLED_BY, pRelationSet);
421  }
422  }
423 }
424 
425 void ScAccessibleCell::AddRelation(const ScAddress& rCell,
426  const sal_uInt16 aRelationType,
427  utl::AccessibleRelationSetHelper* pRelationSet)
428 {
429  AddRelation(ScRange(rCell, rCell), aRelationType, pRelationSet);
430 }
431 
432 void ScAccessibleCell::AddRelation(const ScRange& rRange,
433  const sal_uInt16 aRelationType,
434  utl::AccessibleRelationSetHelper* pRelationSet)
435 {
436  uno::Reference < XAccessibleTable > xTable ( getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY );
437  if (!xTable.is())
438  return;
439 
440  const sal_uInt32 nCount(static_cast<sal_uInt32>(rRange.aEnd.Col() -
441  rRange.aStart.Col() + 1) * (rRange.aEnd.Row() -
442  rRange.aStart.Row() + 1));
443  uno::Sequence < uno::Reference < uno::XInterface > > aTargetSet( nCount );
444  uno::Reference < uno::XInterface >* pTargetSet = aTargetSet.getArray();
445  sal_uInt32 nPos(0);
446  for (sal_uInt32 nRow = rRange.aStart.Row(); nRow <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Row()); ++nRow)
447  {
448  for (sal_uInt32 nCol = rRange.aStart.Col(); nCol <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Col()); ++nCol)
449  {
450  pTargetSet[nPos] = xTable->getAccessibleCellAt(nRow, nCol);
451  ++nPos;
452  }
453  }
454  OSL_ENSURE(nCount == nPos, "something went wrong");
455  AccessibleRelation aRelation;
456  aRelation.RelationType = aRelationType;
457  aRelation.TargetSet = aTargetSet;
458  pRelationSet->AddRelation(aRelation);
459 }
460 
461 static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view replacedChar, const OUString& replaceStr)
462 {
463  int iReplace = oldOUString.lastIndexOf(replacedChar);
464  OUString aRet = oldOUString;
465  while(iReplace > -1)
466  {
467  aRet = aRet.replaceAt(iReplace, 1, replaceStr);
468  iReplace = aRet.lastIndexOf(replacedChar, iReplace);
469  }
470  return aRet;
471 }
472 
473 static OUString ReplaceFourChar(const OUString& oldOUString)
474 {
475  OUString aRet = ReplaceOneChar(oldOUString, u"\\", "\\\\");
476  aRet = ReplaceOneChar(aRet, u";", "\\;");
477  aRet = ReplaceOneChar(aRet, u"=", "\\=");
478  aRet = ReplaceOneChar(aRet, u",", "\\,");
479  aRet = ReplaceOneChar(aRet, u":", "\\:");
480  return aRet;
481 }
482 
484 {
485  SolarMutexGuard aGuard;
486 
487  uno::Any strRet;
488  if (mpViewShell)
489  {
490  OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
491  if (!strFor.isEmpty())
492  {
493  strFor = strFor.copy(1);
494  strFor = ReplaceFourChar(strFor);
495  }
496  strFor = "Formula:" + strFor +
497  ";Note:" +
499  getShadowAttrs() + //the string returned contains the spliter ";"
500  getBorderAttrs();//the string returned contains the spliter ";"
501  //end of cell attributes
502  if( mpDoc )
503  {
504  strFor += "isdropdown:";
505  if( IsDropdown() )
506  strFor += "true";
507  else
508  strFor += "false";
509  strFor += ";";
510  }
511  strRet <<= strFor ;
512  }
513  return strRet;
514 }
515 
516 // cell has its own ParaIndent property, so when calling character attributes on cell, the ParaIndent should replace the ParaLeftMargin if its value is not zero.
517 uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes )
518 {
519  SolarMutexGuard aGuard;
520 
521  uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
522 
523  sal_uInt16 nParaIndent = mpDoc->GetAttr( maCellAddress, ATTR_INDENT )->GetValue();
524  if (nParaIndent > 0)
525  {
526  auto pAttrib = std::find_if(aAttribs.begin(), aAttribs.end(),
527  [](const beans::PropertyValue& rAttrib) { return "ParaLeftMargin" == rAttrib.Name; });
528  if (pAttrib != aAttribs.end())
529  pAttrib->Value <<= nParaIndent;
530  }
531  return aAttribs;
532 }
533 
535 {
536  ScAccessibleSpreadsheet* pSheet = static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
537  if (pSheet)
538  {
539  return pSheet->IsFormulaMode();
540  }
541  return false;
542 }
543 
545 {
546  sal_uInt16 nPosX = maCellAddress.Col();
547  sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
548  sal_uInt16 nTab = maCellAddress.Tab();
549  sal_uInt32 nValidation = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA )->GetValue();
550  if( nValidation )
551  {
552  const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
553  if( pData && pData->HasSelectionList() )
554  return true;
555  }
556  const ScMergeFlagAttr* pAttr = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
557  if( pAttr->HasAutoFilter() )
558  {
559  return true;
560  }
561  else
562  {
563  sal_uInt16 nTabCount = mpDoc->GetTableCount();
564  if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
565  {
566  SCTAB i;
567  ScMarkData aMarks(mpDoc->GetSheetLimits());
568  for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
569  mpDoc->MarkScenario( i, nTab, aMarks, false, ScScenarioFlags::ShowFrame );
570  ScRangeList aRanges;
571  aMarks.FillRangeListWithMarks( &aRanges, false );
572  bool bHasScenario;
573  SCTAB nRangeCount = aRanges.size();
574  for (i=0; i<nRangeCount; i++)
575  {
576  ScRange aRange = aRanges[i];
577  mpDoc->ExtendTotalMerge( aRange );
578  bool bTextBelow = ( aRange.aStart.Row() == 0 );
579  // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
580  if ( bTextBelow )
581  {
582  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
583  }
584  else
585  {
586  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
587  }
588  if( bHasScenario ) return true;
589  }
590  }
591  }
592  return false;
593 }
594 
595 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3047
void SetPos(const Point &rPoint)
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual bool isVisible() override
rtl::Reference< utl::AccessibleRelationSetHelper > GetRelationSet(const ScAddress *pAddress) const
======== internal =====================================================
ScAddress aStart
Definition: address.hxx:499
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
virtual void SAL_CALL grabFocus() override
tools::Rectangle & Intersection(const tools::Rectangle &rRect)
SCROW Row() const
Definition: address.hxx:261
std::unique_ptr< ContentProperties > pData
ScTabViewShell * mpViewShell
static ScDocument * GetDocument(ScTabViewShell *mpViewShell)
static rtl::Reference< ScAccessibleCell > create(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScTabViewShell *pViewShell, const ScAddress &rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument *pAccDoc)
ULONG m_refCount
vcl::Window * GetAccessibleParentWindow() const
void AddAccessibilityObject(SfxListener &rObject)
Definition: tabvwshh.cxx:210
long Long
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
tools::Long getY() const
tools::Long GetWidth() const
ScAddress aEnd
Definition: address.hxx:500
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
ScDocument & GetDocument() const
Definition: viewdata.hxx:379
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
bool HasSelectionList() const
Returns true, if the validation cell will show a selection list.
Definition: validat.cxx:711
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
void FillDependents(utl::AccessibleRelationSetHelper *pRelationSet)
float x
SC_DLLPUBLIC void SetCursor(SCCOL nPosX, SCROW nPosY, bool bNew=false)
Definition: tabview3.cxx:361
ScSplitPos
Definition: viewdata.hxx:44
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
Definition: markdata.cxx:285
void AddRelation(const ScAddress &rCell, const sal_uInt16 aRelationType,::utl::AccessibleRelationSetHelper *pRelationSet)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
bool IsEmpty() const
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:872
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Return the specified child or NULL if index is invalid.
bool IsDropdown() const
tools::Long Left() const
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:871
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:313
static OUString ReplaceOneChar(const OUString &oldOUString, std::u16string_view replacedChar, const OUString &replaceStr)
int nCount
virtual bool IsEditable(const css::uno::Reference< css::accessibility::XAccessibleStateSet > &rxParentStates) override
Walk through all cells in an area.
Definition: dociter.hxx:207
ScFormulaCell * mpFormula
Definition: cellvalue.hxx:110
SCTAB Tab() const
Definition: address.hxx:270
void AddRelation(const css::accessibility::AccessibleRelation &rRelation)
tools::Long getX() const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
void setX(tools::Long x)
ScViewData & GetViewData()
Definition: tabview.hxx:333
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4706
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
ScAccessibleDocument * mpAccDoc
const Color & GetColor() const
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Return NULL to indicate that an empty relation set.
virtual void SAL_CALL disposing() override
void setY(tools::Long y)
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:870
vcl::Window * GetWindowByPos(ScSplitPos ePos) const
Definition: tabview.hxx:371
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
int i
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
Definition: viewdata.cxx:2314
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
Iterator for references in a formula cell.
Definition: formulaiter.hxx:31
void SetSize(const Size &rSize)
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:872
size_t size() const
Definition: rangelst.hxx:89
OUString GetFormula(const ScAddress &rAddress)
Definition: tabvwsh.cxx:107
float u
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:852
This base class provides an implementation of the AccessibleCell service.
This base class provides an implementation of the AccessibleTable service.
tools::Long Top() const
#define IMPLEMENT_FORWARD_XINTERFACE3(classname, refcountbase, baseclass2, baseclass3)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
bool IsScAddrFormulaSel(const ScAddress &addr) const
bool IsOpaque() const
static OUString ReplaceFourChar(const OUString &oldOUString)
SCCOL Col() const
Definition: address.hxx:266
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
CellType meType
Definition: cellvalue.hxx:105
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
OUString GetAllDisplayNote() const
virtual void SAL_CALL disposing() override
virtual void Init() override
bool GetNextRef(ScRange &rRange)
Definition: formulaiter.cxx:52
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
Definition: documen3.cxx:432
void RemoveAccessibilityObject(SfxListener &rObject)
Definition: tabvwshh.cxx:220
virtual css::uno::Any SAL_CALL getExtendedAttributes() override
bool GetProtection() const
Definition: attrib.hxx:143
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
Degree100 GetValue() const
tools::Rectangle GetParagraphBoundingBox() const
OUString getShadowAttrs() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
Definition: viewdata.cxx:2642
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5605
::std::unique_ptr< SvxEditSource > CreateEditSource(ScTabViewShell *pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
void FillPrecedents(utl::AccessibleRelationSetHelper *pRelationSet)
css::uno::Reference< css::accessibility::XAccessible > mxParent
Reference to the parent object.
tools::Long GetHeight() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
bool HasAutoFilter() const
Definition: attrib.hxx:103
void dispose()
ScAccessibleCell(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScTabViewShell *pViewShell, const ScAddress &rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument *pAccDoc)
virtual ~ScAccessibleCell() override
void SetEventSource(const css::uno::Reference< css::accessibility::XAccessible > &rInterface)
sal_uInt16 nPos
sal_Int16 SCTAB
Definition: types.hxx:22
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================