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 .
22 #include <com/sun/star/presentation/AnimationEffect.hpp>
23 #include <com/sun/star/presentation/AnimationSpeed.hpp>
24 #include <com/sun/star/presentation/ClickAction.hpp>
26 #include <tools/color.hxx>
31 class SdAnimationPrmsUndoAction final
: public SdUndoAction
42 bool bOldSecondSoundOn
;
43 bool bNewSecondSoundOn
;
46 bool bOldSecondPlayFull
;
47 bool bNewSecondPlayFull
;
48 css::presentation::AnimationEffect eOldEffect
;
49 css::presentation::AnimationEffect eNewEffect
;
50 css::presentation::AnimationEffect eOldTextEffect
;
51 css::presentation::AnimationEffect eNewTextEffect
;
52 css::presentation::AnimationSpeed eOldSpeed
;
53 css::presentation::AnimationSpeed eNewSpeed
;
54 css::presentation::AnimationEffect eOldSecondEffect
;
55 css::presentation::AnimationEffect eNewSecondEffect
;
56 css::presentation::AnimationSpeed eOldSecondSpeed
;
57 css::presentation::AnimationSpeed eNewSecondSpeed
;
60 OUString aOldSoundFile
;
61 OUString aNewSoundFile
;
62 css::presentation::ClickAction eOldClickAction
;
63 css::presentation::ClickAction eNewClickAction
;
64 OUString aOldBookmark
;
65 OUString aNewBookmark
;
72 SdAnimationPrmsUndoAction(SdDrawDocument
* pTheDoc
, SdrObject
* pObj
,
74 : SdUndoAction(pTheDoc
)
78 , bOldDimPrevious(false)
79 , bNewDimPrevious(false)
84 , bOldSecondSoundOn(false)
85 , bNewSecondSoundOn(false)
88 , bOldSecondPlayFull(false)
89 , bNewSecondPlayFull(false)
90 , eOldEffect(css::presentation::AnimationEffect_NONE
)
91 , eNewEffect(css::presentation::AnimationEffect_NONE
)
92 , eOldTextEffect(css::presentation::AnimationEffect_NONE
)
93 , eNewTextEffect(css::presentation::AnimationEffect_NONE
)
94 , eOldSpeed(css::presentation::AnimationSpeed_SLOW
)
95 , eNewSpeed(css::presentation::AnimationSpeed_SLOW
)
96 , eOldSecondEffect(css::presentation::AnimationEffect_NONE
)
97 , eNewSecondEffect(css::presentation::AnimationEffect_NONE
)
98 , eOldSecondSpeed(css::presentation::AnimationSpeed_SLOW
)
99 , eNewSecondSpeed(css::presentation::AnimationSpeed_SLOW
)
100 , eOldClickAction(css::presentation::ClickAction_NONE
)
101 , eNewClickAction(css::presentation::ClickAction_NONE
)
104 , bInfoCreated(bCreated
)
108 void SetActive(bool bTheOldActive
, bool bTheNewActive
)
109 { bOldActive
= bTheOldActive
; bNewActive
= bTheNewActive
; }
110 void SetEffect(css::presentation::AnimationEffect eTheOldEffect
, css::presentation::AnimationEffect eTheNewEffect
)
111 { eOldEffect
= eTheOldEffect
; eNewEffect
= eTheNewEffect
; }
112 void SetTextEffect(css::presentation::AnimationEffect eTheOldEffect
, css::presentation::AnimationEffect eTheNewEffect
)
113 { eOldTextEffect
= eTheOldEffect
; eNewTextEffect
= eTheNewEffect
; }
114 void SetSpeed(css::presentation::AnimationSpeed eTheOldSpeed
, css::presentation::AnimationSpeed eTheNewSpeed
)
115 { eOldSpeed
= eTheOldSpeed
; eNewSpeed
= eTheNewSpeed
; }
116 void SetDim(bool bTheOldDim
, bool bTheNewDim
)
117 { bOldDimPrevious
= bTheOldDim
; bNewDimPrevious
= bTheNewDim
; }
118 void SetDimColor(Color aTheOldDimColor
, Color aTheNewDimColor
)
119 { aOldDimColor
= aTheOldDimColor
; aNewDimColor
= aTheNewDimColor
; }
120 void SetDimHide(bool bTheOldDimHide
, bool bTheNewDimHide
)
121 { bOldDimHide
= bTheOldDimHide
; bNewDimHide
= bTheNewDimHide
; }
122 void SetSoundOn(bool bTheOldSoundOn
, bool bTheNewSoundOn
)
123 { bOldSoundOn
= bTheOldSoundOn
; bNewSoundOn
= bTheNewSoundOn
; }
124 void SetSound(const OUString
& aTheOldSound
, const OUString
& aTheNewSound
)
125 { aOldSoundFile
= aTheOldSound
; aNewSoundFile
= aTheNewSound
; }
126 void SetPlayFull(bool bTheOldPlayFull
, bool bTheNewPlayFull
)
127 { bOldPlayFull
= bTheOldPlayFull
; bNewPlayFull
= bTheNewPlayFull
; }
128 void SetClickAction(css::presentation::ClickAction eTheOldAction
, css::presentation::ClickAction eTheNewAction
)
129 { eOldClickAction
= eTheOldAction
; eNewClickAction
= eTheNewAction
; }
130 void SetBookmark(const OUString
& aTheOldBookmark
, const OUString
& aTheNewBookmark
)
131 { aOldBookmark
= aTheOldBookmark
; aNewBookmark
= aTheNewBookmark
; }
132 void SetVerb(sal_uInt16 nTheOldVerb
, sal_uInt16 nTheNewVerb
)
133 { nOldVerb
= nTheOldVerb
; nNewVerb
= nTheNewVerb
; }
134 void SetSecondEffect(css::presentation::AnimationEffect eTheOldEffect
, css::presentation::AnimationEffect eTheNewEffect
)
135 { eOldSecondEffect
= eTheOldEffect
; eNewSecondEffect
= eTheNewEffect
; }
136 void SetSecondSpeed(css::presentation::AnimationSpeed eTheOldSpeed
, css::presentation::AnimationSpeed eTheNewSpeed
)
137 { eOldSecondSpeed
= eTheOldSpeed
; eNewSecondSpeed
= eTheNewSpeed
; }
138 void SetSecondSoundOn(bool bTheOldSoundOn
, bool bTheNewSoundOn
)
139 { bOldSecondSoundOn
= bTheOldSoundOn
; bNewSecondSoundOn
= bTheNewSoundOn
; }
140 void SetSecondPlayFull(bool bTheOldPlayFull
, bool bTheNewPlayFull
)
141 { bOldSecondPlayFull
= bTheOldPlayFull
; bNewSecondPlayFull
= bTheNewPlayFull
; }
143 virtual ~SdAnimationPrmsUndoAction() override
;
144 virtual void Undo() override
;
145 virtual void Redo() override
;
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */