summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-01-05 22:26:45 +0100
committerEike Rathke <erack@redhat.com>2016-01-05 23:42:07 +0100
commit4ae7b66286f391839b0d8d6c5a73ee7849eb4d1f (patch)
treec28933b70a8c5bcf62d93a6e5feaa86d62183a5c /include/formula
parentd7e0d0135ba65243fab5ee038c21290b8e74e548 (diff)
use new'ed FormulaToken and FormulaTokenArray::Add()
... instead of a temporary instance and AddToken() that just clones it again. Add function comment describing the difference. Change-Id: I3f089965d394b33d7bbbb9a1c3f69dc1c4182fd2
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 292b3182cb8b..bf3056a392b3 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -296,7 +296,12 @@ public:
*/
virtual void CheckToken( const FormulaToken& t );
+ /** Clones the token and then adds the clone to the pCode array.
+ For just new'ed tokens use Add() instead of cloning it again.
+ Use this AddToken() when adding a token from another origin.
+ */
FormulaToken* AddToken( const FormulaToken& );
+
FormulaToken* AddString( const svl::SharedString& rStr );
FormulaToken* AddDouble( double fVal );
FormulaToken* AddExternal( const sal_Unicode* pStr );