LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sd/inc - TransitionPreset.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 7 42.9 %
Date: 2013-07-09 Functions: 3 7 42.9 %
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             : #ifndef _SD_TRANSITIONPRESET_HXX
      21             : #define _SD_TRANSITIONPRESET_HXX
      22             : 
      23             : #include <boost/shared_ptr.hpp>
      24             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      25             : 
      26             : #include <comphelper/stl_types.hxx>
      27             : 
      28             : #include <list>
      29             : #include <boost/unordered_map.hpp>
      30             : 
      31             : namespace com { namespace sun { namespace star {
      32             :     namespace animations { class XAnimationNode; }
      33             :     namespace uno { template<class X> class Reference; }
      34             : } } }
      35             : 
      36             : class SdPage;
      37             : class String;
      38             : 
      39             : namespace sd {
      40             : 
      41             : class TransitionPreset;
      42             : typedef boost::shared_ptr< TransitionPreset > TransitionPresetPtr;
      43             : typedef std::list< TransitionPresetPtr > TransitionPresetList;
      44             : typedef boost::unordered_map< OUString, OUString, OUStringHash, comphelper::UStringEqual > UStringMap;
      45             : 
      46          81 : class TransitionPreset
      47             : {
      48             : public:
      49             :     static const TransitionPresetList& getTransitionPresetList();
      50             :     static bool importTransitionPresetList( TransitionPresetList& rList );
      51             : 
      52             :     void apply( SdPage* pSlide ) const;
      53             : 
      54         162 :     sal_Int16 getTransition() const { return mnTransition; }
      55           0 :     sal_Int16 getSubtype() const { return mnSubtype; }
      56           0 :     sal_Bool getDirection() const { return mbDirection; }
      57           0 :     sal_Int32 getFadeColor() const { return mnFadeColor; }
      58             : 
      59           0 :     const OUString& getUIName() const { return maUIName; }
      60          81 :     const OUString& getPresetId() const { return maPresetId; }
      61             : 
      62             : private:
      63             :     TransitionPreset( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
      64             : 
      65             :     sal_Int16 mnTransition;
      66             :     sal_Int16 mnSubtype;
      67             :     sal_Bool mbDirection;
      68             :     sal_Int32 mnFadeColor;
      69             :     OUString maPresetId;
      70             :     OUString maUIName;
      71             : 
      72             :     static bool importTransitionsFile( TransitionPresetList& rList,
      73             :                                        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
      74             :                                        UStringMap& rTransitionNameMape,
      75             :                                        String aFilaname );
      76             : };
      77             : 
      78             : }
      79             : 
      80             : #endif // _SD_TRANSITIONPRESET_HXX
      81             : 
      82             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10