LCOV - code coverage report
Current view: top level - include/oox/ppt - timenode.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 20 90.0 %
Date: 2015-06-13 12:38:46 Functions: 9 10 90.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : 
      21             : #ifndef INCLUDED_OOX_PPT_TIMENODE_HXX
      22             : #define INCLUDED_OOX_PPT_TIMENODE_HXX
      23             : 
      24             : #include <memory>
      25             : #include <vector>
      26             : #include <list>
      27             : #include <rtl/ustring.hxx>
      28             : 
      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>
      35             : 
      36             : namespace oox { namespace ppt {
      37             : 
      38             :     class TimeNode;
      39             :     class SlideTransition;
      40             : 
      41             :     typedef std::shared_ptr< TimeNode > TimeNodePtr;
      42             :     typedef std::list< TimeNodePtr > TimeNodePtrList;
      43             : 
      44             :     class TimeNode
      45             :     {
      46             :     public:
      47             :         typedef ::std::map< OUString, ::com::sun::star::uno::Any > UserDataMap;
      48             : 
      49             :         TimeNode( sal_Int16 nNodeType );
      50             :         virtual ~TimeNode();
      51             : 
      52         103 :         NodePropertyMap & getNodeProperties() { return maNodeProperties; }
      53          87 :         UserDataMap & getUserData() { return maUserData; }
      54             :         void addChild( const TimeNodePtr & pChildPtr )
      55             :             { maChildren.push_back( pChildPtr ); }
      56             : 
      57          40 :         TimeNodePtrList & getChildren()
      58          40 :             { return maChildren; }
      59             : 
      60             :         void setId( sal_Int32 nId );
      61             :         const OUString & getId() const { return msId; }
      62             : 
      63             :         void addNode(
      64             :             const ::oox::core::XmlFilterBase& rFilter,
      65             :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode,
      66             :             const SlidePersistPtr & slide);
      67             :         // data setters
      68             :         void setTo( const ::com::sun::star::uno::Any & aTo );
      69             :         void setFrom( const ::com::sun::star::uno::Any & aFrom );
      70             :         void setBy( const ::com::sun::star::uno::Any & aBy );
      71           4 :         void setTransitionFilter( const SlideTransition & aTransition)
      72           4 :             { maTransitionFilter = aTransition; }
      73             : 
      74             :         void setNode(
      75             :             const ::oox::core::XmlFilterBase& rFilter,
      76             :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode,
      77             :             const SlidePersistPtr & pSlide );
      78             : 
      79          16 :         AnimTargetElementPtr getTarget()
      80             :             {
      81          16 :                 if( !mpTarget )
      82          16 :                     mpTarget.reset( new AnimTargetElement );
      83          16 :                 return mpTarget;
      84             :             }
      85             : 
      86          38 :         AnimationConditionList &getStartCondition()
      87          38 :             { return maStCondList; }
      88           0 :         AnimationConditionList &getEndCondition()
      89           0 :             { return maEndCondList; }
      90           8 :         AnimationConditionList &getNextCondition()
      91           8 :             { return maNextCondList; }
      92           7 :         AnimationConditionList &getPrevCondition()
      93           7 :             { return maPrevCondList; }
      94           1 :         AnimationCondition & getEndSyncValue()
      95           1 :             { mbHasEndSyncValue = true; return maEndSyncValue; }
      96             :     protected:
      97             : 
      98             :         static OUString getServiceName( sal_Int16 nNodeType );
      99             : 
     100             :         static ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >
     101             :         createAndInsert(
     102             :             const ::oox::core::XmlFilterBase& rFilter,
     103             :             const OUString& rServiceName,
     104             :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode );
     105             : 
     106             :     private:
     107             :         const sal_Int16 mnNodeType;
     108             : 
     109             :         TimeNodePtrList maChildren;
     110             : 
     111             :         OUString   msId;
     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;
     120             :     };
     121             : 
     122             : } }
     123             : 
     124             : 
     125             : #endif
     126             : 
     127             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11