summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-07 14:13:20 -0400
committerAndras Timar <andras.timar@collabora.com>2014-04-16 17:07:15 +0200
commit8f1ef90df8ab81500ef1e4d5092fbbee519844b7 (patch)
tree65aa8244f2841010b30084b2fdb4f455a52f1210 /include
parent1a831db534611f669e276dcc7406cc2112505505 (diff)
fdo#75741: Re-implement CompileNameFormula for formula groups.
(cherry picked from commit 355baf573425165cbc1c789a6271eb29940e1f76) (cherry picked from commit 615f6aa293a6da90da94e6e78828198ffbc0ca5e) Conflicts: sc/inc/document.hxx sc/source/core/data/column4.cxx sc/source/core/data/document10.cxx sc/source/core/data/table7.cxx sc/source/ui/docshell/docfunc.cxx sc/source/ui/undo/undocell.cxx sc/source/ui/unoobj/nameuno.cxx Change-Id: I57e1e464ac5f7abc10ce5ea5752e036ddb6cf6d7 Reviewed-on: https://gerrit.libreoffice.org/8889 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/formula/tokenarray.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 9f8fed0ab27d..a479c10ad842 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -26,6 +26,8 @@
#include <tools/solar.h>
#include <com/sun/star/sheet/FormulaToken.hpp>
+#include <boost/unordered_set.hpp>
+
namespace formula
{
@@ -124,6 +126,16 @@ public:
/// Token of type svIndex or opcode ocColRowName
bool HasNameOrColRowName() const;
+ /**
+ * Check if the token array contains any of specified opcode tokens.
+ *
+ * @param rOpCodes collection of opcodes to check against.
+ *
+ * @return true if the token array contains at least one of the specified
+ * opcode tokens, false otherwise.
+ */
+ bool HasOpCodes( const boost::unordered_set<OpCode>& rOpCodes ) const;
+
FormulaToken** GetArray() const { return pCode; }
FormulaToken** GetCode() const { return pRPN; }
sal_uInt16 GetLen() const { return nLen; }