LCOV - code coverage report
Current view: top level - formula/source/core/api - vectortoken.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 15 36 41.7 %
Date: 2015-06-13 12:38:46 Functions: 7 17 41.2 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  */
       9             : 
      10             : #include "formula/vectortoken.hxx"
      11             : 
      12             : namespace formula {
      13             : 
      14           2 : VectorRefArray::VectorRefArray() :
      15             :     mpNumericArray(NULL),
      16             :     mpStringArray(NULL),
      17           2 :     mbValid(true) {}
      18             : 
      19           0 : VectorRefArray::VectorRefArray( InitInvalid ) :
      20             :     mpNumericArray(NULL),
      21             :     mpStringArray(NULL),
      22           0 :     mbValid(false) {}
      23             : 
      24           9 : VectorRefArray::VectorRefArray( const double* pArray ) :
      25             :     mpNumericArray(pArray),
      26             :     mpStringArray(NULL),
      27           9 :     mbValid(true) {}
      28             : 
      29           3 : VectorRefArray::VectorRefArray( rtl_uString** pArray ) :
      30             :     mpNumericArray(NULL),
      31             :     mpStringArray(pArray),
      32           3 :     mbValid(true) {}
      33             : 
      34          10 : VectorRefArray::VectorRefArray( const double* pNumArray, rtl_uString** pStrArray ) :
      35             :     mpNumericArray(pNumArray),
      36             :     mpStringArray(pStrArray),
      37          10 :     mbValid(true) {}
      38             : 
      39          18 : bool VectorRefArray::isValid() const
      40             : {
      41          18 :     return mbValid;
      42             : }
      43             : 
      44           4 : SingleVectorRefToken::SingleVectorRefToken( const VectorRefArray& rArray, size_t nReqLength, size_t nArrayLength ) :
      45           4 :     FormulaToken(svSingleVectorRef, ocPush), maArray(rArray), mnRequestedLength(nReqLength), mnArrayLength(nArrayLength)
      46             : {
      47             :     SAL_INFO("formula.core", "Created SingleVectorRefToken nReqLength=" << nReqLength << " nArrayLength=" << nArrayLength);
      48           4 : }
      49             : 
      50           2 : FormulaToken* SingleVectorRefToken::Clone() const
      51             : {
      52           2 :     return new SingleVectorRefToken(maArray, mnRequestedLength, mnArrayLength);
      53             : }
      54             : 
      55           0 : const VectorRefArray& SingleVectorRefToken::GetArray() const
      56             : {
      57           0 :     return maArray;
      58             : }
      59             : 
      60           0 : size_t SingleVectorRefToken::GetArrayLength() const
      61             : {
      62           0 :     return mnArrayLength;
      63             : }
      64             : 
      65           0 : 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           0 :     mnRefRowSize(nRefRowSize), mbStartFixed(bStartFixed), mbEndFixed(bEndFixed)
      71             : {
      72             :     SAL_INFO("formula.core", "Created DoubleVectorRefToken nReqLength=" << nReqLength << " nArrayLength=" << nArrayLength);
      73           0 : }
      74             : 
      75           0 : FormulaToken* DoubleVectorRefToken::Clone() const
      76             : {
      77             :     return new DoubleVectorRefToken(
      78           0 :         maArrays, mnRequestedLength, mnArrayLength, mnRefRowSize, mbStartFixed, mbEndFixed);
      79             : }
      80             : 
      81           0 : const std::vector<VectorRefArray>& DoubleVectorRefToken::GetArrays() const
      82             : {
      83           0 :     return maArrays;
      84             : }
      85             : 
      86           0 : size_t DoubleVectorRefToken::GetArrayLength() const
      87             : {
      88           0 :     return mnArrayLength;
      89             : }
      90             : 
      91           0 : size_t DoubleVectorRefToken::GetRefRowSize() const
      92             : {
      93           0 :     return mnRefRowSize;
      94             : }
      95             : 
      96           0 : bool DoubleVectorRefToken::IsStartFixed() const
      97             : {
      98           0 :     return mbStartFixed;
      99             : }
     100             : 
     101           0 : bool DoubleVectorRefToken::IsEndFixed() const
     102             : {
     103           0 :     return mbEndFixed;
     104             : }
     105             : 
     106             : }
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11