LCOV - code coverage report
Current view: top level - slideshow/source/engine/animationnodes - animationtransformnode.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 23 0.0 %
Date: 2014-11-03 Functions: 0 2 0.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             : // must be first
      22             : #include <canvas/debug.hxx>
      23             : #include <canvas/verbosetrace.hxx>
      24             : #include <com/sun/star/animations/AnimationTransformType.hpp>
      25             : 
      26             : #include "animationtransformnode.hxx"
      27             : #include "animationfactory.hxx"
      28             : #include "activitiesfactory.hxx"
      29             : 
      30             : using namespace com::sun::star;
      31             : 
      32             : namespace slideshow {
      33             : namespace internal {
      34             : 
      35           0 : void AnimationTransformNode::dispose()
      36             : {
      37           0 :     mxTransformNode.clear();
      38           0 :     AnimationBaseNode::dispose();
      39           0 : }
      40             : 
      41           0 : AnimationActivitySharedPtr AnimationTransformNode::createActivity() const
      42             : {
      43           0 :     ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
      44             : 
      45           0 :     const sal_Int16 nTransformType( mxTransformNode->getTransformType() );
      46             : 
      47           0 :     const AttributableShapeSharedPtr& rShape( getShape() );
      48             : 
      49           0 :     switch( nTransformType )
      50             :     {
      51             :     default:
      52           0 :         ENSURE_OR_THROW(
      53             :             false, "AnimationTransformNode::createTransformActivity(): "
      54             :             "Unknown transform type" );
      55             : 
      56             :     case animations::AnimationTransformType::TRANSLATE:
      57             :         // FALLTHROUGH intended
      58             :     case animations::AnimationTransformType::SCALE:
      59             :         return ActivitiesFactory::createAnimateActivity(
      60             :             aParms,
      61             :             AnimationFactory::createPairPropertyAnimation(
      62             :                 rShape,
      63           0 :                 getContext().mpSubsettableShapeManager,
      64           0 :                 getSlideSize(),
      65             :                 nTransformType ),
      66           0 :             getXAnimateNode() );
      67             : 
      68             :     case animations::AnimationTransformType::ROTATE:
      69             :         return ActivitiesFactory::createAnimateActivity(
      70             :             aParms,
      71             :             AnimationFactory::createNumberPropertyAnimation(
      72             :                 OUString("Rotate"),
      73             :                 rShape,
      74           0 :                 getContext().mpSubsettableShapeManager,
      75           0 :                 getSlideSize() ),
      76           0 :             getXAnimateNode() );
      77             : 
      78             :     case animations::AnimationTransformType::SKEWX:
      79             :         return ActivitiesFactory::createAnimateActivity(
      80             :             aParms,
      81             :             AnimationFactory::createNumberPropertyAnimation(
      82             :                 OUString("SkewX"),
      83             :                 rShape,
      84           0 :                 getContext().mpSubsettableShapeManager,
      85           0 :                 getSlideSize() ),
      86           0 :             getXAnimateNode() );
      87             : 
      88             :     case animations::AnimationTransformType::SKEWY:
      89             :         return ActivitiesFactory::createAnimateActivity(
      90             :             aParms,
      91             :             AnimationFactory::createNumberPropertyAnimation(
      92             :                 OUString("SkewY"),
      93             :                 rShape,
      94           0 :                 getContext().mpSubsettableShapeManager,
      95           0 :                 getSlideSize() ),
      96           0 :             getXAnimateNode() );
      97           0 :     }
      98             : }
      99             : 
     100             : } // namespace internal
     101             : } // namespace slideshow
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10