LCOV - code coverage report
Current view: top level - sc/inc - mtvcellfunc.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 34 36 94.4 %
Date: 2014-11-03 Functions: 53 65 81.5 %
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 INCLUDED_SC_INC_MTVCELLFUNC_HXX
      11             : #define INCLUDED_SC_INC_MTVCELLFUNC_HXX
      12             : 
      13             : #include "mtvelements.hxx"
      14             : #include "mtvfunctions.hxx"
      15             : 
      16             : namespace sc {
      17             : 
      18             : template<typename _Func>
      19     7860224 : void ProcessFormula(CellStoreType& rStore, _Func& rFunc)
      20             : {
      21             :     FuncElseNoOp<size_t> aElse;
      22     7860224 :     ProcessElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      23     7860224 : }
      24             : 
      25             : template<typename _FuncElem>
      26             : typename CellStoreType::iterator
      27       53156 : ProcessFormula(
      28             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
      29             : {
      30             :     FuncElseNoOp<size_t> aElse;
      31             :     return ProcessElements1<
      32       53156 :         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       29560 : ProcessFormula(
      38             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse)
      39             : {
      40             :     return ProcessElements1<
      41       29560 :         CellStoreType, formula_block, _FuncElem, _FuncElse>(it, rStore, nRow1, nRow2, rFuncElem, rFuncElse);
      42             : }
      43             : 
      44             : template<typename _Func>
      45             : typename CellStoreType::iterator
      46             : 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             :             itPos, rStore, nRow1, nRow2, rFunc, aElse);
      53             : }
      54             : 
      55             : template<typename _Func>
      56             : void ProcessEditText(CellStoreType& rStore, _Func& rFunc)
      57             : {
      58             :     FuncElseNoOp<size_t> aElse;
      59             :     ProcessElements1<CellStoreType, edittext_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      60             : }
      61             : 
      62             : template<typename _Func>
      63             : CellStoreType::iterator
      64           0 : 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           0 :         itPos, rStore, nRow1, nRow2, rFunc, aElse);
      69             : }
      70             : 
      71             : template<typename _Func>
      72        2130 : void ParseFormula(
      73             :     const CellStoreType& rStore, _Func& rFunc)
      74             : {
      75             :     FuncElseNoOp<size_t> aElse;
      76        2130 :     ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      77        2130 : }
      78             : 
      79             : template<typename _Func>
      80             : typename CellStoreType::const_iterator
      81          44 : 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          44 :         itPos, rStore, nStart, nEnd, rFunc, aElse);
      88             : }
      89             : 
      90             : template<typename _FuncElem, typename _FuncElse>
      91             : typename CellStoreType::const_iterator
      92           6 : 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           6 :             itPos, rCells, nRow1, nRow2, rFuncElem, rFuncElse);
     100             : }
     101             : 
     102             : template<typename _Func>
     103             : typename CellStoreType::const_iterator
     104     1331444 : 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     1331444 :             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        2830 : 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        2830 :             itPos, rCells, nRow1, nRow2, rFunc, aElse);
     137             : }
     138             : 
     139             : template<typename _Func>
     140      804864 : void ProcessFormulaEditText(CellStoreType& rStore, _Func& rFunc)
     141             : {
     142             :     FuncElseNoOp<size_t> aElse;
     143      804864 :     ProcessElements2<CellStoreType, edittext_block, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
     144      804864 : }
     145             : 
     146             : template<typename _Func>
     147             : std::pair<CellStoreType::const_iterator, size_t>
     148          32 : 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          32 :     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     2510394 : FindFormulaEditText(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
     158             : {
     159     2510394 :     return FindElement2<CellStoreType, edittext_block, formula_block, _Func, _Func>(rStore, nRow1, nRow2, rFunc, rFunc);
     160             : }
     161             : 
     162             : template<typename _Func>
     163       59392 : void ProcessNote(CellNoteStoreType& rStore, _Func& rFunc)
     164             : {
     165             :     FuncElseNoOp<size_t> aElse;
     166       59392 :     ProcessElements1<CellNoteStoreType, cellnote_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
     167       59392 : }
     168             : 
     169             : template<typename _Func>
     170             : typename CellNoteStoreType::const_iterator
     171          84 : ParseNote(
     172             :     const CellNoteStoreType::const_iterator& itPos, const CellNoteStoreType& rStore,
     173             :     SCROW nStart, SCROW nEnd, _Func& rFunc)
     174             : {
     175             :     FuncElseNoOp<size_t> aElse;
     176             :     return ParseElements1<CellNoteStoreType, cellnote_block, _Func, FuncElseNoOp<size_t> >(
     177          84 :         itPos, rStore, nStart, nEnd, rFunc, aElse);
     178             : }
     179             : 
     180             : template<typename _FuncElem>
     181             : typename CellNoteStoreType::iterator
     182      347242 : ProcessNote(
     183             :     const CellNoteStoreType::iterator& it, CellNoteStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
     184             : {
     185             :     FuncElseNoOp<size_t> aElse;
     186             :     return ProcessElements1<
     187      347242 :         CellNoteStoreType, cellnote_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse);
     188             : }
     189             : 
     190             : template<typename _FuncElem>
     191             : typename BroadcasterStoreType::iterator
     192        2308 : ProcessBroadcaster(
     193             :     const BroadcasterStoreType::iterator& it, BroadcasterStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
     194             : {
     195             :     FuncElseNoOp<size_t> aElse;
     196             :     return ProcessElements1<
     197        2308 :         BroadcasterStoreType, broadcaster_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse);
     198             : }
     199             : 
     200             : }
     201             : 
     202             : #endif
     203             : 
     204             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10