LCOV - code coverage report
Current view: top level - sc/source/ui/undo - undoconvert.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 21 21 100.0 %
Date: 2014-11-03 Functions: 7 7 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 <undoconvert.hxx>
      11             : #include <globstr.hrc>
      12             : #include <undoutil.hxx>
      13             : 
      14             : namespace sc {
      15             : 
      16           4 : UndoFormulaToValue::UndoFormulaToValue( ScDocShell* pDocSh, TableValues& rUndoValues ) :
      17           4 :     ScSimpleUndo(pDocSh)
      18             : {
      19           4 :     maUndoValues.swap(rUndoValues);
      20           4 : }
      21             : 
      22          12 : OUString UndoFormulaToValue::GetComment() const
      23             : {
      24          12 :     return ScGlobal::GetRscString(STR_UNDO_FORMULA_TO_VALUE);
      25             : }
      26             : 
      27           6 : void UndoFormulaToValue::Undo()
      28             : {
      29           6 :     Execute();
      30           6 : }
      31             : 
      32           2 : void UndoFormulaToValue::Redo()
      33             : {
      34           2 :     Execute();
      35           2 : }
      36             : 
      37           8 : void UndoFormulaToValue::Execute()
      38             : {
      39           8 :     ScDocument& rDoc = pDocShell->GetDocument();
      40           8 :     rDoc.SwapNonEmpty(maUndoValues);
      41             : 
      42           8 :     ScUndoUtil::MarkSimpleBlock(pDocShell, maUndoValues.getRange());
      43             : 
      44           8 :     pDocShell->PostPaint(maUndoValues.getRange(), PAINT_GRID);
      45           8 :     pDocShell->PostDataChanged();
      46           8 :     rDoc.BroadcastCells(maUndoValues.getRange(), SC_HINT_DATACHANGED);
      47           8 : }
      48             : 
      49         228 : }
      50             : 
      51             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10