LCOV - code coverage report
Current view: top level - sc/source/ui/undo - undocell2.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 30 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 <undocell.hxx>
      11             : #include <globstr.hrc>
      12             : #include <cellvalues.hxx>
      13             : 
      14             : namespace sc {
      15             : 
      16           0 : UndoSetCells::UndoSetCells( ScDocShell* pDocSh, const ScAddress& rTopPos ) :
      17           0 :     ScSimpleUndo(pDocSh), maTopPos(rTopPos) {}
      18             : 
      19           0 : UndoSetCells::~UndoSetCells() {}
      20             : 
      21           0 : void UndoSetCells::DoChange( const CellValues& rValues )
      22             : {
      23           0 :     ScDocument* pDoc = pDocShell->GetDocument();
      24           0 :     pDoc->CopyCellValuesFrom(maTopPos, rValues);
      25             : 
      26           0 :     ScRange aRange(maTopPos);
      27           0 :     aRange.aEnd.IncRow(rValues.size());
      28           0 :     BroadcastChanges(aRange);
      29           0 :     pDocShell->PostPaintGridAll();
      30           0 : }
      31             : 
      32           0 : void UndoSetCells::Undo()
      33             : {
      34           0 :     BeginUndo();
      35           0 :     DoChange(maOldValues);
      36           0 :     EndUndo();
      37           0 : }
      38             : 
      39           0 : void UndoSetCells::Redo()
      40             : {
      41           0 :     BeginRedo();
      42           0 :     DoChange(maNewValues);
      43           0 :     EndRedo();
      44           0 : }
      45             : 
      46           0 : bool UndoSetCells::CanRepeat( SfxRepeatTarget& ) const
      47             : {
      48           0 :     return false;
      49             : }
      50             : 
      51           0 : OUString UndoSetCells::GetComment() const
      52             : {
      53             :     // "Input"
      54           0 :     return ScGlobal::GetRscString(STR_UNDO_ENTERDATA);
      55             : }
      56             : 
      57           0 : CellValues& UndoSetCells::GetOldValues()
      58             : {
      59           0 :     return maOldValues;
      60             : }
      61             : 
      62           0 : void UndoSetCells::SetNewValues( const std::vector<double>& rVals )
      63             : {
      64           0 :     maNewValues.assign(rVals);
      65           0 : }
      66             : 
      67             : }
      68             : 
      69             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10