1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_SD_SOURCE_UI_INC_UNOAPRMS_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_UNOAPRMS_HXX
23 #include <com/sun/star/presentation/AnimationEffect.hpp>
24 #include <com/sun/star/presentation/AnimationSpeed.hpp>
25 #include <com/sun/star/presentation/ClickAction.hpp>
27 #include <svx/svdopath.hxx>
28 #include <tools/color.hxx>
33 class SdAnimationPrmsUndoAction
: public SdUndoAction
44 bool bOldSecondSoundOn
;
45 bool bNewSecondSoundOn
;
48 bool bOldSecondPlayFull
;
49 bool bNewSecondPlayFull
;
50 ::com::sun::star::presentation::AnimationEffect eOldEffect
;
51 ::com::sun::star::presentation::AnimationEffect eNewEffect
;
52 ::com::sun::star::presentation::AnimationEffect eOldTextEffect
;
53 ::com::sun::star::presentation::AnimationEffect eNewTextEffect
;
54 ::com::sun::star::presentation::AnimationSpeed eOldSpeed
;
55 ::com::sun::star::presentation::AnimationSpeed eNewSpeed
;
56 ::com::sun::star::presentation::AnimationEffect eOldSecondEffect
;
57 ::com::sun::star::presentation::AnimationEffect eNewSecondEffect
;
58 ::com::sun::star::presentation::AnimationSpeed eOldSecondSpeed
;
59 ::com::sun::star::presentation::AnimationSpeed eNewSecondSpeed
;
64 OUString aOldSoundFile
;
65 OUString aNewSoundFile
;
66 SdrPathObj
* pOldPathObj
;
67 SdrPathObj
* pNewPathObj
;
68 ::com::sun::star::presentation::ClickAction eOldClickAction
;
69 ::com::sun::star::presentation::ClickAction eNewClickAction
;
70 OUString aOldBookmark
;
71 OUString aNewBookmark
;
72 bool bOldInvisibleInPres
;
73 bool bNewInvisibleInPres
;
76 sal_uLong nOldPresOrder
;
77 sal_uLong nNewPresOrder
;
83 SdAnimationPrmsUndoAction(SdDrawDocument
* pTheDoc
, SdrObject
* pObj
,
85 : SdUndoAction(pTheDoc
)
89 , bOldDimPrevious(false)
90 , bNewDimPrevious(false)
95 , bOldSecondSoundOn(false)
96 , bNewSecondSoundOn(false)
99 , bOldSecondPlayFull(false)
100 , bNewSecondPlayFull(false)
101 , eOldEffect(css::presentation::AnimationEffect_NONE
)
102 , eNewEffect(css::presentation::AnimationEffect_NONE
)
103 , eOldTextEffect(css::presentation::AnimationEffect_NONE
)
104 , eNewTextEffect(css::presentation::AnimationEffect_NONE
)
105 , eOldSpeed(css::presentation::AnimationSpeed_SLOW
)
106 , eNewSpeed(css::presentation::AnimationSpeed_SLOW
)
107 , eOldSecondEffect(css::presentation::AnimationEffect_NONE
)
108 , eNewSecondEffect(css::presentation::AnimationEffect_NONE
)
109 , eOldSecondSpeed(css::presentation::AnimationSpeed_SLOW
)
110 , eNewSecondSpeed(css::presentation::AnimationSpeed_SLOW
)
113 , eOldClickAction(css::presentation::ClickAction_NONE
)
114 , eNewClickAction(css::presentation::ClickAction_NONE
)
115 , bOldInvisibleInPres(false)
116 , bNewInvisibleInPres(false)
121 , bInfoCreated(bCreated
)
125 void SetActive(bool bTheOldActive
, bool bTheNewActive
)
126 { bOldActive
= bTheOldActive
; bNewActive
= bTheNewActive
; }
127 void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect
, ::com::sun::star::presentation::AnimationEffect eTheNewEffect
)
128 { eOldEffect
= eTheOldEffect
; eNewEffect
= eTheNewEffect
; }
129 void SetTextEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect
, ::com::sun::star::presentation::AnimationEffect eTheNewEffect
)
130 { eOldTextEffect
= eTheOldEffect
; eNewTextEffect
= eTheNewEffect
; }
131 void SetSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed
, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed
)
132 { eOldSpeed
= eTheOldSpeed
; eNewSpeed
= eTheNewSpeed
; }
133 void SetDim(bool bTheOldDim
, bool bTheNewDim
)
134 { bOldDimPrevious
= bTheOldDim
; bNewDimPrevious
= bTheNewDim
; }
135 void SetDimColor(Color aTheOldDimColor
, Color aTheNewDimColor
)
136 { aOldDimColor
= aTheOldDimColor
; aNewDimColor
= aTheNewDimColor
; }
137 void SetDimHide(bool bTheOldDimHide
, bool bTheNewDimHide
)
138 { bOldDimHide
= bTheOldDimHide
; bNewDimHide
= bTheNewDimHide
; }
139 void SetSoundOn(bool bTheOldSoundOn
, bool bTheNewSoundOn
)
140 { bOldSoundOn
= bTheOldSoundOn
; bNewSoundOn
= bTheNewSoundOn
; }
141 void SetSound(const OUString
& aTheOldSound
, const OUString
& aTheNewSound
)
142 { aOldSoundFile
= aTheOldSound
; aNewSoundFile
= aTheNewSound
; }
143 void SetBlueScreen(Color aTheOldBlueScreen
, Color aTheNewBlueScreen
)
144 { aOldBlueScreen
= aTheOldBlueScreen
; aNewBlueScreen
= aTheNewBlueScreen
; }
145 void SetPlayFull(bool bTheOldPlayFull
, bool bTheNewPlayFull
)
146 { bOldPlayFull
= bTheOldPlayFull
; bNewPlayFull
= bTheNewPlayFull
; }
147 void SetPathObj(SdrPathObj
* pTheOldPath
, SdrPathObj
* pTheNewPath
)
148 { pOldPathObj
= pTheOldPath
; pNewPathObj
= pTheNewPath
; }
149 void SetClickAction(::com::sun::star::presentation::ClickAction eTheOldAction
, ::com::sun::star::presentation::ClickAction eTheNewAction
)
150 { eOldClickAction
= eTheOldAction
; eNewClickAction
= eTheNewAction
; }
151 void SetBookmark(const OUString
& aTheOldBookmark
, const OUString
& aTheNewBookmark
)
152 { aOldBookmark
= aTheOldBookmark
; aNewBookmark
= aTheNewBookmark
; }
153 void SetInvisibleInPres(bool bTheOldInvisibleInPres
, bool bTheNewInvisibleInPres
)
154 { bOldInvisibleInPres
= bTheOldInvisibleInPres
; bNewInvisibleInPres
= bTheNewInvisibleInPres
; }
155 void SetVerb(sal_uInt16 nTheOldVerb
, sal_uInt16 nTheNewVerb
)
156 { nOldVerb
= nTheOldVerb
; nNewVerb
= nTheNewVerb
; }
157 void SetSecondEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect
, ::com::sun::star::presentation::AnimationEffect eTheNewEffect
)
158 { eOldSecondEffect
= eTheOldEffect
; eNewSecondEffect
= eTheNewEffect
; }
159 void SetSecondSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed
, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed
)
160 { eOldSecondSpeed
= eTheOldSpeed
; eNewSecondSpeed
= eTheNewSpeed
; }
161 void SetSecondSoundOn(bool bTheOldSoundOn
, bool bTheNewSoundOn
)
162 { bOldSecondSoundOn
= bTheOldSoundOn
; bNewSecondSoundOn
= bTheNewSoundOn
; }
163 void SetSecondPlayFull(bool bTheOldPlayFull
, bool bTheNewPlayFull
)
164 { bOldSecondPlayFull
= bTheOldPlayFull
; bNewSecondPlayFull
= bTheNewPlayFull
; }
165 void SetPresOrder(sal_uLong nTheOldPresOrder
, sal_uLong nTheNewPresOrder
)
166 { nOldPresOrder
= nTheOldPresOrder
; nNewPresOrder
= nTheNewPresOrder
; }
168 virtual ~SdAnimationPrmsUndoAction();
169 virtual void Undo() SAL_OVERRIDE
;
170 virtual void Redo() SAL_OVERRIDE
;
173 #endif // INCLUDED_SD_SOURCE_UI_INC_UNOAPRMS_HXX
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */