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