1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: EffectMigration.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_EFFECT_MIGRATION_HXX
32 #define _SD_EFFECT_MIGRATION_HXX
34 #include <com/sun/star/presentation/AnimationEffect.hpp>
35 #include <com/sun/star/presentation/AnimationSpeed.hpp>
36 #include <com/sun/star/presentation/FadeEffect.hpp>
40 class SdAnimationInfo
;
45 /** this helper class gives various methods to convert effects from OOo 1.1
46 and below to and from OOo 2.0 and above
51 static ::com::sun::star::presentation::AnimationSpeed
ConvertDuration( double fDuration
);
52 static double ConvertAnimationSpeed( ::com::sun::star::presentation::AnimationSpeed eSpeed
);
54 static bool ConvertPreset( const ::rtl::OUString
& rPresetId
, const ::rtl::OUString
* pPresetSubType
, ::com::sun::star::presentation::AnimationEffect
& rEffect
);
55 static bool ConvertAnimationEffect( const ::com::sun::star::presentation::AnimationEffect
& rEffect
, ::rtl::OUString
& rPresetId
, ::rtl::OUString
& rPresetSubType
);
58 void AddEffectFromAnimationInfo( SdrObject
* pObject
, SdAnimationInfo
* pInfo
);
61 static void SetFadeEffect( SdPage
* pPage
, ::com::sun::star::presentation::FadeEffect eNewEffect
);
62 static ::com::sun::star::presentation::FadeEffect
GetFadeEffect( const SdPage
* pPage
);
65 static void SetAnimationEffect( SvxShape
* pShape
, ::com::sun::star::presentation::AnimationEffect eValue
);
66 static ::com::sun::star::presentation::AnimationEffect
GetAnimationEffect( SvxShape
* pShape
);
67 static void SetTextAnimationEffect( SvxShape
* pShape
, ::com::sun::star::presentation::AnimationEffect eValue
);
68 static ::com::sun::star::presentation::AnimationEffect
GetTextAnimationEffect( SvxShape
* pShape
);
69 static void SetAnimationSpeed( SvxShape
* pShape
, ::com::sun::star::presentation::AnimationSpeed eSpeed
);
70 static ::com::sun::star::presentation::AnimationSpeed
GetAnimationSpeed( SvxShape
* pShape
);
71 static void SetDimColor( SvxShape
* pShape
, sal_Int32 nColor
);
72 static sal_Int32
GetDimColor( SvxShape
* pShape
);
73 static void SetDimHide( SvxShape
* pShape
, sal_Bool bDimHide
);
74 static sal_Bool
GetDimHide( SvxShape
* pShape
);
75 static void SetDimPrevious( SvxShape
* pShape
, sal_Bool bDimPrevious
);
76 static sal_Bool
GetDimPrevious( SvxShape
* pShape
);
77 static void SetPresentationOrder( SvxShape
* pShape
, sal_Int32 nNewPos
);
78 static sal_Int32
GetPresentationOrder( SvxShape
* pShape
);
79 static void UpdateSoundEffect( SvxShape
* pShape
, SdAnimationInfo
* pInfo
);
80 static ::rtl::OUString
GetSoundFile( SvxShape
* pShape
);
81 static sal_Bool
GetSoundOn( SvxShape
* pShape
);
84 } // end of namespace sd