LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/func - unoaprms.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 54 0.0 %
Date: 2012-12-27 Functions: 0 9 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 "drawdoc.hxx"
      21             : #include "unoaprms.hxx"
      22             : #include "anminfo.hxx"
      23             : 
      24             : 
      25           0 : TYPEINIT1(SdAnimationPrmsUndoAction, SdUndoAction);
      26             : 
      27             : 
      28             : /*************************************************************************
      29             : |*
      30             : |* Undo()
      31             : |*
      32             : \************************************************************************/
      33             : 
      34           0 : void SdAnimationPrmsUndoAction::Undo()
      35             : {
      36             :     // keine neu Info erzeugt: Daten restaurieren
      37           0 :     if (!bInfoCreated)
      38             :     {
      39           0 :         SdDrawDocument* pDoc   = (SdDrawDocument*)pObject->GetModel();
      40           0 :         if( pDoc )
      41             :         {
      42           0 :             SdAnimationInfo* pInfo = pDoc->GetAnimationInfo( pObject );
      43             : 
      44           0 :             pInfo->mbActive     = bOldActive;
      45           0 :             pInfo->meEffect      = eOldEffect;
      46           0 :             pInfo->meTextEffect  = eOldTextEffect;
      47           0 :             pInfo->meSpeed      = eOldSpeed;
      48           0 :             pInfo->mbDimPrevious = bOldDimPrevious;
      49           0 :             pInfo->maDimColor    = aOldDimColor;
      50           0 :             pInfo->mbDimHide     = bOldDimHide;
      51           0 :             pInfo->mbSoundOn     = bOldSoundOn;
      52           0 :             pInfo->maSoundFile   = aOldSoundFile;
      53           0 :             pInfo->mbPlayFull    = bOldPlayFull;
      54           0 :             pInfo->meClickAction = eOldClickAction;
      55           0 :             pInfo->SetBookmark( aOldBookmark );
      56           0 :             pInfo->mnVerb        = nOldVerb;
      57           0 :             pInfo->mnPresOrder   = nOldPresOrder;
      58             : 
      59           0 :             pInfo->meSecondEffect    = eOldSecondEffect;
      60           0 :             pInfo->meSecondSpeed     = eOldSecondSpeed;
      61           0 :             pInfo->mbSecondSoundOn   = bOldSecondSoundOn;
      62           0 :             pInfo->mbSecondPlayFull  = bOldSecondPlayFull;
      63             :         }
      64             :     }
      65             :     // Info wurde durch Aktion erzeugt: Info loeschen
      66             :     else
      67             :     {
      68           0 :         pObject->DeleteUserData(0);
      69             :     }
      70             :     // Damit ein ModelHasChanged() ausgeloest wird, um das Effekte-Window
      71             :     // auf Stand zu bringen (Animations-Reihenfolge)
      72           0 :     pObject->SetChanged();
      73           0 :     pObject->BroadcastObjectChange();
      74           0 : }
      75             : 
      76             : /*************************************************************************
      77             : |*
      78             : |* Redo()
      79             : |*
      80             : \************************************************************************/
      81             : 
      82           0 : void SdAnimationPrmsUndoAction::Redo()
      83             : {
      84           0 :     SdAnimationInfo* pInfo = NULL;
      85             : 
      86           0 :     pInfo = SdDrawDocument::GetShapeUserData(*pObject,true);
      87             : 
      88           0 :     pInfo->mbActive      = bNewActive;
      89           0 :     pInfo->meEffect      = eNewEffect;
      90           0 :     pInfo->meTextEffect  = eNewTextEffect;
      91           0 :     pInfo->meSpeed       = eNewSpeed;
      92           0 :     pInfo->mbDimPrevious = bNewDimPrevious;
      93           0 :     pInfo->maDimColor    = aNewDimColor;
      94           0 :     pInfo->mbDimHide     = bNewDimHide;
      95           0 :     pInfo->mbSoundOn     = bNewSoundOn;
      96           0 :     pInfo->maSoundFile   = aNewSoundFile;
      97           0 :     pInfo->mbPlayFull    = bNewPlayFull;
      98           0 :     pInfo->meClickAction = eNewClickAction;
      99           0 :     pInfo->SetBookmark( aNewBookmark );
     100           0 :     pInfo->mnVerb        = nNewVerb;
     101           0 :     pInfo->mnPresOrder   = nNewPresOrder;
     102             : 
     103           0 :     pInfo->meSecondEffect    = eNewSecondEffect;
     104           0 :     pInfo->meSecondSpeed     = eNewSecondSpeed;
     105           0 :     pInfo->mbSecondSoundOn   = bNewSecondSoundOn;
     106           0 :     pInfo->mbSecondPlayFull  = bNewSecondPlayFull;
     107             : 
     108             :     // Damit ein ModelHasChanged() ausgeloest wird, um das Effekte-Window
     109             :     // auf Stand zu bringen (Animations-Reihenfolge)
     110           0 :     pObject->SetChanged();
     111           0 :     pObject->BroadcastObjectChange();
     112           0 : }
     113             : 
     114             : /*************************************************************************
     115             : |*
     116             : |* Destruktor
     117             : |*
     118             : \************************************************************************/
     119             : 
     120           0 : SdAnimationPrmsUndoAction::~SdAnimationPrmsUndoAction()
     121             : {
     122           0 : }
     123             : 
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10