24#include <document.hxx>
32#include <com/sun/star/accessibility/AccessibleStateType.hpp>
33#include <com/sun/star/accessibility/AccessibleEventId.hpp>
34#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
35#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
49static bool CompMinCol(
const std::pair<sal_uInt16,sal_uInt16> & pc1,
const std::pair<sal_uInt16,sal_uInt16> &pc2)
51 return pc1.first < pc2.first;
56 if (pMarkedRanges->
size() <= 1)
62 const int nCurCol = nSelectedChildIndex % nColNum;
63 const int nCurRow = (nSelectedChildIndex - nCurCol)/nColNum;
69 sal_Int32 nMinRow = pDoc->
MaxRow();
70 sal_Int32 nMaxRow = 0;
71 std::vector<ScRange> aRanges;
72 size_t nSize = pMarkedRanges->
size();
73 for (
size_t i = 0;
i < nSize; ++
i)
75 ScRange const & rRange = (*pMarkedRanges)[
i];
81 aRanges.push_back(rRange);
82 nMinRow = std::min(rRange.
aStart.
Row(),nMinRow);
83 nMaxRow = std::max(rRange.
aEnd.
Row(),nMaxRow);
86 SAL_WARN(
"sc",
"Range of wrong table");
90 aRanges.push_back(rRange);
91 nMinRow = std::min(rRange.
aStart.
Row(),nMinRow);
92 nMaxRow = std::max(rRange.
aEnd.
Row(),nMaxRow);
95 SAL_WARN(
"sc",
"Range of wrong table");
97 int nCurrentIndex = 0 ;
98 for(sal_Int32 row = nMinRow ; row <= nMaxRow ; ++row)
100 std::vector<std::pair<SCCOL, SCCOL>> aVecCol;
101 for (
ScRange const & r : aRanges)
103 if ( row >= r.aStart.Row() && row <= r.aEnd.Row())
105 aVecCol.emplace_back(r.aStart.Col(), r.aEnd.Col());
108 std::sort(aVecCol.begin(), aVecCol.end(),
CompMinCol);
109 for (
const std::pair<SCCOL, SCCOL> &pairCol : aVecCol)
111 SCCOL nCol = pairCol.second - pairCol.first + 1;
112 if (nCol + nCurrentIndex > nSelectedChildIndex)
116 nCurrentIndex += nCol;
124 std::vector<ScMyAddress> &vecRet,
int &nSize)
136 if (nCellCount + nSize > nMax)
140 else if(nCellCount > 0)
153 sal_Int32 nMaxRow = rSrc.
aEnd.
Row();
154 for (; nMinRow <= nMaxRow ; ++nMinRow,--nMaxRow)
165 vecRet.push_back(cell);
169 if (nMinRow != nMaxRow)
180 vecRet.push_back(cell);
191 int nMax, std::vector<ScMyAddress> &vecRet)
193 if (pSrc ==
nullptr || pDest ==
nullptr)
206 size_t nSrcSize = pSrc->
size();
207 for (
size_t i = 0;
i < nSrcSize; ++
i)
209 ScRange const & rRange = (*pSrc)[
i];
222 size_t nSizeSrc = pSrc->
size();
223 for (
size_t i = 0;
i < nSizeSrc; ++
i)
225 ScRange const & rRange = (*pSrc)[
i];
226 size_t nSizeDest = pDest->
size();
227 for (
size_t j = 0; j < nSizeDest; ++j)
229 ScRange const & rRangeDest = (*pDest)[j];
249 ScAccessibleTableBase( pAccDoc, GetDocument(pViewShell),
ScRange( 0, 0, nTab, GetDocument(pViewShell)->MaxCol(), GetDocument(pViewShell)->MaxRow(), nTab)),
250 mbIsSpreadsheet( true ),
251 m_bFormulaMode( false ),
252 m_bFormulaLastMode( false ),
253 m_nMinX(0),m_nMaxX(0),m_nMinY(0),m_nMaxY(0)
261 mbIsSpreadsheet( false ),
262 m_bFormulaMode( false ),
263 m_bFormulaLastMode( false ),
264 m_nMinX(0),m_nMaxX(0),m_nMinY(0),m_nMaxY(0)
326 AccessibleEventObject
aEvent;
327 aEvent.EventId = AccessibleEventId::STATE_CHANGED;
329 aEvent.NewValue <<= AccessibleStateType::SELECTED;
331 aEvent.OldValue <<= AccessibleStateType::SELECTED;
332 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
339 AccessibleEventObject
aEvent;
340 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
341 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
352 AccessibleEventObject
aEvent;
353 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
354 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
355 uno::Reference< XAccessible > xNew;
388 AccessibleEventObject
aEvent;
389 aEvent.EventId = AccessibleEventId::BOUNDRECT_CHANGED;
390 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
397 AccessibleEventObject
aEvent;
398 aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
399 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
410 if (pRefHint->GetMode() ==
URM_INSDEL && pRefHint->GetDz() == 0)
420 SCROW nFirstRow = -1;
422 SCCOL nFirstCol = -1;
426 SCCOL nX(pRefHint->GetDx());
427 SCROW nY(pRefHint->GetDy());
428 ScRange aRange(pRefHint->GetRange());
429 if ((nX < 0) || (nY < 0))
431 assert(!((nX < 0) && (nY < 0)) &&
"should not be possible to remove row and column at the same time");
437 nId = AccessibleTableModelChangeType::COLUMNS_REMOVED;
443 nId = AccessibleTableModelChangeType::ROWS_REMOVED;
448 else if ((nX > 0) || (nY > 0))
450 assert(!((nX > 0) && (nY > 0)) &&
"should not be possible to add row and column at the same time");
456 nId = AccessibleTableModelChangeType::COLUMNS_INSERTED;
462 nId = AccessibleTableModelChangeType::ROWS_INSERTED;
469 assert(
false &&
"is it a deletion or an insertion?");
474 AccessibleEventObject
aEvent;
475 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
476 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
485 if (rHint.
GetId() == SfxHintId::ScAccCursorChanged)
507 AccessibleEventObject
aEvent;
508 aEvent.Source = uno::Reference< XAccessible >(
this);
512 aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
522 bool bNewPosCellFocus=
false;
525 bNewPosCellFocus=
true;
530 bool bIsMark =refScMarkData.
IsMarked();
532 bool bNewMarked = refScMarkData.
GetTableSelect(aNewCell.
Tab()) && ( bIsMark || bIsMultMark );
534 sal_uInt16 nTab = rViewData.
GetTabNo();
539 if ( !bNewPosCellFocus &&
540 (bNewMarked || bIsMark || bIsMultMark ) &&
543 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
557 if ((bNewMarked || bIsMark || bIsMultMark ) && (bWholeCol || bWholeRow))
566 bool bLastIsWholeColRow =
570 bLastIsWholeColRow &&
575 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
585 bool bSendSingle= (0 == nNewMarkCount) && bNewPosCell;
593 uno::Reference< XAccessible > xChild ;
594 if (bNewPosCellFocus)
604 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
605 aEvent.NewValue <<= xChild;
606 aEvent.OldValue <<= uno::Reference< XAccessible >();
609 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
610 aEvent.NewValue <<= xChild;
619 bool bIsDel = rViewData.
GetDelMark( aDelRange );
620 if ( (!bIsDel || aMarkRange != aDelRange) &&
630 std::vector<ScMyAddress> vecNew;
633 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
639 for(
const auto& rAddr : vecNew)
642 if (!(bNewPosCellFocus && rAddr == aNewCell) )
644 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
645 aEvent.NewValue <<= xChild;
648 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
649 aEvent.NewValue <<= xChild;
663 else if (rHint.
GetId() == SfxHintId::ScDataChanged)
681 AccessibleEventObject
aEvent;
682 aEvent.EventId = AccessibleEventId::VALUE_CHANGED;
690 AccessibleEventObject
aEvent;
691 aEvent.EventId = AccessibleEventId::NAME_CHANGED;
692 OUString sOldName(
ScResId(STR_ACC_TABLE_NAME));
694 aEvent.OldValue <<= sOldName;
695 OUString sNewName(
ScResId(STR_ACC_TABLE_NAME));
696 sNewName = sNewName.replaceFirst(
"%1", tabName);
697 aEvent.NewValue <<= sNewName;
730 AccessibleEventObject
aEvent;
731 aEvent.Source = uno::Reference< XAccessible >(
this);
735 if (refScMarkData.
IsCellMarked(miRemove->first.Col(),miRemove->first.Row(),
true) ||
736 refScMarkData.
IsCellMarked(miRemove->first.Col(),miRemove->first.Row()) )
741 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
742 aEvent.NewValue <<= miRemove->second;
754 AccessibleEventObject
aEvent;
755 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
756 aEvent.Source = uno::Reference< XAccessible >(
this);
776 uno::Reference< XAccessibleTable > xAccessibleTable;
781 SCROW nStart = oRowRange->aStart.Row();
782 SCROW nEnd = oRowRange->aEnd.Row();
784 if( (0 <= nStart) && (nStart <= nEnd) && (nEnd <= pDoc->MaxRow()) )
788 return xAccessibleTable;
795 uno::Reference< XAccessibleTable > xAccessibleTable;
800 SCCOL nStart = oColRange->aStart.Col();
801 SCCOL nEnd = oColRange->aEnd.Col();
803 if( (0 <= nStart) && (nStart <= nEnd) && (nEnd <= pDoc->MaxCol()) )
807 return xAccessibleTable;
814 uno::Sequence<sal_Int32> aSequence;
823 sal_Int32* pSequence = aSequence.getArray();
833 aSequence.realloc(
nCount);
836 aSequence.realloc(0);
844 uno::Sequence<sal_Int32> aSequence;
849 sal_Int32* pSequence = aSequence.getArray();
860 aSequence.realloc(
nCount);
874 throw lang::IndexOutOfBoundsException();
895 throw lang::IndexOutOfBoundsException();
933 xCell = it->second.get();
937 m_mapCells.insert(std::make_pair(aCellAddress, xCell));
953 throw lang::IndexOutOfBoundsException();
956 return pAccessibleCell;
971 throw lang::IndexOutOfBoundsException();
986 uno::Reference< XAccessible > xAccessible;
999 catch(
const css::lang::IndexOutOfBoundsException &)
1013 if (xAccessibleComponent.is())
1014 xAccessibleComponent->grabFocus();
1027 return sal_Int32(
SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
1038 return pRelationSet;
1045 sal_Int64 nParentStates = 0;
1048 uno::Reference<XAccessibleContext> xParentContext =
getAccessibleParent()->getAccessibleContext();
1049 nParentStates = xParentContext->getAccessibleStateSet();
1051 sal_Int64 nStateSet = 0;
1053 nStateSet |= AccessibleStateType::DEFUNC;
1056 nStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
1058 nStateSet |= AccessibleStateType::EDITABLE;
1059 nStateSet |= AccessibleStateType::ENABLED;
1060 nStateSet |= AccessibleStateType::FOCUSABLE;
1062 nStateSet |= AccessibleStateType::FOCUSED;
1063 nStateSet |= AccessibleStateType::MULTI_SELECTABLE;
1064 nStateSet |= AccessibleStateType::OPAQUE;
1065 nStateSet |= AccessibleStateType::SELECTABLE;
1067 nStateSet |= AccessibleStateType::SELECTED;
1069 nStateSet |= AccessibleStateType::SHOWING;
1071 nStateSet |= AccessibleStateType::VISIBLE;
1083 throw lang::IndexOutOfBoundsException();
1128 sal_Int64 nResult(0);
1151uno::Reference<XAccessible > SAL_CALL
1156 uno::Reference < XAccessible > xAccessible;
1175 if ((nSelectedChildIndex < 0) ||
1178 throw lang::IndexOutOfBoundsException();
1196 throw lang::IndexOutOfBoundsException();
1292 return "ScAccessibleSpreadsheet";
1295uno::Sequence< OUString> SAL_CALL
1298 const css::uno::Sequence<OUString> vals {
"com.sun.star.AccessibleSpreadsheet" };
1304uno::Sequence<sal_Int8> SAL_CALL
1307 return css::uno::Sequence<sal_Int8>();
1350 (nParentStates & AccessibleStateType::DEFUNC);
1359 bool bProtected(
false);
1367 bool bFocused(
false);
1383 bool bResult(
false);
1487 AccessibleEventObject
aEvent;
1488 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
1489 aEvent.Source = uno::Reference< XAccessible >(
this);
1503 sal_uInt16 nRefEndX = rViewData.
GetRefEndX();
1512 m_nMinX =std::min(nRefStartX,nRefEndX);
1513 m_nMaxX =std::max(nRefStartX,nRefEndX);
1514 m_nMinY = std::min(nRefStartY,nRefEndY);
1515 m_nMaxY = std::max(nRefStartY,nRefEndY);
1517 AccessibleEventObject
aEvent;
1518 aEvent.Source = uno::Reference< XAccessible >(
this);
1519 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
1523 aEvent.NewValue <<= xNew;
1525 if (nRefStartX == nRefEndX && nRefStartY == nRefEndY)
1527 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
1528 aEvent.NewValue <<= xNew;
1536 std::vector<ScMyAddress> vecCurSel;
1538 vecCurSel.reserve(nCurSize);
1544 vecCurSel.push_back(aAddr);
1547 std::sort(vecCurSel.begin(), vecCurSel.end());
1548 std::vector<ScMyAddress> vecNew;
1549 std::set_difference(vecCurSel.begin(),vecCurSel.end(),
1551 std::back_insert_iterator(vecNew));
1552 int nNewSize = vecNew.size();
1553 if ( nNewSize > 10 )
1555 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
1561 for(
const auto& rAddr : vecNew)
1563 uno::Reference< XAccessible > xChild;
1564 if (rAddr == aFormulaAddr)
1571 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
1572 aEvent.NewValue <<= xChild;
1575 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
1576 aEvent.NewValue <<= xChild;
1589 AccessibleEventObject
aEvent;
1590 aEvent.Source = uno::Reference< XAccessible >(
this);
1599 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
1600 aEvent.NewValue <<= miRemove->second;
1616 return nIndex <= nMaxIndex && nIndex >= 0 ;
1623 if (nIndex < 0 || nIndex >= nRowAll * nColAll)
1636 sal_uInt16 nColRelative = sal_uInt16(nColumn) -
GetColAll();
1637 sal_Int32 nRowRelative = nRow -
GetRowAll();
1638 if (nRow < 0 || nColumn < 0 || nRowRelative >=
GetRowAll() || nColRelative >=
GetColAll() )
1642 return static_cast<sal_Int64
>(
GetRowAll()) *
static_cast<sal_Int64
>(nRowRelative) + nColRelative;
1668 if( nRefX <= pDoc->MaxCol() && nRefY >= 0 && nRefY <= pDoc->MaxRow())
static bool CompMinCol(const std::pair< sal_uInt16, sal_uInt16 > &pc1, const std::pair< sal_uInt16, sal_uInt16 > &pc2)
static rtl::Reference< ScAccessibleCell > create(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScTabViewShell *pViewShell, const ScAddress &rCellAddress, sal_Int64 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument *pAccDoc)
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
void IsObjectValid() const
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
===== XAccessibleEventBroadcaster =====================================
void CommitFocusLost() const
Calls all FocusListener to tell they that the focus is lost.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
void CommitFocusGained() const
Calls all FocusListener to tell they that the focus is gained.
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
rtl::Reference< utl::AccessibleRelationSetHelper > GetRelationSet(const ScAddress *pAddress) const
======== internal =====================================================
@descr This base class provides an implementation of the AccessibleTable service.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
virtual void SAL_CALL grabFocus() override
static ScDocument * GetDocument(ScTabViewShell *pViewShell)
virtual sal_Bool SAL_CALL unselectColumn(sal_Int32 column) override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
Returns a boolean value indicating whether the specified row is selected.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
===== XAccessibleContext ==============================================
std::vector< ScMyAddress > m_vecFormulaLastMyAddr
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
Returns the column headers as an AccessibleTable.
virtual ~ScAccessibleSpreadsheet() override
bool CheckChildIndex(sal_Int64) const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Return the set of current states.
void FireFirstCellFocus()
bool IsCompleteSheetSelected()
virtual sal_Bool SAL_CALL unselectRow(sal_Int32 row) override
ScAddress m_aFormulaActiveCell
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
===== XAccessibleTable ================================================
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
===== XTypeProvider ===================================================
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
Returns the selected rows in a table.
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nChildIndex) override
void CommitFocusCell(const ScAddress &aNewCell)
rtl::Reference< ScAccessibleCell > mpAccCell
MAP_ADDR_XACC m_mapFormulaSelectionSend
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
static bool CalcScRangeDifferenceMax(const ScRange &rSrc, const ScRange &rDest, int nMax, std::vector< ScMyAddress > &vecRet, int &nSize)
ScMyAddress CalcScAddressFromRangeList(ScRangeList *pMarkedRanges, sal_Int32 nSelectedChildIndex)
sal_Int32 GetRowAll() const
virtual void SAL_CALL selectAllAccessibleChildren() override
void ConstructScAccessibleSpreadsheet(ScAccessibleDocument *pAccDoc, ScTabViewShell *pViewShell, SCTAB nTab, ScSplitPos eSplitPos)
sal_Int64 GetAccessibleIndexFormula(sal_Int32 nRow, sal_Int32 nColumn)
bool IsScAddrFormulaSel(const ScAddress &addr) const
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the Accessible at a specified row and column in the table.
MAP_ADDR_XACC m_mapSelectionSend
std::unique_ptr< ScRangeList > mpMarkedRanges
virtual sal_Bool SAL_CALL selectColumn(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getBackground() override
ScAccessibleSpreadsheet(ScAccessibleDocument *pAccDoc, ScTabViewShell *pViewShell, SCTAB nTab, ScSplitPos eSplitPos)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
void RemoveFormulaSelection(bool bRemoveAll=false)
OUString m_strCurCellValue
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
Returns a boolean value indicating whether the accessible at a specified row and column is selected.
virtual sal_Bool SAL_CALL selectRow(sal_Int32 row) override
static bool CalcScRangeListDifferenceMax(ScRangeList *pSrc, ScRangeList *pDest, int nMax, std::vector< ScMyAddress > &vecRet)
rtl::Reference< ScAccessibleCell > m_pAccFormulaCell
ScRange m_aLastWithInMarkRange
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
Returns the selected columns in a table.
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
Returns a boolean value indicating whether the specified column is selected.
ScAddress GetChildIndexAddress(sal_Int64) const
virtual void SAL_CALL disposing() override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
virtual sal_Int32 SAL_CALL getForeground() override
rtl::Reference< ScAccessibleCell > GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
void BoundingBoxChanged()
ScTabViewShell * mpViewShell
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
===== XAccessibleEventBroadcaster =====================================
ScRangeList m_LastMarkedRanges
void CompleteSelectionChanged(bool bNewState)
void RemoveSelection(const ScMarkData &refScMarkData)
std::map< ScAddress, unotools::WeakReference< ScAccessibleCell > > m_mapCells
ScAccessibleDocument * mpAccDoc
void SelectCell(sal_Int32 nRow, sal_Int32 nCol, bool bDeselect)
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
bool GetFormulaCurrentFocusCell(ScAddress &addr)
virtual void SAL_CALL clearAccessibleSelection() override
sal_uInt16 GetColAll() const
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
===== XAccessibleSelection ===========================================
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
===== XAccessibleExtendedTable ========================================
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
Returns the row number of an index in the table.
ScRange maRange
contains the range of the table, because it could be a subrange of the complete table
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Return the number of currently visible children.
void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId)
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
Returns the column number of an index in the table.
virtual void SAL_CALL disposing() override
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC std::optional< ScRange > GetRepeatColRange(SCTAB nTab)
SC_DLLPUBLIC std::optional< ScRange > GetRepeatRowRange(SCTAB nTab)
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
bool IsAllMarked(const ScRange &rRange) const
const ScRange & GetMarkArea() const
bool IsMultiMarked() const
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
bool GetTableSelect(SCTAB nTab) const
bool IsColumnMarked(SCCOL nCol) const
bool IsRowMarked(SCROW nRow) const
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
sal_uInt64 GetCellCount() const
bool Intersects(const ScRange &rRange) const
bool Contains(const ScAddress &) const
is Address& fully in Range?
bool GetForceFocusOnCurCell() const
void AddAccessibilityObject(SfxListener &rObject)
void RemoveAccessibilityObject(SfxListener &rObject)
void InitBlockMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bTestNeg=false, bool bCols=false, bool bRows=false, bool bForceNeg=false)
void DoneBlockMode(bool bContinue=false)
void SelectionChanged(bool bFromPaste=false)
void InitRefMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType)
void MarkCursor(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bCols=false, bool bRows=false, bool bCellSelection=false)
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
void SelectAll(bool bContinue=false)
vcl::Window * GetWindowByPos(ScSplitPos ePos) const
void UpdateRef(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ)
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
ScMarkData & GetMarkData()
ScDocument & GetDocument() const
SCCOL GetRefStartX() const
void GetPosFromPixel(tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich, SCCOL &rPosX, SCROW &rPosY, bool bTestMerge=true, bool bRepair=false, SCTAB nForTab=-1)
void SetRefEnd(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
ScSplitPos GetActivePart() const
bool GetDelMark(ScRange &rRange) const
SCROW GetRefStartY() const
ScAddress GetCurPos() const
void SetRefStart(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
tools::Rectangle GetWindowExtentsAbsolute() const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window &rRelativeWindow) const
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define SAL_WARN(area, stream)
RttiCompleteObjectLocator col
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OUString ScResId(TranslateId aId)