diff options
author | Eike Rathke <erack@redhat.com> | 2016-04-23 14:33:50 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-04-23 15:52:35 +0200 |
commit | f41257dc9913cd6020a3a37bf425c20b51e18ece (patch) | |
tree | 57386538d6c6cc828d611ada4efb123c66ee52fd /include/formula | |
parent | 9185f889ed9da48aad07d6a552224561f38e9b99 (diff) |
simplify the ReplaceToken() offset logic to absolute offsets
Change-Id: I8d02fb63bc0c5cb48aabaf7a8800f5f9ac95cbf5
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/tokenarray.hxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index e890c3aae2a1..cd0f430f365c 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -127,23 +127,19 @@ protected: public: enum ReplaceMode { - BACKWARD_CODE_ONLY, ///< offset goes backward, replacement only in pCode - FORWARD_CODE_AND_RPN ///< offset goes forward, replacement in pCode and RPN + CODE_ONLY, ///< replacement only in pCode + CODE_AND_RPN ///< replacement in pCode and pRPN }; protected: /** Also used by the compiler. The token MUST had been allocated with new! @param nOffset - If eMode==BACKWARD_CODE_ONLY negative offset of token, 0==last, - 1==previous, ... - If eMode==FORWARD_CODE_AND_RPN positive offset of token, 0==first, - 1==second, ... + Absolute offset in pCode of the token to be replaced. @param eMode - If BACKWARD_CODE_ONLY only the token in pCode at nLen-nOffset-1 - is replaced. - If FORWARD_CODE_AND_RPN the token in pCode at nOffset is - replaced; if the original token was also referenced in the RPN - array then that reference is replaced with a reference to the new + If CODE_ONLY only the token in pCode at nOffset is replaced. + If CODE_AND_RPN the token in pCode at nOffset is replaced; + if the original token was also referenced in the pRPN array + then that reference is replaced with a reference to the new token as well. */ FormulaToken* ReplaceToken( sal_uInt16 nOffset, FormulaToken*, ReplaceMode eMode ); |