summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-06 15:40:43 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-12 19:46:26 -0400
commit01bc4976a058628a40337f8041c0daedfa63da97 (patch)
treeb736d6ade8b55e1237fbf73db15d772415940055 /sc/source/core/data
parent492f0ad5347ed640c3a12b61e22d279b29becb88 (diff)
Const correctness at ScFormulaCell side.
Though I had to use const_cast in some places... Change-Id: I22830bf291179efafc1b400f33a520072b7fab0f
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/formulacell.cxx28
2 files changed, 25 insertions, 5 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 25af317f5d7b..c4276d99ffc5 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -978,7 +978,7 @@ void lcl_AddCode( ScTokenArray& rArr, const ScFormulaCell* pCell )
{
rArr.AddOpCode(ocOpen);
- ScTokenArray* pCode = pCell->GetCode();
+ ScTokenArray* pCode = const_cast<ScFormulaCell*>(pCell)->GetCode();
if (pCode)
{
const formula::FormulaToken* pToken = pCode->First();
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 485d45ccb781..c3ab5cd24039 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2987,10 +2987,30 @@ void ScFormulaCell::SetChanged(bool b)
bChanged = b;
}
-sal_uInt8 ScFormulaCell::GetMatrixFlag() const { return cMatrixFlag; }
-ScTokenArray* ScFormulaCell::GetCode() const { return pCode; }
-bool ScFormulaCell::IsRunning() const { return bRunning; }
-void ScFormulaCell::SetRunning( bool bVal ) { bRunning = bVal; }
+sal_uInt8 ScFormulaCell::GetMatrixFlag() const
+{
+ return cMatrixFlag;
+}
+
+ScTokenArray* ScFormulaCell::GetCode()
+{
+ return pCode;
+}
+
+const ScTokenArray* ScFormulaCell::GetCode() const
+{
+ return pCode;
+}
+
+bool ScFormulaCell::IsRunning() const
+{
+ return bRunning;
+}
+
+void ScFormulaCell::SetRunning( bool bVal )
+{
+ bRunning = bVal;
+}
void ScFormulaCell::CompileDBFormula()
{