LCOV - code coverage report
Current view: top level - libreoffice/svx/source/engine3d - e3dundo.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 34 0.0 %
Date: 2012-12-27 Functions: 0 29 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             :  * 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             : /************************************************************************/
      28             : 
      29           0 : TYPEINIT1(E3dUndoAction, SfxUndoAction);
      30             : 
      31           0 : E3dUndoAction::~E3dUndoAction ()
      32             : {
      33           0 : }
      34             : 
      35             : // Repeat does not exist
      36             : 
      37           0 : sal_Bool E3dUndoAction::CanRepeat(SfxRepeatTarget&) const
      38             : {
      39           0 :     return sal_False;
      40             : }
      41             : 
      42             : /************************************************************************/
      43             : 
      44           0 : TYPEINIT1(E3dRotateUndoAction, E3dUndoAction);
      45             : 
      46             : /************************************************************************
      47             : 
      48             :                         E3dRotateUndoAction
      49             : 
      50             : ************************************************************************/
      51             : 
      52             : // Undo destructor for 3D-Rotation
      53             : 
      54           0 : E3dRotateUndoAction::~E3dRotateUndoAction ()
      55             : {
      56           0 : }
      57             : 
      58             : // Undo for 3D-Rotation on the Rotation matrix
      59             : 
      60           0 : void E3dRotateUndoAction::Undo ()
      61             : {
      62           0 :     E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj);
      63           0 :     pMy3DObj->SetTransform(aMyOldRotation);
      64           0 : }
      65             : 
      66             : // Redo for 3D-Rotation on the Rotation matrix
      67             : 
      68           0 : void E3dRotateUndoAction::Redo ()
      69             : {
      70           0 :     E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj);
      71           0 :     pMy3DObj->SetTransform(aMyNewRotation);
      72           0 : }
      73             : 
      74           0 : TYPEINIT1(E3dAttributesUndoAction, SdrUndoAction);
      75             : 
      76           0 : E3dAttributesUndoAction::E3dAttributesUndoAction( SdrModel &rModel,
      77             :     E3dObject*  pInObject,
      78             :     const SfxItemSet& rNewSet,
      79             :     const SfxItemSet& rOldSet)
      80             : :   SdrUndoAction( rModel ),
      81             :     pObject      ( pInObject ),
      82             :     aNewSet      ( rNewSet ),
      83           0 :     aOldSet      ( rOldSet )
      84             : {
      85           0 : }
      86             : 
      87           0 : E3dAttributesUndoAction::~E3dAttributesUndoAction()
      88             : {
      89           0 : }
      90             : 
      91             : // Undo() implemented through Set3DAttributes() to only maintain the attributes
      92             : // in one place
      93             : 
      94           0 : void E3dAttributesUndoAction::Undo()
      95             : {
      96           0 :     E3DModifySceneSnapRectUpdater aUpdater(pObject);
      97           0 :     pObject->SetMergedItemSetAndBroadcast(aOldSet);
      98           0 : }
      99             : 
     100           0 : void E3dAttributesUndoAction::Redo()
     101             : {
     102           0 :     E3DModifySceneSnapRectUpdater aUpdater(pObject);
     103           0 :     pObject->SetMergedItemSetAndBroadcast(aNewSet);
     104           0 : }
     105             : 
     106             : // Multiple Undo is not possible
     107             : 
     108           0 : sal_Bool E3dAttributesUndoAction::CanRepeat(SfxRepeatTarget& /*rView*/) const
     109             : {
     110           0 :     return sal_False;
     111             : }
     112             : 
     113             : // Multiple Undo is not possible
     114             : 
     115           0 : void E3dAttributesUndoAction::Repeat()
     116             : {
     117           0 : }
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10