LCOV - code coverage report
Current view: top level - sd/inc - TransitionPreset.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 7 42.9 %
Date: 2012-08-25 Functions: 3 7 42.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SD_TRANSITIONPRESET_HXX
      30                 :            : #define _SD_TRANSITIONPRESET_HXX
      31                 :            : 
      32                 :            : #include <boost/shared_ptr.hpp>
      33                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      34                 :            : 
      35                 :            : #include <comphelper/stl_types.hxx>
      36                 :            : 
      37                 :            : #include <list>
      38                 :            : #include <boost/unordered_map.hpp>
      39                 :            : 
      40                 :            : namespace com { namespace sun { namespace star {
      41                 :            :     namespace animations { class XAnimationNode; }
      42                 :            :     namespace uno { template<class X> class Reference; }
      43                 :            : } } }
      44                 :            : 
      45                 :            : class SdPage;
      46                 :            : class String;
      47                 :            : 
      48                 :            : namespace sd {
      49                 :            : 
      50                 :            : class TransitionPreset;
      51                 :            : typedef boost::shared_ptr< TransitionPreset > TransitionPresetPtr;
      52                 :            : typedef std::list< TransitionPresetPtr > TransitionPresetList;
      53                 :            : typedef boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash, comphelper::UStringEqual > UStringMap;
      54                 :            : 
      55                 :        162 : class TransitionPreset
      56                 :            : {
      57                 :            : public:
      58                 :            :     static const TransitionPresetList& getTransitionPresetList();
      59                 :            :     static bool importTransitionPresetList( TransitionPresetList& rList );
      60                 :            : 
      61                 :            :     void apply( SdPage* pSlide ) const;
      62                 :            : 
      63                 :        324 :     sal_Int16 getTransition() const { return mnTransition; }
      64                 :          0 :     sal_Int16 getSubtype() const { return mnSubtype; }
      65                 :          0 :     sal_Bool getDirection() const { return mbDirection; }
      66                 :          0 :     sal_Int32 getFadeColor() const { return mnFadeColor; }
      67                 :            : 
      68                 :          0 :     const rtl::OUString& getUIName() const { return maUIName; }
      69                 :        162 :     const rtl::OUString& getPresetId() const { return maPresetId; }
      70                 :            : 
      71                 :            : private:
      72                 :            :     TransitionPreset( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
      73                 :            : 
      74                 :            :     sal_Int16 mnTransition;
      75                 :            :     sal_Int16 mnSubtype;
      76                 :            :     sal_Bool mbDirection;
      77                 :            :     sal_Int32 mnFadeColor;
      78                 :            :     rtl::OUString maPresetId;
      79                 :            :     rtl::OUString maUIName;
      80                 :            : 
      81                 :            :     static bool importTransitionsFile( TransitionPresetList& rList,
      82                 :            :                                        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
      83                 :            :                                        UStringMap& rTransitionNameMape,
      84                 :            :                                        String aFilaname );
      85                 :            : };
      86                 :            : 
      87                 :            : }
      88                 :            : 
      89                 :            : #endif // _SD_TRANSITIONPRESET_HXX
      90                 :            : 
      91                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10