LCOV - code coverage report
Current view: top level - sc/source/core/tool - scopetools.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 21 21 100.0 %
Date: 2014-04-11 Functions: 6 6 100.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 "scopetools.hxx"
      11             : #include "document.hxx"
      12             : 
      13             : namespace sc {
      14             : 
      15     1177178 : AutoCalcSwitch::AutoCalcSwitch(ScDocument& rDoc, bool bAutoCalc) :
      16     1177178 :     mrDoc(rDoc), mbOldValue(rDoc.GetAutoCalc())
      17             : {
      18     1177178 :     mrDoc.SetAutoCalc(bAutoCalc);
      19     1177178 : }
      20             : 
      21     1177178 : AutoCalcSwitch::~AutoCalcSwitch()
      22             : {
      23     1177178 :     mrDoc.SetAutoCalc(mbOldValue);
      24     1177178 : }
      25             : 
      26          64 : ExpandRefsSwitch::ExpandRefsSwitch(ScDocument& rDoc, bool bExpandRefs) :
      27          64 :     mrDoc(rDoc), mbOldValue(rDoc.IsExpandRefs())
      28             : {
      29          64 :     mrDoc.SetExpandRefs(bExpandRefs);
      30          64 : }
      31             : 
      32          64 : ExpandRefsSwitch::~ExpandRefsSwitch()
      33             : {
      34          64 :     mrDoc.SetExpandRefs(mbOldValue);
      35          64 : }
      36             : 
      37           3 : UndoSwitch::UndoSwitch(ScDocument& rDoc, bool bUndo) :
      38           3 :     mrDoc(rDoc), mbOldValue(rDoc.IsUndoEnabled())
      39             : {
      40           3 :     mrDoc.EnableUndo(bUndo);
      41           3 : }
      42             : 
      43           3 : UndoSwitch::~UndoSwitch()
      44             : {
      45           3 :     mrDoc.EnableUndo(mbOldValue);
      46           3 : }
      47             : 
      48             : }
      49             : 
      50             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10