summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/transitions/slidetransitionfactory.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:16 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:16 +0200
commit0553d10867217e30a86c88c17ccb15a06030ce07 (patch)
tree4d85a5a78ea132f8fd53b26ce93e94ae30dad1f9 /slideshow/source/engine/transitions/slidetransitionfactory.cxx
parentd0ac8f1e7866c637be15f081b59ef456aacb954a (diff)
recreated tag OOO_BUILD_3_2_98_1 which had these commits:
commit c0de36f21ef8f0afd7667f53a5d97dbc264a1cfb (tag: refs/tags/OOO_BUILD_3_2_98_1) Author: Petr Mladek <pmladek@walk.suse.cz> Date: Wed Sep 15 19:03:26 2010 +0200 Release ooo-build-3.2.98.1, tag OOO_BUILD_3_2_98_1 (3.3-alpha1) commit e31a45314a5a2f1e7e2bbea4a2bb6eca7beb7962 Merge: 7234327 29a7259 Author: Jan Holesovsky <kendy@suse.cz> Date: Wed Sep 8 11:34:03 2010 +0200 Merge commit 'ooo/OOO330_m7' commit 29a72592b0046498a30e87a7beedae4d29161f9b (tag: refs/tags/ooo/OOO330_m7) Merge: 10146e0 6b04480 Author: Kurt Zenker <kz@openoffice.org> Date: Tue Aug 31 15:10:03 2010 +0200 CWS-TOOLING: integrate CWS impress197 commit 6b04480dd88a5bd048d12874dc8c07630670c239 Author: sj <sj@openoffice.org> Date: Mon Aug 9 14:11:58 2010 +0200 impress197: #163250# fixed string handling, improved polygon splitting sd/source/filter/ppt/propread.cxx | 128 ++++++++++++++++++++++++------------- 1 files changed, 83 insertions(+), 45 deletions(-) commit a37d85f979d1616b158c918762821ed82b1e0691 Merge: 1380a03 d766efe Author: Christian Lippka <christian.lippka@sun.com> Date: Fri Aug 6 14:53:07 2010 +0200 merge commit 1380a03aaf7464643eb99de1488ab5b372663ccd Author: Christian Lippka <christian.lippka@sun.com> Date: Wed Aug 4 10:48:35 2010 +0200 #i113603# only change layout shape size on init or of user call is set sd/source/core/sdpage.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d766efe9f601a65cd22b46e0f4131d9acd74b1a8 Author: Andre Fischer<andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com> Date: Thu Jan 1 00:00:00 1970 +0000 impress197: #i112420# Create accessibility object of ToolPanelViewShell in constructor. sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 17 +++++++++++++++-- sd/source/ui/view/sdwindow.cxx | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-)
Notes
Notes: split repo tag: impress_OOO_BUILD_3_2_98_1
Diffstat (limited to 'slideshow/source/engine/transitions/slidetransitionfactory.cxx')
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx170
1 files changed, 85 insertions, 85 deletions
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index ab1ad816d3f6..28636b2fe49f 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,7 +84,7 @@ void fillPage( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
const ::cppcanvas::CanvasSharedPtr pDevicePixelCanvas(
rDestinationCanvas->clone() );
pDevicePixelCanvas->setTransformation( ::basegfx::B2DHomMatrix() );
-
+
// TODO(F2): Properly respect clip here.
// Might have to be transformed, too.
const ::basegfx::B2DHomMatrix aViewTransform(
@@ -138,7 +138,7 @@ public:
ScreenUpdater& rScreenUpdater,
const uno::Reference<
presentation::XTransitionFactory>& xFactory,
- const SoundPlayerSharedPtr& pSoundPlayer,
+ const SoundPlayerSharedPtr& pSoundPlayer,
EventMultiplexer& rEventMultiplexer) :
SlideChangeBase( leavingSlide_,
pEnteringSlide,
@@ -184,7 +184,7 @@ public:
bool addTransition( const UnoViewSharedPtr& rView )
{
uno::Reference<presentation::XTransition> rTransition = mxFactory->createTransition(
- mnTransitionType,
+ mnTransitionType,
mnTransitionSubType,
rView->getUnoView(),
getLeavingBitmap(ViewEntry(rView))->getXBitmap(),
@@ -197,7 +197,7 @@ public:
return true;
}
-
+
virtual bool operator()( double t )
{
std::for_each(maTransitions.begin(),
@@ -294,7 +294,7 @@ public:
}
}
-private:
+private:
// One transition object per view
std::vector< TransitionViewPair* > maTransitions;
@@ -337,19 +337,19 @@ public:
bDirectionForward,
true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
private:
ClippingFunctor maClippingFunctor;
};
@@ -365,8 +365,8 @@ void ClippedSlideChange::performIn(
// that, getEnteringSizePixel() _guarantees_ to cover the whole
// slide bitmap. There's a catch, though: this removes any effect
// of the view transformation (e.g. rotation) from the transition.
- rSprite->setClipPixel(
- maClippingFunctor( t,
+ rSprite->setClipPixel(
+ maClippingFunctor( t,
getEnteringSlideSizePixel(rViewEntry.mpView) ) );
}
@@ -403,19 +403,19 @@ public:
maFadeColor( rFadeColor ),
mbFirstTurn( true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
private:
const boost::optional< RGBColor > maFadeColor;
bool mbFirstTurn;
@@ -430,7 +430,7 @@ void FadingSlideChange::performIn(
ENSURE_OR_THROW(
rSprite,
"FadingSlideChange::performIn(): Invalid sprite" );
-
+
if( maFadeColor )
// After half of the active time, fade in new slide
rSprite->setAlpha( t > 0.5 ? 2.0*(t-0.5) : 0.0 );
@@ -451,21 +451,21 @@ void FadingSlideChange::performOut(
ENSURE_OR_THROW(
rDestinationCanvas,
"FadingSlideChange::performOut(): Invalid dest canvas" );
-
+
// only needed for color fades
if( maFadeColor )
{
if( mbFirstTurn )
{
mbFirstTurn = false;
-
+
// clear page to given fade color. 'Leaving' slide is
// painted atop of that, but slowly fading out.
fillPage( rDestinationCanvas,
getEnteringSlideSizePixel( rViewEntry.mpView ),
*maFadeColor );
}
-
+
// Until half of the active time, fade out old
// slide. After half of the active time, old slide
// will be invisible.
@@ -477,23 +477,23 @@ class MovingSlideChange : public SlideChangeBase
{
/// Direction vector for leaving slide,
const ::basegfx::B2DVector maLeavingDirection;
-
+
/// Direction vector for entering slide,
const ::basegfx::B2DVector maEnteringDirection;
-
+
bool mbFirstPerformCall;
-
+
public:
/** Create a new SlideChanger, for the given entering slide
bitmaps, which performes a moving slide change effect
-
+
@param rLeavingDirection
Direction vector. The move is performed along this
direction vector, starting at a position where the leaving
slide is fully visible, and ending at a position where the
leaving slide is just not visible. The vector must have
unit length.
-
+
@param rEnteringDirection
Direction vector. The move is performed along this
direction vector, starting at a position where the
@@ -527,13 +527,13 @@ public:
maEnteringDirection( rEnteringDirection ),
mbFirstPerformCall( true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
@@ -548,20 +548,20 @@ void MovingSlideChange::performIn(
double t )
{
// intro sprite moves:
-
+
ENSURE_OR_THROW(
rSprite,
"MovingSlideChange::performIn(): Invalid sprite" );
ENSURE_OR_THROW(
rDestinationCanvas,
"MovingSlideChange::performIn(): Invalid dest canvas" );
-
- if (mbFirstPerformCall && maLeavingDirection.equalZero())
+
+ if (mbFirstPerformCall && maLeavingDirection.equalZero())
{
mbFirstPerformCall = false;
renderBitmap( getLeavingBitmap(rViewEntry), rDestinationCanvas );
}
-
+
// TODO(F1): This does not account for non-translational
// transformations! If the canvas is rotated, we still
// move the sprite unrotated (which might or might not
@@ -570,12 +570,12 @@ void MovingSlideChange::performIn(
rDestinationCanvas->getTransformation() );
const basegfx::B2DPoint aPageOrigin(
aViewTransform * basegfx::B2DPoint() );
-
+
// move sprite
rSprite->movePixel(
aPageOrigin +
- ((t - 1.0) *
- ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
+ ((t - 1.0) *
+ ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
maEnteringDirection) );
}
@@ -586,20 +586,20 @@ void MovingSlideChange::performOut(
double t )
{
// outro sprite moves:
-
+
ENSURE_OR_THROW(
rSprite,
"MovingSlideChange::performOut(): Invalid sprite" );
ENSURE_OR_THROW(
rDestinationCanvas,
"MovingSlideChange::performOut(): Invalid dest canvas" );
-
- if (mbFirstPerformCall && maEnteringDirection.equalZero())
+
+ if (mbFirstPerformCall && maEnteringDirection.equalZero())
{
mbFirstPerformCall = false;
renderBitmap( getEnteringBitmap(rViewEntry), rDestinationCanvas );
}
-
+
// TODO(F1): This does not account for non-translational
// transformations! If the canvas is rotated, we still
// move the sprite unrotated (which might or might not
@@ -608,11 +608,11 @@ void MovingSlideChange::performOut(
rDestinationCanvas->getTransformation() );
const basegfx::B2DPoint aPageOrigin(
aViewTransform * basegfx::B2DPoint() );
-
+
// move sprite
rSprite->movePixel(
- aPageOrigin + (t *
- ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
+ aPageOrigin + (t *
+ ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
maLeavingDirection) );
}
@@ -638,7 +638,7 @@ NumberAnimationSharedPtr createPushWipeTransition(
// wipes.
leavingSlide = leavingSlide_;
}
-
+
// setup direction vector
bool bComb( false );
::basegfx::B2DVector aDirection;
@@ -646,55 +646,55 @@ NumberAnimationSharedPtr createPushWipeTransition(
{
default:
OSL_ENSURE(
- false,
+ false,
"createPushWipeTransition(): Unexpected transition "
"subtype for animations::TransitionType::PUSHWIPE "
"transitions" );
return NumberAnimationSharedPtr();
-
+
case animations::TransitionSubType::FROMTOP:
aDirection = ::basegfx::B2DVector( 0.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOM:
aDirection = ::basegfx::B2DVector( 0.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMLEFT:
aDirection = ::basegfx::B2DVector( 1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMLEFT:
aDirection = ::basegfx::B2DVector( 1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPLEFT:
aDirection = ::basegfx::B2DVector( 1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::COMBHORIZONTAL:
aDirection = ::basegfx::B2DVector( 1.0, 0.0 );
bComb = true;
break;
-
+
case animations::TransitionSubType::COMBVERTICAL:
aDirection = ::basegfx::B2DVector( 0.0, 1.0 );
bComb = true;
break;
}
-
+
if( bComb )
{
return NumberAnimationSharedPtr(
@@ -704,19 +704,19 @@ NumberAnimationSharedPtr createPushWipeTransition(
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
- aDirection,
+ aDirection,
24 /* comb with 12 stripes */ ));
}
else
{
- return NumberAnimationSharedPtr(
+ return NumberAnimationSharedPtr(
new MovingSlideChange( leavingSlide,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
- aDirection,
+ aDirection,
aDirection ));
}
}
@@ -738,53 +738,53 @@ NumberAnimationSharedPtr createSlideWipeTransition(
{
default:
OSL_ENSURE(
- false,
+ false,
"createSlideWipeTransition(): Unexpected transition "
"subtype for animations::TransitionType::SLIDEWIPE "
"transitions" );
return NumberAnimationSharedPtr();
-
+
case animations::TransitionSubType::FROMTOP:
aInDirection = ::basegfx::B2DVector( 0.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOM:
aInDirection = ::basegfx::B2DVector( 0.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, 1.0 );
break;
}
-
+
if( bTransitionDirection )
{
// normal, 'forward' slide wipe effect. Since the old
// content is still on screen (and does not move), we omit
// the 'leaving' slide.
// =======================================================
-
- return NumberAnimationSharedPtr(
+
+ return NumberAnimationSharedPtr(
new MovingSlideChange(
boost::optional<SlideSharedPtr>() /* no slide */,
pEnteringSlide,
@@ -801,8 +801,8 @@ NumberAnimationSharedPtr createSlideWipeTransition(
// means, that the new slide is in the back, statically,
// and the old one is moving off in the foreground.
// =======================================================
-
- return NumberAnimationSharedPtr(
+
+ return NumberAnimationSharedPtr(
new MovingSlideChange( leavingSlide,
pEnteringSlide,
pSoundPlayer,
@@ -823,10 +823,10 @@ NumberAnimationSharedPtr createPluginTransition(
ScreenUpdater& rScreenUpdater,
const uno::Reference<
presentation::XTransitionFactory>& xFactory,
- const SoundPlayerSharedPtr& pSoundPlayer,
+ const SoundPlayerSharedPtr& pSoundPlayer,
EventMultiplexer& rEventMultiplexer)
{
- PluginSlideChange* pTransition =
+ PluginSlideChange* pTransition =
new PluginSlideChange(
nTransitionType,
nTransitionSubType,
@@ -872,12 +872,12 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
}
return NumberAnimationSharedPtr();
}
-
+
ENSURE_OR_THROW(
pEnteringSlide,
"TransitionFactory::createSlideTransition(): Invalid entering slide" );
-
- if( xOptionalFactory.is() &&
+
+ if( xOptionalFactory.is() &&
xOptionalFactory->hasTransition(nTransitionType, nTransitionSubType) )
{
// #i82460# - optional plugin factory claims this transition. delegate.
@@ -897,7 +897,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
return pTransition;
}
- const TransitionInfo* pTransitionInfo(
+ const TransitionInfo* pTransitionInfo(
getTransitionInfo( nTransitionType, nTransitionSubType ) );
if( pTransitionInfo != NULL )
@@ -913,12 +913,12 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
nTransitionSubType );
return NumberAnimationSharedPtr();
-
+
case TransitionInfo::TRANSITION_CLIP_POLYPOLYGON:
{
// generate parametric poly-polygon
- ParametricPolyPolygonSharedPtr pPoly(
- ParametricPolyPolygonFactory::createClipPolyPolygon(
+ ParametricPolyPolygonSharedPtr pPoly(
+ ParametricPolyPolygonFactory::createClipPolyPolygon(
nTransitionType, nTransitionSubType ) );
// create a clip transition from that
@@ -932,14 +932,14 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
bTransitionDirection,
pSoundPlayer ));
}
-
+
case TransitionInfo::TRANSITION_SPECIAL:
{
switch( nTransitionType )
{
default:
OSL_ENSURE(
- false,
+ false,
"TransitionFactory::createSlideTransition(): "
"Unexpected transition type for "
"TRANSITION_SPECIAL transitions" );
@@ -952,7 +952,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
const TransitionInfo* pRandomTransitionInfo(
getRandomTransitionInfo() );
-
+
ENSURE_OR_THROW(
pRandomTransitionInfo != NULL,
"TransitionFactory::createSlideTransition(): "
@@ -1038,7 +1038,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
"SlideTransitionFactory::createSlideTransition(): Unknown FADE subtype" );
}
- return NumberAnimationSharedPtr(
+ return NumberAnimationSharedPtr(
new FadingSlideChange(
leavingSlide,
pEnteringSlide,
@@ -1054,8 +1054,8 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
break;
}
}
-
- // No animation generated, maybe no table entry for given
+
+ // No animation generated, maybe no table entry for given
// transition?
OSL_TRACE(
"TransitionFactory::createSlideTransition(): "
@@ -1066,7 +1066,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
false,
"TransitionFactory::createSlideTransition(): "
"Unknown type/subtype combination encountered" );
-
+
return NumberAnimationSharedPtr();
}