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.Move(aRect.Left(), aRect.Top());
160  }
161  }
162  return aCellRect;
163 }
164 
166 {
167  tools::Rectangle aCellRect;
168  if (mpViewShell)
169  {
170  tools::Long nSizeX, nSizeY;
172  maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
173  aCellRect.SetSize(Size(nSizeX, nSizeY));
175 
177  if (pWindow)
178  {
180  aRect.Move(-aRect.Left(), -aRect.Top());
181  aCellRect = aRect.Intersection(aCellRect);
182  }
183 
184  /* #i19430# Gnopernicus reads text partly if it sticks out of the cell
185  boundaries. This leads to wrong results in cases where the cell
186  text is rotated, because rotation is not taken into account when
187  calculating the visible part of the text. In these cases we will
188  simply expand the cell size to the width of the unrotated text. */
189  if (mpDoc)
190  {
192  if( pItem && (pItem->GetValue() != 0_deg100) )
193  {
195  if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) )
196  aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) );
197  }
198  }
199  }
200  if (aCellRect.IsEmpty())
201  aCellRect.SetPos(Point(-1, -1));
202  return aCellRect;
203 }
204 
205  //===== XAccessibleContext ==============================================
206 
207 sal_Int32 SAL_CALL
209 {
210  return AccessibleStaticTextBase::getAccessibleChildCount();
211 }
212 
213 uno::Reference< XAccessible > SAL_CALL
215 {
216  return AccessibleStaticTextBase::getAccessibleChild(nIndex);
217 }
218 
219 uno::Reference<XAccessibleStateSet> SAL_CALL
221 {
222  SolarMutexGuard aGuard;
223  uno::Reference<XAccessibleStateSet> xParentStates;
224  if (getAccessibleParent().is())
225  {
226  uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext();
227  xParentStates = xParentContext->getAccessibleStateSet();
228  }
230  if (IsDefunc(xParentStates))
231  pStateSet->AddState(AccessibleStateType::DEFUNC);
232  else
233  {
234  if (IsFormulaMode())
235  {
236  pStateSet->AddState(AccessibleStateType::ENABLED);
237  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
238  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
239  if (IsOpaque())
240  pStateSet->AddState(AccessibleStateType::OPAQUE);
241  pStateSet->AddState(AccessibleStateType::SELECTABLE);
242  if (IsSelected())
243  pStateSet->AddState(AccessibleStateType::SELECTED);
244  if (isShowing())
245  pStateSet->AddState(AccessibleStateType::SHOWING);
246  pStateSet->AddState(AccessibleStateType::TRANSIENT);
247  if (isVisible())
248  pStateSet->AddState(AccessibleStateType::VISIBLE);
249  return pStateSet;
250  }
251  if (IsEditable(xParentStates))
252  {
253  pStateSet->AddState(AccessibleStateType::EDITABLE);
254  pStateSet->AddState(AccessibleStateType::RESIZABLE);
255  }
256  pStateSet->AddState(AccessibleStateType::ENABLED);
257  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
258  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
259  pStateSet->AddState(AccessibleStateType::FOCUSABLE);
260  if (IsOpaque())
261  pStateSet->AddState(AccessibleStateType::OPAQUE);
262  pStateSet->AddState(AccessibleStateType::SELECTABLE);
263  if (IsSelected())
264  pStateSet->AddState(AccessibleStateType::SELECTED);
265  if (isShowing())
266  pStateSet->AddState(AccessibleStateType::SHOWING);
267  pStateSet->AddState(AccessibleStateType::TRANSIENT);
268  if (isVisible())
269  pStateSet->AddState(AccessibleStateType::VISIBLE);
270  }
271  return pStateSet;
272 }
273 
274 uno::Reference<XAccessibleRelationSet> SAL_CALL
276 {
277  SolarMutexGuard aGuard;
278  IsObjectValid();
280  if (mpAccDoc)
281  pRelationSet = mpAccDoc->GetRelationSet(&maCellAddress);
282  if (!pRelationSet)
283  pRelationSet = new utl::AccessibleRelationSetHelper();
284  FillDependents(pRelationSet.get());
285  FillPrecedents(pRelationSet.get());
286  return pRelationSet;
287 }
288 
289  //===== XServiceInfo ====================================================
290 
292 {
293  return "ScAccessibleCell";
294 }
295 
296 uno::Sequence< OUString> SAL_CALL
298 {
299  const css::uno::Sequence<OUString> vals { "com.sun.star.sheet.AccessibleCell" };
301 }
302 
303  //==== internal =========================================================
304 
306  const uno::Reference<XAccessibleStateSet>& rxParentStates)
307 {
308  return ScAccessibleContextBase::IsDefunc() || (mpDoc == nullptr) || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
309  (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
310 }
311 
313  const uno::Reference<XAccessibleStateSet>& rxParentStates)
314 {
315  bool bEditable(true);
316  if (rxParentStates.is() && !rxParentStates->contains(AccessibleStateType::EDITABLE) &&
317  mpDoc)
318  {
319  // here I have to test whether the protection of the table should influence this cell.
321  if (pItem)
322  bEditable = !pItem->GetProtection();
323  }
324  return bEditable;
325 }
326 
328 {
329  // test whether there is a background color
330  bool bOpaque(true);
331  if (mpDoc)
332  {
334  if (pItem)
335  bOpaque = pItem->GetColor() != COL_TRANSPARENT;
336  }
337  return bOpaque;
338 }
339 
341 {
342  if (IsFormulaMode())
343  {
344  const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
345  if (pSheet)
346  {
347  return pSheet->IsScAddrFormulaSel(maCellAddress);
348  }
349  return false;
350  }
351 
352  bool bResult(false);
353  if (mpViewShell)
354  {
355  const ScMarkData& rMarkdata = mpViewShell->GetViewData().GetMarkData();
356  bResult = rMarkdata.IsCellMarked(maCellAddress.Col(), maCellAddress.Row());
357  }
358  return bResult;
359 }
360 
362 {
363  ScDocument* pDoc = nullptr;
364  if (pViewShell)
365  pDoc = &pViewShell->GetViewData().GetDocument();
366  return pDoc;
367 }
368 
369 ::std::unique_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
370 {
371  if (IsFormulaMode())
372  {
373  return ::std::unique_ptr< SvxEditSource >();
374  }
375  ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::make_unique<ScAccessibleCellTextData>(pViewShell, aCell, eSplitPos, this)));
376 
377  return pEditSource;
378 }
379 
381 {
382  if (!mpDoc)
383  return;
384 
385  ScRange aRange(0, 0, maCellAddress.Tab(), mpDoc->MaxCol(), mpDoc->MaxRow(), maCellAddress.Tab());
386  ScCellIterator aCellIter(*mpDoc, aRange);
387 
388  for (bool bHasCell = aCellIter.first(); bHasCell; bHasCell = aCellIter.next())
389  {
390  if (aCellIter.getType() == CELLTYPE_FORMULA)
391  {
392  bool bFound = false;
393  ScDetectiveRefIter aIter(*mpDoc, aCellIter.getFormulaCell());
394  ScRange aRef;
395  while ( !bFound && aIter.GetNextRef( aRef ) )
396  {
397  if (aRef.In(maCellAddress))
398  bFound = true;
399  }
400  if (bFound)
401  AddRelation(aCellIter.GetPos(), AccessibleRelationType::CONTROLLER_FOR, pRelationSet);
402  }
403  }
404 }
405 
407 {
408  if (!mpDoc)
409  return;
410 
412  if (aCell.meType == CELLTYPE_FORMULA)
413  {
414  ScFormulaCell* pCell = aCell.mpFormula;
415  ScDetectiveRefIter aIter(*mpDoc, pCell);
416  ScRange aRef;
417  while ( aIter.GetNextRef( aRef ) )
418  {
419  AddRelation( aRef, AccessibleRelationType::CONTROLLED_BY, pRelationSet);
420  }
421  }
422 }
423 
424 void ScAccessibleCell::AddRelation(const ScAddress& rCell,
425  const sal_uInt16 aRelationType,
426  utl::AccessibleRelationSetHelper* pRelationSet)
427 {
428  AddRelation(ScRange(rCell, rCell), aRelationType, pRelationSet);
429 }
430 
431 void ScAccessibleCell::AddRelation(const ScRange& rRange,
432  const sal_uInt16 aRelationType,
433  utl::AccessibleRelationSetHelper* pRelationSet)
434 {
435  uno::Reference < XAccessibleTable > xTable ( getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY );
436  if (!xTable.is())
437  return;
438 
439  const sal_uInt32 nCount(static_cast<sal_uInt32>(rRange.aEnd.Col() -
440  rRange.aStart.Col() + 1) * (rRange.aEnd.Row() -
441  rRange.aStart.Row() + 1));
442  uno::Sequence < uno::Reference < uno::XInterface > > aTargetSet( nCount );
443  uno::Reference < uno::XInterface >* pTargetSet = aTargetSet.getArray();
444  sal_uInt32 nPos(0);
445  for (sal_uInt32 nRow = rRange.aStart.Row(); nRow <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Row()); ++nRow)
446  {
447  for (sal_uInt32 nCol = rRange.aStart.Col(); nCol <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Col()); ++nCol)
448  {
449  pTargetSet[nPos] = xTable->getAccessibleCellAt(nRow, nCol);
450  ++nPos;
451  }
452  }
453  OSL_ENSURE(nCount == nPos, "something went wrong");
454  AccessibleRelation aRelation;
455  aRelation.RelationType = aRelationType;
456  aRelation.TargetSet = aTargetSet;
457  pRelationSet->AddRelation(aRelation);
458 }
459 
460 static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view replacedChar, const OUString& replaceStr)
461 {
462  int iReplace = oldOUString.lastIndexOf(replacedChar);
463  OUString aRet = oldOUString;
464  while(iReplace > -1)
465  {
466  aRet = aRet.replaceAt(iReplace, 1, replaceStr);
467  iReplace = aRet.lastIndexOf(replacedChar, iReplace);
468  }
469  return aRet;
470 }
471 
472 static OUString ReplaceFourChar(const OUString& oldOUString)
473 {
474  OUString aRet = ReplaceOneChar(oldOUString, u"\\", "\\\\");
475  aRet = ReplaceOneChar(aRet, u";", "\\;");
476  aRet = ReplaceOneChar(aRet, u"=", "\\=");
477  aRet = ReplaceOneChar(aRet, u",", "\\,");
478  aRet = ReplaceOneChar(aRet, u":", "\\:");
479  return aRet;
480 }
481 
483 {
484  SolarMutexGuard aGuard;
485 
486  uno::Any strRet;
487  if (mpViewShell)
488  {
489  OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
490  if (!strFor.isEmpty())
491  {
492  strFor = strFor.copy(1);
493  strFor = ReplaceFourChar(strFor);
494  }
495  strFor = "Formula:" + strFor +
496  ";Note:" +
498  getShadowAttrs() + //the string returned contains the spliter ";"
499  getBorderAttrs();//the string returned contains the spliter ";"
500  //end of cell attributes
501  if( mpDoc )
502  {
503  strFor += "isdropdown:";
504  if( IsDropdown() )
505  strFor += "true";
506  else
507  strFor += "false";
508  strFor += ";";
509  }
510  strRet <<= strFor ;
511  }
512  return strRet;
513 }
514 
515 // 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.
516 uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes )
517 {
518  SolarMutexGuard aGuard;
519 
520  uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
521 
522  sal_uInt16 nParaIndent = mpDoc->GetAttr( maCellAddress, ATTR_INDENT )->GetValue();
523  if (nParaIndent > 0)
524  {
525  auto pAttrib = std::find_if(aAttribs.begin(), aAttribs.end(),
526  [](const beans::PropertyValue& rAttrib) { return "ParaLeftMargin" == rAttrib.Name; });
527  if (pAttrib != aAttribs.end())
528  pAttrib->Value <<= nParaIndent;
529  }
530  return aAttribs;
531 }
532 
534 {
535  ScAccessibleSpreadsheet* pSheet = static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
536  if (pSheet)
537  {
538  return pSheet->IsFormulaMode();
539  }
540  return false;
541 }
542 
544 {
545  sal_uInt16 nPosX = maCellAddress.Col();
546  sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
547  sal_uInt16 nTab = maCellAddress.Tab();
548  sal_uInt32 nValidation = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA )->GetValue();
549  if( nValidation )
550  {
551  const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
552  if( pData && pData->HasSelectionList() )
553  return true;
554  }
555  const ScMergeFlagAttr* pAttr = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
556  if( pAttr->HasAutoFilter() )
557  {
558  return true;
559  }
560  else
561  {
562  sal_uInt16 nTabCount = mpDoc->GetTableCount();
563  if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
564  {
565  SCTAB i;
566  ScMarkData aMarks(mpDoc->GetSheetLimits());
567  for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
568  mpDoc->MarkScenario( i, nTab, aMarks, false, ScScenarioFlags::ShowFrame );
569  ScRangeList aRanges;
570  aMarks.FillRangeListWithMarks( &aRanges, false );
571  bool bHasScenario;
572  SCTAB nRangeCount = aRanges.size();
573  for (i=0; i<nRangeCount; i++)
574  {
575  ScRange aRange = aRanges[i];
576  mpDoc->ExtendTotalMerge( aRange );
577  bool bTextBelow = ( aRange.aStart.Row() == 0 );
578  // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
579  if ( bTextBelow )
580  {
581  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
582  }
583  else
584  {
585  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
586  }
587  if( bHasScenario ) return true;
588  }
589  }
590  }
591  return false;
592 }
593 
594 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3108
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)
constexpr tools::Long Left() const
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 ====================================================
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:712
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:363
ScSplitPos
Definition: viewdata.hxx:44
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
Definition: markdata.cxx:284
void AddRelation(const ScAddress &rCell, const sal_uInt16 aRelationType,::utl::AccessibleRelationSetHelper *pRelationSet)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:882
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
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:872
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:314
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
constexpr tools::Long GetWidth() const
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::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
ScViewData & GetViewData()
Definition: tabview.hxx:333
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4745
constexpr bool IsEmpty() const
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
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:871
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:2375
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:873
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.
constexpr tools::Long Top() const
This base class provides an implementation of the AccessibleTable service.
#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:2703
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5644
::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.
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 =====================================================
constexpr tools::Long GetHeight() const