1 --- sd/source/filter/ppt/pptin.cxx
2 +++ sd/source/filter/ppt/pptin.cxx
3 @@ -1638,7 +1638,11 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
5 pPage->SetFadeEffect( ::com::sun::star::presentation::FadeEffect_NONE ); // Direkt
6 else if ( nDirection == 1 )
7 - pPage->SetFadeEffect( ::com::sun::star::presentation::FadeEffect_NONE ); // Direkt ueber Schwarz
9 + pPage->setTransitionType( animations::TransitionType::BARWIPE );
10 + pPage->setTransitionSubtype( animations::TransitionSubType::FADEOVERCOLOR );
11 + pPage->setTransitionFadeColor( 0 );
15 pPage->setTransitionType( 0 );
16 diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
17 index 854467b..ec23e29 100644
18 --- slideshow/source/engine/transitions/slidetransitionfactory.cxx
19 +++ slideshow/source/engine/transitions/slidetransitionfactory.cxx
20 @@ -349,6 +349,89 @@ void FadingSlideChange::performOut(
24 +class CutSlideChange : public SlideChangeBase
27 + /** Create a new SlideChanger, for the given leaving and
28 + entering slides, which applies a cut effect.
31 + boost::optional<SlideSharedPtr> const & leavingSlide,
32 + const SlideSharedPtr& pEnteringSlide,
33 + const RGBColor& rFadeColor,
34 + const SoundPlayerSharedPtr& pSoundPlayer,
35 + const UnoViewContainer& rViewContainer,
36 + ScreenUpdater& rScreenUpdater,
37 + EventMultiplexer& rEventMultiplexer )
38 + : SlideChangeBase( leavingSlide,
43 + rEventMultiplexer ),
44 + maFadeColor( rFadeColor ),
48 + virtual void performIn(
49 + const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
50 + const ViewEntry& rViewEntry,
51 + const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
54 + virtual void performOut(
55 + const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
56 + const ViewEntry& rViewEntry,
57 + const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
61 + RGBColor maFadeColor;
65 +void CutSlideChange::performIn(
66 + const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
67 + const ViewEntry& /*rViewEntry*/,
68 + const ::cppcanvas::CanvasSharedPtr& /*rDestinationCanvas*/,
73 + "CutSlideChange::performIn(): Invalid sprite" );
75 + // After 2/3rd of the active time, display new slide
76 + rSprite->setAlpha( t > 2/3.0 ? 1.0 : 0.0 );
79 +void CutSlideChange::performOut(
80 + const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
81 + const ViewEntry& rViewEntry,
82 + const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
87 + "CutSlideChange::performOut(): Invalid sprite" );
90 + "FadingSlideChange::performOut(): Invalid dest canvas" );
94 + mbFirstTurn = false;
96 + // clear page to given fade color. 'Leaving' slide is
97 + // painted atop of that
98 + fillPage( rDestinationCanvas,
99 + getEnteringSlideSizePixel( rViewEntry.mpView ),
103 + // Until 1/3rd of the active time, display old slide.
104 + rSprite->setAlpha( t > 1/3.0 ? 0.0 : 1.0 );
107 class MovingSlideChange : public SlideChangeBase
109 /// Direction vector for leaving slide,
110 @@ -883,6 +966,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
114 + case animations::TransitionType::BARWIPE:
115 case animations::TransitionType::FADE:
118 @@ -914,16 +998,27 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
119 "SlideTransitionFactory::createSlideTransition(): Unknown FADE subtype" );
122 - return NumberAnimationSharedPtr(
123 - new FadingSlideChange(
126 - comphelper::make_optional(
127 - rTransitionFadeColor),
131 - rEventMultiplexer ));
132 + if( nTransitionType == animations::TransitionType::FADE )
133 + return NumberAnimationSharedPtr(
134 + new FadingSlideChange(
137 + comphelper::make_optional(
138 + rTransitionFadeColor),
142 + rEventMultiplexer ));
144 + return NumberAnimationSharedPtr(
145 + new CutSlideChange(
148 + rTransitionFadeColor,
152 + rEventMultiplexer ));
156 diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx b/slideshow/source/engine/transitions/transitionfactorytab.cxx
157 index d5be3d2..ed3f7dd 100644
158 --- slideshow/source/engine/transitions/transitionfactorytab.cxx
159 +++ slideshow/source/engine/transitions/transitionfactorytab.cxx
160 @@ -2018,6 +2018,20 @@ static const TransitionInfo lcl_transitionInfo[] =
161 true, // 'out' by parameter sweep inversion
162 false // scale isotrophically to target size
164 + // this is the cut through black fade (does not fade, but does a
167 + animations::TransitionType::BARWIPE,
168 + animations::TransitionSubType::FADEOVERCOLOR,
169 + TransitionInfo::TRANSITION_SPECIAL,
170 + // TODO(F2): Setup parameters
171 + 0.0, // no rotation
174 + TransitionInfo::REVERSEMETHOD_IGNORE,
175 + true, // 'out' by parameter sweep inversion
176 + false // scale isotrophically to target size
180 // mapped to RandomWipe:
182 --- sd/xml/transitions.orig 2008-08-18 15:59:32.000000000 +0200
183 +++ sd/xml/transitions.xml 2008-08-18 16:23:48.000000000 +0200
185 <anim:par pres:preset-id="fade-through-black">
186 <anim:transitionFilter smil:type="fade" smil:subtype="fadeOverColor" smil:fadeColor="#000000"/>
188 + <anim:par pres:preset-id="cut-through-black">
189 + <anim:transitionFilter smil:type="barWipe" smil:subtype="fadeOverColor" smil:fadeColor="#000000"/>
191 <anim:par pres:preset-id="cover-down">
192 <anim:transitionFilter smil:type="slideWipe" smil:subtype="fromTop"/>