Bump version to 6.4-15
[LibreOffice.git] / include / oox / ppt / timenode.hxx
blobd4794ae96dee65edae032ab55bf6468a35987231
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 .
21 #ifndef INCLUDED_OOX_PPT_TIMENODE_HXX
22 #define INCLUDED_OOX_PPT_TIMENODE_HXX
24 #include <vector>
25 #include <map>
26 #include <memory>
28 #include <com/sun/star/uno/Any.hxx>
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <oox/ppt/slidetransition.hxx>
31 #include <oox/ppt/slidepersist.hxx>
32 #include <oox/ppt/animationspersist.hxx>
33 #include <rtl/ustring.hxx>
34 #include <sal/types.h>
36 namespace com { namespace sun { namespace star {
37 namespace animations { class XAnimationNode; }
38 } } }
40 namespace oox { namespace core { class XmlFilterBase; } }
42 namespace oox { namespace ppt {
44 class TimeNode;
46 typedef std::shared_ptr< TimeNode > TimeNodePtr;
47 typedef std::vector< TimeNodePtr > TimeNodePtrList;
49 class TimeNode final
51 public:
52 typedef ::std::map< OUString, css::uno::Any > UserDataMap;
54 TimeNode( sal_Int16 nNodeType );
55 ~TimeNode();
57 NodePropertyMap & getNodeProperties() { return maNodeProperties; }
58 UserDataMap & getUserData() { return maUserData; }
59 TimeNodePtrList & getChildren()
60 { return maChildren; }
62 void setId( sal_Int32 nId );
64 void addNode(
65 const ::oox::core::XmlFilterBase& rFilter,
66 const css::uno::Reference< css::animations::XAnimationNode >& rxNode,
67 const SlidePersistPtr & slide);
68 // data setters
69 void setTo( const css::uno::Any & aTo );
70 void setFrom( const css::uno::Any & aFrom );
71 void setBy( const css::uno::Any & aBy );
72 void setTransitionFilter( const SlideTransition & aTransition)
73 { maTransitionFilter = aTransition; }
75 void setNode(
76 const ::oox::core::XmlFilterBase& rFilter,
77 const css::uno::Reference< css::animations::XAnimationNode >& xNode,
78 const SlidePersistPtr & pSlide,
79 const css::uno::Reference< css::animations::XAnimationNode >& xParent);
81 AnimTargetElementPtr const & getTarget()
83 if( !mpTarget )
84 mpTarget.reset( new AnimTargetElement );
85 return mpTarget;
88 AnimationConditionList &getStartCondition()
89 { return maStCondList; }
90 AnimationConditionList &getEndCondition()
91 { return maEndCondList; }
92 AnimationConditionList &getNextCondition()
93 { return maNextCondList; }
94 AnimationConditionList &getPrevCondition()
95 { return maPrevCondList; }
96 AnimationCondition & getEndSyncValue()
97 { mbHasEndSyncValue = true; return maEndSyncValue; }
98 private:
100 static OUString getServiceName( sal_Int16 nNodeType );
102 static css::uno::Reference< css::animations::XAnimationNode >
103 createAndInsert(
104 const ::oox::core::XmlFilterBase& rFilter,
105 const OUString& rServiceName,
106 const css::uno::Reference< css::animations::XAnimationNode >& rxNode );
108 const sal_Int16 mnNodeType;
110 TimeNodePtrList maChildren;
112 OUString msId;
113 NodePropertyMap maNodeProperties;
114 UserDataMap maUserData; // a sequence to be stored as "UserData" property
115 SlideTransition maTransitionFilter;
116 AnimTargetElementPtr mpTarget;
117 bool mbHasEndSyncValue; // set to true if we try to get the endSync.
118 AnimationCondition maEndSyncValue;
119 AnimationConditionList maStCondList, maEndCondList;
120 AnimationConditionList maPrevCondList, maNextCondList;
126 #endif
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */