xref: /aoo4110/main/sd/source/ui/inc/unoaprms.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SD_UNOAPRMS_HXX
25 #define _SD_UNOAPRMS_HXX
26 
27 #include <com/sun/star/presentation/AnimationEffect.hpp>
28 #include <com/sun/star/presentation/AnimationSpeed.hpp>
29 #include <com/sun/star/presentation/ClickAction.hpp>
30 #include "sdundo.hxx"
31 #include "anmdef.hxx"
32 #include <svx/svdopath.hxx>
33 #include <tools/color.hxx>
34 
35 
36 class SdDrawDocument;
37 class SdrObject;
38 
39 class SdAnimationPrmsUndoAction : public SdUndoAction
40 {
41 	SdrObject*		pObject;
42 	sal_Bool			bOldActive;
43 	sal_Bool			bNewActive;
44 	sal_Bool            bOldDimPrevious;
45 	sal_Bool			bNewDimPrevious;
46 	sal_Bool            bOldDimHide;
47 	sal_Bool            bNewDimHide;
48 	sal_Bool            bOldSoundOn;
49 	sal_Bool            bNewSoundOn;
50 	sal_Bool            bOldSecondSoundOn;
51 	sal_Bool            bNewSecondSoundOn;
52 	sal_Bool            bOldPlayFull;
53 	sal_Bool            bNewPlayFull;
54 	sal_Bool            bOldSecondPlayFull;
55 	sal_Bool            bNewSecondPlayFull;
56 	::com::sun::star::presentation::AnimationEffect eOldEffect;
57 	::com::sun::star::presentation::AnimationEffect eNewEffect;
58 	::com::sun::star::presentation::AnimationEffect eOldTextEffect;
59 	::com::sun::star::presentation::AnimationEffect eNewTextEffect;
60 	::com::sun::star::presentation::AnimationSpeed  eOldSpeed;
61 	::com::sun::star::presentation::AnimationSpeed	eNewSpeed;
62 	::com::sun::star::presentation::AnimationEffect eOldSecondEffect;
63 	::com::sun::star::presentation::AnimationEffect eNewSecondEffect;
64 	::com::sun::star::presentation::AnimationSpeed  eOldSecondSpeed;
65 	::com::sun::star::presentation::AnimationSpeed  eNewSecondSpeed;
66 	Color           aOldDimColor;
67 	Color			aNewDimColor;
68 	Color           aOldBlueScreen;
69 	Color           aNewBlueScreen;
70 	String          aOldSoundFile;
71 	String          aNewSoundFile;
72 	SdrPathObj*     pOldPathObj;
73 	SdrPathObj*     pNewPathObj;
74 	::com::sun::star::presentation::ClickAction     eOldClickAction;
75 	::com::sun::star::presentation::ClickAction     eNewClickAction;
76 	String          aOldBookmark;
77 	String          aNewBookmark;
78 	sal_Bool            bOldInvisibleInPres;
79 	sal_Bool            bNewInvisibleInPres;
80 	sal_uInt16          nOldVerb;
81 	sal_uInt16          nNewVerb;
82 	sal_uLong			nOldPresOrder;
83 	sal_uLong			nNewPresOrder;
84 
85 	sal_Bool            bInfoCreated;
86 
87 public:
88 	TYPEINFO();
SdAnimationPrmsUndoAction(SdDrawDocument * pTheDoc,SdrObject * pObj,sal_Bool bCreated)89 		SdAnimationPrmsUndoAction(SdDrawDocument* pTheDoc, SdrObject* pObj,
90 								  sal_Bool bCreated):
91 		SdUndoAction	(pTheDoc),
92 		pObject 		(pObj),
93 		bInfoCreated    (bCreated)
94 		{}
95 
SetActive(sal_Bool bTheOldActive,sal_Bool bTheNewActive)96 		void SetActive(sal_Bool bTheOldActive, sal_Bool bTheNewActive)
97 			{ bOldActive = bTheOldActive; bNewActive = bTheNewActive; }
SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect,::com::sun::star::presentation::AnimationEffect eTheNewEffect)98 		void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
99 			{ eOldEffect = eTheOldEffect; eNewEffect = eTheNewEffect; }
SetTextEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect,::com::sun::star::presentation::AnimationEffect eTheNewEffect)100 		void SetTextEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
101 			{ eOldTextEffect = eTheOldEffect; eNewTextEffect = eTheNewEffect; }
SetSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed,::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)102 		void SetSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
103 			{ eOldSpeed = eTheOldSpeed; eNewSpeed = eTheNewSpeed; }
SetDim(sal_Bool bTheOldDim,sal_Bool bTheNewDim)104 		void SetDim(sal_Bool bTheOldDim, sal_Bool bTheNewDim)
105 			{ bOldDimPrevious = bTheOldDim; bNewDimPrevious = bTheNewDim; }
SetDimColor(Color aTheOldDimColor,Color aTheNewDimColor)106 		void SetDimColor(Color aTheOldDimColor, Color aTheNewDimColor)
107 			{ aOldDimColor = aTheOldDimColor; aNewDimColor = aTheNewDimColor; }
SetDimHide(sal_Bool bTheOldDimHide,sal_Bool bTheNewDimHide)108 		void SetDimHide(sal_Bool bTheOldDimHide, sal_Bool bTheNewDimHide)
109 			{ bOldDimHide = bTheOldDimHide; bNewDimHide = bTheNewDimHide; }
SetSoundOn(sal_Bool bTheOldSoundOn,sal_Bool bTheNewSoundOn)110 		void SetSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
111 			{ bOldSoundOn = bTheOldSoundOn; bNewSoundOn = bTheNewSoundOn; }
SetSound(String aTheOldSound,String aTheNewSound)112 		void SetSound(String aTheOldSound, String aTheNewSound)
113 			{ aOldSoundFile = aTheOldSound; aNewSoundFile = aTheNewSound; }
SetBlueScreen(Color aTheOldBlueScreen,Color aTheNewBlueScreen)114 		void SetBlueScreen(Color aTheOldBlueScreen, Color aTheNewBlueScreen)
115 			{ aOldBlueScreen = aTheOldBlueScreen; aNewBlueScreen = aTheNewBlueScreen; }
SetPlayFull(sal_Bool bTheOldPlayFull,sal_Bool bTheNewPlayFull)116 		void SetPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
117 			{ bOldPlayFull = bTheOldPlayFull; bNewPlayFull = bTheNewPlayFull; }
SetPathObj(SdrPathObj * pTheOldPath,SdrPathObj * pTheNewPath)118 		void SetPathObj(SdrPathObj* pTheOldPath, SdrPathObj* pTheNewPath)
119 			{ pOldPathObj = pTheOldPath; pNewPathObj = pTheNewPath; }
SetClickAction(::com::sun::star::presentation::ClickAction eTheOldAction,::com::sun::star::presentation::ClickAction eTheNewAction)120 		void SetClickAction(::com::sun::star::presentation::ClickAction eTheOldAction, ::com::sun::star::presentation::ClickAction eTheNewAction)
121 			{ eOldClickAction = eTheOldAction; eNewClickAction = eTheNewAction; }
SetBookmark(String aTheOldBookmark,String aTheNewBookmark)122 		void SetBookmark(String aTheOldBookmark, String aTheNewBookmark)
123 			{ aOldBookmark = aTheOldBookmark; aNewBookmark = aTheNewBookmark; }
SetInvisibleInPres(sal_Bool bTheOldInvisibleInPres,sal_Bool bTheNewInvisibleInPres)124 		void SetInvisibleInPres(sal_Bool bTheOldInvisibleInPres, sal_Bool bTheNewInvisibleInPres)
125 			{ bOldInvisibleInPres = bTheOldInvisibleInPres; bNewInvisibleInPres = bTheNewInvisibleInPres; }
SetVerb(sal_uInt16 nTheOldVerb,sal_uInt16 nTheNewVerb)126 		void SetVerb(sal_uInt16 nTheOldVerb, sal_uInt16 nTheNewVerb)
127 			{ nOldVerb = nTheOldVerb; nNewVerb = nTheNewVerb; }
SetSecondEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect,::com::sun::star::presentation::AnimationEffect eTheNewEffect)128 		void SetSecondEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
129 			{ eOldSecondEffect = eTheOldEffect; eNewSecondEffect = eTheNewEffect; }
SetSecondSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed,::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)130 		void SetSecondSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
131 			{ eOldSecondSpeed = eTheOldSpeed; eNewSecondSpeed = eTheNewSpeed; }
SetSecondSoundOn(sal_Bool bTheOldSoundOn,sal_Bool bTheNewSoundOn)132 		void SetSecondSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
133 			{ bOldSecondSoundOn = bTheOldSoundOn; bNewSecondSoundOn = bTheNewSoundOn; }
SetSecondPlayFull(sal_Bool bTheOldPlayFull,sal_Bool bTheNewPlayFull)134 		void SetSecondPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
135 			{ bOldSecondPlayFull = bTheOldPlayFull; bNewSecondPlayFull = bTheNewPlayFull; }
SetPresOrder(sal_uLong nTheOldPresOrder,sal_uLong nTheNewPresOrder)136 		void SetPresOrder(sal_uLong nTheOldPresOrder, sal_uLong nTheNewPresOrder)
137 			{ nOldPresOrder = nTheOldPresOrder; nNewPresOrder = nTheNewPresOrder; }
138 
139 	virtual ~SdAnimationPrmsUndoAction();
140 	virtual void Undo();
141 	virtual void Redo();
142 };
143 
144 #endif		// _SD_UNOAPRMS_HXX
145 
146