diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-10 19:21:12 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-10 19:51:08 +0200 |
commit | 26a1aed24cc903ee858fb2d354f5dbb00f6d9969 (patch) | |
tree | 4e3f26f91ad2d44bb367944355845d84aa767a0f | |
parent | 07616ec2bd3dba7b858d801dbcd94e1089e3532a (diff) |
make more ScTable methods const
Change-Id: I9965a5ee383c4380dc1e75abc6a8df17ed69f6fc
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/inc/table.hxx | 24 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/table4.cxx | 2 |
7 files changed, 26 insertions, 26 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index d9c18ec57585..34e05cbc6368 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -366,7 +366,7 @@ public: bool GetDataEntries(SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit); void UpdateInsertTabAbs(SCTAB nNewPos); - bool TestTabRefAbs(SCTAB nTable); + bool TestTabRefAbs(SCTAB nTable) const; bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const; void RemoveAutoSpellObj(); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 10d25f8e57d3..223d38c9aea6 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -345,12 +345,12 @@ public: @param bForced True = always create all captions, false = skip when Undo is disabled. */ void InitializeNoteCaptions( bool bForced = false ); - bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ); + bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ) const; void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ); void DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize, bool* pUndoOutline = NULL ); - bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ); + bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const; void InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ); void DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline = NULL ); @@ -422,13 +422,13 @@ public: SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ); + SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const; void FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const; void GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const; - void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ); + void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const; bool HasData( SCCOL nCol, SCROW nRow ) const; bool HasStringData( SCCOL nCol, SCROW nRow ) const; @@ -653,9 +653,9 @@ public: sal_uInt16 GetOriginalWidth( SCCOL nCol ) const; sal_uInt16 GetOriginalHeight( SCROW nRow ) const; - sal_uInt16 GetCommonWidth( SCCOL nEndCol ); + sal_uInt16 GetCommonWidth( SCCOL nEndCol ) const; - SCROW GetHiddenRowCount( SCROW nRow ); + SCROW GetHiddenRowCount( SCROW nRow ) const; void ShowCol(SCCOL nCol, bool bShow); void ShowRow(SCROW nRow, bool bShow); @@ -765,8 +765,8 @@ public: void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<ScTypedStrData>& rStrings, bool& rHasDates ); bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit); - bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); - bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); + bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const; + bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const; void DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ); @@ -777,7 +777,7 @@ public: SCCOL nCol, SCROW nRowStart, SCROW nRowEnd ) const; - void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ); + void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ) const; void IncRecalcLevel(); void DecRecalcLevel( bool bUpdateNoteCaptionPos = true ); @@ -871,7 +871,7 @@ private: bool RefVisible(ScFormulaCell* pCell); - bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol); + bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol) const; void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd); void FillFormula(sal_uLong& nFormulaCounter, bool bFirst, ScFormulaCell* pSrcCell, @@ -879,8 +879,8 @@ private: void UpdateInsertTabAbs(SCTAB nNewPos); bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel, const ScMarkData& rMark) const; - bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ); - bool TestTabRefAbs(SCTAB nTable); + bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const; + bool TestTabRefAbs(SCTAB nTable) const; void CompileDBFormula(); void CompileDBFormula( bool bCreateFormulaString ); void CompileNameFormula( bool bCreateFormulaString ); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index d381db359895..435e8b82e99e 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1006,7 +1006,7 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow ) // ========================================================================================= -bool ScColumn::TestTabRefAbs(SCTAB nTable) +bool ScColumn::TestTabRefAbs(SCTAB nTable) const { bool bRet = false; if ( !maItems.empty() ) diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 1ca2760cd6e8..2e1dfbdd595d 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -997,7 +997,7 @@ bool ScTable::ShrinkToUsedDataArea( bool& o_bShrunk, SCCOL& rStartCol, SCROW& rS SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) + SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const { SCSIZE nCount = 0; SCCOL nCol; @@ -1029,7 +1029,7 @@ SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, return nCount; } -bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol ) +bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol ) const { bool bFound = false; for (SCCOL i=nStartCol; i<=nEndCol && !bFound; i++) @@ -1038,7 +1038,7 @@ bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol ) return !bFound; } -void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) +void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const { while ( rStartCol<rEndCol && aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow) ) ++rStartCol; @@ -1379,7 +1379,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, } } -bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) +bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const { const ScMarkArray* pMarkArray = rMark.GetArray(); OSL_ENSURE(pMarkArray,"GetNextMarkedCell ohne MarkArray"); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index bcc9e386bec3..a2be5f538f58 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -118,7 +118,7 @@ void ScTable::SetCalcNotification( bool bSet ) } -bool ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ) +bool ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ) const { bool bTest = true; @@ -297,7 +297,7 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE } -bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) +bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const { bool bTest = true; @@ -2549,7 +2549,7 @@ sal_uInt16 ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die ein } -sal_uInt16 ScTable::GetCommonWidth( SCCOL nEndCol ) +sal_uInt16 ScTable::GetCommonWidth( SCCOL nEndCol ) const { // get the width that is used in the largest continuous column range (up to nEndCol) @@ -2706,7 +2706,7 @@ sal_uInt16 ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if // Spalten-/Zeilen-Flags -SCROW ScTable::GetHiddenRowCount( SCROW nRow ) +SCROW ScTable::GetHiddenRowCount( SCROW nRow ) const { if (!ValidRow(nRow)) return 0; diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 831756d5824e..ef7b3b6a7e57 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2155,7 +2155,7 @@ bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow return bValid; } -bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ ) +bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ ) const { for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) { @@ -2166,7 +2166,7 @@ bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR return true; } -bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow ) +bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow ) const { for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) { @@ -2290,7 +2290,7 @@ void ScTable::UpdateSelectionFunction( ScFunctionData& rData, aCol[nCol].UpdateAreaFunction( rData, *mpHiddenRows, nStartRow, nEndRow ); } -void ScTable::FindConditionalFormat( sal_uLong nKey, ScRangeList& rList ) +void ScTable::FindConditionalFormat( sal_uLong nKey, ScRangeList& rList ) const { SCROW nStartRow = 0, nEndRow = 0; for (SCCOL nCol=0; nCol<=MAXCOL; nCol++) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index fcafa58bf884..525970de237d 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -2026,7 +2026,7 @@ void ScTable::RemoveAutoSpellObj() aCol[i].RemoveAutoSpellObj(); } -bool ScTable::TestTabRefAbs(SCTAB nTable) +bool ScTable::TestTabRefAbs(SCTAB nTable) const { for (SCCOL i=0; i <= MAXCOL; i++) if (aCol[i].TestTabRefAbs(nTable)) |