summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/core/api/vectortoken.cxx10
-rw-r--r--include/formula/vectortoken.hxx4
2 files changed, 14 insertions, 0 deletions
diff --git a/formula/source/core/api/vectortoken.cxx b/formula/source/core/api/vectortoken.cxx
index 0c2e45577198..94a071cd02d7 100644
--- a/formula/source/core/api/vectortoken.cxx
+++ b/formula/source/core/api/vectortoken.cxx
@@ -17,6 +17,11 @@ VectorArray::VectorArray( const double* pArray, size_t nLength ) :
SingleVectorRefToken::SingleVectorRefToken( const double* pArray, size_t nLength ) :
FormulaToken(svSingleVectorRef, ocPush), maArray(pArray, nLength) {}
+FormulaToken* SingleVectorRefToken::Clone() const
+{
+ return new SingleVectorRefToken(maArray.mpArray, maArray.mnLength);
+}
+
const VectorArray& SingleVectorRefToken::GetArray() const
{
return maArray;
@@ -27,6 +32,11 @@ DoubleVectorRefToken::DoubleVectorRefToken(
FormulaToken(svDoubleVectorRef, ocPush),
maArrays(rArrays), mnRowSize(nRowSize), mbAbsStart(bAbsStart), mbAbsEnd(bAbsEnd) {}
+FormulaToken* DoubleVectorRefToken::Clone() const
+{
+ return new DoubleVectorRefToken(maArrays, mnRowSize, mbAbsStart, mbAbsEnd);
+}
+
const std::vector<VectorArray>& DoubleVectorRefToken::GetArrays() const
{
return maArrays;
diff --git a/include/formula/vectortoken.hxx b/include/formula/vectortoken.hxx
index 90e28d836a75..82051d4275cc 100644
--- a/include/formula/vectortoken.hxx
+++ b/include/formula/vectortoken.hxx
@@ -28,6 +28,8 @@ class FORMULA_DLLPUBLIC SingleVectorRefToken : public FormulaToken
public:
SingleVectorRefToken( const double* pArray, size_t nLength );
+ virtual FormulaToken* Clone() const;
+
const VectorArray& GetArray() const;
};
@@ -48,6 +50,8 @@ public:
DoubleVectorRefToken(
const std::vector<VectorArray>& rArrays, size_t nRowSize, bool bAbsStart, bool bAbsEnd );
+ virtual FormulaToken* Clone() const;
+
const std::vector<VectorArray>& GetArrays() const;
};