22#include <com/sun/star/sheet/XSpreadsheet.hpp>
23#include <com/sun/star/table/XCellRange.hpp>
30#include <document.hxx>
31#include <osl/diagnose.h>
48 if( ( aNewAddr.
Tab() == rCellAddress.
Tab() ) &&
49 ( ( aNewAddr.
Row() < rCellAddress.
Row() ) ||
50 ( ( aNewAddr.
Row() == rCellAddress.
Row() ) && ( aNewAddr.
Col() < rCellAddress.
Col() ) ) ) )
51 rCellAddress = aNewAddr;
79 return ( nTable == rCellAddress.
Tab() );
88 ScMyShapeList::iterator aItr(
aShapeList.begin());
89 ScMyShapeList::iterator aEndItr(
aShapeList.end());
90 while( (aItr != aEndItr) && (aItr->aAddress == rMyCell.
maCellAddress) )
101 [&nSkip](
const ScMyShape& rShape) { return rShape.aAddress.Tab() == nSkip; });
134 return ( nTable == rCellAddress.
Tab() );
142 [&rMyCell](
const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos == rMyCell.maCellAddress; });
149 [&nSkip](
const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos.Tab() == nSkip; });
182 aRange.
nRows = nEndRow - nStartRow + 1;
187 for(
SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow )
200 rCellAddress =
aRangeList.begin()->aCellRange.aStart;
201 return ( nTable == rCellAddress.
Tab() );
209 ScMyMergedRangeList::iterator aItr(
aRangeList.begin());
221 if( aItr->aCellRange.aStart.Col() < aItr->aCellRange.aEnd.Col() )
223 aItr->aCellRange.aStart.IncCol( 1 );
224 aItr->bIsFirst =
false;
233 [&nSkip](
const ScMyMergedRange& rRange) { return rRange.aCellRange.aStart.Tab() == nSkip; });
270 return ( nTable == rCellAddress.
Tab() );
293 OSL_FAIL(
"more than one linked range on one cell");
304 [&nSkip](
const ScMyAreaLink& rAreaLink) { return rAreaLink.aDestRange.aStart.Tab() == nSkip; });
323 SCROW nStartRow(aCellRange.StartRow);
324 SCROW nEndRow(aCellRange.EndRow);
325 ScRange aRange( aCellRange.StartColumn, aCellRange.StartRow, aCellRange.Sheet,
326 aCellRange.EndColumn, aCellRange.EndRow, aCellRange.Sheet );
327 for(
SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow )
341 return ( nTable == rCellAddress.
Tab() );
349 ScMyEmptyDatabaseRangeList::iterator aItr(
aDatabaseList.begin());
355 if( aItr->aStart.Col() < aItr->aEnd.Col() )
356 aItr->aStart.SetCol( aItr->aStart.Col() + 1 );
366 [&nSkip](
const ScRange& rDatabase) { return rDatabase.aStart.Tab() == nSkip; });
426 return ( nTable == rCellAddress.
Tab() );
436 while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.
aCellAddress) )
447 [&nSkip](
const ScMyDetectiveObj& rDetectiveObj) { return rDetectiveObj.aPosition.Tab() == nSkip; });
484 return ( nTable == rCellAddress.
Tab() );
494 while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.
aCellAddress) )
505 [&nSkip](
const ScMyDetectiveOp& rDetectiveOp) { return rDetectiveOp.aPosition.Tab() == nSkip; });
516 nValidationIndex(-1),
520 bIsAutoStyle( false ),
522 bIsMergedBase( false ),
524 bHasAreaLink( false ),
525 bHasEmptyDatabase( false ),
526 bHasDetectiveObj( false ),
527 bHasDetectiveOp( false ),
528 bIsMatrixBase( false ),
529 bIsMatrixCovered( false ),
530 bHasAnnotation( false )
536 pNoteShapes(nullptr),
537 pEmptyDatabaseRanges(nullptr),
538 pMergedRanges(nullptr),
540 pDetectiveObj(nullptr),
541 pDetectiveOp(nullptr),
542 rExport(rTempXMLExport),
595 rMyCell.
nType = table::CellContentType_VALUE;
599 rMyCell.
nType = table::CellContentType_TEXT;
602 rMyCell.
nType = table::CellContentType_FORMULA;
605 rMyCell.
nType = table::CellContentType_EMPTY;
610 bool bIsMatrixBase =
false;
632 const uno::Reference<sheet::XSpreadsheet>& rxTable)
695 bool bFoundCell( ( aAddress.
Col() <= pDoc->
MaxCol() ) && ( aAddress.
Row() <= pDoc->
MaxRow() + 1 ) );
726 aCell.
nType = table::CellContentType_EMPTY;
bool lessThanByRow(const ScAddress &rAddress) const
Less than ordered by tab,row,col as needed by row-wise import/export.
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyAreaLinkList aAreaLinkList
void SkipTable(SCTAB nSkip)
void UpdateAddress(ScAddress &rCellAddress)
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
virtual void Sort() override
virtual ~ScMyAreaLinksContainer() override
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
virtual void Sort() override
virtual ~ScMyDetectiveObjContainer() override
ScMyDetectiveObjList aDetectiveObjList
ScMyDetectiveObjContainer()
void UpdateAddress(ScAddress &rCellAddress)
void AddObject(ScDetectiveObjType eObjType, const SCTAB nSheet, const ScAddress &rPosition, const ScRange &rSourceRange, bool bHasError)
virtual void SetCellData(ScMyCell &rMyCell) override
void SkipTable(SCTAB nSkip)
void AddOperation(ScDetOpType eOpType, const ScAddress &rPosition, sal_uInt32 nIndex)
virtual void Sort() override
ScMyDetectiveOpList aDetectiveOpList
ScMyDetectiveOpContainer()
virtual void SetCellData(ScMyCell &rMyCell) override
virtual ~ScMyDetectiveOpContainer() override
void SkipTable(SCTAB nSkip)
void UpdateAddress(ScAddress &rCellAddress)
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
void AddNewEmptyDatabaseRange(const css::table::CellRangeAddress &aCellRangeAddress)
virtual void Sort() override
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
virtual ~ScMyEmptyDatabaseRangesContainer() override
virtual void SetCellData(ScMyCell &rMyCell) override
void SkipTable(SCTAB nSkip)
ScMyEmptyDatabaseRangeList aDatabaseList
void UpdateAddress(ScAddress &rCellAddress)
ScMyEmptyDatabaseRangesContainer()
virtual ~ScMyIteratorBase()
virtual bool GetFirstAddress(ScAddress &rCellAddress)=0
void UpdateAddress(ScAddress &rCellAddress)
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
void SkipTable(SCTAB nSkip)
ScMyMergedRangesContainer()
void AddRange(const ScRange &rMergedRange)
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyMergedRangeList aRangeList
void UpdateAddress(ScAddress &rCellAddress)
virtual void Sort() override
virtual ~ScMyMergedRangesContainer() override
ScMyDetectiveObjContainer * pDetectiveObj
void SetCurrentTable(const SCTAB nTable, const css::uno::Reference< css::sheet::XSpreadsheet > &rxTable)
css::uno::Reference< css::sheet::XSpreadsheet > xTable
std::unique_ptr< ScHorizontalCellIterator > mpCellItr
void HasAnnotation(ScMyCell &aCell)
ScMyNoteShapesContainer * pNoteShapes
void SkipTable(SCTAB nSkip)
bool GetNext(ScMyCell &aCell, ScFormatRangeStyles *pCellStyles)
ScMyMergedRangesContainer * pMergedRanges
ScMyAreaLinksContainer * pAreaLinks
void SetCellData(ScMyCell &rMyCell, const ScAddress &rAddress)
ScMyShapesContainer * pShapes
css::uno::Reference< css::table::XCellRange > xCellRange
ScMyNotEmptyCellsIterator(const ScMyNotEmptyCellsIterator &)=delete
ScMyDetectiveOpContainer * pDetectiveOp
void UpdateAddress(ScAddress &rAddress)
~ScMyNotEmptyCellsIterator()
ScMyEmptyDatabaseRangesContainer * pEmptyDatabaseRanges
virtual void Sort() override
void SkipTable(SCTAB nSkip)
void AddNewNote(const ScMyNoteShape &aNote)
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
void UpdateAddress(ScAddress &rCellAddress)
ScMyNoteShapeList aNoteShapeList
virtual ~ScMyNoteShapesContainer() override
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyNoteShapesContainer()
virtual void Sort() override
virtual void SetCellData(ScMyCell &rMyCell) override
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
void AddNewShape(const ScMyShape &aShape)
virtual ~ScMyShapesContainer() override
void SkipTable(SCTAB nSkip)
void UpdateAddress(ScAddress &rCellAddress)
sal_Int32 GetLastRow(const sal_Int32 nTable) const
sal_Int32 GetLastColumn(const sal_Int32 nTable) const
Additional class containing cell annotation data.
ScDocument * GetDocument()
ScMySharedData * GetSharedData()
bool IsMatrix(const ScAddress &aCell, ScRange &aCellAddress, bool &bIsFirst) const
sal_Int32 GetRowCount() const
bool operator<(const ScMyAreaLink &rAreaLink) const
bool Compare(const ScMyAreaLink &rAreaLink) const
sal_Int32 nValidationIndex
ScRefCellValue maBaseCell
ScMyDetectiveObjVec aDetectiveObjVec
ScMyDetectiveOpVec aDetectiveOpVec
css::table::CellContentType nType
ScAddress aCellAddress
Use this instead of the UNO one.
bool operator<(const ScMyDetectiveObj &rDetObj) const
ScDetectiveObjType eObjType
bool operator<(const ScMyDetectiveOp &rDetOp) const
bool operator<(const ScMyMergedRange &aRange) const
bool operator<(const ScMyNoteShape &aNote) const
bool operator<(const ScMyShape &aShape) const
This is very similar to ScCellValue, except that it references the original value instead of copying ...