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 .
21 #ifndef INCLUDED_OOX_PPT_TIMENODE_HXX
22 #define INCLUDED_OOX_PPT_TIMENODE_HXX
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::sun::star
{
37 namespace animations
{ class XAnimationNode
; }
40 namespace oox::core
{ class XmlFilterBase
; }
46 typedef std::shared_ptr
< TimeNode
> TimeNodePtr
;
47 typedef std::vector
< TimeNodePtr
> TimeNodePtrList
;
52 typedef ::std::map
< OUString
, css::uno::Any
> UserDataMap
;
54 TimeNode( sal_Int16 nNodeType
);
57 NodePropertyMap
& getNodeProperties() { return maNodeProperties
; }
58 UserDataMap
& getUserData() { return maUserData
; }
59 TimeNodePtrList
& getChildren()
60 { return maChildren
; }
62 void setId( sal_Int32 nId
);
65 const ::oox::core::XmlFilterBase
& rFilter
,
66 const css::uno::Reference
< css::animations::XAnimationNode
>& rxNode
,
67 const SlidePersistPtr
& slide
);
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
; }
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()
84 mpTarget
= std::make_shared
<AnimTargetElement
>();
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
; }
100 static OUString
getServiceName( sal_Int16 nNodeType
);
102 static css::uno::Reference
< css::animations::XAnimationNode
>
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
;
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
;
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */