[Libreoffice-commits] .: sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jun 7 17:58:31 PDT 2011
sc/inc/document.hxx | 9
sc/source/core/data/dociter.cxx | 94 +-
sc/source/core/data/documen2.cxx | 171 ++--
sc/source/core/data/documen3.cxx | 348 ++++-----
sc/source/core/data/documen4.cxx | 92 +-
sc/source/core/data/documen5.cxx | 22
sc/source/core/data/documen7.cxx | 18
sc/source/core/data/documen8.cxx | 54 -
sc/source/core/data/documen9.cxx | 38 -
sc/source/core/data/document.cxx | 1430 +++++++++++++++++++--------------------
sc/source/core/data/fillinfo.cxx | 4
11 files changed, 1139 insertions(+), 1141 deletions(-)
New commits:
commit a97017a060aad7aff7d0aa4a4edce52f9a6f7484
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Jun 7 20:57:16 2011 -0400
Renamed pTab to maTabs since it's no longer a pointer array.
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index a6bda3a..bea50b0 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -186,8 +186,6 @@ namespace com { namespace sun { namespace star {
#define SC_ASIANCOMPRESSION_INVALID 0xff
#define SC_ASIANKERNING_INVALID 0xff
-typedef ::std::vector<ScTable*> TableContainer;
-
enum ScDocumentMode
{
SCDOCMODE_DOCUMENT,
@@ -224,6 +222,7 @@ friend class ScAttrRectIterator;
friend class ScDocShell;
friend class ScDocRowHeightUpdater;
+ typedef ::std::vector<ScTable*> TableContainer;
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
@@ -241,7 +240,7 @@ private:
ScConditionalFormatList* pCondFormList; // conditional formats
ScValidationDataList* pValidationList; // validity
SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
- ::std::vector<ScTable*> pTab;
+ TableContainer maTabs;
mutable ScRangeName* pRangeName;
ScDBCollection* pDBCollection;
ScDPCollection* pDPCollection;
@@ -472,7 +471,7 @@ public:
SC_DLLPUBLIC ScRangeName* GetRangeName() const;
void SetRangeName(SCTAB nTab, ScRangeName* pNew);
void SetRangeName( ScRangeName* pNewRangeName );
- SCTAB GetMaxTableNumber() { return static_cast<SCTAB>(pTab.size()) - 1; }
+ SCTAB GetMaxTableNumber() { return static_cast<SCTAB>(maTabs.size()) - 1; }
void SetMaxTableNumber(SCTAB nNumber) { nMaxTableNumber = nNumber; }
ScRangePairList* GetColNameRanges() { return &xColNameRanges; }
@@ -535,7 +534,7 @@ public:
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData);
SC_DLLPUBLIC ScDBData* GetAnonymousDBData(SCTAB nTab);
- SC_DLLPUBLIC inline SCTAB GetTableCount() const { return static_cast<SCTAB>(pTab.size()); }
+ SC_DLLPUBLIC inline SCTAB GetTableCount() const { return static_cast<SCTAB>(maTabs.size()); }
SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
SC_DLLPUBLIC ScDocProtection* GetDocProtection() const;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 550996c..e0b7573 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -94,7 +94,7 @@ ScDocumentIterator::~ScDocumentIterator()
sal_Bool ScDocumentIterator::GetThisCol()
{
ScTable* pTab = NULL;
- while ( nTab < pDoc->GetTableCount() && (pTab = pDoc->pTab[nTab]) == NULL )
+ while ( nTab < pDoc->GetTableCount() && (pTab = pDoc->maTabs[nTab]) == NULL )
{
if ( nTab == nEndTab )
{
@@ -288,7 +288,7 @@ sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
{
OSL_FAIL("try to access out of index, FIX IT");
}
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
for (;;)
{
if ( nRow > nEndRow )
@@ -308,7 +308,7 @@ sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
return false; // Ende und Aus
}
}
- pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
} while ( pCol->nCount == 0 );
pCol->Search( nRow, nColRow );
}
@@ -319,7 +319,7 @@ sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
if ( nColRow < pCol->nCount && pCol->pItems[nColRow].nRow <= nEndRow )
{
nRow = pCol->pItems[nColRow].nRow + 1;
- if ( !bSubTotal || !pDoc->pTab[nTab]->RowFiltered( nRow-1 ) )
+ if ( !bSubTotal || !pDoc->maTabs[nTab]->RowFiltered( nRow-1 ) )
{
ScBaseCell* pCell = pCol->pItems[nColRow].pCell;
++nColRow;
@@ -413,7 +413,7 @@ void ScValueIterator::GetCurNumFmtInfo( short& nType, sal_uLong& nIndex )
{
if (!bNumValid && nTab < pDoc->GetTableCount())
{
- const ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ const ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
nNumFmtIndex = pCol->GetNumberFormat( nRow );
if ( (nNumFmtIndex % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
{
@@ -450,7 +450,7 @@ sal_Bool ScValueIterator::GetFirst(double& rValue, sal_uInt16& rErr)
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
pCol->Search( nRow, nColRow );
nNumFormat = 0; // werden bei GetNumberFormat initialisiert
@@ -475,7 +475,7 @@ SCROW ScDBQueryDataIterator::GetRowByColEntryIndex(ScDocument& rDoc, SCTAB nTab,
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol];
+ ScColumn* pCol = &rDoc.maTabs[nTab]->aCol[nCol];
return pCol->pItems[nColRow].nRow;
}
@@ -483,7 +483,7 @@ ScBaseCell* ScDBQueryDataIterator::GetCellByColEntryIndex(ScDocument& rDoc, SCTA
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol];
+ ScColumn* pCol = &rDoc.maTabs[nTab]->aCol[nCol];
return pCol->pItems[nColRow].pCell;
}
@@ -491,7 +491,7 @@ ScAttrArray* ScDBQueryDataIterator::GetAttrArrayByCol(ScDocument& rDoc, SCTAB nT
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol];
+ ScColumn* pCol = &rDoc.maTabs[nTab]->aCol[nCol];
return pCol->pAttrArray;
}
@@ -499,14 +499,14 @@ bool ScDBQueryDataIterator::IsQueryValid(ScDocument& rDoc, const ScQueryParam& r
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- return rDoc.pTab[nTab]->ValidQuery(nRow, rParam, NULL, pCell);
+ return rDoc.maTabs[nTab]->ValidQuery(nRow, rParam, NULL, pCell);
}
SCSIZE ScDBQueryDataIterator::SearchColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCROW nRow, SCCOL nCol)
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol];
+ ScColumn* pCol = &rDoc.maTabs[nTab]->aCol[nCol];
SCSIZE nColRow;
pCol->Search(nRow, nColRow);
return nColRow;
@@ -956,7 +956,7 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
if (!ValidTab(nStartTab)) nStartTab = pDoc->GetTableCount()-1;
if (!ValidTab(nEndTab)) nEndTab = pDoc->GetTableCount()-1;
- while (nEndTab>0 && !pDoc->pTab[nEndTab])
+ while (nEndTab>0 && !pDoc->maTabs[nEndTab])
--nEndTab; // nur benutzte Tabellen
if (nStartTab>nEndTab)
nStartTab = nEndTab;
@@ -966,7 +966,7 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
nTab = nStartTab;
nColRow = 0; // wird bei GetFirst initialisiert
- if (!pDoc->pTab[nTab])
+ if (!pDoc->maTabs[nTab])
{
OSL_FAIL("Tabelle nicht gefunden");
nStartCol = nCol = MAXCOL+1;
@@ -998,7 +998,7 @@ ScCellIterator::ScCellIterator
if (!ValidTab(nStartTab)) nStartTab = pDoc->GetTableCount()-1;
if (!ValidTab(nEndTab)) nEndTab = pDoc->GetTableCount()-1;
- while (nEndTab>0 && !pDoc->pTab[nEndTab])
+ while (nEndTab>0 && !pDoc->maTabs[nEndTab])
--nEndTab; // nur benutzte Tabellen
if (nStartTab>nEndTab)
nStartTab = nEndTab;
@@ -1008,7 +1008,7 @@ ScCellIterator::ScCellIterator
nTab = nStartTab;
nColRow = 0; // wird bei GetFirst initialisiert
- if (!pDoc->pTab[nTab])
+ if (!pDoc->maTabs[nTab])
{
OSL_FAIL("Tabelle nicht gefunden");
nStartCol = nCol = MAXCOL+1;
@@ -1020,7 +1020,7 @@ ScCellIterator::ScCellIterator
ScBaseCell* ScCellIterator::GetThis()
{
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
for ( ;; )
{
if ( nRow > nEndRow )
@@ -1036,7 +1036,7 @@ ScBaseCell* ScCellIterator::GetThis()
if ( nTab > nEndTab )
return NULL; // Ende und Aus
}
- pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
} while ( pCol->nCount == 0 );
pCol->Search( nRow, nColRow );
}
@@ -1047,7 +1047,7 @@ ScBaseCell* ScCellIterator::GetThis()
if ( nColRow < pCol->nCount && pCol->pItems[nColRow].nRow <= nEndRow )
{
nRow = pCol->pItems[nColRow].nRow;
- if ( !bSubTotal || !pDoc->pTab[nTab]->RowFiltered( nRow ) )
+ if ( !bSubTotal || !pDoc->maTabs[nTab]->RowFiltered( nRow ) )
{
ScBaseCell* pCell = pCol->pItems[nColRow].pCell;
@@ -1072,7 +1072,7 @@ ScBaseCell* ScCellIterator::GetFirst()
nCol = nStartCol;
nRow = nStartRow;
nTab = nStartTab;
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
pCol->Search( nRow, nColRow );
return GetThis();
}
@@ -1119,7 +1119,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
{
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
const ScQueryEntry& rEntry = aParam.GetEntry(0);
SCCOLROW nFirstQueryField = rEntry.nField;
bool bAllStringIgnore = bIgnoreMismatchOnLeadingStrings &&
@@ -1144,7 +1144,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
AdvanceQueryParamEntryField();
nFirstQueryField = rEntry.nField;
}
- pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
} while ( pCol->nCount == 0 );
pCol->Search( nRow, nColRow );
bFirstStringIgnore = bIgnoreMismatchOnLeadingStrings &&
@@ -1166,7 +1166,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
else
{
sal_Bool bTestEqualCondition;
- if ( (pDoc->pTab[nTab])->ValidQuery( nRow, aParam, NULL,
+ if ( (pDoc->maTabs[nTab])->ValidQuery( nRow, aParam, NULL,
(nCol == static_cast<SCCOL>(nFirstQueryField) ? pCell : NULL),
(nTestEqualCondition ? &bTestEqualCondition : NULL) ) )
{
@@ -1222,7 +1222,7 @@ ScBaseCell* ScQueryCellIterator::GetFirst()
nRow = aParam.nRow1;
if (aParam.bHasHeader)
nRow++;
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
pCol->Search( nRow, nColRow );
return GetThis();
}
@@ -1386,7 +1386,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
nCol = aParam.nCol1;
- ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
+ ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
if (!pCol->nCount)
return 0;
@@ -1672,7 +1672,7 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB
for (i=nStartCol; i<=nEndCol; i++)
{
- ScColumn* pCol = &pDoc->pTab[nTab]->aCol[i];
+ ScColumn* pCol = &pDoc->maTabs[nTab]->aCol[i];
pCol->Search( nRow1, nIndex );
if ( nIndex < pCol->nCount )
@@ -1704,7 +1704,7 @@ ScBaseCell* ScHorizontalCellIterator::GetNext( SCCOL& rCol, SCROW& rRow )
rCol = nCol;
rRow = nRow;
- ScColumn* pCol = &pDoc->pTab[nTab]->aCol[nCol];
+ ScColumn* pCol = &pDoc->maTabs[nTab]->aCol[nCol];
SCSIZE nIndex = pNextIndices[nCol-nStartCol];
OSL_ENSURE( nIndex < pCol->nCount, "ScHorizontalCellIterator::GetNext: nIndex out of range" );
ScBaseCell* pCell = pCol->pItems[nIndex].pCell;
@@ -1779,7 +1779,7 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
{
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
- OSL_ENSURE( pDoc->pTab[nTab], "Tabelle nicht da" );
+ OSL_ENSURE( pDoc->maTabs[nTab], "Tabelle nicht da" );
SCCOL i;
@@ -1796,7 +1796,7 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
for (i=nStartCol; i<=nEndCol; i++)
{
SCCOL nPos = i - nStartCol;
- ScAttrArray* pArray = pDoc->pTab[nTab]->aCol[i].pAttrArray;
+ ScAttrArray* pArray = pDoc->maTabs[nTab]->aCol[i].pAttrArray;
OSL_ENSURE( pArray, "pArray == 0" );
SCSIZE nIndex;
@@ -1870,7 +1870,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
SCCOL nPos = i-nStartCol;
if ( pNextEnd[nPos] < nRow )
{
- ScAttrArray* pArray = pDoc->pTab[nTab]->aCol[i].pAttrArray;
+ ScAttrArray* pArray = pDoc->maTabs[nTab]->aCol[i].pAttrArray;
SCSIZE nIndex = ++pIndices[nPos];
if ( nIndex < pArray->nCount )
@@ -2021,8 +2021,8 @@ ScDocAttrIterator::ScDocAttrIterator(ScDocument* pDocument, SCTAB nTable,
nEndRow( nRow2 ),
nCol( nCol1 )
{
- if ( ValidTab(nTab) && nTab < pDoc->GetTableCount() && pDoc->pTab[nTab] )
- pColIter = pDoc->pTab[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
+ if ( ValidTab(nTab) && nTab < pDoc->GetTableCount() && pDoc->maTabs[nTab] )
+ pColIter = pDoc->maTabs[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
else
pColIter = NULL;
}
@@ -2046,7 +2046,7 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& rCol, SCROW& rRow1, SCRO
delete pColIter;
++nCol;
if ( nCol <= nEndCol )
- pColIter = pDoc->pTab[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
+ pColIter = pDoc->maTabs[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
else
pColIter = NULL;
}
@@ -2102,7 +2102,7 @@ void ScDocRowHeightUpdater::update()
for (; itr != itrEnd; ++itr)
{
SCTAB nTab = itr->mnTab;
- if (!ValidTab(nTab) || nTab >= mrDoc.GetTableCount() || !mrDoc.pTab[nTab])
+ if (!ValidTab(nTab) || nTab >= mrDoc.GetTableCount() || !mrDoc.maTabs[nTab])
continue;
ScFlatBoolRowSegments::RangeData aData;
@@ -2112,7 +2112,7 @@ void ScDocRowHeightUpdater::update()
if (!aData.mbValue)
continue;
- mrDoc.pTab[nTab]->SetOptimalHeight(
+ mrDoc.maTabs[nTab]->SetOptimalHeight(
aData.mnRow1, aData.mnRow2, 0, mpOutDev, mfPPTX, mfPPTY, aZoom, aZoom, false, &aProgress, nProgressStart);
nProgressStart += aData.mnRow2 - aData.mnRow1 + 1;
@@ -2125,10 +2125,10 @@ void ScDocRowHeightUpdater::updateAll()
sal_uInt32 nCellCount = 0;
for (SCTAB nTab = 0; nTab < mrDoc.GetTableCount(); ++nTab)
{
- if (!ValidTab(nTab) || !mrDoc.pTab[nTab])
+ if (!ValidTab(nTab) || !mrDoc.maTabs[nTab])
continue;
- nCellCount += mrDoc.pTab[nTab]->GetWeightedCount();
+ nCellCount += mrDoc.maTabs[nTab]->GetWeightedCount();
}
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount);
@@ -2137,13 +2137,13 @@ void ScDocRowHeightUpdater::updateAll()
sal_uLong nProgressStart = 0;
for (SCTAB nTab = 0; nTab < mrDoc.GetTableCount(); ++nTab)
{
- if (!ValidTab(nTab) || !mrDoc.pTab[nTab])
+ if (!ValidTab(nTab) || !mrDoc.maTabs[nTab])
continue;
- mrDoc.pTab[nTab]->SetOptimalHeight(
+ mrDoc.maTabs[nTab]->SetOptimalHeight(
0, MAXROW, 0, mpOutDev, mfPPTX, mfPPTY, aZoom, aZoom, false, &aProgress, nProgressStart);
- nProgressStart += mrDoc.pTab[nTab]->GetWeightedCount();
+ nProgressStart += mrDoc.maTabs[nTab]->GetWeightedCount();
}
}
@@ -2160,12 +2160,12 @@ ScAttrRectIterator::ScAttrRectIterator(ScDocument* pDocument, SCTAB nTable,
nIterStartCol( nCol1 ),
nIterEndCol( nCol1 )
{
- if ( ValidTab(nTab) && nTab < pDoc->GetTableCount() && pDoc->pTab[nTab] )
+ if ( ValidTab(nTab) && nTab < pDoc->GetTableCount() && pDoc->maTabs[nTab] )
{
- pColIter = pDoc->pTab[nTab]->aCol[nIterStartCol].CreateAttrIterator( nStartRow, nEndRow );
+ pColIter = pDoc->maTabs[nTab]->aCol[nIterStartCol].CreateAttrIterator( nStartRow, nEndRow );
while ( nIterEndCol < nEndCol &&
- pDoc->pTab[nTab]->aCol[nIterEndCol].IsAllAttrEqual(
- pDoc->pTab[nTab]->aCol[nIterEndCol+1], nStartRow, nEndRow ) )
+ pDoc->maTabs[nTab]->aCol[nIterEndCol].IsAllAttrEqual(
+ pDoc->maTabs[nTab]->aCol[nIterEndCol+1], nStartRow, nEndRow ) )
++nIterEndCol;
}
else
@@ -2183,7 +2183,7 @@ void ScAttrRectIterator::DataChanged()
{
SCROW nNextRow = pColIter->GetNextRow();
delete pColIter;
- pColIter = pDoc->pTab[nTab]->aCol[nIterStartCol].CreateAttrIterator( nNextRow, nEndRow );
+ pColIter = pDoc->maTabs[nTab]->aCol[nIterStartCol].CreateAttrIterator( nNextRow, nEndRow );
}
}
@@ -2205,10 +2205,10 @@ const ScPatternAttr* ScAttrRectIterator::GetNext( SCCOL& rCol1, SCCOL& rCol2,
if ( nIterStartCol <= nEndCol )
{
nIterEndCol = nIterStartCol;
- pColIter = pDoc->pTab[nTab]->aCol[nIterStartCol].CreateAttrIterator( nStartRow, nEndRow );
+ pColIter = pDoc->maTabs[nTab]->aCol[nIterStartCol].CreateAttrIterator( nStartRow, nEndRow );
while ( nIterEndCol < nEndCol &&
- pDoc->pTab[nTab]->aCol[nIterEndCol].IsAllAttrEqual(
- pDoc->pTab[nTab]->aCol[nIterEndCol+1], nStartRow, nEndRow ) )
+ pDoc->maTabs[nTab]->aCol[nIterEndCol].IsAllAttrEqual(
+ pDoc->maTabs[nTab]->aCol[nIterEndCol+1], nStartRow, nEndRow ) )
++nIterEndCol;
}
else
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index b65780e..e6376cf 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -139,7 +139,6 @@ ScDocument::ScDocument( ScDocumentMode eMode,
pCondFormList( NULL ),
pValidationList( NULL ),
pFormatExchangeList( NULL ),
- pTab( 0 ),
pRangeName(NULL),
pDPCollection( NULL ),
pLinkManager( NULL ),
@@ -556,26 +555,26 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
{
InitClipPtrs(pSourceDoc);
- for (SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->pTab.size()); i++)
- if (pSourceDoc->pTab[i])
+ for (SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->maTabs.size()); i++)
+ if (pSourceDoc->maTabs[i])
if (!pMarks || pMarks->GetTableSelect(i))
{
String aString;
- pSourceDoc->pTab[i]->GetName(aString);
- if ( i < static_cast<SCTAB>(pTab.size()) )
+ pSourceDoc->maTabs[i]->GetName(aString);
+ if ( i < static_cast<SCTAB>(maTabs.size()) )
{
- pTab[i] = new ScTable(this, i, aString);
+ maTabs[i] = new ScTable(this, i, aString);
}
else
{
- if( i > static_cast<SCTAB>(pTab.size()) )
+ if( i > static_cast<SCTAB>(maTabs.size()) )
{
- pTab.resize(i, NULL );
+ maTabs.resize(i, NULL );
}
- pTab.push_back(new ScTable(this, i, aString));
+ maTabs.push_back(new ScTable(this, i, aString));
}
- pTab[i]->SetLayoutRTL( pSourceDoc->pTab[i]->IsLayoutRTL() );
+ maTabs[i]->SetLayoutRTL( pSourceDoc->maTabs[i]->IsLayoutRTL() );
}
}
else
@@ -589,17 +588,17 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
if (bIsClip)
{
InitClipPtrs(pSourceDoc);
- if (nTab >= static_cast<SCTAB>(pTab.size()))
+ if (nTab >= static_cast<SCTAB>(maTabs.size()))
{
- if( nTab > static_cast<SCTAB>(pTab.size()) )
+ if( nTab > static_cast<SCTAB>(maTabs.size()) )
{
- pTab.resize(nTab+1, NULL );
+ maTabs.resize(nTab+1, NULL );
}
}
- pTab[nTab] = new ScTable(this, nTab,
+ maTabs[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("baeh")));
- if (nTab < static_cast<SCTAB>(pSourceDoc->pTab.size()) && pSourceDoc->pTab[nTab])
- pTab[nTab]->SetLayoutRTL( pSourceDoc->pTab[nTab]->IsLayoutRTL() );
+ if (nTab < static_cast<SCTAB>(pSourceDoc->maTabs.size()) && pSourceDoc->maTabs[nTab])
+ maTabs[nTab]->SetLayoutRTL( pSourceDoc->maTabs[nTab]->IsLayoutRTL() );
}
else
{
@@ -620,20 +619,20 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
{
if (VALIDTAB(nTab))
{
- if ( bForceTab && ( nTab >= static_cast<SCTAB>(pTab.size()) || !pTab[nTab] ) )
+ if ( bForceTab && ( nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab] ) )
{
sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
- if ( nTab >= static_cast<SCTAB>(pTab.size()) )
+ if ( nTab >= static_cast<SCTAB>(maTabs.size()) )
{
- pTab.resize( nTab + 1, NULL );
+ maTabs.resize( nTab + 1, NULL );
}
- pTab.at(nTab) = new ScTable(this, nTab,
+ maTabs.at(nTab) = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
bExtras, bExtras);
}
- if ( nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->PutCell( nCol, nRow, nFormatIndex, pCell );
+ if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->PutCell( nCol, nRow, nFormatIndex, pCell );
}
}
@@ -641,9 +640,9 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
sal_Bool bNotes ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
- sal_Bool bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
+ sal_Bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
@@ -665,9 +664,9 @@ sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
SCCOL& rEndCol, sal_Bool bNotes ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
- sal_Bool bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
+ sal_Bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
@@ -687,9 +686,9 @@ sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow
sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
SCROW& rEndRow, sal_Bool bNotes ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
- sal_Bool bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
+ sal_Bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
@@ -708,9 +707,9 @@ sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol
sal_Bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
- sal_Bool bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
+ sal_Bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
@@ -733,10 +732,10 @@ sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgres
{
if (nOldPos == nNewPos) return false;
sal_Bool bValid = false;
- SCTAB nTabCount = static_cast<SCTAB>(pTab.size());
+ SCTAB nTabCount = static_cast<SCTAB>(maTabs.size());
if (VALIDTAB(nOldPos) && nOldPos < nTabCount )
{
- if (pTab[nOldPos])
+ if (maTabs[nOldPos])
{
if (nTabCount > 1)
{
@@ -771,20 +770,20 @@ sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgres
pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_REORDER,
aSourceRange, 0,0,nDz ) );
- ScTable* pSaveTab = pTab[nOldPos];
- pTab.erase(pTab.begin()+nOldPos);
- pTab.insert(pTab.begin()+nNewPos, pSaveTab);
- TableContainer::iterator it = pTab.begin();
+ ScTable* pSaveTab = maTabs[nOldPos];
+ maTabs.erase(maTabs.begin()+nOldPos);
+ maTabs.insert(maTabs.begin()+nNewPos, pSaveTab);
+ TableContainer::iterator it = maTabs.begin();
for (SCTAB i = 0; i < nTabCount; i++)
- if (pTab[i])
- pTab[i]->UpdateMoveTab( nOldPos, nNewPos, i, pProgress );
- it = pTab.begin();
- for (; it != pTab.end(); ++it)
+ if (maTabs[i])
+ maTabs[i]->UpdateMoveTab( nOldPos, nNewPos, i, pProgress );
+ it = maTabs.begin();
+ for (; it != maTabs.end(); ++it)
if (*it)
(*it)->UpdateCompile();
SetNoListening( false );
- it = pTab.begin();
- for (; it != pTab.end(); ++it)
+ it = maTabs.begin();
+ for (; it != maTabs.end(); ++it)
if (*it)
(*it)->StartAllListeners();
// sheet names of references may not be valid until sheet is moved
@@ -804,8 +803,8 @@ sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgres
sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
{
- if (SC_TAB_APPEND == nNewPos || nNewPos >= static_cast<SCTAB>(pTab.size()))
- nNewPos = static_cast<SCTAB>(pTab.size());
+ if (SC_TAB_APPEND == nNewPos || nNewPos >= static_cast<SCTAB>(maTabs.size()))
+ nNewPos = static_cast<SCTAB>(maTabs.size());
String aName;
GetName(nOldPos, aName);
@@ -827,13 +826,13 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO
SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
if (bValid)
{
- if (nNewPos >= static_cast<SCTAB>(pTab.size()))
+ if (nNewPos >= static_cast<SCTAB>(maTabs.size()))
{
- pTab.push_back( new ScTable(this, static_cast<SCTAB>(pTab.size()), aName) );
+ maTabs.push_back( new ScTable(this, static_cast<SCTAB>(maTabs.size()), aName) );
}
else
{
- if (VALIDTAB(nNewPos) && (nNewPos < static_cast<SCTAB>(pTab.size())))
+ if (VALIDTAB(nNewPos) && (nNewPos < static_cast<SCTAB>(maTabs.size())))
{
SetNoListening( sal_True );
@@ -854,22 +853,22 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO
pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, aRange, 0,0,1 ) );
SCTAB i;
- for (TableContainer::iterator it = pTab.begin(); it != pTab.end(); ++it)
- if (*it && it != (pTab.begin() + nOldPos))
+ for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
+ if (*it && it != (maTabs.begin() + nOldPos))
(*it)->UpdateInsertTab(nNewPos);
- pTab.push_back(NULL);
- for (i = static_cast<SCTAB>(pTab.size())-1; i > nNewPos; i--)
- pTab[i] = pTab[i - 1];
+ maTabs.push_back(NULL);
+ for (i = static_cast<SCTAB>(maTabs.size())-1; i > nNewPos; i--)
+ maTabs[i] = maTabs[i - 1];
if (nNewPos <= nOldPos)
nOldPos++;
- pTab[nNewPos] = new ScTable(this, nNewPos, aName);
+ maTabs[nNewPos] = new ScTable(this, nNewPos, aName);
bValid = sal_True;
- for (TableContainer::iterator it = pTab.begin(); it != pTab.end(); ++it)
- if (*it && it != pTab.begin()+nOldPos && it != pTab.begin() + nNewPos)
+ for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
+ if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin() + nNewPos)
(*it)->UpdateCompile();
SetNoListening( false );
- for (TableContainer::iterator it = pTab.begin(); it != pTab.end(); ++it)
- if (*it && it != pTab.begin()+nOldPos && it != pTab.begin()+nNewPos)
+ for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
+ if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin()+nNewPos)
(*it)->StartAllListeners();
// update conditional formats after table is inserted
@@ -887,34 +886,34 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO
if (bValid)
{
SetNoListening( sal_True ); // noch nicht bei CopyToTable/Insert
- pTab[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
- pTab[nNewPos], pOnlyMarked );
- pTab[nNewPos]->SetTabBgColor(pTab[nOldPos]->GetTabBgColor());
+ maTabs[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
+ maTabs[nNewPos], pOnlyMarked );
+ maTabs[nNewPos]->SetTabBgColor(maTabs[nOldPos]->GetTabBgColor());
SCsTAB nDz;
nDz = ((short)nNewPos) - (short)nOldPos;
- pTab[nNewPos]->UpdateReference(URM_COPY, 0, 0, nNewPos , MAXCOL, MAXROW,
+ maTabs[nNewPos]->UpdateReference(URM_COPY, 0, 0, nNewPos , MAXCOL, MAXROW,
nNewPos, 0, 0, nDz, NULL);
- pTab[nNewPos]->UpdateInsertTabAbs(nNewPos); // alle abs. um eins hoch!!
- pTab[nOldPos]->UpdateInsertTab(nNewPos);
+ maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos); // alle abs. um eins hoch!!
+ maTabs[nOldPos]->UpdateInsertTab(nNewPos);
- pTab[nOldPos]->UpdateCompile();
- pTab[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation
+ maTabs[nOldPos]->UpdateCompile();
+ maTabs[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation
SetNoListening( false );
- pTab[nOldPos]->StartAllListeners();
- pTab[nNewPos]->StartAllListeners();
+ maTabs[nOldPos]->StartAllListeners();
+ maTabs[nNewPos]->StartAllListeners();
SetDirty();
SetAutoCalc( bOldAutoCalc );
if (pDrawLayer)
DrawCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
- pTab[nNewPos]->SetPageStyle( pTab[nOldPos]->GetPageStyle() );
- pTab[nNewPos]->SetPendingRowHeights( pTab[nOldPos]->IsPendingRowHeights() );
+ maTabs[nNewPos]->SetPageStyle( maTabs[nOldPos]->GetPageStyle() );
+ maTabs[nNewPos]->SetPendingRowHeights( maTabs[nOldPos]->IsPendingRowHeights() );
// Copy the custom print range if exists.
- pTab[nNewPos]->CopyPrintRange(*pTab[nOldPos]);
+ maTabs[nNewPos]->CopyPrintRange(*maTabs[nOldPos]);
}
else
SetAutoCalc( bOldAutoCalc );
@@ -940,9 +939,9 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
}
else // bestehende Tabelle ersetzen
{
- if (VALIDTAB(nDestPos) && nDestPos < static_cast<SCTAB>(pTab.size()) && pTab[nDestPos])
+ if (VALIDTAB(nDestPos) && nDestPos < static_cast<SCTAB>(maTabs.size()) && maTabs[nDestPos])
{
- pTab[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
+ maTabs[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
}
else
bValid = false;
@@ -966,12 +965,12 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
nDestPos = Min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM);
- pSrcDoc->pTab[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
+ pSrcDoc->maTabs[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
- false, pTab[nDestPos] );
+ false, maTabs[nDestPos] );
}
}
- pTab[nDestPos]->SetTabNo(nDestPos);
+ maTabs[nDestPos]->SetTabNo(nDestPos);
if ( !bResultsOnly )
{
@@ -988,7 +987,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// find named ranges that are used in the source sheet
std::set<sal_uInt16> aUsedNames;
- pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
+ pSrcDoc->maTabs[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
if (pSrcDoc->pRangeName)
{
@@ -1047,17 +1046,17 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
aSrcRangeNames[i]->ReplaceRangeNamesInUse( aSrcRangeMap );
// then update the formulas, they might need the just updated range names
- pTab[nDestPos]->ReplaceRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aSrcRangeMap );
+ maTabs[nDestPos]->ReplaceRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aSrcRangeMap );
}
SCsTAB nDz = ((SCsTAB)nDestPos) - (SCsTAB)nSrcPos;
- pTab[nDestPos]->UpdateReference(URM_COPY, 0, 0, nDestPos,
+ maTabs[nDestPos]->UpdateReference(URM_COPY, 0, 0, nDestPos,
MAXCOL, MAXROW, nDestPos,
0, 0, nDz, NULL);
// Test for outside absolute references for info box
- sal_Bool bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
+ sal_Bool bIsAbsRef = pSrcDoc->maTabs[nSrcPos]->TestTabRefAbs(nSrcPos);
// Readjust self-contained absolute references to this sheet
- pTab[nDestPos]->TestTabRefAbs(nSrcPos);
+ maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
if (bIsAbsRef)
{
nRetVal += 1;
@@ -1068,12 +1067,12 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
nRetVal += 2;
// message: duplicate names
}
- pTab[nDestPos]->CompileAll();
+ maTabs[nDestPos]->CompileAll();
}
SetNoListening( false );
if ( !bResultsOnly )
- pTab[nDestPos]->StartAllListeners();
+ maTabs[nDestPos]->StartAllListeners();
SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos));
if ( bResultsOnly )
@@ -1085,7 +1084,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
if (bInsertNew)
TransferDrawPage( pSrcDoc, nSrcPos, nDestPos );
- pTab[nDestPos]->SetPendingRowHeights( pSrcDoc->pTab[nSrcPos]->IsPendingRowHeights() );
+ maTabs[nDestPos]->SetPendingRowHeights( pSrcDoc->maTabs[nSrcPos]->IsPendingRowHeights() );
}
if (!bValid)
nRetVal = 0;
@@ -1133,9 +1132,9 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError)
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()))
- if (pTab[nTab])
- pTab[nTab]->SetError( nCol, nRow, nError );
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ if (maTabs[nTab])
+ maTabs[nTab]->SetError( nCol, nRow, nError );
}
// ----------------------------------------------------------------------------
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index d165d64..05a86b1 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -91,13 +91,13 @@ using namespace com::sun::star;
void ScDocument::GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rNames) const
{
ScRangeName::TabNameCopyMap aNames;
- for (SCTAB i = 0; i < static_cast<SCTAB>(pTab.size()); ++i)
+ for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); ++i)
{
- if (!pTab[i])
+ if (!maTabs[i])
// no more tables to iterate through.
break;
- const ScRangeName* p = pTab[i]->GetRangeName();
+ const ScRangeName* p = maTabs[i]->GetRangeName();
if (!p || p->empty())
// ignore empty ones.
continue;
@@ -110,13 +110,13 @@ void ScDocument::GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rNames) const
void ScDocument::SetAllTabRangeNames(const ScRangeName::TabNameCopyMap& rNames)
{
// Remove all existing range names first.
- for (SCTAB i = 0; i < static_cast<SCTAB>(pTab.size()); ++i)
+ for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); ++i)
{
- if (!pTab[i])
+ if (!maTabs[i])
// no more tables to iterate through.
break;
- pTab[i]->SetRangeName(NULL);
+ maTabs[i]->SetRangeName(NULL);
}
ScRangeName::TabNameCopyMap::const_iterator itr = rNames.begin(), itrEnd = rNames.end();
@@ -126,10 +126,10 @@ void ScDocument::SetAllTabRangeNames(const ScRangeName::TabNameCopyMap& rNames)
ScRangeName* ScDocument::GetRangeName(SCTAB nTab) const
{
- if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(pTab.size()) || !pTab[nTab])
+ if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
return NULL;
- return pTab[nTab]->GetRangeName();
+ return maTabs[nTab]->GetRangeName();
}
ScRangeName* ScDocument::GetRangeName() const
@@ -141,10 +141,10 @@ ScRangeName* ScDocument::GetRangeName() const
void ScDocument::SetRangeName(SCTAB nTab, ScRangeName* pNew)
{
- if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(pTab.size()) || !pTab[nTab])
+ if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
return;
- return pTab[nTab]->SetRangeName(pNew);
+ return maTabs[nTab]->SetRangeName(pNew);
}
void ScDocument::SetRangeName( ScRangeName* pNewRangeName )
@@ -326,66 +326,66 @@ void ScDocument::SetChartListenerCollection(
void ScDocument::SetScenario( SCTAB nTab, sal_Bool bFlag )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->SetScenario(bFlag);
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetScenario(bFlag);
}
sal_Bool ScDocument::IsScenario( SCTAB nTab ) const
{
- return ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] &&pTab[nTab]->IsScenario();
+ return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] &&maTabs[nTab]->IsScenario();
}
void ScDocument::SetScenarioData( SCTAB nTab, const String& rComment,
const Color& rColor, sal_uInt16 nFlags )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsScenario())
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario())
{
- pTab[nTab]->SetScenarioComment( rComment );
- pTab[nTab]->SetScenarioColor( rColor );
- pTab[nTab]->SetScenarioFlags( nFlags );
+ maTabs[nTab]->SetScenarioComment( rComment );
+ maTabs[nTab]->SetScenarioColor( rColor );
+ maTabs[nTab]->SetScenarioFlags( nFlags );
}
}
Color ScDocument::GetTabBgColor( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetTabBgColor();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetTabBgColor();
return Color(COL_AUTO);
}
void ScDocument::SetTabBgColor( SCTAB nTab, const Color& rColor )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->SetTabBgColor(rColor);
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetTabBgColor(rColor);
}
bool ScDocument::IsDefaultTabBgColor( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetTabBgColor() == COL_AUTO;
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetTabBgColor() == COL_AUTO;
return true;
}
void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
Color& rColor, sal_uInt16& rFlags ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsScenario())
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario())
{
- pTab[nTab]->GetScenarioComment( rComment );
- rColor = pTab[nTab]->GetScenarioColor();
- rFlags = pTab[nTab]->GetScenarioFlags();
+ maTabs[nTab]->GetScenarioComment( rComment );
+ rColor = maTabs[nTab]->GetScenarioColor();
+ rFlags = maTabs[nTab]->GetScenarioFlags();
}
}
void ScDocument::GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsScenario())
- rFlags = pTab[nTab]->GetScenarioFlags();
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario())
+ rFlags = maTabs[nTab]->GetScenarioFlags();
}
sal_Bool ScDocument::IsLinked( SCTAB nTab ) const
{
- return ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsLinked();
+ return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsLinked();
// euqivalent to
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->IsLinked();
@@ -409,43 +409,43 @@ void ScDocument::SetGrammar( formula::FormulaGrammar::Grammar eGram )
sal_Bool ScDocument::GetLinkMode( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkMode();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkMode();
return SC_LINK_NONE;
}
const String& ScDocument::GetLinkDoc( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkDoc();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkDoc();
return EMPTY_STRING;
}
const String& ScDocument::GetLinkFlt( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkFlt();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkFlt();
return EMPTY_STRING;
}
const String& ScDocument::GetLinkOpt( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkOpt();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkOpt();
return EMPTY_STRING;
}
const String& ScDocument::GetLinkTab( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkTab();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkTab();
return EMPTY_STRING;
}
sal_uLong ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetLinkRefreshDelay();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetLinkRefreshDelay();
return 0;
}
@@ -453,19 +453,19 @@ void ScDocument::SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc,
const String& rFilter, const String& rOptions,
const String& rTabName, sal_uLong nRefreshDelay )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->SetLink( nMode, rDoc, rFilter, rOptions, rTabName, nRefreshDelay );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetLink( nMode, rDoc, rFilter, rOptions, rTabName, nRefreshDelay );
}
sal_Bool ScDocument::HasLink( const String& rDoc,
const String& rFilter, const String& rOptions ) const
{
- SCTAB nCount = static_cast<SCTAB>(pTab.size());
+ SCTAB nCount = static_cast<SCTAB>(maTabs.size());
for (SCTAB i=0; i<nCount; i++)
- if (pTab[i]->IsLinked()
- && pTab[i]->GetLinkDoc() == rDoc
- && pTab[i]->GetLinkFlt() == rFilter
- && pTab[i]->GetLinkOpt() == rOptions)
+ if (maTabs[i]->IsLinked()
+ && maTabs[i]->GetLinkDoc() == rDoc
+ && maTabs[i]->GetLinkFlt() == rFilter
+ && maTabs[i]->GetLinkOpt() == rOptions)
return sal_True;
return false;
@@ -561,23 +561,23 @@ ScFormulaParserPool& ScDocument::GetFormulaParserPool() const
const ScSheetEvents* ScDocument::GetSheetEvents( SCTAB nTab ) const
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetSheetEvents();
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetSheetEvents();
return NULL;
}
void ScDocument::SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew )
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->SetSheetEvents( pNew );
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetSheetEvents( pNew );
}
bool ScDocument::HasSheetEventScript( SCTAB nTab, sal_Int32 nEvent, bool bWithVbaEvents ) const
{
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
// check if any event handler script has been configured
- const ScSheetEvents* pEvents = pTab[nTab]->GetSheetEvents();
+ const ScSheetEvents* pEvents = maTabs[nTab]->GetSheetEvents();
if ( pEvents && pEvents->GetScript( nEvent ) )
return true;
// check if VBA event handlers exist
@@ -598,7 +598,7 @@ bool ScDocument::HasSheetEventScript( SCTAB nTab, sal_Int32 nEvent, bool bWithVb
bool ScDocument::HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents ) const
{
- for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(pTab.size()); nTab++)
+ for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
if (HasSheetEventScript( nTab, nEvent, bWithVbaEvents ))
return true;
return false;
@@ -606,46 +606,46 @@ bool ScDocument::HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents )
bool ScDocument::HasAnyCalcNotification() const
{
- for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(pTab.size()); nTab++)
- if (pTab[nTab] && pTab[nTab]->GetCalcNotification())
+ for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
+ if (maTabs[nTab] && maTabs[nTab]->GetCalcNotification())
return true;
return false;
}
sal_Bool ScDocument::HasCalcNotification( SCTAB nTab ) const
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetCalcNotification();
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetCalcNotification();
return false;
}
void ScDocument::SetCalcNotification( SCTAB nTab )
{
// set only if not set before
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && !pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(sal_True);
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && !maTabs[nTab]->GetCalcNotification())
+ maTabs[nTab]->SetCalcNotification(sal_True);
}
void ScDocument::ResetCalcNotifications()
{
- for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(pTab.size()); nTab++)
- if (pTab[nTab] && pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(false);
+ for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
+ if (maTabs[nTab] && maTabs[nTab]->GetCalcNotification())
+ maTabs[nTab]->SetCalcNotification(false);
}
ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate )
{
ScOutlineTable* pVal = NULL;
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()))
- if (pTab[nTab])
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ if (maTabs[nTab])
{
- pVal = pTab[nTab]->GetOutlineTable();
+ pVal = maTabs[nTab]->GetOutlineTable();
if (!pVal)
if (bCreate)
{
- pTab[nTab]->StartOutlineTable();
- pVal = pTab[nTab]->GetOutlineTable();
+ maTabs[nTab]->StartOutlineTable();
+ pVal = maTabs[nTab]->GetOutlineTable();
}
}
@@ -654,30 +654,30 @@ ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate )
sal_Bool ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline )
{
- return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->SetOutlineTable(pNewOutline);
+ return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->SetOutlineTable(pNewOutline);
}
void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow );
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow );
}
sal_Bool ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam )
{
- return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->TestRemoveSubTotals( rParam );
+ return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->TestRemoveSubTotals( rParam );
}
void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
{
- if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->RemoveSubTotals( rParam );
+ if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->RemoveSubTotals( rParam );
}
sal_Bool ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
{
- return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->DoSubTotals( rParam );
+ return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->DoSubTotals( rParam );
}
sal_Bool ScDocument::HasSubTotalCells( const ScRange& rRange )
@@ -699,51 +699,51 @@ sal_Bool ScDocument::HasSubTotalCells( const ScRange& rRange )
void ScDocument::CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc )
{
- SCTAB nCount = static_cast<SCTAB>(pTab.size());
+ SCTAB nCount = static_cast<SCTAB>(maTabs.size());
for (SCTAB nTab=0; nTab<nCount; nTab++)
- if (pTab[nTab] && pPosDoc->pTab[nTab] && pDestDoc->pTab[nTab])
- pTab[nTab]->CopyUpdated( pPosDoc->pTab[nTab], pDestDoc->pTab[nTab] );
+ if (maTabs[nTab] && pPosDoc->maTabs[nTab] && pDestDoc->maTabs[nTab])
+ maTabs[nTab]->CopyUpdated( pPosDoc->maTabs[nTab], pDestDoc->maTabs[nTab] );
}
void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario )
{
- if (ValidTab(nSrcTab) && ValidTab(nDestTab) && nSrcTab < static_cast<SCTAB>(pTab.size())
- && nDestTab < static_cast<SCTAB>(pTab.size()) && pTab[nSrcTab] && pTab[nDestTab])
+ if (ValidTab(nSrcTab) && ValidTab(nDestTab) && nSrcTab < static_cast<SCTAB>(maTabs.size())
+ && nDestTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nSrcTab] && maTabs[nDestTab])
{
// Flags fuer aktive Szenarios richtig setzen
// und aktuelle Werte in bisher aktive Szenarios zurueckschreiben
- ScRangeList aRanges = *pTab[nSrcTab]->GetScenarioRanges();
+ ScRangeList aRanges = *maTabs[nSrcTab]->GetScenarioRanges();
// nDestTab ist die Zieltabelle
for ( SCTAB nTab = nDestTab+1;
- nTab< static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsScenario();
+ nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario();
nTab++ )
{
- if ( pTab[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist
+ if ( maTabs[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist
{
sal_Bool bTouched = false;
for ( size_t nR=0, nRangeCount = aRanges.size(); nR < nRangeCount && !bTouched; nR++ )
{
const ScRange* pRange = aRanges[ nR ];
- if ( pTab[nTab]->HasScenarioRange( *pRange ) )
+ if ( maTabs[nTab]->HasScenarioRange( *pRange ) )
bTouched = sal_True;
}
if (bTouched)
{
- pTab[nTab]->SetActiveScenario(false);
- if ( pTab[nTab]->GetScenarioFlags() & SC_SCENARIO_TWOWAY )
- pTab[nTab]->CopyScenarioFrom( pTab[nDestTab] );
+ maTabs[nTab]->SetActiveScenario(false);
+ if ( maTabs[nTab]->GetScenarioFlags() & SC_SCENARIO_TWOWAY )
+ maTabs[nTab]->CopyScenarioFrom( maTabs[nDestTab] );
}
}
}
- pTab[nSrcTab]->SetActiveScenario(sal_True); // da kommt's her...
+ maTabs[nSrcTab]->SetActiveScenario(sal_True); // da kommt's her...
if (!bNewScenario) // Daten aus dem ausgewaehlten Szenario kopieren
{
sal_Bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
- pTab[nSrcTab]->CopyScenarioTo( pTab[nDestTab] );
+ maTabs[nSrcTab]->CopyScenarioTo( maTabs[nDestTab] );
SetDirty();
SetAutoCalc( bOldAutoCalc );
}
@@ -756,41 +756,41 @@ void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestM
if (bResetMark)
rDestMark.ResetMark();
- if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(pTab.size()) && pTab[nSrcTab])
- pTab[nSrcTab]->MarkScenarioIn( rDestMark, nNeededBits );
+ if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nSrcTab])
+ maTabs[nSrcTab]->MarkScenarioIn( rDestMark, nNeededBits );
rDestMark.SetAreaTab( nDestTab );
}
sal_Bool ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const
{
- return ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->HasScenarioRange( rRange );
+ return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->HasScenarioRange( rRange );
}
const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetScenarioRanges();
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetScenarioRanges();
return NULL;
}
sal_Bool ScDocument::IsActiveScenario( SCTAB nTab ) const
{
- return ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsActiveScenario( );
+ return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsActiveScenario( );
}
void ScDocument::SetActiveScenario( SCTAB nTab, sal_Bool bActive )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->SetActiveScenario( bActive );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetActiveScenario( bActive );
}
sal_Bool ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
{
- if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(pTab.size())
- && nDestTab < static_cast<SCTAB>(pTab.size())&& ValidTab(nDestTab))
- return pTab[nSrcTab]->TestCopyScenarioTo( pTab[nDestTab] );
+ if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(maTabs.size())
+ && nDestTab < static_cast<SCTAB>(maTabs.size())&& ValidTab(nDestTab))
+ return maTabs[nSrcTab]->TestCopyScenarioTo( maTabs[nDestTab] );
OSL_FAIL("falsche Tabelle bei TestCopyScenario");
return false;
@@ -956,11 +956,11 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
pUnoBroadcaster->Broadcast( ScUpdateRefHint(
eUpdateRefMode, aRange, nDx, nDy, nDz ) );
i = 0;
- iMax = static_cast<SCTAB>(pTab.size())-1;
+ iMax = static_cast<SCTAB>(maTabs.size())-1;
}
- for ( ; i<=iMax && i < static_cast<SCTAB>(pTab.size()); i++)
- if (pTab[i])
- pTab[i]->UpdateReference(
+ for ( ; i<=iMax && i < static_cast<SCTAB>(maTabs.size()); i++)
+ if (maTabs[i])
+ maTabs[i]->UpdateReference(
eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2,
nDx, nDy, nDz, pUndoDoc, bIncludeDraw, bUpdateNoteCaptionPos );
@@ -1008,10 +1008,10 @@ void ScDocument::UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDo
ScAddress aDest = rDestPos;
SCTAB nClipTab = 0;
- for (SCTAB nDestTab=0; nDestTab< static_cast<SCTAB>(pTab.size()) && pTab[nDestTab]; nDestTab++)
+ for (SCTAB nDestTab=0; nDestTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nDestTab]; nDestTab++)
if (rMark.GetTableSelect(nDestTab))
{
- while (!pClipDoc->pTab[nClipTab]) nClipTab = (nClipTab+1) % (MAXTAB+1);
+ while (!pClipDoc->maTabs[nClipTab]) nClipTab = (nClipTab+1) % (MAXTAB+1);
aSource.aStart.SetTab( nClipTab );
aSource.aEnd.SetTab( nClipTab );
aDest.SetTab( nDestTab );
@@ -1019,9 +1019,9 @@ void ScDocument::UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDo
// wie UpdateReference
if (pRangeName)
pRangeName->UpdateTranspose( aSource, aDest ); // vor den Zellen!
- for (SCTAB i=0; i< static_cast<SCTAB>(pTab.size()); i++)
- if (pTab[i])
- pTab[i]->UpdateTranspose( aSource, aDest, pUndoDoc );
+ for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++)
+ if (maTabs[i])
+ maTabs[i]->UpdateTranspose( aSource, aDest, pUndoDoc );
nClipTab = (nClipTab+1) % (MAXTAB+1);
}
@@ -1036,8 +1036,8 @@ void ScDocument::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
if (pRangeName)
pRangeName->UpdateGrow( rArea, nGrowX, nGrowY );
- for (SCTAB i=0; i< static_cast<SCTAB>(pTab.size()) && pTab[i]; i++)
- pTab[i]->UpdateGrow( rArea, nGrowX, nGrowY );
+ for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()) && maTabs[i]; i++)
+ maTabs[i]->UpdateGrow( rArea, nGrowX, nGrowY );
}
void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
@@ -1046,10 +1046,10 @@ void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
- for (SCTAB i=0; i < static_cast<SCTAB>(pTab.size()); i++)
- if (pTab[i])
+ for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++)
+ if (maTabs[i])
if (rMark.GetTableSelect(i))
- pTab[i]->Fill(nCol1, nRow1, nCol2, nRow2,
+ maTabs[i]->Fill(nCol1, nRow1, nCol2, nRow2,
nFillCount, eFillDir, eFillCmd, eFillDateCmd,
nStepValue, nMaxValue);
}
@@ -1057,8 +1057,8 @@ void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const
String ScDocument::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY )
{
SCTAB nTab = rSource.aStart.Tab();
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetAutoFillPreview( rSource, nEndX, nEndY );
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetAutoFillPreview( rSource, nEndX, nEndY );
return EMPTY_STRING;
}
@@ -1068,22 +1068,22 @@ void ScDocument::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
PutInOrder( nStartCol, nEndCol );
PutInOrder( nStartRow, nEndRow );
- for (SCTAB i=0; i < static_cast<SCTAB>(pTab.size()); i++)
- if (pTab[i])
+ for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++)
+ if (maTabs[i])
if (rMark.GetTableSelect(i))
- pTab[i]->AutoFormat( nStartCol, nStartRow, nEndCol, nEndRow, nFormatNo );
+ maTabs[i]->AutoFormat( nStartCol, nStartRow, nEndCol, nEndRow, nFormatNo );
}
void ScDocument::GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
ScAutoFormatData& rData)
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()))
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
{
- if (pTab[nTab])
+ if (maTabs[nTab])
{
PutInOrder(nStartCol, nEndCol);
PutInOrder(nStartRow, nEndRow);
- pTab[nTab]->GetAutoFormatData(nStartCol, nStartRow, nEndCol, nEndRow, rData);
+ maTabs[nTab]->GetAutoFormatData(nStartCol, nStartRow, nEndCol, nEndRow, rData);
}
}
}
@@ -1184,7 +1184,7 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
rMark.MarkToMulti();
sal_Bool bFound = false;
- if (rTab >= static_cast<SCTAB>(pTab.size()))
+ if (rTab >= static_cast<SCTAB>(maTabs.size()))
OSL_FAIL("table out of range");
if (VALIDTAB(rTab))
{
@@ -1195,14 +1195,14 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
if ( nCommand == SVX_SEARCHCMD_FIND_ALL ||
nCommand == SVX_SEARCHCMD_REPLACE_ALL )
{
- for (nTab = 0; nTab < static_cast<SCTAB>(pTab.size()); nTab++)
- if (pTab[nTab])
+ for (nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
+ if (maTabs[nTab])
{
if (rMark.GetTableSelect(nTab))
{
nCol = 0;
nRow = 0;
- bFound |= pTab[nTab]->SearchAndReplace(
+ bFound |= maTabs[nTab]->SearchAndReplace(
rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc );
}
}
@@ -1216,11 +1216,11 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
if (rSearchItem.GetBackward())
{
for (nTab = rTab; ((SCsTAB)nTab >= 0) && !bFound; nTab--)
- if (pTab[nTab])
+ if (maTabs[nTab])
{
if (rMark.GetTableSelect(nTab))
{
- bFound = pTab[nTab]->SearchAndReplace(
+ bFound = maTabs[nTab]->SearchAndReplace(
rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc );
if (bFound)
{
@@ -1236,12 +1236,12 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- for (nTab = rTab; (nTab < static_cast<SCTAB>(pTab.size())) && !bFound; nTab++)
- if (pTab[nTab])
+ for (nTab = rTab; (nTab < static_cast<SCTAB>(maTabs.size())) && !bFound; nTab++)
+ if (maTabs[nTab])
{
if (rMark.GetTableSelect(nTab))
{
- bFound = pTab[nTab]->SearchAndReplace(
+ bFound = maTabs[nTab]->SearchAndReplace(
rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc );
if (bFound)
{
@@ -1264,8 +1264,8 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- return pTab[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow );
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ return maTabs[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow );
OSL_FAIL("missing tab");
return false;
@@ -1273,8 +1273,8 @@ sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTa
sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- return pTab[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow );
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ return maTabs[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow );
OSL_FAIL("missing tab");
return false;
@@ -1282,19 +1282,19 @@ sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTa
void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery)
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
{
sal_Bool bOldDisableIdle = IsIdleDisabled();
DisableIdle( sal_True );
- pTab[nTab]->Sort(rSortParam, bKeepQuery);
+ maTabs[nTab]->Sort(rSortParam, bKeepQuery);
DisableIdle( bOldDisableIdle );
}
}
SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub)
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- return pTab[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub);
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ return maTabs[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub);
OSL_FAIL("missing tab");
return 0;
@@ -1303,16 +1303,16 @@ SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool b
void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr)
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->GetUpperCellString( nCol, nRow, rStr );
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->GetUpperCellString( nCol, nRow, rStr );
else
rStr.Erase();
}
sal_Bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam)
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- return pTab[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam);
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ return maTabs[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam);
OSL_FAIL("missing tab");
return false;
@@ -1355,13 +1355,13 @@ bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
sal_Bool ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
- return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow );
+ return VALIDTAB(nTab) && maTabs[nTab] && maTabs[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow );
}
sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
- return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow );
+ return VALIDTAB(nTab) && maTabs[nTab] && maTabs[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow );
}
//
@@ -1371,7 +1371,7 @@ sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndC
sal_Bool ScDocument::GetFilterEntries(
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates)
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pDBCollection )
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && pDBCollection )
{
ScDBData* pDBData = pDBCollection->GetDBAtCursor(nCol, nRow, nTab, false); //!??
if (pDBData)
@@ -1408,11 +1408,11 @@ sal_Bool ScDocument::GetFilterEntries(
if ( bFilter )
{
- pTab[nTab]->GetFilteredFilterEntries( nCol, nStartRow, nEndRow, aParam, rStrings, rHasDates );
+ maTabs[nTab]->GetFilteredFilterEntries( nCol, nStartRow, nEndRow, aParam, rStrings, rHasDates );
}
else
{
- pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
+ maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
}
return sal_True;
@@ -1429,9 +1429,9 @@ sal_Bool ScDocument::GetFilterEntries(
sal_Bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
{
- pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
+ maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
return sal_True;
}
@@ -1459,7 +1459,7 @@ sal_Bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
}
- return ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit );
+ return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit );
}
//
@@ -1549,8 +1549,8 @@ Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm
{
Rectangle aRect;
ScTable* pTable = NULL;
- if ( aEmbedRange.aStart.Tab() < static_cast<SCTAB>(pTab.size()) )
- pTable = pTab[aEmbedRange.aStart.Tab()];
+ if ( aEmbedRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) )
+ pTable = maTabs[aEmbedRange.aStart.Tab()];
else
OSL_FAIL("table out of range");
if (!pTable)
@@ -1641,8 +1641,8 @@ bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEn
ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
{
ScTable* pTable = NULL;
- if (nTab < static_cast<SCTAB>(pTab.size()))
- pTable = pTab[nTab];
+ if (nTab < static_cast<SCTAB>(maTabs.size()))
+ pTable = maTabs[nTab];
else
OSL_FAIL("table out of range");
if (!pTable)
@@ -1779,8 +1779,8 @@ void lcl_SnapVer( ScTable* pTable, long& rVal, SCROW& rStartRow )
void ScDocument::SnapVisArea( Rectangle& rRect ) const
{
ScTable* pTable = NULL;
- if (nVisibleTab < static_cast<SCTAB>(pTab.size()))
- pTable = pTab[nVisibleTab];
+ if (nVisibleTab < static_cast<SCTAB>(maTabs.size()))
+ pTable = maTabs[nVisibleTab];
else
OSL_FAIL("table out of range");
if (!pTable)
@@ -1833,8 +1833,8 @@ sal_Bool ScDocument::IsDocEditable() const
sal_Bool ScDocument::IsTabProtected( SCTAB nTab ) const
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->IsProtected();
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->IsProtected();
OSL_FAIL("Falsche Tabellennummer");
return false;
@@ -1842,26 +1842,26 @@ sal_Bool ScDocument::IsTabProtected( SCTAB nTab ) const
ScTableProtection* ScDocument::GetTabProtection( SCTAB nTab ) const
{
- if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetProtection();
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetProtection();
return NULL;
}
void ScDocument::SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect)
{
- if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(pTab.size()))
+ if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()))
return;
- pTab[nTab]->SetProtection(pProtect);
+ maTabs[nTab]->SetProtection(pProtect);
}
void ScDocument::CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
{
- if (!ValidTab(nTabSrc) || nTabSrc >= static_cast<SCTAB>(pTab.size()) || nTabDest >= static_cast<SCTAB>(pTab.size()) || !ValidTab(nTabDest))
+ if (!ValidTab(nTabSrc) || nTabSrc >= static_cast<SCTAB>(maTabs.size()) || nTabDest >= static_cast<SCTAB>(maTabs.size()) || !ValidTab(nTabDest))
return;
- pTab[nTabDest]->SetProtection( pTab[nTabSrc]->GetProtection() );
+ maTabs[nTabDest]->SetProtection( maTabs[nTabSrc]->GetProtection() );
}
const ScDocOptions& ScDocument::GetDocOptions() const
@@ -1948,7 +1948,7 @@ void ScDocument::SetDrawDefaults()
Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
{
- if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(pTab.size()) || !pTab[nTab])
+ if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
{
OSL_FAIL("GetMMRect: falsche Tabelle");
return Rectangle(0,0,0,0);
@@ -2052,20 +2052,20 @@ void ScDocument::RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab )
void ScDocument::ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->ExtendPrintArea( pDev, nStartCol, nStartRow, rEndCol, nEndRow );
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->ExtendPrintArea( pDev, nStartCol, nStartRow, rEndCol, nEndRow );
}
void ScDocument::IncSizeRecalcLevel( SCTAB nTab )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->IncRecalcLevel();
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->IncRecalcLevel();
}
void ScDocument::DecSizeRecalcLevel( SCTAB nTab, bool bUpdateNoteCaptionPos )
{
- if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] )
- pTab[nTab]->DecRecalcLevel( bUpdateNoteCaptionPos );
+ if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
+ maTabs[nTab]->DecRecalcLevel( bUpdateNoteCaptionPos );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 934a3b5..c2f5f89 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -70,8 +70,8 @@ sal_Bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
nX = 0.0;
if (ValidColRow(nFCol, nFRow) && ValidColRow(nVCol, nVRow) &&
VALIDTAB(nFTab) && VALIDTAB(nVTab) &&
- nFTab < static_cast<SCTAB>(pTab.size()) && pTab[nFTab] &&
- nVTab < static_cast<SCTAB>(pTab.size()) && pTab[nVTab])
+ nFTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nFTab] &&
+ nVTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nVTab])
{
CellType eFType, eVType;
GetCellType(nFCol, nFRow, nFTab, eFType);
@@ -138,9 +138,9 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SCROW k;
i = 0;
bool bStop = false;
- for (;i < static_cast<SCTAB>(pTab.size()); ++i)
+ for (;i < static_cast<SCTAB>(maTabs.size()); ++i)
{
- if (pTab[i] && rMark.GetTableSelect(i))
+ if (maTabs[i] && rMark.GetTableSelect(i))
{
bStop = true;
break;
@@ -161,14 +161,14 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
else
pCell = new ScFormulaCell( this, aPos, rFormula, eGram, MM_FORMULA );
pCell->SetMatColsRows( nCol2 - nCol1 + 1, nRow2 - nRow1 + 1 );
- for (i = 0; i < static_cast<SCTAB>(pTab.size()); i++)
+ for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++)
{
- if (pTab[i] && rMark.GetTableSelect(i))
+ if (maTabs[i] && rMark.GetTableSelect(i))
{
if (i == nTab1)
- pTab[i]->PutCell(nCol1, nRow1, pCell);
+ maTabs[i]->PutCell(nCol1, nRow1, pCell);
else
- pTab[i]->PutCell(nCol1, nRow1, pCell->CloneWithoutNote(*this, ScAddress( nCol1, nRow1, i), SC_CLONECELL_STARTLISTENING));
+ maTabs[i]->PutCell(nCol1, nRow1, pCell->CloneWithoutNote(*this, ScAddress( nCol1, nRow1, i), SC_CLONECELL_STARTLISTENING));
}
}
@@ -185,11 +185,11 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
ScTokenArray aArr;
ScToken* t = static_cast<ScToken*>(aArr.AddMatrixSingleReference( aRefData));
- for (i = 0; i < static_cast<SCTAB>(pTab.size()); i++)
+ for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++)
{
- if (pTab[i] && rMark.GetTableSelect(i))
+ if (maTabs[i] && rMark.GetTableSelect(i))
{
- pTab[i]->DoColResize( nCol1, nCol2, static_cast<SCSIZE>(nRow2 - nRow1 + 1) );
+ maTabs[i]->DoColResize( nCol1, nCol2, static_cast<SCSIZE>(nRow2 - nRow1 + 1) );
if (i != nTab1)
{
aRefData.nTab = i;
@@ -207,7 +207,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
aPos = ScAddress( j, k, i );
t->CalcRelFromAbs( aPos );
pCell = new ScFormulaCell( this, aPos, aArr.Clone(), eGram, MM_REFERENCE );
- pTab[i]->PutCell(j, k, (ScBaseCell*) pCell);
+ maTabs[i]->PutCell(j, k, (ScBaseCell*) pCell);
}
}
}
@@ -226,9 +226,9 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
SCROW k;
i = 0;
bool bStop = false;
- for (;i < static_cast<SCTAB>(pTab.size()); ++i)
+ for (;i < static_cast<SCTAB>(maTabs.size()); ++i)
{
- if (pTab[i] && rMark.GetTableSelect(i))
+ if (maTabs[i] && rMark.GetTableSelect(i))
{
bStop = true;
break;
@@ -295,9 +295,9 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
formula::FormulaGrammar::GRAM_NATIVE, MM_NONE );
for( j = nCol1; j <= nCol2; j++ )
for( k = nRow1; k <= nRow2; k++ )
- for (i = 0; i < static_cast<SCTAB>(pTab.size()); i++)
- if( pTab[i] && rMark.GetTableSelect(i) )
- pTab[i]->PutCell( j, k, aRefCell.CloneWithoutNote( *this, ScAddress( j, k, i ), SC_CLONECELL_STARTLISTENING ) );
+ for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++)
+ if( maTabs[i] && rMark.GetTableSelect(i) )
+ maTabs[i]->PutCell( j, k, aRefCell.CloneWithoutNote( *this, ScAddress( j, k, i ), SC_CLONECELL_STARTLISTENING ) );
}
namespace {
@@ -374,8 +374,8 @@ bool ScDocument::MarkUsedExternalReferences( ScTokenArray & rArr )
sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
sal_Bool bInSel, const ScMarkData& rMark) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetNextSpellingCell( nCol, nRow, bInSel, rMark );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetNextSpellingCell( nCol, nRow, bInSel, rMark );
else
return false;
}
@@ -383,8 +383,8 @@ sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
sal_Bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
const ScMarkData& rMark )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetNextMarkedCell( rCol, rRow, rMark );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetNextMarkedCell( rCol, rRow, rMark );
else
return false;
}
@@ -394,16 +394,16 @@ sal_Bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
ScMarkData& rMark,
sal_Bool bIsUndoP)
{
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP);
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP);
else
return false;
}
void ScDocument::CompileDBFormula()
{
- TableContainer::iterator it = pTab.begin();
- for (;it != pTab.end(); ++it)
+ TableContainer::iterator it = maTabs.begin();
+ for (;it != maTabs.end(); ++it)
{
if (*it)
(*it)->CompileDBFormula();
@@ -412,8 +412,8 @@ void ScDocument::CompileDBFormula()
void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString )
{
- TableContainer::iterator it = pTab.begin();
- for (;it != pTab.end(); ++it)
+ TableContainer::iterator it = maTabs.begin();
+ for (;it != maTabs.end(); ++it)
{
if (*it)
(*it)->CompileDBFormula( bCreateFormulaString );
@@ -425,8 +425,8 @@ void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString )
if ( pCondFormList )
pCondFormList->CompileAll(); // nach ScNameDlg noetig
- TableContainer::iterator it = pTab.begin();
- for (;it != pTab.end(); ++it)
+ TableContainer::iterator it = maTabs.begin();
+ for (;it != maTabs.end(); ++it)
{
if (*it)
(*it)->CompileNameFormula( bCreateFormulaString );
@@ -435,8 +435,8 @@ void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString )
void ScDocument::CompileColRowNameFormula()
{
- TableContainer::iterator it = pTab.begin();
- for (;it != pTab.end(); ++it)
+ TableContainer::iterator it = maTabs.begin();
+ for (;it != maTabs.end(); ++it)
{
if (*it)
(*it)->CompileColRowNameFormula();
@@ -445,8 +445,8 @@ void ScDocument::CompileColRowNameFormula()
void ScDocument::DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd )
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->DoColResize( nCol1, nCol2, nAdd );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->DoColResize( nCol1, nCol2, nAdd );
else
{
OSL_FAIL("DoColResize: falsche Tabelle");
@@ -455,8 +455,8 @@ void ScDocument::DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd
void ScDocument::InvalidateTableArea()
{
- TableContainer::iterator it = pTab.begin();
- for (;it != pTab.end() && *it; ++it)
+ TableContainer::iterator it = maTabs.begin();
+ for (;it != maTabs.end() && *it; ++it)
{
(*it)->InvalidateTableArea();
if ( (*it)->IsScenario() )
@@ -467,8 +467,8 @@ void ScDocument::InvalidateTableArea()
sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol,
SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetMaxStringLen( nCol, nRowStart, nRowEnd, eCharSet );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetMaxStringLen( nCol, nRowStart, nRowEnd, eCharSet );
else
return 0;
}
@@ -477,8 +477,8 @@ xub_StrLen ScDocument::GetMaxNumberStringLen( sal_uInt16& nPrecision, SCTAB nTab
SCCOL nCol,
SCROW nRowStart, SCROW nRowEnd ) const
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->GetMaxNumberStringLen( nPrecision, nCol,
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->GetMaxNumberStringLen( nPrecision, nCol,
nRowStart, nRowEnd );
else
return 0;
@@ -499,9 +499,9 @@ sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
SCCOL nEndCol = aSingle.aEnd.Col();
SCROW nEndRow = aSingle.aEnd.Row();
- for (SCTAB nTab=0; nTab< static_cast<SCTAB>(pTab.size()) && !aData.bError; nTab++)
- if (pTab[nTab] && rMark.GetTableSelect(nTab))
- pTab[nTab]->UpdateSelectionFunction( aData,
+ for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && !aData.bError; nTab++)
+ if (maTabs[nTab] && rMark.GetTableSelect(nTab))
+ maTabs[nTab]->UpdateSelectionFunction( aData,
nStartCol, nStartRow, nEndCol, nEndRow, rMark );
//! rMark an UpdateSelectionFunction uebergeben !!!!!
@@ -725,14 +725,14 @@ const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) const
void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges )
{
- for (SCTAB i=0; i< static_cast<SCTAB>(pTab.size()) && pTab[i]; i++)
- pTab[i]->FindConditionalFormat( nKey, rRanges );
+ for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()) && maTabs[i]; i++)
+ maTabs[i]->FindConditionalFormat( nKey, rRanges );
}
void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab )
{
- if(VALIDTAB(nTab) && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->FindConditionalFormat( nKey, rRanges );
+ if(VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->FindConditionalFormat( nKey, rRanges );
}
void ScDocument::ConditionalChanged( sal_uLong nKey )
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 485ac6c..486779f 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -135,9 +135,9 @@ void ScDocument::UpdateAllCharts()
size_t nDataCount = pChartCollection->size();
- for (SCTAB nTab=0; nTab< static_cast<SCTAB>(pTab.size()); nTab++)
+ for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++)
{
- if (pTab[nTab])
+ if (maTabs[nTab])
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
@@ -205,7 +205,7 @@ void ScDocument::UpdateAllCharts()
sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
{
- if (pDrawLayer && nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
+ if (pDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
@@ -251,7 +251,7 @@ uno::Reference< chart2::XChartDocument > ScDocument::GetChartByName( const Strin
if (pDrawLayer)
{
sal_uInt16 nCount = pDrawLayer->GetPageCount();
- for (sal_uInt16 nTab=0; nTab<nCount&& nTab < static_cast<SCTAB>(pTab.size()); nTab++)
+ for (sal_uInt16 nTab=0; nTab<nCount&& nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
OSL_ENSURE(pPage,"Page ?");
@@ -316,7 +316,7 @@ void ScDocument::GetOldChartParameters( const String& rName,
return;
sal_uInt16 nCount = pDrawLayer->GetPageCount();
- for (sal_uInt16 nTab=0; nTab<nCount && nTab < static_cast<SCTAB>(pTab.size()); nTab++)
+ for (sal_uInt16 nTab=0; nTab<nCount && nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
OSL_ENSURE(pPage,"Page ?");
@@ -363,7 +363,7 @@ void ScDocument::UpdateChartArea( const String& rChartName,
if (!pDrawLayer)
return;
- for (SCTAB nTab=0; nTab< static_cast<SCTAB>(pTab.size()) && pTab[nTab]; nTab++)
+ for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
@@ -598,7 +598,7 @@ void ScDocument::SetChartRangeList( const String& rChartName,
if (!pDrawLayer)
return;
- for (SCTAB nTab=0; nTab< static_cast<SCTAB>(pTab.size()) && pTab[nTab]; nTab++)
+ for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
@@ -638,8 +638,8 @@ void ScDocument::SetChartRangeList( const String& rChartName,
sal_Bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- return pTab[nTab]->HasData( nCol, nRow );
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ return maTabs[nTab]->HasData( nCol, nRow );
else
return false;
}
@@ -700,9 +700,9 @@ void ScDocument::UpdateChartListenerCollection()
ScRange aRange;
// Range for searching is not important
ScChartListener aCLSearcher( EMPTY_STRING, this, aRange );
- for (SCTAB nTab=0; nTab< static_cast<SCTAB>(pTab.size()); nTab++)
+ for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++)
{
- if (pTab[nTab])
+ if (maTabs[nTab])
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page ?");
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 6abb6de..8291642 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -116,8 +116,8 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( rHint.GetAddress() != BCA_BRDCST_ALWAYS )
{
SCTAB nTab = rHint.GetAddress().Tab();
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid(false);
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsStreamValid())
+ maTabs[nTab]->SetStreamValid(false);
}
}
@@ -193,8 +193,8 @@ void ScDocument::StartListeningCell( const ScAddress& rAddress,
{
OSL_ENSURE(pListener, "StartListeningCell: pListener Null");
SCTAB nTab = rAddress.Tab();
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->StartListening( rAddress, pListener );
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->StartListening( rAddress, pListener );
}
void ScDocument::EndListeningCell( const ScAddress& rAddress,
@@ -202,8 +202,8 @@ void ScDocument::EndListeningCell( const ScAddress& rAddress,
{
OSL_ENSURE(pListener, "EndListeningCell: pListener Null");
SCTAB nTab = rAddress.Tab();
- if (nTab < static_cast<SCTAB>(pTab.size()) && pTab[nTab])
- pTab[nTab]->EndListening( rAddress, pListener );
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->EndListening( rAddress, pListener );
}
@@ -488,9 +488,9 @@ void ScDocument::TrackFormulas( sal_uLong nHintId )
void ScDocument::StartAllListeners()
{
- for ( SCTAB i = 0; i < static_cast<SCTAB>(pTab.size()); ++i )
- if ( pTab[i] )
- pTab[i]->StartAllListeners();
+ for ( SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); ++i )
+ if ( maTabs[i] )
+ maTabs[i]->StartAllListeners();
}
void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 5c3ccbb..8559b8b 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -267,8 +267,8 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
for (SCTAB nTab=0; nTab<=MAXTAB; ++nTab)
- if (pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid( false );
+ if (maTabs[nTab] && maTabs[nTab]->IsStreamValid())
+ maTabs[nTab]->SetStreamValid( false );
sal_uLong nOldFormat =
((const SfxUInt32Item*)&rSet.Get(
@@ -327,8 +327,8 @@ void ScDocument::CopyStdStylesFrom( ScDocument* pSrcDoc )
void ScDocument::InvalidateTextWidth( const String& rStyleName )
{
const SCTAB nCount = GetTableCount();
- for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
- if ( pTab[i]->GetPageStyle() == rStyleName )
+ for ( SCTAB i=0; i<nCount && maTabs[i]; i++ )
+ if ( maTabs[i]->GetPageStyle() == rStyleName )
InvalidateTextWidth( i );
}
@@ -349,8 +349,8 @@ sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTa
const SCTAB nCount = GetTableCount();
SCTAB i;
- for ( i = 0; !bInUse && i < nCount && pTab[i]; i++ )
- bInUse = ( pTab[i]->GetPageStyle() == rStrPageStyle );
+ for ( i = 0; !bInUse && i < nCount && maTabs[i]; i++ )
+ bInUse = ( maTabs[i]->GetPageStyle() == rStrPageStyle );
if ( pInTab )
*pInTab = i-1;
@@ -365,11 +365,11 @@ sal_Bool ScDocument::RemovePageStyleInUse( const String& rStyle )
sal_Bool bWasInUse = false;
const SCTAB nCount = GetTableCount();
- for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
- if ( pTab[i]->GetPageStyle() == rStyle )
+ for ( SCTAB i=0; i<nCount && maTabs[i]; i++ )
+ if ( maTabs[i]->GetPageStyle() == rStyle )
{
bWasInUse = sal_True;
- pTab[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ maTabs[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
}
return bWasInUse;
@@ -380,11 +380,11 @@ sal_Bool ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNe
sal_Bool bWasInUse = false;
const SCTAB nCount = GetTableCount();
- for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
- if ( pTab[i]->GetPageStyle() == rOld )
+ for ( SCTAB i=0; i<nCount && maTabs[i]; i++ )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list