summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-10 03:01:33 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-10 19:51:08 +0200
commit07616ec2bd3dba7b858d801dbcd94e1089e3532a (patch)
tree354caab8bb94573652a65794e3c1f18dde56098b /sc
parent0ab5ce54c441b12ea6c12a2cedb9069f36cfd0f4 (diff)
make more methods const in ScTable
Change-Id: Ib61ab9ea33ea94d6175a2110105849279d1ad440
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/table.hxx10
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/data/table3.cxx8
3 files changed, 10 insertions, 10 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index f4709bf873da..10d25f8e57d3 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -311,7 +311,7 @@ public:
void SetValue( SCCOL nCol, SCROW nRow, const double& rVal );
void SetError( SCCOL nCol, SCROW nRow, sal_uInt16 nError);
- void GetString( SCCOL nCol, SCROW nRow, rtl::OUString& rString );
+ void GetString( SCCOL nCol, SCROW nRow, rtl::OUString& rString ) const;
void GetInputString( SCCOL nCol, SCROW nRow, rtl::OUString& rString ) const;
double GetValue( const ScAddress& rPos ) const
{
@@ -852,15 +852,15 @@ private:
ScRangeList& rMatchedRanges, rtl::OUString& rUndoStr, ScDocument* pUndoDoc);
// use the global sort parameter:
- bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd);
+ bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const;
void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 );
void SwapCol(SCCOL nCol1, SCCOL nCol2);
void SwapRow(SCROW nRow1, SCROW nRow2);
short CompareCell( sal_uInt16 nSort,
ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row,
- ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row );
- short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2);
- short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2);
+ ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row ) const;
+ short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const;
+ short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2) const;
ScSortInfoArray* CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 );
void QuickSort( ScSortInfoArray*, SCsCOLROW nLo, SCsCOLROW nHi);
void SortReorder( ScSortInfoArray*, ScProgress& );
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a78e7de17ba1..bcc9e386bec3 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1294,7 +1294,7 @@ void ScTable::SetValue( SCCOL nCol, SCROW nRow, const double& rVal )
}
-void ScTable::GetString( SCCOL nCol, SCROW nRow, rtl::OUString& rString )
+void ScTable::GetString( SCCOL nCol, SCROW nRow, rtl::OUString& rString ) const
{
if (ValidColRow(nCol,nRow))
aCol[nCol].GetString( nRow, rString );
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index ea49b058d947..831756d5824e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -378,7 +378,7 @@ void ScTable::SortReorder( ScSortInfoArray* pArray, ScProgress& rProgress )
short ScTable::CompareCell( sal_uInt16 nSort,
ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row,
- ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row )
+ ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row ) const
{
short nRes = 0;
@@ -490,7 +490,7 @@ short ScTable::CompareCell( sal_uInt16 nSort,
return nRes;
}
-short ScTable::Compare( ScSortInfoArray* pArray, SCCOLROW nIndex1, SCCOLROW nIndex2 )
+short ScTable::Compare( ScSortInfoArray* pArray, SCCOLROW nIndex1, SCCOLROW nIndex2 ) const
{
short nRes;
sal_uInt16 nSort = 0;
@@ -681,7 +681,7 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
}
}
-short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
+short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const
{
short nRes;
sal_uInt16 nSort = 0;
@@ -710,7 +710,7 @@ short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
return nRes;
}
-bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) // ueber aSortParam
+bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) const // ueber aSortParam
{
for (SCCOLROW i=nStart; i<nEnd; i++)
{