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