summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/transitions
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/transitions')
-rw-r--r--slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx104
-rw-r--r--slideshow/source/engine/transitions/shapetransitionfactory.cxx10
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx2
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx35
4 files changed, 58 insertions, 93 deletions
diff --git a/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx b/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
index 2f190257902d..94ee99cecd48 100644
--- a/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
+++ b/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
@@ -61,61 +61,46 @@ namespace slideshow
switch (nType)
{
case BARWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BarWipePolyPolygon );
+ return std::make_shared<BarWipePolyPolygon>();
case BLINDSWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BarWipePolyPolygon( 6 ) );
+ return std::make_shared<BarWipePolyPolygon>( 6 );
case BOXWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BoxWipe( nSubType == LEFTCENTER ||
+ return std::make_shared<BoxWipe>( nSubType == LEFTCENTER ||
nSubType == TOPCENTER ||
nSubType == RIGHTCENTER||
- nSubType == BOTTOMCENTER ) );
+ nSubType == BOTTOMCENTER );
case FOURBOXWIPE:
- return ParametricPolyPolygonSharedPtr(
- new FourBoxWipe( nSubType == CORNERSOUT ) );
+ return std::make_shared<FourBoxWipe>( nSubType == CORNERSOUT );
case BARNDOORWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BarnDoorWipe );
+ return std::make_shared<BarnDoorWipe>();
case DIAGONALWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BarWipePolyPolygon );
+ return std::make_shared<BarWipePolyPolygon>();
case VEEWIPE:
- return ParametricPolyPolygonSharedPtr(
- new VeeWipe );
+ return std::make_shared<VeeWipe>();
case IRISWIPE:
- return ParametricPolyPolygonSharedPtr(
- new IrisWipe );
+ return std::make_shared<IrisWipe>();
case ELLIPSEWIPE:
- return ParametricPolyPolygonSharedPtr(
- new EllipseWipe(nSubType) );
+ return std::make_shared<EllipseWipe>(nSubType);
case CHECKERBOARDWIPE:
- return ParametricPolyPolygonSharedPtr(
- new CheckerBoardWipe );
+ return std::make_shared<CheckerBoardWipe>();
case RANDOMBARWIPE:
- return ParametricPolyPolygonSharedPtr(
- new RandomWipe( 128, true /* bars */ ) );
+ return std::make_shared<RandomWipe>( 128, true /* bars */ );
case DISSOLVE:
- return ParametricPolyPolygonSharedPtr(
- new RandomWipe( 16 * 16, // for now until dxcanvas is faster
+ return std::make_shared<RandomWipe>( 16 * 16, // for now until dxcanvas is faster
// 64 * 64 /* elements */,
- false /* dissolve */ ) );
+ false /* dissolve */ );
case WATERFALLWIPE:
- return ParametricPolyPolygonSharedPtr(
- new WaterfallWipe(
+ return std::make_shared<WaterfallWipe>(
128,
// flipOnYAxis:
nSubType == VERTICALRIGHT ||
- nSubType == HORIZONTALLEFT ) );
+ nSubType == HORIZONTALLEFT );
case CLOCKWIPE:
- return ParametricPolyPolygonSharedPtr(
- new ClockWipe );
+ return std::make_shared<ClockWipe>();
case FANWIPE:
- return ParametricPolyPolygonSharedPtr(
- new FanWipe( // center:
+ return std::make_shared<FanWipe>( // center:
nSubType == CENTERTOP ||
- nSubType == CENTERRIGHT ) );
+ nSubType == CENTERRIGHT );
case PINWHEELWIPE: {
sal_Int32 blades;
switch (nSubType) {
@@ -135,12 +120,10 @@ namespace slideshow
blades = 2;
break;
}
- return ParametricPolyPolygonSharedPtr(
- new PinWheelWipe( blades ) );
+ return std::make_shared<PinWheelWipe>( blades );
}
case SNAKEWIPE:
- return ParametricPolyPolygonSharedPtr(
- new SnakeWipe(
+ return std::make_shared<SnakeWipe>(
// elements:
8 * 8,
// diagonal:
@@ -152,10 +135,9 @@ namespace slideshow
nSubType == TOPLEFTVERTICAL ||
nSubType == TOPRIGHTDIAGONAL ||
nSubType == BOTTOMLEFTDIAGONAL
- ) );
+ );
case PARALLELSNAKESWIPE:
- return ParametricPolyPolygonSharedPtr(
- new ParallelSnakesWipe(
+ return std::make_shared<ParallelSnakesWipe>(
// elements:
8 * 8,
// diagonal:
@@ -172,28 +154,25 @@ namespace slideshow
nSubType == HORIZONTALTOPRIGHTOPPOSITE ||
nSubType == DIAGONALBOTTOMLEFTOPPOSITE ||
nSubType == DIAGONALTOPLEFTOPPOSITE
- ) );
+ );
case SPIRALWIPE:
- return ParametricPolyPolygonSharedPtr(
- new SpiralWipe(
+ return std::make_shared<SpiralWipe>(
// elements:
8 * 8,
// flipOnYAxis:
nSubType == TOPLEFTCOUNTERCLOCKWISE ||
nSubType == TOPRIGHTCOUNTERCLOCKWISE ||
nSubType == BOTTOMRIGHTCOUNTERCLOCKWISE ||
- nSubType == BOTTOMLEFTCOUNTERCLOCKWISE ) );
+ nSubType == BOTTOMLEFTCOUNTERCLOCKWISE );
case BOXSNAKESWIPE:
- return ParametricPolyPolygonSharedPtr(
- new BoxSnakesWipe(
+ return std::make_shared<BoxSnakesWipe>(
// elements:
8 * 8,
// fourBox:
nSubType == FOURBOXVERTICAL ||
- nSubType == FOURBOXHORIZONTAL ) );
+ nSubType == FOURBOXHORIZONTAL );
case SINGLESWEEPWIPE:
- return ParametricPolyPolygonSharedPtr(
- new SweepWipe(
+ return std::make_shared<SweepWipe>(
// center:
nSubType == CLOCKWISETOP ||
nSubType == CLOCKWISERIGHT ||
@@ -206,10 +185,9 @@ namespace slideshow
// flipOnYAxis:
nSubType == COUNTERCLOCKWISEBOTTOMLEFT ||
nSubType == COUNTERCLOCKWISETOPRIGHT
- ) );
+ );
case DOUBLESWEEPWIPE:
- return ParametricPolyPolygonSharedPtr(
- new SweepWipe(
+ return std::make_shared<SweepWipe>(
// center:
nSubType == PARALLELVERTICAL ||
nSubType == PARALLELDIAGONAL ||
@@ -221,17 +199,16 @@ namespace slideshow
nSubType == OPPOSITEVERTICAL ||
nSubType == OPPOSITEHORIZONTAL,
// flipOnYAxis:
- false ) );
+ false );
case DOUBLEFANWIPE:
- return ParametricPolyPolygonSharedPtr(
- new FanWipe(
+ return std::make_shared<FanWipe>(
//center:
true,
// single:
false,
// fanIn:
nSubType == FANINVERTICAL ||
- nSubType == FANINHORIZONTAL ) );
+ nSubType == FANINHORIZONTAL );
case TRIANGLEWIPE:
return ParametricPolyPolygonSharedPtr(
FigureWipe::createTriangleWipe() );
@@ -263,18 +240,16 @@ namespace slideshow
case MISCDIAGONALWIPE: {
switch (nSubType) {
case DOUBLEBARNDOOR:
- return ParametricPolyPolygonSharedPtr(
- new BarnDoorWipe( true /* doubled */ ) );
+ return std::make_shared<BarnDoorWipe>( true /* doubled */ );
case DOUBLEDIAMOND:
- return ParametricPolyPolygonSharedPtr(
- new DoubleDiamondWipe );
+ return std::make_shared<DoubleDiamondWipe>();
}
break;
}
case ZIGZAGWIPE:
- return ParametricPolyPolygonSharedPtr( new ZigZagWipe(5) );
+ return std::make_shared<ZigZagWipe>(5);
case BARNZIGZAGWIPE:
- return ParametricPolyPolygonSharedPtr( new BarnZigZagWipe(5) );
+ return std::make_shared<BarnZigZagWipe>(5);
case BOWTIEWIPE:
case BARNVEEWIPE:
@@ -284,8 +259,7 @@ namespace slideshow
case SALOONDOORWIPE:
case WINDSHIELDWIPE:
// for now, map to barwipe transition
- return ParametricPolyPolygonSharedPtr(
- new BarWipePolyPolygon );
+ return std::make_shared<BarWipePolyPolygon>();
default:
case PUSHWIPE:
diff --git a/slideshow/source/engine/transitions/shapetransitionfactory.cxx b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
index 666ce116b6be..ce4da4cb1611 100644
--- a/slideshow/source/engine/transitions/shapetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
@@ -219,13 +219,12 @@ AnimationActivitySharedPtr createShapeTransitionByType(
// create a clip activity from that
pGeneratedActivity = ActivitiesFactory::createSimpleActivity(
rParms,
- NumberAnimationSharedPtr(
- new ClippingAnimation(
+ std::make_shared<ClippingAnimation>(
pPoly,
rShapeManager,
*pTransitionInfo,
xTransition->getDirection(),
- xTransition->getMode() ) ),
+ xTransition->getMode() ),
true );
}
break;
@@ -302,14 +301,13 @@ AnimationActivitySharedPtr createShapeTransitionByType(
// create a clip activity from that
pGeneratedActivity = ActivitiesFactory::createSimpleActivity(
rParms,
- NumberAnimationSharedPtr(
- new ClippingAnimation(
+ std::make_shared<ClippingAnimation>(
pPoly,
rShapeManager,
*getTransitionInfo( animations::TransitionType::BARWIPE,
nBarWipeSubType ),
bDirectionForward,
- xTransition->getMode() ) ),
+ xTransition->getMode() ),
true );
}
break;
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index 6c53690017cc..e0ef0b060b1f 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -125,7 +125,7 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr&
slideSizePixel.getY() ),
0x000000FFU );
- pRet.reset( new SlideBitmap( pBitmap ));
+ pRet = std::make_shared<SlideBitmap>( pBitmap );
}
else
{
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 30724effa283..52b2bdc0b105 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -730,27 +730,25 @@ NumberAnimationSharedPtr createPushWipeTransition(
if( bComb )
{
- return NumberAnimationSharedPtr(
- new CombTransition( leavingSlide,
+ return std::make_shared<CombTransition>( leavingSlide,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
aDirection,
- 24 /* comb with 12 stripes */ ));
+ 24 /* comb with 12 stripes */ );
}
else
{
- return NumberAnimationSharedPtr(
- new MovingSlideChange( leavingSlide,
+ return std::make_shared<MovingSlideChange>( leavingSlide,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
aDirection,
- aDirection ));
+ aDirection );
}
}
@@ -816,8 +814,7 @@ NumberAnimationSharedPtr createSlideWipeTransition(
// the 'leaving' slide.
- return NumberAnimationSharedPtr(
- new MovingSlideChange(
+ return std::make_shared<MovingSlideChange>(
o3tl::optional<SlideSharedPtr>() /* no slide */,
pEnteringSlide,
pSoundPlayer,
@@ -825,7 +822,7 @@ NumberAnimationSharedPtr createSlideWipeTransition(
rScreenUpdater,
rEventMultiplexer,
basegfx::B2DVector(),
- aInDirection ));
+ aInDirection );
}
else
{
@@ -834,15 +831,14 @@ NumberAnimationSharedPtr createSlideWipeTransition(
// and the old one is moving off in the foreground.
- return NumberAnimationSharedPtr(
- new MovingSlideChange( leavingSlide,
+ return std::make_shared<MovingSlideChange>( leavingSlide,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
aInDirection,
- basegfx::B2DVector() ));
+ basegfx::B2DVector() );
}
}
@@ -953,15 +949,14 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
nTransitionType, nTransitionSubType ) );
// create a clip transition from that
- return NumberAnimationSharedPtr(
- new ClippedSlideChange( pEnteringSlide,
+ return std::make_shared<ClippedSlideChange>( pEnteringSlide,
pPoly,
*pTransitionInfo,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
bTransitionDirection,
- pSoundPlayer ));
+ pSoundPlayer );
}
case TransitionInfo::TRANSITION_SPECIAL:
@@ -1070,25 +1065,23 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
}
if( nTransitionType == animations::TransitionType::FADE )
- return NumberAnimationSharedPtr(
- new FadingSlideChange(
+ return std::make_shared<FadingSlideChange>(
leavingSlide,
pEnteringSlide,
aFadeColor,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
- rEventMultiplexer ));
+ rEventMultiplexer );
else
- return NumberAnimationSharedPtr(
- new CutSlideChange(
+ return std::make_shared<CutSlideChange>(
leavingSlide,
pEnteringSlide,
rTransitionFadeColor,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
- rEventMultiplexer ));
+ rEventMultiplexer );
}
}
}