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_INC_TRANSITIONPRESET_HXX
21 #define INCLUDED_SD_INC_TRANSITIONPRESET_HXX
23 #include <boost/shared_ptr.hpp>
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <unordered_map>
29 namespace com
{ namespace sun
{ namespace star
{
30 namespace animations
{ class XAnimationNode
; }
31 namespace uno
{ template<class X
> class Reference
; }
38 class TransitionPreset
;
39 typedef boost::shared_ptr
< TransitionPreset
> TransitionPresetPtr
;
40 typedef std::list
< TransitionPresetPtr
> TransitionPresetList
;
41 typedef std::unordered_map
< OUString
, OUString
, OUStringHash
> UStringMap
;
43 class TransitionPreset
46 static const TransitionPresetList
& getTransitionPresetList();
47 static bool importTransitionPresetList( TransitionPresetList
& rList
);
49 void apply( SdPage
* pSlide
) const;
51 sal_Int16
getTransition() const { return mnTransition
; }
52 sal_Int16
getSubtype() const { return mnSubtype
; }
53 bool getDirection() const { return mbDirection
; }
54 sal_Int32
getFadeColor() const { return mnFadeColor
; }
56 const OUString
& getUIName() const { return maUIName
; }
57 const OUString
& getPresetId() const { return maPresetId
; }
60 TransitionPreset( const ::com::sun::star::uno::Reference
< ::com::sun::star::animations::XAnimationNode
>& xNode
);
62 sal_Int16 mnTransition
;
65 sal_Int32 mnFadeColor
;
69 static bool importTransitionsFile( TransitionPresetList
& rList
,
70 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& xServiceFactory
,
71 UStringMap
& rTransitionNameMape
,
72 const OUString
& aFilename
);
77 #endif // INCLUDED_SD_INC_TRANSITIONPRESET_HXX
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */