bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / func / unoaprms.cxx
blob1a30565e0f7615601d8b4d5b170d716ce874ac1e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <drawdoc.hxx>
21 #include <unoaprms.hxx>
22 #include <anminfo.hxx>
25 void SdAnimationPrmsUndoAction::Undo()
27 // no new info created: restore data
28 if (!bInfoCreated)
30 SdDrawDocument* pDoc(dynamic_cast< SdDrawDocument* >(&pObject->getSdrModelFromSdrObject()));
31 if( pDoc )
33 SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo( pObject );
35 pInfo->mbActive = bOldActive;
36 pInfo->meEffect = eOldEffect;
37 pInfo->meTextEffect = eOldTextEffect;
38 pInfo->meSpeed = eOldSpeed;
39 pInfo->mbDimPrevious = bOldDimPrevious;
40 pInfo->maDimColor = aOldDimColor;
41 pInfo->mbDimHide = bOldDimHide;
42 pInfo->mbSoundOn = bOldSoundOn;
43 pInfo->maSoundFile = aOldSoundFile;
44 pInfo->mbPlayFull = bOldPlayFull;
45 pInfo->meClickAction = eOldClickAction;
46 pInfo->SetBookmark( aOldBookmark );
47 pInfo->mnVerb = nOldVerb;
49 pInfo->meSecondEffect = eOldSecondEffect;
50 pInfo->meSecondSpeed = eOldSecondSpeed;
51 pInfo->mbSecondSoundOn = bOldSecondSoundOn;
52 pInfo->mbSecondPlayFull = bOldSecondPlayFull;
55 // info was created by action: delete info
56 else
58 pObject->DeleteUserData(0);
60 // force ModelHasChanged() in order to update effect window (animation order)
61 pObject->SetChanged();
62 pObject->BroadcastObjectChange();
65 void SdAnimationPrmsUndoAction::Redo()
67 SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObject,true);
69 pInfo->mbActive = bNewActive;
70 pInfo->meEffect = eNewEffect;
71 pInfo->meTextEffect = eNewTextEffect;
72 pInfo->meSpeed = eNewSpeed;
73 pInfo->mbDimPrevious = bNewDimPrevious;
74 pInfo->maDimColor = aNewDimColor;
75 pInfo->mbDimHide = bNewDimHide;
76 pInfo->mbSoundOn = bNewSoundOn;
77 pInfo->maSoundFile = aNewSoundFile;
78 pInfo->mbPlayFull = bNewPlayFull;
79 pInfo->meClickAction = eNewClickAction;
80 pInfo->SetBookmark( aNewBookmark );
81 pInfo->mnVerb = nNewVerb;
83 pInfo->meSecondEffect = eNewSecondEffect;
84 pInfo->meSecondSpeed = eNewSecondSpeed;
85 pInfo->mbSecondSoundOn = bNewSecondSoundOn;
86 pInfo->mbSecondPlayFull = bNewSecondPlayFull;
88 // force ModelHasChanged() in order to update effect window (animation order)
89 pObject->SetChanged();
90 pObject->BroadcastObjectChange();
93 SdAnimationPrmsUndoAction::~SdAnimationPrmsUndoAction()
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */