2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-09-17 07:35:10 +00:00
|
|
|
|
2005-01-21 16:03:55 +00:00
|
|
|
// must be first
|
INTEGRATION: CWS presfixes12 (1.6.12); FILE MERGED
2007/02/06 17:18:06 thb 1.6.12.2: #i37778# Moved clear() method from View to ViewLayer (also sprites need to be cleared); fixed a few more cases of local code style violations; removed redundant inline keywords; finished Layer/LayerManager rework (Layer now represents ViewLayers, shapes and rendering are fully under LayerManager control); made shape comparator reusable
2007/01/29 14:02:01 thb 1.6.12.1: Issue number: #i37778#
Larger slideshow refactoring. Wrote design and coding style manifest,
and adapted the code to actually conform to this. In detail:
- cleaned up ownership/disposable/weak_ptr story. removed hacks and
explicit Disposable implementations, where workaround were available
- removed object mutices, where superfluous
- reworked EventMultiplexer (using templatized listener class now), added
more events. EventMultiplexer now serves as a true blackboard
- reworked directory structure: disjunct parts are now physically separated
into directories, instantiation happens via factories & abstract interfaces
- added CursorManager, to make setting mouse cursor less hackish
- reworked DrawShape, to implement SeparateListener pattern
- reworked IntrinsicAnimationActivity, to avoid cyclic references
- modified hyperlink & shape cursor handling to communicate via
EventMultiplexer
- renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx,
etc.)
- added first version of the z-order fix to layer/layermanager
- cleaned up include guards and include syntax
2007-07-17 13:48:11 +00:00
|
|
|
#include <canvas/debug.hxx>
|
|
|
|
#include <canvas/verbosetrace.hxx>
|
|
|
|
#include <com/sun/star/animations/AnimationTransformType.hpp>
|
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
#include "animationtransformnode.hxx"
|
|
|
|
#include "animationfactory.hxx"
|
|
|
|
#include "activitiesfactory.hxx"
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
using namespace com::sun::star;
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-12-13 14:31:17 +00:00
|
|
|
namespace slideshow {
|
2006-07-26 06:32:58 +00:00
|
|
|
namespace internal {
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
void AnimationTransformNode::dispose()
|
2005-01-21 16:03:55 +00:00
|
|
|
{
|
2006-07-26 06:32:58 +00:00
|
|
|
mxTransformNode.clear();
|
|
|
|
AnimationBaseNode::dispose();
|
|
|
|
}
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
AnimationActivitySharedPtr AnimationTransformNode::createActivity() const
|
|
|
|
{
|
|
|
|
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
const sal_Int16 nTransformType( mxTransformNode->getTransformType() );
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
const AttributableShapeSharedPtr& rShape( getShape() );
|
2005-01-21 16:03:55 +00:00
|
|
|
|
2006-07-26 06:32:58 +00:00
|
|
|
switch( nTransformType )
|
|
|
|
{
|
|
|
|
default:
|
2008-06-24 11:07:54 +00:00
|
|
|
ENSURE_OR_THROW(
|
2006-07-26 06:32:58 +00:00
|
|
|
false, "AnimationTransformNode::createTransformActivity(): "
|
|
|
|
"Unknown transform type" );
|
|
|
|
|
|
|
|
case animations::AnimationTransformType::TRANSLATE:
|
|
|
|
// FALLTHROUGH intended
|
|
|
|
case animations::AnimationTransformType::SCALE:
|
|
|
|
return ActivitiesFactory::createAnimateActivity(
|
|
|
|
aParms,
|
|
|
|
AnimationFactory::createPairPropertyAnimation(
|
|
|
|
rShape,
|
INTEGRATION: CWS presfixes12 (1.6.12); FILE MERGED
2007/02/06 17:18:06 thb 1.6.12.2: #i37778# Moved clear() method from View to ViewLayer (also sprites need to be cleared); fixed a few more cases of local code style violations; removed redundant inline keywords; finished Layer/LayerManager rework (Layer now represents ViewLayers, shapes and rendering are fully under LayerManager control); made shape comparator reusable
2007/01/29 14:02:01 thb 1.6.12.1: Issue number: #i37778#
Larger slideshow refactoring. Wrote design and coding style manifest,
and adapted the code to actually conform to this. In detail:
- cleaned up ownership/disposable/weak_ptr story. removed hacks and
explicit Disposable implementations, where workaround were available
- removed object mutices, where superfluous
- reworked EventMultiplexer (using templatized listener class now), added
more events. EventMultiplexer now serves as a true blackboard
- reworked directory structure: disjunct parts are now physically separated
into directories, instantiation happens via factories & abstract interfaces
- added CursorManager, to make setting mouse cursor less hackish
- reworked DrawShape, to implement SeparateListener pattern
- reworked IntrinsicAnimationActivity, to avoid cyclic references
- modified hyperlink & shape cursor handling to communicate via
EventMultiplexer
- renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx,
etc.)
- added first version of the z-order fix to layer/layermanager
- cleaned up include guards and include syntax
2007-07-17 13:48:11 +00:00
|
|
|
getContext().mpSubsettableShapeManager,
|
|
|
|
getSlideSize(),
|
2006-07-26 06:32:58 +00:00
|
|
|
nTransformType ),
|
|
|
|
getXAnimateNode() );
|
|
|
|
|
|
|
|
case animations::AnimationTransformType::ROTATE:
|
|
|
|
return ActivitiesFactory::createAnimateActivity(
|
|
|
|
aParms,
|
|
|
|
AnimationFactory::createNumberPropertyAnimation(
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString("Rotate"),
|
2006-07-26 06:32:58 +00:00
|
|
|
rShape,
|
INTEGRATION: CWS presfixes12 (1.6.12); FILE MERGED
2007/02/06 17:18:06 thb 1.6.12.2: #i37778# Moved clear() method from View to ViewLayer (also sprites need to be cleared); fixed a few more cases of local code style violations; removed redundant inline keywords; finished Layer/LayerManager rework (Layer now represents ViewLayers, shapes and rendering are fully under LayerManager control); made shape comparator reusable
2007/01/29 14:02:01 thb 1.6.12.1: Issue number: #i37778#
Larger slideshow refactoring. Wrote design and coding style manifest,
and adapted the code to actually conform to this. In detail:
- cleaned up ownership/disposable/weak_ptr story. removed hacks and
explicit Disposable implementations, where workaround were available
- removed object mutices, where superfluous
- reworked EventMultiplexer (using templatized listener class now), added
more events. EventMultiplexer now serves as a true blackboard
- reworked directory structure: disjunct parts are now physically separated
into directories, instantiation happens via factories & abstract interfaces
- added CursorManager, to make setting mouse cursor less hackish
- reworked DrawShape, to implement SeparateListener pattern
- reworked IntrinsicAnimationActivity, to avoid cyclic references
- modified hyperlink & shape cursor handling to communicate via
EventMultiplexer
- renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx,
etc.)
- added first version of the z-order fix to layer/layermanager
- cleaned up include guards and include syntax
2007-07-17 13:48:11 +00:00
|
|
|
getContext().mpSubsettableShapeManager,
|
|
|
|
getSlideSize() ),
|
2006-07-26 06:32:58 +00:00
|
|
|
getXAnimateNode() );
|
|
|
|
|
|
|
|
case animations::AnimationTransformType::SKEWX:
|
|
|
|
return ActivitiesFactory::createAnimateActivity(
|
|
|
|
aParms,
|
|
|
|
AnimationFactory::createNumberPropertyAnimation(
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString("SkewX"),
|
2006-07-26 06:32:58 +00:00
|
|
|
rShape,
|
INTEGRATION: CWS presfixes12 (1.6.12); FILE MERGED
2007/02/06 17:18:06 thb 1.6.12.2: #i37778# Moved clear() method from View to ViewLayer (also sprites need to be cleared); fixed a few more cases of local code style violations; removed redundant inline keywords; finished Layer/LayerManager rework (Layer now represents ViewLayers, shapes and rendering are fully under LayerManager control); made shape comparator reusable
2007/01/29 14:02:01 thb 1.6.12.1: Issue number: #i37778#
Larger slideshow refactoring. Wrote design and coding style manifest,
and adapted the code to actually conform to this. In detail:
- cleaned up ownership/disposable/weak_ptr story. removed hacks and
explicit Disposable implementations, where workaround were available
- removed object mutices, where superfluous
- reworked EventMultiplexer (using templatized listener class now), added
more events. EventMultiplexer now serves as a true blackboard
- reworked directory structure: disjunct parts are now physically separated
into directories, instantiation happens via factories & abstract interfaces
- added CursorManager, to make setting mouse cursor less hackish
- reworked DrawShape, to implement SeparateListener pattern
- reworked IntrinsicAnimationActivity, to avoid cyclic references
- modified hyperlink & shape cursor handling to communicate via
EventMultiplexer
- renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx,
etc.)
- added first version of the z-order fix to layer/layermanager
- cleaned up include guards and include syntax
2007-07-17 13:48:11 +00:00
|
|
|
getContext().mpSubsettableShapeManager,
|
|
|
|
getSlideSize() ),
|
2006-07-26 06:32:58 +00:00
|
|
|
getXAnimateNode() );
|
|
|
|
|
|
|
|
case animations::AnimationTransformType::SKEWY:
|
|
|
|
return ActivitiesFactory::createAnimateActivity(
|
|
|
|
aParms,
|
|
|
|
AnimationFactory::createNumberPropertyAnimation(
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString("SkewY"),
|
2006-07-26 06:32:58 +00:00
|
|
|
rShape,
|
INTEGRATION: CWS presfixes12 (1.6.12); FILE MERGED
2007/02/06 17:18:06 thb 1.6.12.2: #i37778# Moved clear() method from View to ViewLayer (also sprites need to be cleared); fixed a few more cases of local code style violations; removed redundant inline keywords; finished Layer/LayerManager rework (Layer now represents ViewLayers, shapes and rendering are fully under LayerManager control); made shape comparator reusable
2007/01/29 14:02:01 thb 1.6.12.1: Issue number: #i37778#
Larger slideshow refactoring. Wrote design and coding style manifest,
and adapted the code to actually conform to this. In detail:
- cleaned up ownership/disposable/weak_ptr story. removed hacks and
explicit Disposable implementations, where workaround were available
- removed object mutices, where superfluous
- reworked EventMultiplexer (using templatized listener class now), added
more events. EventMultiplexer now serves as a true blackboard
- reworked directory structure: disjunct parts are now physically separated
into directories, instantiation happens via factories & abstract interfaces
- added CursorManager, to make setting mouse cursor less hackish
- reworked DrawShape, to implement SeparateListener pattern
- reworked IntrinsicAnimationActivity, to avoid cyclic references
- modified hyperlink & shape cursor handling to communicate via
EventMultiplexer
- renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx,
etc.)
- added first version of the z-order fix to layer/layermanager
- cleaned up include guards and include syntax
2007-07-17 13:48:11 +00:00
|
|
|
getContext().mpSubsettableShapeManager,
|
|
|
|
getSlideSize() ),
|
2006-07-26 06:32:58 +00:00
|
|
|
getXAnimateNode() );
|
2005-01-21 16:03:55 +00:00
|
|
|
}
|
|
|
|
}
|
2006-07-26 06:32:58 +00:00
|
|
|
|
|
|
|
} // namespace internal
|
2006-12-13 14:31:17 +00:00
|
|
|
} // namespace slideshow
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|