summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-04-29 11:18:54 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-04-30 13:10:41 -0400
commit7fb73a8475623de9c559f549fb8127993b62ba06 (patch)
treebb0c873559cb8f3a9edbc3fedde17acf680934d2 /formula
parent2f72495cd8097f782f0c8543c13605403f3e90c2 (diff)
Initial cut on vector formula ref tokens. Not used yet.
Change-Id: I4b28c269759bc01bfc94cfdd6a1c651d03d829c7
Diffstat (limited to 'formula')
-rw-r--r--formula/Library_for.mk1
-rw-r--r--formula/source/core/api/vectortoken.cxx37
2 files changed, 38 insertions, 0 deletions
diff --git a/formula/Library_for.mk b/formula/Library_for.mk
index 52e157f51393..832d7cd96d5e 100644
--- a/formula/Library_for.mk
+++ b/formula/Library_for.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_Library_add_exception_objects,for,\
formula/source/core/api/FormulaOpCodeMapperObj \
formula/source/core/api/services \
formula/source/core/api/token \
+ formula/source/core/api/vectortoken \
formula/source/core/resource/core_resource \
))
diff --git a/formula/source/core/api/vectortoken.cxx b/formula/source/core/api/vectortoken.cxx
new file mode 100644
index 000000000000..b7cab77e0136
--- /dev/null
+++ b/formula/source/core/api/vectortoken.cxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula/vectortoken.hxx"
+
+namespace formula {
+
+VectorArray::VectorArray( const double* pArray, size_t nLength ) :
+ mpArray(pArray), mnLength(nLength) {}
+
+SingleVectorRefToken::SingleVectorRefToken( const double* pArray, size_t nLength ) :
+ FormulaToken(svSingleVectorRef, ocPush), maArray(pArray, nLength) {}
+
+const VectorArray& SingleVectorRefToken::GetArray() const
+{
+ return maArray;
+}
+
+DoubleVectorRefToken::DoubleVectorRefToken(
+ const std::vector<VectorArray>& rArrays, size_t nColSize, size_t nRowSize, bool bAbsStart, bool bAbsEnd ) :
+ FormulaToken(svDoubleVectorRef, ocPush),
+ maArrays(rArrays), mnColSize(nColSize), mnRowSize(nRowSize), mbAbsStart(bAbsStart), mbAbsEnd(bAbsEnd) {}
+
+const std::vector<VectorArray>& DoubleVectorRefToken::GetArrays() const
+{
+ return maArrays;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */