LCOV - code coverage report
Current view: top level - svx/source/engine3d - e3dundo.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 34 2.9 %
Date: 2014-11-03 Functions: 2 31 6.5 %
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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <svx/e3dundo.hxx>
      21             : #include <svx/svdmodel.hxx>
      22             : #include <editeng/outlobj.hxx>
      23             : #include <svx/view3d.hxx>
      24             : #include <svx/scene3d.hxx>
      25             : #include <svx/e3dsceneupdater.hxx>
      26             : 
      27           0 : TYPEINIT1(E3dUndoAction, SfxUndoAction);
      28             : 
      29           0 : E3dUndoAction::~E3dUndoAction ()
      30             : {
      31           0 : }
      32             : 
      33             : // Repeat does not exist
      34             : 
      35           0 : bool E3dUndoAction::CanRepeat(SfxRepeatTarget&) const
      36             : {
      37           0 :     return false;
      38             : }
      39             : 
      40           0 : TYPEINIT1(E3dRotateUndoAction, E3dUndoAction);
      41             : 
      42             : // Undo destructor for 3D-Rotation
      43             : 
      44           0 : E3dRotateUndoAction::~E3dRotateUndoAction ()
      45             : {
      46           0 : }
      47             : 
      48             : // Undo for 3D-Rotation on the Rotation matrix
      49             : 
      50           0 : void E3dRotateUndoAction::Undo ()
      51             : {
      52           0 :     E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj);
      53           0 :     pMy3DObj->SetTransform(aMyOldRotation);
      54           0 : }
      55             : 
      56             : // Redo for 3D-Rotation on the Rotation matrix
      57             : 
      58           0 : void E3dRotateUndoAction::Redo ()
      59             : {
      60           0 :     E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj);
      61           0 :     pMy3DObj->SetTransform(aMyNewRotation);
      62           0 : }
      63             : 
      64           0 : TYPEINIT1(E3dAttributesUndoAction, SdrUndoAction);
      65             : 
      66           0 : E3dAttributesUndoAction::E3dAttributesUndoAction( SdrModel &rModel,
      67             :                                                   E3dObject*  pInObject,
      68             :                                                   const SfxItemSet& rNewSet,
      69             :                                                   const SfxItemSet& rOldSet)
      70             :     : SdrUndoAction( rModel )
      71             :     , pObject      ( pInObject )
      72             :     , aNewSet      ( rNewSet )
      73           0 :     , aOldSet      ( rOldSet )
      74             : {
      75           0 : }
      76             : 
      77           0 : E3dAttributesUndoAction::~E3dAttributesUndoAction()
      78             : {
      79           0 : }
      80             : 
      81             : // Undo() implemented through Set3DAttributes() to only maintain the attributes
      82             : // in one place
      83             : 
      84           0 : void E3dAttributesUndoAction::Undo()
      85             : {
      86           0 :     E3DModifySceneSnapRectUpdater aUpdater(pObject);
      87           0 :     pObject->SetMergedItemSetAndBroadcast(aOldSet);
      88           0 : }
      89             : 
      90           0 : void E3dAttributesUndoAction::Redo()
      91             : {
      92           0 :     E3DModifySceneSnapRectUpdater aUpdater(pObject);
      93           0 :     pObject->SetMergedItemSetAndBroadcast(aNewSet);
      94           0 : }
      95             : 
      96             : // Multiple Undo is not possible
      97             : 
      98           0 : bool E3dAttributesUndoAction::CanRepeat(SfxRepeatTarget& /*rView*/) const
      99             : {
     100           0 :     return false;
     101             : }
     102             : 
     103             : // Multiple Undo is not possible
     104             : 
     105           0 : void E3dAttributesUndoAction::Repeat()
     106             : {
     107         651 : }
     108             : 
     109             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10