fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / formula / source / core / api / vectortoken.cxx
blob99f7decd06fcec76152a1fd989efc1c7d6800f32
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include "formula/vectortoken.hxx"
12 namespace formula {
14 VectorRefArray::VectorRefArray() :
15 mpNumericArray(NULL),
16 mpStringArray(NULL),
17 mbValid(true) {}
19 VectorRefArray::VectorRefArray( InitInvalid ) :
20 mpNumericArray(NULL),
21 mpStringArray(NULL),
22 mbValid(false) {}
24 VectorRefArray::VectorRefArray( const double* pArray ) :
25 mpNumericArray(pArray),
26 mpStringArray(NULL),
27 mbValid(true) {}
29 VectorRefArray::VectorRefArray( rtl_uString** pArray ) :
30 mpNumericArray(NULL),
31 mpStringArray(pArray),
32 mbValid(true) {}
34 VectorRefArray::VectorRefArray( const double* pNumArray, rtl_uString** pStrArray ) :
35 mpNumericArray(pNumArray),
36 mpStringArray(pStrArray),
37 mbValid(true) {}
39 bool VectorRefArray::isValid() const
41 return mbValid;
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
57 return maArray;
60 size_t SingleVectorRefToken::GetArrayLength() const
62 return mnArrayLength;
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
83 return maArrays;
86 size_t DoubleVectorRefToken::GetArrayLength() const
88 return mnArrayLength;
91 size_t DoubleVectorRefToken::GetRefRowSize() const
93 return mnRefRowSize;
96 bool DoubleVectorRefToken::IsStartFixed() const
98 return mbStartFixed;
101 bool DoubleVectorRefToken::IsEndFixed() const
103 return mbEndFixed;
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */