summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-04 10:19:47 -0500
committerFridrich Strba <fridrich@documentfoundation.org>2014-02-06 14:37:10 +0000
commit99a835ca644d69241cba9d7e4c4a315a4a3ea652 (patch)
tree6f5a05825df489ec953490772bbaeda81e30e63b /sc/source/core/data/table2.cxx
parent8e8827a2d092810394c819c536d48b74080abce8 (diff)
fdo#74516: Avoid excessive building of escaped sheet names.
The old code would build an array of escaped sheet names for all sheets on evevery invokation of ScCompiler, which unfortunately slowed down these "compile all formula cells" type methods, such as CompileAll(), CompileXML() etc. Let's avoid that and build or re-build the list only when necessary. Conflicts: sc/inc/column.hxx sc/inc/table.hxx sc/source/core/data/document.cxx sc/source/core/tool/compiler.cxx Change-Id: Iabf7c2374b728b6701da3aae7835cca2157f6c96 Reviewed-on: https://gerrit.libreoffice.org/7861 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r--sc/source/core/data/table2.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index e81a5e218811..ce0909d0aeb2 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1704,44 +1704,46 @@ void ScTable::CalcAll()
}
-void ScTable::CompileAll()
+void ScTable::CompileAll( sc::CompileFormulaContext& rCxt )
{
- for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].CompileAll();
+ for (SCCOL i = 0; i <= MAXCOL; ++i)
+ aCol[i].CompileAll(rCxt);
if(mpCondFormatList)
mpCondFormatList->CompileAll();
}
-void ScTable::CompileXML( ScProgress& rProgress )
+void ScTable::CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress )
{
if (mpRangeName)
- mpRangeName->CompileUnresolvedXML();
+ mpRangeName->CompileUnresolvedXML(rCxt);
for (SCCOL i=0; i <= MAXCOL; i++)
{
- aCol[i].CompileXML( rProgress );
+ aCol[i].CompileXML(rCxt, rProgress);
}
if(mpCondFormatList)
mpCondFormatList->CompileXML();
}
-bool ScTable::CompileErrorCells(sal_uInt16 nErrCode)
+bool ScTable::CompileErrorCells( sc::CompileFormulaContext& rCxt, sal_uInt16 nErrCode )
{
bool bCompiled = false;
for (SCCOL i = 0; i <= MAXCOL; ++i)
{
- if (aCol[i].CompileErrorCells(nErrCode))
+ if (aCol[i].CompileErrorCells(rCxt, nErrCode))
bCompiled = true;
}
return bCompiled;
}
-void ScTable::CalcAfterLoad()
+void ScTable::CalcAfterLoad( sc::CompileFormulaContext& rCxt )
{
- for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].CalcAfterLoad();
+ for (SCCOL i = 0; i <= MAXCOL; ++i)
+ aCol[i].CalcAfterLoad(rCxt);
}
bool ScTable::IsEmptyData( SCCOL nCol ) const