summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table7.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/table7.cxx')
-rw-r--r--sc/source/core/data/table7.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index 2104b6f983bc..36a22c643a23 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -180,4 +180,16 @@ void ScTable::CollectListeners(
aCol[nCol].CollectListeners(rListeners, nRow1, nRow2);
}
+bool ScTable::HasFormulaCell( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const
+{
+ if (nCol2 < nCol1 || !ValidCol(nCol1) || !ValidCol(nCol2))
+ return false;
+
+ for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
+ if (aCol[nCol].HasFormulaCell(nRow1, nRow2))
+ return true;
+
+ return false;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */