LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sc/inc - mtvcellfunc.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 27 32 84.4 %
Date: 2013-07-09 Functions: 40 54 74.1 %
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             : #ifndef SC_MTVCELLFUNC_HXX
      11             : #define SC_MTVCELLFUNC_HXX
      12             : 
      13             : #include "mtvelements.hxx"
      14             : #include "mtvfunctions.hxx"
      15             : 
      16             : namespace sc {
      17             : 
      18             : template<typename _Func>
      19     2109440 : void ProcessFormula(CellStoreType& rStore, _Func& rFunc)
      20             : {
      21             :     FuncElseNoOp<size_t> aElse;
      22     2109440 :     ProcessElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      23     2109440 : }
      24             : 
      25             : template<typename _FuncElem>
      26             : typename CellStoreType::iterator
      27       26855 : ProcessFormula(
      28             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
      29             : {
      30             :     FuncElseNoOp<size_t> aElse;
      31             :     return ProcessElements1<
      32       26855 :         CellStoreType, formula_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse);
      33             : }
      34             : 
      35             : template<typename _FuncElem, typename _FuncElse>
      36             : typename CellStoreType::iterator
      37        3371 : ProcessFormula(
      38             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse)
      39             : {
      40             :     return ProcessElements1<
      41        3371 :         CellStoreType, formula_block, _FuncElem, _FuncElse>(it, rStore, nRow1, nRow2, rFuncElem, rFuncElse);
      42             : }
      43             : 
      44             : template<typename _Func>
      45             : typename CellStoreType::iterator
      46         193 : ProcessFormulaNumeric(
      47             :     const CellStoreType::iterator& itPos, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
      48             : {
      49             :     FuncElseNoOp<size_t> aElse;
      50             :     return ProcessElements2<
      51             :         CellStoreType, numeric_block, formula_block, _Func, FuncElseNoOp<size_t> >(
      52         193 :             itPos, rStore, nRow1, nRow2, rFunc, aElse);
      53             : }
      54             : 
      55             : template<typename _Func>
      56           0 : void ProcessEditText(CellStoreType& rStore, _Func& rFunc)
      57             : {
      58             :     FuncElseNoOp<size_t> aElse;
      59           0 :     ProcessElements1<CellStoreType, edittext_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      60           0 : }
      61             : 
      62             : template<typename _Func>
      63             : CellStoreType::iterator
      64           8 : ProcessEditText(const CellStoreType::iterator& itPos, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
      65             : {
      66             :     FuncElseNoOp<size_t> aElse;
      67             :     return ProcessElements1<CellStoreType, edittext_block, _Func, FuncElseNoOp<size_t> >(
      68           8 :         itPos, rStore, nRow1, nRow2, rFunc, aElse);
      69             : }
      70             : 
      71             : template<typename _Func>
      72           4 : void ParseFormula(
      73             :     const CellStoreType& rStore, _Func& rFunc)
      74             : {
      75             :     FuncElseNoOp<size_t> aElse;
      76           4 :     ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      77           4 : }
      78             : 
      79             : template<typename _Func>
      80             : typename CellStoreType::const_iterator
      81          21 : ParseFormula(
      82             :     const CellStoreType::const_iterator& itPos, const CellStoreType& rStore,
      83             :     SCROW nStart, SCROW nEnd, _Func& rFunc)
      84             : {
      85             :     FuncElseNoOp<size_t> aElse;
      86             :     return ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(
      87          21 :         itPos, rStore, nStart, nEnd, rFunc, aElse);
      88             : }
      89             : 
      90             : template<typename _FuncElem, typename _FuncElse>
      91             : typename CellStoreType::const_iterator
      92           0 : ParseAll(
      93             :     const typename CellStoreType::const_iterator& itPos, const CellStoreType& rCells,
      94             :     SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse)
      95             : {
      96             :     return ParseElements4<CellStoreType,
      97             :         numeric_block, string_block, edittext_block, formula_block,
      98             :         _FuncElem, _FuncElse>(
      99           0 :             itPos, rCells, nRow1, nRow2, rFuncElem, rFuncElse);
     100             : }
     101             : 
     102             : template<typename _Func>
     103             : typename CellStoreType::const_iterator
     104      111323 : ParseAllNonEmpty(
     105             :     const typename CellStoreType::const_iterator& itPos, const CellStoreType& rCells,
     106             :     SCROW nRow1, SCROW nRow2, _Func& rFunc)
     107             : {
     108             :     FuncElseNoOp<size_t> aElse;
     109             :     return ParseElements4<CellStoreType,
     110             :         numeric_block, string_block, edittext_block, formula_block,
     111             :         _Func, FuncElseNoOp<size_t> >(
     112      111323 :             itPos, rCells, nRow1, nRow2, rFunc, aElse);
     113             : }
     114             : 
     115             : template<typename _FuncElem, typename _FuncElse>
     116             : typename CellStoreType::const_iterator
     117             : ParseAllNonEmpty(
     118             :     const typename CellStoreType::const_iterator& itPos, const CellStoreType& rCells,
     119             :     SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse)
     120             : {
     121             :     return ParseElements4<CellStoreType,
     122             :         numeric_block, string_block, edittext_block, formula_block,
     123             :         _FuncElem, _FuncElse>(
     124             :             itPos, rCells, nRow1, nRow2, rFuncElem, rFuncElse);
     125             : }
     126             : 
     127             : template<typename _Func>
     128             : typename CellStoreType::const_iterator
     129         967 : ParseFormulaNumeric(
     130             :     const CellStoreType::const_iterator& itPos, const CellStoreType& rCells,
     131             :     SCROW nRow1, SCROW nRow2, _Func& rFunc)
     132             : {
     133             :     FuncElseNoOp<size_t> aElse;
     134             :     return ParseElements2<CellStoreType,
     135             :         numeric_block, formula_block, _Func, FuncElseNoOp<size_t> >(
     136         967 :             itPos, rCells, nRow1, nRow2, rFunc, aElse);
     137             : }
     138             : 
     139             : template<typename _Func>
     140      197632 : void ProcessFormulaEditText(CellStoreType& rStore, _Func& rFunc)
     141             : {
     142             :     FuncElseNoOp<size_t> aElse;
     143      197632 :     ProcessElements2<CellStoreType, edittext_block, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
     144      197632 : }
     145             : 
     146             : template<typename _Func>
     147             : std::pair<CellStoreType::const_iterator, size_t>
     148          16 : FindFormula(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
     149             : {
     150             :     typedef std::pair<size_t,bool> ElseRetType;
     151             :     FuncElseNoOp<size_t, ElseRetType> aElse;
     152          16 :     return FindElement1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t, ElseRetType> >(rStore, nRow1, nRow2, rFunc, aElse);
     153             : }
     154             : 
     155             : template<typename _Func>
     156             : std::pair<CellStoreType::const_iterator, size_t>
     157      751402 : FindFormulaEditText(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
     158             : {
     159      751402 :     return FindElement2<CellStoreType, edittext_block, formula_block, _Func, _Func>(rStore, nRow1, nRow2, rFunc, rFunc);
     160             : }
     161             : 
     162             : }
     163             : 
     164             : #endif
     165             : 
     166             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10