update credits
[LibreOffice.git] / sd / inc / TransitionPreset.hxx
blob7010a33946479cbbc3c0bc1be980aa26bf7ad890
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_TRANSITIONPRESET_HXX
21 #define _SD_TRANSITIONPRESET_HXX
23 #include <boost/shared_ptr.hpp>
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <comphelper/stl_types.hxx>
28 #include <list>
29 #include <boost/unordered_map.hpp>
31 namespace com { namespace sun { namespace star {
32 namespace animations { class XAnimationNode; }
33 namespace uno { template<class X> class Reference; }
34 } } }
36 class SdPage;
37 class String;
39 namespace sd {
41 class TransitionPreset;
42 typedef boost::shared_ptr< TransitionPreset > TransitionPresetPtr;
43 typedef std::list< TransitionPresetPtr > TransitionPresetList;
44 typedef boost::unordered_map< OUString, OUString, OUStringHash, comphelper::UStringEqual > UStringMap;
46 class TransitionPreset
48 public:
49 static const TransitionPresetList& getTransitionPresetList();
50 static bool importTransitionPresetList( TransitionPresetList& rList );
52 void apply( SdPage* pSlide ) const;
54 sal_Int16 getTransition() const { return mnTransition; }
55 sal_Int16 getSubtype() const { return mnSubtype; }
56 sal_Bool getDirection() const { return mbDirection; }
57 sal_Int32 getFadeColor() const { return mnFadeColor; }
59 const OUString& getUIName() const { return maUIName; }
60 const OUString& getPresetId() const { return maPresetId; }
62 private:
63 TransitionPreset( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
65 sal_Int16 mnTransition;
66 sal_Int16 mnSubtype;
67 sal_Bool mbDirection;
68 sal_Int32 mnFadeColor;
69 OUString maPresetId;
70 OUString maUIName;
72 static bool importTransitionsFile( TransitionPresetList& rList,
73 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
74 UStringMap& rTransitionNameMape,
75 String aFilaname );
80 #endif // _SD_TRANSITIONPRESET_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */