diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-07 14:13:20 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-07 14:43:16 -0400 |
commit | 355baf573425165cbc1c789a6271eb29940e1f76 (patch) | |
tree | 42050f8ac0a293b75e3745d511fe2e086e88cd42 /formula | |
parent | 137c288978fb8f4aee259fabfdcb9252b1b011d3 (diff) |
fdo#75741: Re-implement CompileNameFormula for formula groups.
Change-Id: I57e1e464ac5f7abc10ce5ea5752e036ddb6cf6d7
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/token.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 4f8b8aa60eb3..da98d0e5da4d 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -616,6 +616,19 @@ bool FormulaTokenArray::HasNameOrColRowName() const return false; } +bool FormulaTokenArray::HasOpCodes( const boost::unordered_set<OpCode>& rOpCodes ) const +{ + FormulaToken** p = pCode; + FormulaToken** pEnd = p + static_cast<size_t>(nLen); + for (; p != pEnd; ++p) + { + OpCode eOp = (*p)->GetOpCode(); + if (rOpCodes.count(eOp) > 0) + return true; + } + + return false; +} FormulaTokenArray::FormulaTokenArray() : pCode(NULL), |