summaryrefslogtreecommitdiff
path: root/sc/inc/dociter.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/inc/dociter.hxx')
-rw-r--r--sc/inc/dociter.hxx318
1 files changed, 159 insertions, 159 deletions
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index ac382889fb71..6bf06641c2a9 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,78 +49,78 @@ class ScAttrIterator;
class ScRange;
class ScFlatBoolRowSegments;
-class ScDocumentIterator // alle nichtleeren Zellen durchgehen
+class ScDocumentIterator // alle nichtleeren Zellen durchgehen
{
private:
- ScDocument* pDoc;
- SCTAB nStartTab;
- SCTAB nEndTab;
+ ScDocument* pDoc;
+ SCTAB nStartTab;
+ SCTAB nEndTab;
- const ScPatternAttr* pDefPattern;
+ const ScPatternAttr* pDefPattern;
- SCCOL nCol;
- SCROW nRow;
- SCTAB nTab;
- ScBaseCell* pCell;
- const ScPatternAttr* pPattern;
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ ScBaseCell* pCell;
+ const ScPatternAttr* pPattern;
- SCSIZE nColPos;
- SCSIZE nAttrPos;
+ SCSIZE nColPos;
+ SCSIZE nAttrPos;
- BOOL GetThis();
- BOOL GetThisCol();
+ BOOL GetThis();
+ BOOL GetThisCol();
public:
ScDocumentIterator( ScDocument* pDocument, SCTAB nStartTable, SCTAB nEndTable );
~ScDocumentIterator();
- BOOL GetFirst();
- BOOL GetNext();
+ BOOL GetFirst();
+ BOOL GetNext();
- ScBaseCell* GetCell();
- const ScPatternAttr* GetPattern();
- void GetPos( SCCOL& rCol, SCROW& rRow, SCTAB& rTab );
+ ScBaseCell* GetCell();
+ const ScPatternAttr* GetPattern();
+ void GetPos( SCCOL& rCol, SCROW& rRow, SCTAB& rTab );
};
class ScValueIterator // alle Zahlenwerte in einem Bereich durchgehen
{
private:
- double fNextValue;
- ScDocument* pDoc;
- const ScAttrArray* pAttrArray;
- ULONG nNumFormat; // fuer CalcAsShown
- ULONG nNumFmtIndex;
- SCCOL nStartCol;
- SCROW nStartRow;
- SCTAB nStartTab;
- SCCOL nEndCol;
- SCROW nEndRow;
- SCTAB nEndTab;
- SCCOL nCol;
- SCROW nRow;
- SCTAB nTab;
- SCSIZE nColRow;
- SCROW nNextRow;
- SCROW nAttrEndRow;
- short nNumFmtType;
- BOOL bNumValid;
- BOOL bSubTotal;
- BOOL bNextValid;
- BOOL bCalcAsShown;
- BOOL bTextAsZero;
-
- BOOL GetThis(double& rValue, USHORT& rErr);
+ double fNextValue;
+ ScDocument* pDoc;
+ const ScAttrArray* pAttrArray;
+ ULONG nNumFormat; // fuer CalcAsShown
+ ULONG nNumFmtIndex;
+ SCCOL nStartCol;
+ SCROW nStartRow;
+ SCTAB nStartTab;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+ SCTAB nEndTab;
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ SCSIZE nColRow;
+ SCROW nNextRow;
+ SCROW nAttrEndRow;
+ short nNumFmtType;
+ BOOL bNumValid;
+ BOOL bSubTotal;
+ BOOL bNextValid;
+ BOOL bCalcAsShown;
+ BOOL bTextAsZero;
+
+ BOOL GetThis(double& rValue, USHORT& rErr);
public:
ScValueIterator(ScDocument* pDocument,
const ScRange& rRange, BOOL bSTotal = FALSE,
BOOL bTextAsZero = FALSE );
- void GetCurNumFmtInfo( short& nType, ULONG& nIndex );
+ void GetCurNumFmtInfo( short& nType, ULONG& nIndex );
/// Does NOT reset rValue if no value found!
- BOOL GetFirst(double& rValue, USHORT& rErr);
+ BOOL GetFirst(double& rValue, USHORT& rErr);
/// Does NOT reset rValue if no value found!
- BOOL GetNext(double& rValue, USHORT& rErr)
+ BOOL GetNext(double& rValue, USHORT& rErr)
{
return bNextValid ? ( bNextValid = FALSE, rValue = fNextValue,
rErr = 0, nRow = nNextRow,
@@ -219,22 +219,22 @@ public:
// ============================================================================
class ScCellIterator // alle Zellen in einem Bereich durchgehen
-{ // bei SubTotal aber keine ausgeblendeten und
-private: // SubTotalZeilen
- ScDocument* pDoc;
- SCCOL nStartCol;
- SCROW nStartRow;
- SCTAB nStartTab;
- SCCOL nEndCol;
- SCROW nEndRow;
- SCTAB nEndTab;
- SCCOL nCol;
- SCROW nRow;
- SCTAB nTab;
- SCSIZE nColRow;
- BOOL bSubTotal;
-
- ScBaseCell* GetThis();
+{ // bei SubTotal aber keine ausgeblendeten und
+private: // SubTotalZeilen
+ ScDocument* pDoc;
+ SCCOL nStartCol;
+ SCROW nStartRow;
+ SCTAB nStartTab;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+ SCTAB nEndTab;
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ SCSIZE nColRow;
+ BOOL bSubTotal;
+
+ ScBaseCell* GetThis();
public:
ScCellIterator(ScDocument* pDocument,
SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
@@ -242,8 +242,8 @@ public:
BOOL bSTotal = FALSE);
ScCellIterator(ScDocument* pDocument,
const ScRange& rRange, BOOL bSTotal = FALSE);
- ScBaseCell* GetFirst();
- ScBaseCell* GetNext();
+ ScBaseCell* GetFirst();
+ ScBaseCell* GetNext();
SCCOL GetCol() const { return nCol; }
SCROW GetRow() const { return nRow; }
SCTAB GetTab() const { return nTab; }
@@ -251,7 +251,7 @@ public:
};
class ScQueryCellIterator // alle nichtleeren Zellen in einem Bereich
-{ // durchgehen
+{ // durchgehen
enum StopOnMismatchBits
{
nStopOnMismatchDisabled = 0x00,
@@ -269,21 +269,21 @@ class ScQueryCellIterator // alle nichtleeren Zellen in einem Bereich
};
private:
- ScQueryParam aParam;
- ScDocument* pDoc;
- const ScAttrArray* pAttrArray;
- ULONG nNumFormat;
- SCTAB nTab;
- SCCOL nCol;
- SCROW nRow;
- SCSIZE nColRow;
- SCROW nAttrEndRow;
+ ScQueryParam aParam;
+ ScDocument* pDoc;
+ const ScAttrArray* pAttrArray;
+ ULONG nNumFormat;
+ SCTAB nTab;
+ SCCOL nCol;
+ SCROW nRow;
+ SCSIZE nColRow;
+ SCROW nAttrEndRow;
BYTE nStopOnMismatch;
BYTE nTestEqualCondition;
- BOOL bAdvanceQuery;
+ BOOL bAdvanceQuery;
BOOL bIgnoreMismatchOnLeadingStrings;
- ScBaseCell* GetThis();
+ ScBaseCell* GetThis();
/* Only works if no regular expression is involved, only
searches for rows in one column, and only the first
@@ -301,16 +301,16 @@ public:
const ScQueryParam& aParam, BOOL bMod = TRUE);
// fuer bMod = FALSE muss der QueryParam
// weiter aufgefuellt sein (bIsString)
- ScBaseCell* GetFirst();
- ScBaseCell* GetNext();
+ ScBaseCell* GetFirst();
+ ScBaseCell* GetNext();
SCCOL GetCol() { return nCol; }
SCROW GetRow() { return nRow; }
// setzt alle Entry.nField einen weiter, wenn Spalte
// wechselt, fuer ScInterpreter ScHLookup()
- void SetAdvanceQueryParamEntryField( BOOL bVal )
+ void SetAdvanceQueryParamEntryField( BOOL bVal )
{ bAdvanceQuery = bVal; }
- void AdvanceQueryParamEntryField();
+ void AdvanceQueryParamEntryField();
/** If set, iterator stops on first non-matching cell
content. May be used in SC_LESS_EQUAL queries where a
@@ -376,141 +376,141 @@ public:
BOOL bIgnoreMismatchOnLeadingStrings = TRUE );
};
-class ScDocAttrIterator // alle Attribut-Bereiche
+class ScDocAttrIterator // alle Attribut-Bereiche
{
private:
- ScDocument* pDoc;
- SCTAB nTab;
- SCCOL nEndCol;
- SCROW nStartRow;
- SCROW nEndRow;
- SCCOL nCol;
- ScAttrIterator* pColIter;
+ ScDocument* pDoc;
+ SCTAB nTab;
+ SCCOL nEndCol;
+ SCROW nStartRow;
+ SCROW nEndRow;
+ SCCOL nCol;
+ ScAttrIterator* pColIter;
public:
ScDocAttrIterator(ScDocument* pDocument, SCTAB nTable,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
~ScDocAttrIterator();
- const ScPatternAttr* GetNext( SCCOL& rCol, SCROW& rRow1, SCROW& rRow2 );
+ const ScPatternAttr* GetNext( SCCOL& rCol, SCROW& rRow1, SCROW& rRow2 );
};
-class ScAttrRectIterator // alle Attribut-Bereiche, auch Bereiche ueber mehrere Spalten
+class ScAttrRectIterator // alle Attribut-Bereiche, auch Bereiche ueber mehrere Spalten
{
private:
- ScDocument* pDoc;
- SCTAB nTab;
- SCCOL nEndCol;
- SCROW nStartRow;
- SCROW nEndRow;
- SCCOL nIterStartCol;
- SCCOL nIterEndCol;
- ScAttrIterator* pColIter;
+ ScDocument* pDoc;
+ SCTAB nTab;
+ SCCOL nEndCol;
+ SCROW nStartRow;
+ SCROW nEndRow;
+ SCCOL nIterStartCol;
+ SCCOL nIterEndCol;
+ ScAttrIterator* pColIter;
public:
ScAttrRectIterator(ScDocument* pDocument, SCTAB nTable,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
~ScAttrRectIterator();
- void DataChanged();
- const ScPatternAttr* GetNext( SCCOL& rCol1, SCCOL& rCol2, SCROW& rRow1, SCROW& rRow2 );
+ void DataChanged();
+ const ScPatternAttr* GetNext( SCCOL& rCol1, SCCOL& rCol2, SCROW& rRow1, SCROW& rRow2 );
};
-class ScHorizontalCellIterator // alle nichtleeren Zellen in einem Bereich
-{ // zeilenweise durchgehen
+class ScHorizontalCellIterator // alle nichtleeren Zellen in einem Bereich
+{ // zeilenweise durchgehen
private:
- ScDocument* pDoc;
- SCTAB nTab;
- SCCOL nStartCol;
- SCCOL nEndCol;
- SCROW nEndRow;
- SCROW* pNextRows;
- SCSIZE* pNextIndices;
- SCCOL nCol;
- SCROW nRow;
- BOOL bMore;
+ ScDocument* pDoc;
+ SCTAB nTab;
+ SCCOL nStartCol;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+ SCROW* pNextRows;
+ SCSIZE* pNextIndices;
+ SCCOL nCol;
+ SCROW nRow;
+ BOOL bMore;
public:
ScHorizontalCellIterator(ScDocument* pDocument, SCTAB nTable,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
~ScHorizontalCellIterator();
- ScBaseCell* GetNext( SCCOL& rCol, SCROW& rRow );
- BOOL ReturnNext( SCCOL& rCol, SCROW& rRow );
+ ScBaseCell* GetNext( SCCOL& rCol, SCROW& rRow );
+ BOOL ReturnNext( SCCOL& rCol, SCROW& rRow );
private:
- void Advance();
+ void Advance();
};
//
-// gibt alle Bereiche mit nicht-Default-Formatierung zurueck (horizontal)
+// gibt alle Bereiche mit nicht-Default-Formatierung zurueck (horizontal)
//
class ScHorizontalAttrIterator
{
private:
- ScDocument* pDoc;
- SCTAB nTab;
- SCCOL nStartCol;
- SCROW nStartRow;
- SCCOL nEndCol;
- SCROW nEndRow;
-
- SCROW* pNextEnd;
- SCSIZE* pIndices;
- const ScPatternAttr** ppPatterns;
- SCCOL nCol;
- SCROW nRow;
- BOOL bRowEmpty;
+ ScDocument* pDoc;
+ SCTAB nTab;
+ SCCOL nStartCol;
+ SCROW nStartRow;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+
+ SCROW* pNextEnd;
+ SCSIZE* pIndices;
+ const ScPatternAttr** ppPatterns;
+ SCCOL nCol;
+ SCROW nRow;
+ BOOL bRowEmpty;
public:
ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB nTable,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
~ScHorizontalAttrIterator();
- const ScPatternAttr* GetNext( SCCOL& rCol1, SCCOL& rCol2, SCROW& rRow );
+ const ScPatternAttr* GetNext( SCCOL& rCol1, SCCOL& rCol2, SCROW& rRow );
};
//
-// gibt nichtleere Zellen und Bereiche mit Formatierung zurueck (horizontal)
+// gibt nichtleere Zellen und Bereiche mit Formatierung zurueck (horizontal)
//
class SC_DLLPUBLIC ScUsedAreaIterator
{
private:
- ScHorizontalCellIterator aCellIter;
- ScHorizontalAttrIterator aAttrIter;
-
- SCCOL nNextCol;
- SCROW nNextRow;
-
- SCCOL nCellCol;
- SCROW nCellRow;
- const ScBaseCell* pCell;
- SCCOL nAttrCol1;
- SCCOL nAttrCol2;
- SCROW nAttrRow;
- const ScPatternAttr* pPattern;
-
- SCCOL nFoundStartCol; // Ergebnisse nach GetNext
- SCCOL nFoundEndCol;
- SCROW nFoundRow;
- const ScPatternAttr* pFoundPattern;
- const ScBaseCell* pFoundCell;
+ ScHorizontalCellIterator aCellIter;
+ ScHorizontalAttrIterator aAttrIter;
+
+ SCCOL nNextCol;
+ SCROW nNextRow;
+
+ SCCOL nCellCol;
+ SCROW nCellRow;
+ const ScBaseCell* pCell;
+ SCCOL nAttrCol1;
+ SCCOL nAttrCol2;
+ SCROW nAttrRow;
+ const ScPatternAttr* pPattern;
+
+ SCCOL nFoundStartCol; // Ergebnisse nach GetNext
+ SCCOL nFoundEndCol;
+ SCROW nFoundRow;
+ const ScPatternAttr* pFoundPattern;
+ const ScBaseCell* pFoundCell;
public:
ScUsedAreaIterator( ScDocument* pDocument, SCTAB nTable,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
~ScUsedAreaIterator();
- BOOL GetNext();
+ BOOL GetNext();
- SCCOL GetStartCol() const { return nFoundStartCol; }
- SCCOL GetEndCol() const { return nFoundEndCol; }
- SCROW GetRow() const { return nFoundRow; }
- const ScPatternAttr* GetPattern() const { return pFoundPattern; }
- const ScBaseCell* GetCell() const { return pFoundCell; }
+ SCCOL GetStartCol() const { return nFoundStartCol; }
+ SCCOL GetEndCol() const { return nFoundEndCol; }
+ SCROW GetRow() const { return nFoundRow; }
+ const ScPatternAttr* GetPattern() const { return pFoundPattern; }
+ const ScBaseCell* GetCell() const { return pFoundCell; }
};
// ============================================================================
@@ -523,7 +523,7 @@ public:
explicit ScRowBreakIterator(::std::set<SCROW>& rBreaks);
SCROW first();
SCROW next();
-
+
private:
::std::set<SCROW>& mrBreaks;
::std::set<SCROW>::const_iterator maItr;