summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-09-18 15:01:29 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-10-10 12:59:39 +0200
commit16e417b8c211a919a921baeb65660185aac38393 (patch)
treec3cbc6d190fcc96a92694ed14e5961b7c57cc3ac /include/formula
parent7600c63424db644065d736158c182cb9498574e9 (diff)
add ScTokenArray::Finalize() to explicitly reduce memory usage
Since ScTokenArray::Add() overallocates memory, make sure we do not keep such possibly large arrays. Since any copying of ScTokenArray implicitly finalizes as well, this is not a big problem right now, but then why needlessly do the copies? (next commit) Change-Id: I55398bcd8fb31f1be5a4b8e3f5a71b26649a7594 Reviewed-on: https://gerrit.libreoffice.org/60862 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/formula')
-rw-r--r--include/formula/tokenarray.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 2c422d94faf8..2891601b2626 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -291,6 +291,11 @@ public:
virtual void Clear();
+ /**
+ * The array has its final used size and no more token can be added.
+ */
+ void Finalize();
+
void SetFromRangeName( bool b ) { mbFromRangeName = b; }
bool IsFromRangeName() const { return mbFromRangeName; }