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

Generated by: LCOV version 1.11