update credits
[LibreOffice.git] / sd / inc / EffectMigration.hxx
blob2387d4390491cdedb8872a20ae53abd148c7f917
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _SD_EFFECT_MIGRATION_HXX
21 #define _SD_EFFECT_MIGRATION_HXX
23 #include <com/sun/star/presentation/AnimationEffect.hpp>
24 #include <com/sun/star/presentation/AnimationSpeed.hpp>
25 #include <com/sun/star/presentation/FadeEffect.hpp>
27 class SdPage;
28 class SvxShape;
29 class SdAnimationInfo;
30 class SdrObject;
31 class SdrPathObj;
33 namespace sd {
35 /** this helper class gives various methods to convert effects from OOo 1.1
36 and below to and from OOo 2.0 and above
38 class EffectMigration
40 public:
41 static ::com::sun::star::presentation::AnimationSpeed ConvertDuration( double fDuration );
42 static double ConvertAnimationSpeed( ::com::sun::star::presentation::AnimationSpeed eSpeed );
44 static bool ConvertPreset( const OUString& rPresetId, const OUString* pPresetSubType, ::com::sun::star::presentation::AnimationEffect& rEffect );
45 static bool ConvertAnimationEffect( const ::com::sun::star::presentation::AnimationEffect& rEffect, OUString& rPresetId, OUString& rPresetSubType );
47 public:
48 void AddEffectFromAnimationInfo( SdrObject* pObject, SdAnimationInfo* pInfo );
50 public:
51 static void SetFadeEffect( SdPage* pPage, ::com::sun::star::presentation::FadeEffect eNewEffect);
52 static ::com::sun::star::presentation::FadeEffect GetFadeEffect( const SdPage* pPage );
54 public:
55 static void SetAnimationEffect( SvxShape* pShape, ::com::sun::star::presentation::AnimationEffect eValue );
56 static ::com::sun::star::presentation::AnimationEffect GetAnimationEffect( SvxShape* pShape );
57 static void SetTextAnimationEffect( SvxShape* pShape, ::com::sun::star::presentation::AnimationEffect eValue );
58 static ::com::sun::star::presentation::AnimationEffect GetTextAnimationEffect( SvxShape* pShape );
59 static void SetAnimationSpeed( SvxShape* pShape, ::com::sun::star::presentation::AnimationSpeed eSpeed );
60 static ::com::sun::star::presentation::AnimationSpeed GetAnimationSpeed( SvxShape* pShape );
61 static void SetDimColor( SvxShape* pShape, sal_Int32 nColor );
62 static sal_Int32 GetDimColor( SvxShape* pShape );
63 static void SetDimHide( SvxShape* pShape, sal_Bool bDimHide );
64 static sal_Bool GetDimHide( SvxShape* pShape );
65 static void SetDimPrevious( SvxShape* pShape, sal_Bool bDimPrevious );
66 static sal_Bool GetDimPrevious( SvxShape* pShape );
67 static void SetPresentationOrder( SvxShape* pShape, sal_Int32 nNewPos );
68 static sal_Int32 GetPresentationOrder( SvxShape* pShape );
69 static void UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo* pInfo );
70 static OUString GetSoundFile( SvxShape* pShape );
71 static sal_Bool GetSoundOn( SvxShape* pShape );
73 static void SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj );
76 } // end of namespace sd
78 #endif
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */