LCOV - code coverage report
Current view: top level - sc/source/core/data - table7.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 44 0.0 %
Date: 2014-04-14 Functions: 0 10 0.0 %
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 <table.hxx>
      11             : #include <clipcontext.hxx>
      12             : #include <document.hxx>
      13             : #include <clipparam.hxx>
      14             : #include <bcaslot.hxx>
      15             : 
      16           0 : bool ScTable::IsMerged( SCCOL nCol, SCROW nRow ) const
      17             : {
      18           0 :     if (!ValidCol(nCol))
      19           0 :         return false;
      20             : 
      21           0 :     return aCol[nCol].IsMerged(nRow);
      22             : }
      23             : 
      24           0 : void ScTable::DeleteBeforeCopyFromClip( sc::CopyFromClipContext& rCxt, const ScTable& rClipTab )
      25             : {
      26           0 :     sc::CopyFromClipContext::Range aRange = rCxt.getDestRange();
      27           0 :     if (!ValidCol(aRange.mnCol1) || !ValidCol(aRange.mnCol2))
      28           0 :         return;
      29             : 
      30             :     // Pass some stuff to the columns via context.
      31           0 :     rCxt.setTableProtected(IsProtected());
      32           0 :     rCxt.setCondFormatList(mpCondFormatList.get());
      33             : 
      34           0 :     ScRange aClipRange = rCxt.getClipDoc()->GetClipParam().getWholeRange();
      35           0 :     SCCOL nClipCol = aClipRange.aStart.Col();
      36             :     {
      37           0 :         ScBulkBroadcast aBulkBroadcast(pDocument->GetBASM());
      38             : 
      39           0 :         for (SCCOL nCol = aRange.mnCol1; nCol <= aRange.mnCol2; ++nCol, ++nClipCol)
      40             :         {
      41           0 :             if (nClipCol > aClipRange.aEnd.Col())
      42           0 :                 nClipCol = aClipRange.aStart.Col(); // loop through columns.
      43             : 
      44           0 :             const ScColumn& rClipCol = rClipTab.aCol[nClipCol];
      45           0 :             aCol[nCol].DeleteBeforeCopyFromClip(rCxt, rClipCol);
      46           0 :         }
      47             :     }
      48             : 
      49           0 :     SetStreamValid(false);
      50             : }
      51             : 
      52           0 : void ScTable::CopyOneCellFromClip(
      53             :     sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
      54             : {
      55           0 :     for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
      56           0 :         aCol[nCol].CopyOneCellFromClip(rCxt, nRow1, nRow2);
      57           0 : }
      58             : 
      59           0 : void ScTable::SetValues( SCCOL nCol, SCROW nRow, const std::vector<double>& rVals )
      60             : {
      61           0 :     if (!ValidCol(nCol))
      62           0 :         return;
      63             : 
      64           0 :     aCol[nCol].SetValues(nRow, rVals);
      65             : }
      66             : 
      67           0 : void ScTable::TransferCellValuesTo( SCCOL nCol, SCROW nRow, size_t nLen, sc::CellValues& rDest )
      68             : {
      69           0 :     if (!ValidCol(nCol))
      70           0 :         return;
      71             : 
      72           0 :     aCol[nCol].TransferCellValuesTo(nRow, nLen, rDest);
      73             : }
      74             : 
      75           0 : void ScTable::CopyCellValuesFrom( SCCOL nCol, SCROW nRow, const sc::CellValues& rSrc )
      76             : {
      77           0 :     if (!ValidCol(nCol))
      78           0 :         return;
      79             : 
      80           0 :     aCol[nCol].CopyCellValuesFrom(nRow, rSrc);
      81             : }
      82             : 
      83           0 : void ScTable::PreprocessRangeNameUpdate(
      84             :     sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt )
      85             : {
      86           0 :     for (SCCOL i = 0; i <= MAXCOL; ++i)
      87           0 :         aCol[i].PreprocessRangeNameUpdate(rEndListenCxt, rCompileCxt);
      88           0 : }
      89             : 
      90           0 : void ScTable::PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt )
      91             : {
      92           0 :     for (SCCOL i = 0; i <= MAXCOL; ++i)
      93           0 :         aCol[i].PostprocessRangeNameUpdate(rCompileCxt);
      94           0 : }
      95             : 
      96             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10