LCOV - code coverage report
Current view: top level - sc/source/ui/view - cellmergeoption.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 24 0.0 %
Date: 2014-04-14 Functions: 0 5 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             : 
      11             : #include "cellmergeoption.hxx"
      12             : #include "address.hxx"
      13             : 
      14           0 : ScCellMergeOption::ScCellMergeOption(const ScRange& rRange) :
      15           0 :     mnStartCol(rRange.aStart.Col()),
      16           0 :     mnStartRow(rRange.aStart.Row()),
      17           0 :     mnEndCol(rRange.aEnd.Col()),
      18           0 :     mnEndRow(rRange.aEnd.Row()),
      19           0 :     mbCenter(false)
      20             : {
      21           0 :     SCTAB nTab1 = rRange.aStart.Tab();
      22           0 :     SCTAB nTab2 = rRange.aEnd.Tab();
      23           0 :     for (SCTAB i = nTab1; i <= nTab2; ++i)
      24           0 :         maTabs.insert(i);
      25           0 : }
      26             : 
      27           0 : ScCellMergeOption::ScCellMergeOption(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bCenter) :
      28             :     mnStartCol(nStartCol),
      29             :     mnStartRow(nStartRow),
      30             :     mnEndCol(nEndCol),
      31             :     mnEndRow(nEndRow),
      32           0 :     mbCenter(bCenter)
      33             : {
      34           0 : }
      35             : 
      36           0 : ScCellMergeOption::ScCellMergeOption(const ScCellMergeOption& r) :
      37             :     maTabs(r.maTabs),
      38             :     mnStartCol(r.mnStartCol),
      39             :     mnStartRow(r.mnStartRow),
      40             :     mnEndCol(r.mnEndCol),
      41             :     mnEndRow(r.mnEndRow),
      42           0 :     mbCenter(r.mbCenter)
      43             : {
      44           0 : }
      45             : 
      46           0 : ScRange ScCellMergeOption::getSingleRange(SCTAB nTab) const
      47             : {
      48           0 :     return ScRange(mnStartCol, mnStartRow, nTab, mnEndCol, mnEndRow, nTab);
      49             : }
      50             : 
      51           0 : ScRange ScCellMergeOption::getFirstSingleRange() const
      52             : {
      53           0 :     SCTAB nTab = 0;
      54           0 :     if (!maTabs.empty())
      55           0 :         nTab = *maTabs.begin();
      56             : 
      57           0 :     return getSingleRange(nTab);
      58             : }
      59             : 
      60             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10