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
27 #include <rtl/ustring.hxx>
29 #include <com/sun/star/frame/XModel.hpp>
30 #include <com/sun/star/animations/XAnimationNode.hpp>
31 #include <oox/helper/propertymap.hxx>
32 #include <oox/ppt/slidetransition.hxx>
33 #include <oox/ppt/slidepersist.hxx>
34 #include <oox/ppt/animationspersist.hxx>
36 namespace oox
{ namespace ppt
{
39 class SlideTransition
;
41 typedef std::shared_ptr
< TimeNode
> TimeNodePtr
;
42 typedef std::list
< TimeNodePtr
> TimeNodePtrList
;
47 typedef ::std::map
< OUString
, css::uno::Any
> UserDataMap
;
49 TimeNode( sal_Int16 nNodeType
);
52 NodePropertyMap
& getNodeProperties() { return maNodeProperties
; }
53 UserDataMap
& getUserData() { return maUserData
; }
54 TimeNodePtrList
& getChildren()
55 { return maChildren
; }
57 void setId( sal_Int32 nId
);
60 const ::oox::core::XmlFilterBase
& rFilter
,
61 const css::uno::Reference
< css::animations::XAnimationNode
>& rxNode
,
62 const SlidePersistPtr
& slide
);
64 void setTo( const css::uno::Any
& aTo
);
65 void setFrom( const css::uno::Any
& aFrom
);
66 void setBy( const css::uno::Any
& aBy
);
67 void setTransitionFilter( const SlideTransition
& aTransition
)
68 { maTransitionFilter
= aTransition
; }
71 const ::oox::core::XmlFilterBase
& rFilter
,
72 const css::uno::Reference
< css::animations::XAnimationNode
>& xNode
,
73 const SlidePersistPtr
& pSlide
);
75 AnimTargetElementPtr
getTarget()
78 mpTarget
.reset( new AnimTargetElement
);
82 AnimationConditionList
&getStartCondition()
83 { return maStCondList
; }
84 AnimationConditionList
&getEndCondition()
85 { return maEndCondList
; }
86 AnimationConditionList
&getNextCondition()
87 { return maNextCondList
; }
88 AnimationConditionList
&getPrevCondition()
89 { return maPrevCondList
; }
90 AnimationCondition
& getEndSyncValue()
91 { mbHasEndSyncValue
= true; return maEndSyncValue
; }
94 static OUString
getServiceName( sal_Int16 nNodeType
);
96 static css::uno::Reference
< css::animations::XAnimationNode
>
98 const ::oox::core::XmlFilterBase
& rFilter
,
99 const OUString
& rServiceName
,
100 const css::uno::Reference
< css::animations::XAnimationNode
>& rxNode
);
103 const sal_Int16 mnNodeType
;
105 TimeNodePtrList maChildren
;
108 NodePropertyMap maNodeProperties
;
109 UserDataMap maUserData
; // a sequence to be stored as "UserData" property
110 SlideTransition maTransitionFilter
;
111 AnimTargetElementPtr mpTarget
;
112 bool mbHasEndSyncValue
; // set to true if we try to get the endSync.
113 AnimationCondition maEndSyncValue
;
114 AnimationConditionList maStCondList
, maEndCondList
;
115 AnimationConditionList maPrevCondList
, maNextCondList
;
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */