summaryrefslogtreecommitdiff
path: root/sc/inc/address.hxx
diff options
context:
space:
mode:
authorAlbert Thuswaldner <albert.thuswaldner@gmail.com>2012-04-18 00:31:02 +0200
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-04-18 14:57:52 -0400
commit670db0daa2ed638ec9df0d5d569d7c43ae1bf786 (patch)
tree0e3f054fd3af26e99fd35e39797c65a9993c98e5 /sc/inc/address.hxx
parente4784750705b3d2649b461ade363c84bd1b2b10b (diff)
Use global constants for initial tab count bounds checking
Diffstat (limited to 'sc/inc/address.hxx')
-rw-r--r--sc/inc/address.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 6c453115c02c..182fba145263 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -95,7 +95,11 @@ const SCROW MAXROW = MAXROWCOUNT - 1;
const SCCOL MAXCOL = MAXCOLCOUNT - 1;
const SCTAB MAXTAB = MAXTABCOUNT - 1;
const SCCOLROW MAXCOLROW = MAXROW;
-
+// Limit the initial tab count to prevent users to set the count too high,
+// which could cause the memory usage of blank documents to exceed the
+// available system memory.
+const SCTAB MAXINITTAB = 1024;
+const SCTAB MININITTAB = 1;
// Special values
const SCTAB SC_TAB_APPEND = SCTAB_MAX;