LCOV - code coverage report
Current view: top level - sc/inc - mtvcellfunc.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 34 36 94.4 %
Date: 2015-06-13 12:38:46 Functions: 53 64 82.8 %
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     4114432 : void ProcessFormula(CellStoreType& rStore, _Func& rFunc)
      20             : {
      21             :     FuncElseNoOp<size_t> aElse;
      22     4114432 :     ProcessElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      23     4114432 : }
      24             : 
      25             : template<typename _FuncElem>
      26             : typename CellStoreType::iterator
      27       53780 : ProcessFormula(
      28             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
      29             : {
      30             :     FuncElseNoOp<size_t> aElse;
      31             :     return ProcessElements1<
      32       53780 :         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       13636 : ProcessFormula(
      38             :     const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse)
      39             : {
      40             :     return ProcessElements1<
      41       13636 :         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        1065 : void ParseFormula(
      73             :     const CellStoreType& rStore, _Func& rFunc)
      74             : {
      75             :     FuncElseNoOp<size_t> aElse;
      76        1065 :     ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
      77        1065 : }
      78             : 
      79             : template<typename _Func>
      80             : typename CellStoreType::const_iterator
      81          22 : 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          22 :         itPos, rStore, nStart, nEnd, rFunc, aElse);
      88             : }
      89             : 
      90             : template<typename _FuncElem, typename _FuncElse>
      91             : typename CellStoreType::const_iterator
      92           3 : 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           3 :             itPos, rCells, nRow1, nRow2, rFuncElem, rFuncElse);
     100             : }
     101             : 
     102             : template<typename _Func>
     103             : typename CellStoreType::const_iterator
     104      137000 : 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      137000 :             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        3088 : 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        3088 :             itPos, rCells, nRow1, nRow2, rFunc, aElse);
     137             : }
     138             : 
     139             : template<typename _Func>
     140      453632 : void ProcessFormulaEditText(CellStoreType& rStore, _Func& rFunc)
     141             : {
     142             :     FuncElseNoOp<size_t> aElse;
     143      453632 :     ProcessElements2<CellStoreType, edittext_block, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
     144      453632 : }
     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      718653 : FindFormulaEditText(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc)
     158             : {
     159      718653 :     return FindElement2<CellStoreType, edittext_block, formula_block, _Func, _Func>(rStore, nRow1, nRow2, rFunc, rFunc);
     160             : }
     161             : 
     162             : template<typename _Func>
     163       34816 : void ProcessNote(CellNoteStoreType& rStore, _Func& rFunc)
     164             : {
     165             :     FuncElseNoOp<size_t> aElse;
     166       34816 :     ProcessElements1<CellNoteStoreType, cellnote_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse);
     167       34816 : }
     168             : 
     169             : template<typename _Func>
     170             : typename CellNoteStoreType::const_iterator
     171          39 : 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          39 :         itPos, rStore, nStart, nEnd, rFunc, aElse);
     178             : }
     179             : 
     180             : template<typename _FuncElem>
     181             : typename CellNoteStoreType::iterator
     182      175696 : ProcessNote(
     183             :     const CellNoteStoreType::iterator& it, CellNoteStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
     184             : {
     185             :     FuncElseNoOp<size_t> aElse;
     186             :     return ProcessElements1<
     187      175696 :         CellNoteStoreType, cellnote_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse);
     188             : }
     189             : 
     190             : template<typename _FuncElem>
     191             : typename BroadcasterStoreType::iterator
     192         519 : ProcessBroadcaster(
     193             :     const BroadcasterStoreType::iterator& it, BroadcasterStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem)
     194             : {
     195             :     FuncElseNoOp<size_t> aElse;
     196             :     return ProcessElements1<
     197         519 :         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.11