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 css::uno::Sequence< css::uno::Type > SAL_CALL ScAccessibleCell::getTypes()
126 {
127  return ::comphelper::concatSequences(
129  AccessibleStaticTextBase::getTypes(),
131  );
132 }
134 
135  //===== XAccessibleComponent ============================================
136 
137 uno::Reference< XAccessible > SAL_CALL ScAccessibleCell::getAccessibleAtPoint(
138  const awt::Point& rPoint )
139 {
140  return AccessibleStaticTextBase::getAccessibleAtPoint(rPoint);
141 }
142 
144 {
145  SolarMutexGuard aGuard;
146  IsObjectValid();
147  if (getAccessibleParent().is() && mpViewShell)
148  {
149  uno::Reference<XAccessibleComponent> xAccessibleComponent(getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY);
150  if (xAccessibleComponent.is())
151  {
152  xAccessibleComponent->grabFocus();
154  }
155  }
156 }
157 
159 {
160  tools::Rectangle aCellRect(GetBoundingBox());
161  if (mpViewShell)
162  {
164  if (pWindow)
165  {
166  tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
167  aCellRect.Move(aRect.Left(), aRect.Top());
168  }
169  }
170  return aCellRect;
171 }
172 
174 {
175  tools::Rectangle aCellRect;
176  if (mpViewShell)
177  {
178  tools::Long nSizeX, nSizeY;
180  maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
181  aCellRect.SetSize(Size(nSizeX, nSizeY));
183 
185  if (pWindow)
186  {
188  aRect.Move(-aRect.Left(), -aRect.Top());
189  aCellRect = aRect.Intersection(aCellRect);
190  }
191 
192  /* #i19430# Gnopernicus reads text partly if it sticks out of the cell
193  boundaries. This leads to wrong results in cases where the cell
194  text is rotated, because rotation is not taken into account when
195  calculating the visible part of the text. In these cases we will
196  simply expand the cell size to the width of the unrotated text. */
197  if (mpDoc)
198  {
200  if( pItem && (pItem->GetValue() != 0_deg100) )
201  {
203  if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) )
204  aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) );
205  }
206  }
207  }
208  if (aCellRect.IsEmpty())
209  aCellRect.SetPos(Point(-1, -1));
210  return aCellRect;
211 }
212 
213  //===== XAccessibleContext ==============================================
214 
215 sal_Int32 SAL_CALL
217 {
218  return AccessibleStaticTextBase::getAccessibleChildCount();
219 }
220 
221 uno::Reference< XAccessible > SAL_CALL
223 {
224  return AccessibleStaticTextBase::getAccessibleChild(nIndex);
225 }
226 
227 uno::Reference<XAccessibleStateSet> SAL_CALL
229 {
230  SolarMutexGuard aGuard;
231  uno::Reference<XAccessibleStateSet> xParentStates;
232  if (getAccessibleParent().is())
233  {
234  uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext();
235  xParentStates = xParentContext->getAccessibleStateSet();
236  }
238  if (IsDefunc(xParentStates))
239  pStateSet->AddState(AccessibleStateType::DEFUNC);
240  else
241  {
242  if (IsFocused())
243  pStateSet->AddState(AccessibleStateType::FOCUSED);
244 
245  if (IsFormulaMode())
246  {
247  pStateSet->AddState(AccessibleStateType::ENABLED);
248  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
249  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
250  if (IsOpaque())
251  pStateSet->AddState(AccessibleStateType::OPAQUE);
252  pStateSet->AddState(AccessibleStateType::SELECTABLE);
253  if (IsSelected())
254  pStateSet->AddState(AccessibleStateType::SELECTED);
255  if (isShowing())
256  pStateSet->AddState(AccessibleStateType::SHOWING);
257  pStateSet->AddState(AccessibleStateType::TRANSIENT);
258  if (isVisible())
259  pStateSet->AddState(AccessibleStateType::VISIBLE);
260  return pStateSet;
261  }
262  if (IsEditable(xParentStates))
263  {
264  pStateSet->AddState(AccessibleStateType::EDITABLE);
265  pStateSet->AddState(AccessibleStateType::RESIZABLE);
266  }
267  pStateSet->AddState(AccessibleStateType::ENABLED);
268  pStateSet->AddState(AccessibleStateType::MULTI_LINE);
269  pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
270  pStateSet->AddState(AccessibleStateType::FOCUSABLE);
271  if (IsOpaque())
272  pStateSet->AddState(AccessibleStateType::OPAQUE);
273  pStateSet->AddState(AccessibleStateType::SELECTABLE);
274  if (IsSelected())
275  pStateSet->AddState(AccessibleStateType::SELECTED);
276  if (isShowing())
277  pStateSet->AddState(AccessibleStateType::SHOWING);
278  pStateSet->AddState(AccessibleStateType::TRANSIENT);
279  if (isVisible())
280  pStateSet->AddState(AccessibleStateType::VISIBLE);
281  }
282  return pStateSet;
283 }
284 
285 uno::Reference<XAccessibleRelationSet> SAL_CALL
287 {
288  SolarMutexGuard aGuard;
289  IsObjectValid();
291  if (mpAccDoc)
292  pRelationSet = mpAccDoc->GetRelationSet(&maCellAddress);
293  if (!pRelationSet)
294  pRelationSet = new utl::AccessibleRelationSetHelper();
295  FillDependents(pRelationSet.get());
296  FillPrecedents(pRelationSet.get());
297  return pRelationSet;
298 }
299 
300  //===== XServiceInfo ====================================================
301 
303 {
304  return "ScAccessibleCell";
305 }
306 
307 uno::Sequence< OUString> SAL_CALL
309 {
310  const css::uno::Sequence<OUString> vals { "com.sun.star.sheet.AccessibleCell" };
312 }
313 
314  //==== internal =========================================================
315 
317  const uno::Reference<XAccessibleStateSet>& rxParentStates)
318 {
319  return ScAccessibleContextBase::IsDefunc() || (mpDoc == nullptr) || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
320  (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
321 }
322 
324  const uno::Reference<XAccessibleStateSet>& rxParentStates)
325 {
326  bool bEditable(true);
327  if (rxParentStates.is() && !rxParentStates->contains(AccessibleStateType::EDITABLE) &&
328  mpDoc)
329  {
330  // here I have to test whether the protection of the table should influence this cell.
332  if (pItem)
333  bEditable = !pItem->GetProtection();
334  }
335  return bEditable;
336 }
337 
339 {
340  // test whether there is a background color
341  bool bOpaque(true);
342  if (mpDoc)
343  {
345  if (pItem)
346  bOpaque = pItem->GetColor() != COL_TRANSPARENT;
347  }
348  return bOpaque;
349 }
350 
352 {
354  return mpViewShell->GetActiveWin()->HasFocus();
355 
356  return false;
357 }
358 
360 {
361  if (IsFormulaMode())
362  {
363  const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
364  if (pSheet)
365  {
366  return pSheet->IsScAddrFormulaSel(maCellAddress);
367  }
368  return false;
369  }
370 
371  bool bResult(false);
372  if (mpViewShell)
373  {
374  const ScMarkData& rMarkdata = mpViewShell->GetViewData().GetMarkData();
375  bResult = rMarkdata.IsCellMarked(maCellAddress.Col(), maCellAddress.Row());
376  }
377  return bResult;
378 }
379 
381 {
382  ScDocument* pDoc = nullptr;
383  if (pViewShell)
384  pDoc = &pViewShell->GetViewData().GetDocument();
385  return pDoc;
386 }
387 
388 ::std::unique_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
389 {
390  if (IsFormulaMode())
391  {
392  return ::std::unique_ptr< SvxEditSource >();
393  }
394  ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::make_unique<ScAccessibleCellTextData>(pViewShell, aCell, eSplitPos, this)));
395 
396  return pEditSource;
397 }
398 
400 {
401  if (!mpDoc)
402  return;
403 
404  ScRange aRange(0, 0, maCellAddress.Tab(), mpDoc->MaxCol(), mpDoc->MaxRow(), maCellAddress.Tab());
405  ScCellIterator aCellIter(*mpDoc, aRange);
406 
407  for (bool bHasCell = aCellIter.first(); bHasCell; bHasCell = aCellIter.next())
408  {
409  if (aCellIter.getType() == CELLTYPE_FORMULA)
410  {
411  bool bFound = false;
412  ScDetectiveRefIter aIter(*mpDoc, aCellIter.getFormulaCell());
413  ScRange aRef;
414  while ( !bFound && aIter.GetNextRef( aRef ) )
415  {
416  if (aRef.Contains(maCellAddress))
417  bFound = true;
418  }
419  if (bFound)
420  AddRelation(aCellIter.GetPos(), AccessibleRelationType::CONTROLLER_FOR, pRelationSet);
421  }
422  }
423 }
424 
426 {
427  if (!mpDoc)
428  return;
429 
431  if (aCell.meType == CELLTYPE_FORMULA)
432  {
433  ScFormulaCell* pCell = aCell.mpFormula;
434  ScDetectiveRefIter aIter(*mpDoc, pCell);
435  ScRange aRef;
436  while ( aIter.GetNextRef( aRef ) )
437  {
438  AddRelation( aRef, AccessibleRelationType::CONTROLLED_BY, pRelationSet);
439  }
440  }
441 }
442 
443 void ScAccessibleCell::AddRelation(const ScAddress& rCell,
444  const sal_uInt16 aRelationType,
445  utl::AccessibleRelationSetHelper* pRelationSet)
446 {
447  AddRelation(ScRange(rCell, rCell), aRelationType, pRelationSet);
448 }
449 
450 void ScAccessibleCell::AddRelation(const ScRange& rRange,
451  const sal_uInt16 aRelationType,
452  utl::AccessibleRelationSetHelper* pRelationSet)
453 {
454  uno::Reference < XAccessibleTable > xTable ( getAccessibleParent()->getAccessibleContext(), uno::UNO_QUERY );
455  if (!xTable.is())
456  return;
457 
458  const sal_uInt32 nCount(static_cast<sal_uInt32>(rRange.aEnd.Col() -
459  rRange.aStart.Col() + 1) * (rRange.aEnd.Row() -
460  rRange.aStart.Row() + 1));
461  uno::Sequence < uno::Reference < uno::XInterface > > aTargetSet( nCount );
462  uno::Reference < uno::XInterface >* pTargetSet = aTargetSet.getArray();
463  sal_uInt32 nPos(0);
464  for (sal_uInt32 nRow = rRange.aStart.Row(); nRow <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Row()); ++nRow)
465  {
466  for (sal_uInt32 nCol = rRange.aStart.Col(); nCol <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Col()); ++nCol)
467  {
468  pTargetSet[nPos] = xTable->getAccessibleCellAt(nRow, nCol);
469  ++nPos;
470  }
471  }
472  OSL_ENSURE(nCount == nPos, "something went wrong");
473  AccessibleRelation aRelation;
474  aRelation.RelationType = aRelationType;
475  aRelation.TargetSet = aTargetSet;
476  pRelationSet->AddRelation(aRelation);
477 }
478 
479 static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view replacedChar, std::u16string_view replaceStr)
480 {
481  int iReplace = oldOUString.lastIndexOf(replacedChar);
482  OUString aRet = oldOUString;
483  while(iReplace > -1)
484  {
485  aRet = aRet.replaceAt(iReplace, 1, replaceStr);
486  iReplace = aRet.lastIndexOf(replacedChar, iReplace);
487  }
488  return aRet;
489 }
490 
491 static OUString ReplaceFourChar(const OUString& oldOUString)
492 {
493  OUString aRet = ReplaceOneChar(oldOUString, u"\\", u"\\\\");
494  aRet = ReplaceOneChar(aRet, u";", u"\\;");
495  aRet = ReplaceOneChar(aRet, u"=", u"\\=");
496  aRet = ReplaceOneChar(aRet, u",", u"\\,");
497  aRet = ReplaceOneChar(aRet, u":", u"\\:");
498  return aRet;
499 }
500 
502 {
503  SolarMutexGuard aGuard;
504 
505  uno::Any strRet;
506  if (mpViewShell)
507  {
508  OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
509  if (!strFor.isEmpty())
510  {
511  strFor = strFor.copy(1);
512  strFor = ReplaceFourChar(strFor);
513  }
514  strFor = "Formula:" + strFor +
515  ";Note:" +
517  getShadowAttrs() + //the string returned contains the spliter ";"
518  getBorderAttrs();//the string returned contains the spliter ";"
519  //end of cell attributes
520  if( mpDoc )
521  {
522  strFor += "isdropdown:";
523  if( IsDropdown() )
524  strFor += "true";
525  else
526  strFor += "false";
527  strFor += ";";
528  }
529  strRet <<= strFor ;
530  }
531  return strRet;
532 }
533 
534 // 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.
535 uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes )
536 {
537  SolarMutexGuard aGuard;
538 
539  uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
540 
541  sal_uInt16 nParaIndent = mpDoc->GetAttr( maCellAddress, ATTR_INDENT )->GetValue();
542  if (nParaIndent > 0)
543  {
544  auto [begin, end] = asNonConstRange(aAttribs);
545  auto pAttrib = std::find_if(begin, end,
546  [](const beans::PropertyValue& rAttrib) { return "ParaLeftMargin" == rAttrib.Name; });
547  if (pAttrib != end)
548  pAttrib->Value <<= nParaIndent;
549  }
550  return aAttribs;
551 }
552 
554 {
555  ScAccessibleSpreadsheet* pSheet = static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
556  if (pSheet)
557  {
558  return pSheet->IsFormulaMode();
559  }
560  return false;
561 }
562 
564 {
565  sal_uInt16 nPosX = maCellAddress.Col();
566  sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
567  sal_uInt16 nTab = maCellAddress.Tab();
568  sal_uInt32 nValidation = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA )->GetValue();
569  if( nValidation )
570  {
571  const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
572  if( pData && pData->HasSelectionList() )
573  return true;
574  }
575  const ScMergeFlagAttr* pAttr = mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
576  if( pAttr->HasAutoFilter() )
577  {
578  return true;
579  }
580  else
581  {
582  sal_uInt16 nTabCount = mpDoc->GetTableCount();
583  if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
584  {
585  SCTAB i;
586  ScMarkData aMarks(mpDoc->GetSheetLimits());
587  for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
588  mpDoc->MarkScenario( i, nTab, aMarks, false, ScScenarioFlags::ShowFrame );
589  ScRangeList aRanges;
590  aMarks.FillRangeListWithMarks( &aRanges, false );
591  bool bHasScenario;
592  SCTAB nRangeCount = aRanges.size();
593  for (i=0; i<nRangeCount; i++)
594  {
595  ScRange aRange = aRanges[i];
596  mpDoc->ExtendTotalMerge( aRange );
597  bool bTextBelow = ( aRange.aStart.Row() == 0 );
598  // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
599  if ( bTextBelow )
600  {
601  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
602  }
603  else
604  {
605  bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
606  }
607  if( bHasScenario ) return true;
608  }
609  }
610  }
611  return false;
612 }
613 
614 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3135
void SetPos(const Point &rPoint)
Type
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual bool isVisible() override
bool IsFocused() const
rtl::Reference< utl::AccessibleRelationSetHelper > GetRelationSet(const ScAddress *pAddress) const
======== internal =====================================================
ScAddress aStart
Definition: address.hxx:497
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:274
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
std::unique_ptr< sal_Int32[]> pData
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:498
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
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:703
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:270
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:888
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
enumrange< T >::Iterator begin(enumrange< T >)
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:891
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:315
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:283
void AddRelation(const css::accessibility::AccessibleRelation &rRelation)
static OUString ReplaceOneChar(const OUString &oldOUString, std::u16string_view replacedChar, std::u16string_view replaceStr)
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
ScViewData & GetViewData()
Definition: tabview.hxx:333
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:887
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4764
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:890
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:896
size_t size() const
Definition: rangelst.hxx:89
OUString GetFormula(const ScAddress &rAddress)
Definition: tabvwsh.cxx:109
float u
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:855
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
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
enumrange< T >::Iterator end(enumrange< T >)
static OUString ReplaceFourChar(const OUString &oldOUString)
SCCOL Col() const
Definition: address.hxx:279
ScAddress GetCurPos() const
Definition: viewdata.cxx:4121
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:2721
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5712
::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()
IMPLEMENT_GET_IMPLEMENTATION_ID(DrawController)
bool HasFocus() const
ScAccessibleCell(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScTabViewShell *pViewShell, const ScAddress &rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument *pAccDoc)
virtual ~ScAccessibleCell() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_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