LibreOffice Module sd (master) 1
EffectMigration.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/presentation/AnimationEffect.hpp>
23#include <com/sun/star/presentation/AnimationSpeed.hpp>
24#include <com/sun/star/presentation/FadeEffect.hpp>
25
26class SdDrawDocument;
27class SdPage;
28class SvxShape;
29class SdAnimationInfo;
30class SdrPathObj;
31class SdrObjGroup;
32
33namespace sd {
34
39{
40public:
41 static css::presentation::AnimationSpeed ConvertDuration( double fDuration );
42 static double ConvertAnimationSpeed( css::presentation::AnimationSpeed eSpeed );
43
44 static bool ConvertPreset( std::u16string_view rPresetId, const OUString* pPresetSubType, css::presentation::AnimationEffect& rEffect );
45 static bool ConvertAnimationEffect( const css::presentation::AnimationEffect& rEffect, OUString& rPresetId, OUString& rPresetSubType );
46
47 static void SetFadeEffect( SdPage* pPage, css::presentation::FadeEffect eNewEffect);
48 static css::presentation::FadeEffect GetFadeEffect( const SdPage* pPage );
49
50 static void SetAnimationEffect( SvxShape* pShape, css::presentation::AnimationEffect eValue );
51 static css::presentation::AnimationEffect GetAnimationEffect( SvxShape* pShape );
52 static void SetTextAnimationEffect( SvxShape* pShape, css::presentation::AnimationEffect eValue );
53 static css::presentation::AnimationEffect GetTextAnimationEffect( SvxShape* pShape );
54 static void SetAnimationSpeed( SvxShape* pShape, css::presentation::AnimationSpeed eSpeed );
55 static css::presentation::AnimationSpeed GetAnimationSpeed( SvxShape* pShape );
56 static void SetDimColor( SvxShape* pShape, sal_Int32 nColor );
57 static sal_Int32 GetDimColor( SvxShape* pShape );
58 static void SetDimHide( SvxShape* pShape, bool bDimHide );
59 static bool GetDimHide( SvxShape* pShape );
60 static void SetDimPrevious( SvxShape* pShape, bool bDimPrevious );
61 static bool GetDimPrevious( SvxShape* pShape );
62 static void SetPresentationOrder( SvxShape* pShape, sal_Int32 nNewPos );
63 static sal_Int32 GetPresentationOrder( SvxShape* pShape );
64 static void UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo const * pInfo );
65 static OUString GetSoundFile( SvxShape* pShape );
66 static bool GetSoundOn( SvxShape* pShape );
67
68 static void SetAnimationPath( SvxShape* pShape, SdrPathObj const * pPathObj );
69 static void CreateAnimatedGroup(SdrObjGroup const & rGroupObj, SdPage& rPage);
70 static void DocumentLoaded(SdDrawDocument & rDoc);
71};
72
73} // end of namespace sd
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
this helper class gives various methods to convert effects from OOo 1.1 and below to and from OOo 2....
static void DocumentLoaded(SdDrawDocument &rDoc)
static void SetAnimationPath(SvxShape *pShape, SdrPathObj const *pPathObj)
static sal_Int32 GetDimColor(SvxShape *pShape)
static css::presentation::AnimationSpeed ConvertDuration(double fDuration)
static double ConvertAnimationSpeed(css::presentation::AnimationSpeed eSpeed)
static void SetTextAnimationEffect(SvxShape *pShape, css::presentation::AnimationEffect eValue)
static bool GetDimPrevious(SvxShape *pShape)
static void CreateAnimatedGroup(SdrObjGroup const &rGroupObj, SdPage &rPage)
static void SetAnimationSpeed(SvxShape *pShape, css::presentation::AnimationSpeed eSpeed)
static OUString GetSoundFile(SvxShape *pShape)
static void SetFadeEffect(SdPage *pPage, css::presentation::FadeEffect eNewEffect)
static css::presentation::FadeEffect GetFadeEffect(const SdPage *pPage)
static bool ConvertPreset(std::u16string_view rPresetId, const OUString *pPresetSubType, css::presentation::AnimationEffect &rEffect)
static void SetAnimationEffect(SvxShape *pShape, css::presentation::AnimationEffect eValue)
static bool GetSoundOn(SvxShape *pShape)
static css::presentation::AnimationSpeed GetAnimationSpeed(SvxShape *pShape)
static void UpdateSoundEffect(SvxShape *pShape, SdAnimationInfo const *pInfo)
static css::presentation::AnimationEffect GetAnimationEffect(SvxShape *pShape)
static bool ConvertAnimationEffect(const css::presentation::AnimationEffect &rEffect, OUString &rPresetId, OUString &rPresetSubType)
static css::presentation::AnimationEffect GetTextAnimationEffect(SvxShape *pShape)
static void SetDimColor(SvxShape *pShape, sal_Int32 nColor)
static void SetDimPrevious(SvxShape *pShape, bool bDimPrevious)
static bool GetDimHide(SvxShape *pShape)
static void SetPresentationOrder(SvxShape *pShape, sal_Int32 nNewPos)
static sal_Int32 GetPresentationOrder(SvxShape *pShape)
Returns the position of the given SdrObject in the Presentation order.
static void SetDimHide(SvxShape *pShape, bool bDimHide)