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