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
{ namespace sun
{ namespace star
{
37 namespace animations
{ class XAnimationNode
; }
40 namespace oox
{ namespace core
{ class XmlFilterBase
; } }
42 namespace oox
{ namespace ppt
{
46 typedef std::shared_ptr
< TimeNode
> TimeNodePtr
;
47 typedef std::list
< 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
);
80 AnimTargetElementPtr
const & getTarget()
83 mpTarget
.reset( new AnimTargetElement
);
87 AnimationConditionList
&getStartCondition()
88 { return maStCondList
; }
89 AnimationConditionList
&getEndCondition()
90 { return maEndCondList
; }
91 AnimationConditionList
&getNextCondition()
92 { return maNextCondList
; }
93 AnimationConditionList
&getPrevCondition()
94 { return maPrevCondList
; }
95 AnimationCondition
& getEndSyncValue()
96 { mbHasEndSyncValue
= true; return maEndSyncValue
; }
99 static OUString
getServiceName( sal_Int16 nNodeType
);
101 static css::uno::Reference
< css::animations::XAnimationNode
>
103 const ::oox::core::XmlFilterBase
& rFilter
,
104 const OUString
& rServiceName
,
105 const css::uno::Reference
< css::animations::XAnimationNode
>& rxNode
);
107 const sal_Int16 mnNodeType
;
109 TimeNodePtrList maChildren
;
112 NodePropertyMap maNodeProperties
;
113 UserDataMap maUserData
; // a sequence to be stored as "UserData" property
114 SlideTransition maTransitionFilter
;
115 AnimTargetElementPtr mpTarget
;
116 bool mbHasEndSyncValue
; // set to true if we try to get the endSync.
117 AnimationCondition maEndSyncValue
;
118 AnimationConditionList maStCondList
, maEndCondList
;
119 AnimationConditionList maPrevCondList
, maNextCondList
;
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */