1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include "formula/vectortoken.hxx"
14 VectorRefArray::VectorRefArray() :
19 VectorRefArray::VectorRefArray( InitInvalid
) :
24 VectorRefArray::VectorRefArray( const double* pArray
) :
25 mpNumericArray(pArray
),
29 VectorRefArray::VectorRefArray( rtl_uString
** pArray
) :
31 mpStringArray(pArray
),
34 VectorRefArray::VectorRefArray( const double* pNumArray
, rtl_uString
** pStrArray
) :
35 mpNumericArray(pNumArray
),
36 mpStringArray(pStrArray
),
39 bool VectorRefArray::isValid() const
44 SingleVectorRefToken::SingleVectorRefToken( const VectorRefArray
& rArray
, size_t nReqLength
, size_t nArrayLength
) :
45 FormulaToken(svSingleVectorRef
, ocPush
), maArray(rArray
), mnRequestedLength(nReqLength
), mnArrayLength(nArrayLength
)
47 SAL_INFO("formula.core", "Created SingleVectorRefToken nReqLength=" << nReqLength
<< " nArrayLength=" << nArrayLength
);
50 FormulaToken
* SingleVectorRefToken::Clone() const
52 return new SingleVectorRefToken(maArray
, mnRequestedLength
, mnArrayLength
);
55 const VectorRefArray
& SingleVectorRefToken::GetArray() const
60 size_t SingleVectorRefToken::GetArrayLength() const
65 DoubleVectorRefToken::DoubleVectorRefToken(
66 const std::vector
<VectorRefArray
>& rArrays
, size_t nReqLength
, size_t nArrayLength
,
67 size_t nRefRowSize
, bool bStartFixed
, bool bEndFixed
) :
68 FormulaToken(svDoubleVectorRef
, ocPush
),
69 maArrays(rArrays
), mnRequestedLength(nReqLength
), mnArrayLength(nArrayLength
),
70 mnRefRowSize(nRefRowSize
), mbStartFixed(bStartFixed
), mbEndFixed(bEndFixed
)
72 SAL_INFO("formula.core", "Created DoubleVectorRefToken nReqLength=" << nReqLength
<< " nArrayLength=" << nArrayLength
);
75 FormulaToken
* DoubleVectorRefToken::Clone() const
77 return new DoubleVectorRefToken(
78 maArrays
, mnRequestedLength
, mnArrayLength
, mnRefRowSize
, mbStartFixed
, mbEndFixed
);
81 const std::vector
<VectorRefArray
>& DoubleVectorRefToken::GetArrays() const
86 size_t DoubleVectorRefToken::GetArrayLength() const
91 size_t DoubleVectorRefToken::GetRefRowSize() const
96 bool DoubleVectorRefToken::IsStartFixed() const
101 bool DoubleVectorRefToken::IsEndFixed() const
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */