LCOV - code coverage report
Current view: top level - oox/inc/oox/ppt - timenode.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 20 10.0 %
Date: 2012-08-25 Functions: 2 10 20.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 0.0 %

           Branch data     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 OOX_DRAWINGML_TIMENODE_HXX
      22                 :            : #define OOX_DRAWINGML_TIMENODE_HXX
      23                 :            : 
      24                 :            : #include <boost/shared_ptr.hpp>
      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                 :            : #include "oox/ppt/timenode.hxx"
      36                 :            : 
      37                 :            : namespace oox { namespace ppt {
      38                 :            : 
      39                 :            :     class TimeNode;
      40                 :            :     class SlideTransition;
      41                 :            : 
      42                 :            :     typedef boost::shared_ptr< TimeNode > TimeNodePtr;
      43                 :            :     typedef ::std::list< TimeNodePtr > TimeNodePtrList;
      44                 :            : 
      45                 :            :     class TimeNode
      46                 :            :     {
      47                 :            :     public:
      48                 :            :         typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any > UserDataMap;
      49                 :            : 
      50                 :            :         TimeNode( sal_Int16 nNodeType );
      51                 :            :         virtual ~TimeNode();
      52                 :            : 
      53                 :          3 :         NodePropertyMap & getNodeProperties() { return maNodeProperties; }
      54                 :          3 :         UserDataMap & getUserData() { return maUserData; }
      55                 :            :         void addChild( const TimeNodePtr & pChildPtr )
      56                 :            :             { maChildren.push_back( pChildPtr ); }
      57                 :            : 
      58                 :          0 :         TimeNodePtrList & getChildren()
      59                 :          0 :             { return maChildren; }
      60                 :            : 
      61                 :            :         void setId( sal_Int32 nId );
      62                 :            :         const ::rtl::OUString & getId() const { return msId; }
      63                 :            : 
      64                 :            :         void addNode(
      65                 :            :             const ::oox::core::XmlFilterBase& rFilter,
      66                 :            :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode,
      67                 :            :             const SlidePersistPtr & slide);
      68                 :            :         // data setters
      69                 :            :         void setTo( const ::com::sun::star::uno::Any & aTo );
      70                 :            :         void setFrom( const ::com::sun::star::uno::Any & aFrom );
      71                 :            :         void setBy( const ::com::sun::star::uno::Any & aBy );
      72                 :          0 :         void setTransitionFilter( const SlideTransition & aTransition)
      73                 :          0 :             { maTransitionFilter = aTransition; }
      74                 :            : 
      75                 :            :         void setNode(
      76                 :            :             const ::oox::core::XmlFilterBase& rFilter,
      77                 :            :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode,
      78                 :            :             const SlidePersistPtr & pSlide );
      79                 :            : 
      80                 :          0 :         AnimTargetElementPtr getTarget()
      81                 :            :             {
      82         [ #  # ]:          0 :                 if( !mpTarget )
      83                 :          0 :                     mpTarget.reset( new AnimTargetElement );
      84                 :          0 :                 return mpTarget;
      85                 :            :             }
      86                 :            : 
      87                 :          0 :         AnimationConditionList &getStartCondition()
      88                 :          0 :             { return maStCondList; }
      89                 :          0 :         AnimationConditionList &getEndCondition()
      90                 :          0 :             { return maEndCondList; }
      91                 :          0 :         AnimationConditionList &getNextCondition()
      92                 :          0 :             { return maNextCondList; }
      93                 :          0 :         AnimationConditionList &getPrevCondition()
      94                 :          0 :             { return maPrevCondList; }
      95                 :          0 :         AnimationCondition & getEndSyncValue()
      96                 :          0 :             { mbHasEndSyncValue = true; return maEndSyncValue; }
      97                 :            :     protected:
      98                 :            : 
      99                 :            :         static rtl::OUString getServiceName( sal_Int16 nNodeType );
     100                 :            : 
     101                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >
     102                 :            :         createAndInsert(
     103                 :            :             const ::oox::core::XmlFilterBase& rFilter,
     104                 :            :             const rtl::OUString& rServiceName,
     105                 :            :             const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode );
     106                 :            : 
     107                 :            :     private:
     108                 :            :         const sal_Int16 mnNodeType;
     109                 :            : 
     110                 :            :         TimeNodePtrList maChildren;
     111                 :            : 
     112                 :            :         rtl::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;
     121                 :            :     };
     122                 :            : 
     123                 :            : } }
     124                 :            : 
     125                 :            : 
     126                 :            : #endif
     127                 :            : 
     128                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10