xref: /trunk/main/sd/source/ui/inc/unoaprms.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SD_UNOAPRMS_HXX
29 #define _SD_UNOAPRMS_HXX
30 
31 #include <com/sun/star/presentation/AnimationEffect.hpp>
32 #include <com/sun/star/presentation/AnimationSpeed.hpp>
33 #include <com/sun/star/presentation/ClickAction.hpp>
34 #include "sdundo.hxx"
35 #include "anmdef.hxx"
36 #include <svx/svdopath.hxx>
37 #include <tools/color.hxx>
38 
39 
40 class SdDrawDocument;
41 class SdrObject;
42 
43 class SdAnimationPrmsUndoAction : public SdUndoAction
44 {
45     SdrObject*      pObject;
46     sal_Bool            bOldActive;
47     sal_Bool            bNewActive;
48     sal_Bool            bOldDimPrevious;
49     sal_Bool            bNewDimPrevious;
50     sal_Bool            bOldDimHide;
51     sal_Bool            bNewDimHide;
52     sal_Bool            bOldSoundOn;
53     sal_Bool            bNewSoundOn;
54     sal_Bool            bOldSecondSoundOn;
55     sal_Bool            bNewSecondSoundOn;
56     sal_Bool            bOldPlayFull;
57     sal_Bool            bNewPlayFull;
58     sal_Bool            bOldSecondPlayFull;
59     sal_Bool            bNewSecondPlayFull;
60     ::com::sun::star::presentation::AnimationEffect eOldEffect;
61     ::com::sun::star::presentation::AnimationEffect eNewEffect;
62     ::com::sun::star::presentation::AnimationEffect eOldTextEffect;
63     ::com::sun::star::presentation::AnimationEffect eNewTextEffect;
64     ::com::sun::star::presentation::AnimationSpeed  eOldSpeed;
65     ::com::sun::star::presentation::AnimationSpeed  eNewSpeed;
66     ::com::sun::star::presentation::AnimationEffect eOldSecondEffect;
67     ::com::sun::star::presentation::AnimationEffect eNewSecondEffect;
68     ::com::sun::star::presentation::AnimationSpeed  eOldSecondSpeed;
69     ::com::sun::star::presentation::AnimationSpeed  eNewSecondSpeed;
70     Color           aOldDimColor;
71     Color           aNewDimColor;
72     Color           aOldBlueScreen;
73     Color           aNewBlueScreen;
74     String          aOldSoundFile;
75     String          aNewSoundFile;
76     SdrPathObj*     pOldPathObj;
77     SdrPathObj*     pNewPathObj;
78     ::com::sun::star::presentation::ClickAction     eOldClickAction;
79     ::com::sun::star::presentation::ClickAction     eNewClickAction;
80     String          aOldBookmark;
81     String          aNewBookmark;
82     sal_Bool            bOldInvisibleInPres;
83     sal_Bool            bNewInvisibleInPres;
84     sal_uInt16          nOldVerb;
85     sal_uInt16          nNewVerb;
86     sal_uLong           nOldPresOrder;
87     sal_uLong           nNewPresOrder;
88 
89     sal_Bool            bInfoCreated;
90 
91 public:
92     TYPEINFO();
93         SdAnimationPrmsUndoAction(SdDrawDocument* pTheDoc, SdrObject* pObj,
94                                   sal_Bool bCreated):
95         SdUndoAction    (pTheDoc),
96         pObject         (pObj),
97         bInfoCreated    (bCreated)
98         {}
99 
100         void SetActive(sal_Bool bTheOldActive, sal_Bool bTheNewActive)
101             { bOldActive = bTheOldActive; bNewActive = bTheNewActive; }
102         void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
103             { eOldEffect = eTheOldEffect; eNewEffect = eTheNewEffect; }
104         void SetTextEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
105             { eOldTextEffect = eTheOldEffect; eNewTextEffect = eTheNewEffect; }
106         void SetSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
107             { eOldSpeed = eTheOldSpeed; eNewSpeed = eTheNewSpeed; }
108         void SetDim(sal_Bool bTheOldDim, sal_Bool bTheNewDim)
109             { bOldDimPrevious = bTheOldDim; bNewDimPrevious = bTheNewDim; }
110         void SetDimColor(Color aTheOldDimColor, Color aTheNewDimColor)
111             { aOldDimColor = aTheOldDimColor; aNewDimColor = aTheNewDimColor; }
112         void SetDimHide(sal_Bool bTheOldDimHide, sal_Bool bTheNewDimHide)
113             { bOldDimHide = bTheOldDimHide; bNewDimHide = bTheNewDimHide; }
114         void SetSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
115             { bOldSoundOn = bTheOldSoundOn; bNewSoundOn = bTheNewSoundOn; }
116         void SetSound(String aTheOldSound, String aTheNewSound)
117             { aOldSoundFile = aTheOldSound; aNewSoundFile = aTheNewSound; }
118         void SetBlueScreen(Color aTheOldBlueScreen, Color aTheNewBlueScreen)
119             { aOldBlueScreen = aTheOldBlueScreen; aNewBlueScreen = aTheNewBlueScreen; }
120         void SetPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
121             { bOldPlayFull = bTheOldPlayFull; bNewPlayFull = bTheNewPlayFull; }
122         void SetPathObj(SdrPathObj* pTheOldPath, SdrPathObj* pTheNewPath)
123             { pOldPathObj = pTheOldPath; pNewPathObj = pTheNewPath; }
124         void SetClickAction(::com::sun::star::presentation::ClickAction eTheOldAction, ::com::sun::star::presentation::ClickAction eTheNewAction)
125             { eOldClickAction = eTheOldAction; eNewClickAction = eTheNewAction; }
126         void SetBookmark(String aTheOldBookmark, String aTheNewBookmark)
127             { aOldBookmark = aTheOldBookmark; aNewBookmark = aTheNewBookmark; }
128         void SetInvisibleInPres(sal_Bool bTheOldInvisibleInPres, sal_Bool bTheNewInvisibleInPres)
129             { bOldInvisibleInPres = bTheOldInvisibleInPres; bNewInvisibleInPres = bTheNewInvisibleInPres; }
130         void SetVerb(sal_uInt16 nTheOldVerb, sal_uInt16 nTheNewVerb)
131             { nOldVerb = nTheOldVerb; nNewVerb = nTheNewVerb; }
132         void SetSecondEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
133             { eOldSecondEffect = eTheOldEffect; eNewSecondEffect = eTheNewEffect; }
134         void SetSecondSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
135             { eOldSecondSpeed = eTheOldSpeed; eNewSecondSpeed = eTheNewSpeed; }
136         void SetSecondSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
137             { bOldSecondSoundOn = bTheOldSoundOn; bNewSecondSoundOn = bTheNewSoundOn; }
138         void SetSecondPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
139             { bOldSecondPlayFull = bTheOldPlayFull; bNewSecondPlayFull = bTheNewPlayFull; }
140         void SetPresOrder(sal_uLong nTheOldPresOrder, sal_uLong nTheNewPresOrder)
141             { nOldPresOrder = nTheOldPresOrder; nNewPresOrder = nTheNewPresOrder; }
142 
143     virtual ~SdAnimationPrmsUndoAction();
144     virtual void Undo();
145     virtual void Redo();
146 };
147 
148 #endif      // _SD_UNOAPRMS_HXX
149 
150