ooo-build r13462 - in trunk: . patches/dev300



Author: thorstenb
Date: Sat Aug  2 00:46:36 2008
New Revision: 13462
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13462&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/slideshow-cutblack.diff:
    * patches/dev300/transogl-transitions-newsflash.diff:
    Added two new transitions (and changed the ppt import plumbing to
    actually use them) for cut through black and newsflash effect.



Added:
   trunk/patches/dev300/slideshow-cutblack.diff
   trunk/patches/dev300/transogl-transitions-newsflash.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Sat Aug  2 00:46:36 2008
@@ -1923,6 +1923,7 @@
 transogl-shader-transitions-1.diff
 transogl-dispose-fix.diff
 transogl-sync-fix.diff
+transogl-transitions-newsflash.diff, thorsten
 
 [ OpenGLTransitions ]
 transogl-detect-fix.diff
@@ -2710,6 +2711,7 @@
 vcl-gtk-slideshow-crash.diff, i#91496, thorsten
 cairocanvas-colorspace-fix.diff, thorsten
 slideshow-colorspace-fix.diff, thorsten
+slideshow-cutblack.diff, thorsten
 
 sw-source-filter-ww8-continous-section-break-fix.diff, n#405071, i#91395, fridrich
 

Added: trunk/patches/dev300/slideshow-cutblack.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/slideshow-cutblack.diff	Sat Aug  2 00:46:36 2008
@@ -0,0 +1,187 @@
+ sd/source/filter/pptin.cxx                         |    6 +
+ .../engine/transitions/slidetransitionfactory.cxx  |  115 +++++++++++++++++++++--
+ .../engine/transitions/transitionfactorytab.cxx    |   14 +++
+ 3 files changed, 124 insertions(+), 11 deletions(-)
+
+diff --git a/sd/source/filter/pptin.cxx b/sd/source/filter/pptin.cxx
+index 479299a..bb73ddc 100644
+--- sd/source/filter/pptin.cxx
++++ sd/source/filter/pptin.cxx
+@@ -1638,7 +1638,11 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
+ 											if ( nDirection == 0 )
+ 												pPage->SetFadeEffect( ::com::sun::star::presentation::FadeEffect_NONE );				// Direkt
+ 											else if ( nDirection == 1 )
+-												pPage->SetFadeEffect( ::com::sun::star::presentation::FadeEffect_NONE );				// Direkt ueber Schwarz
++                                            {
++                                                pPage->setTransitionType( 0 );
++                                                pPage->setTransitionSubtype( animations::TransitionSubType::FADEOVERCOLOR );
++                                                pPage->setTransitionFadeColor( 0 );
++                                            }
+ 										}
+ 										else
+ 											pPage->setTransitionType( 0 );
+diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+index 854467b..ec23e29 100644
+--- slideshow/source/engine/transitions/slidetransitionfactory.cxx
++++ slideshow/source/engine/transitions/slidetransitionfactory.cxx
+@@ -349,6 +349,89 @@ void FadingSlideChange::performOut(
+     }
+ }
+ 
++class CutSlideChange : public SlideChangeBase
++{
++public:
++    /** Create a new SlideChanger, for the given leaving and
++        entering slides, which applies a cut effect.
++    */
++    CutSlideChange(
++        boost::optional<SlideSharedPtr> const & leavingSlide,
++        const SlideSharedPtr&                   pEnteringSlide,
++        const RGBColor&                          rFadeColor,
++        const SoundPlayerSharedPtr&             pSoundPlayer,
++        const UnoViewContainer&                 rViewContainer,
++        ScreenUpdater&                          rScreenUpdater,
++        EventMultiplexer&                       rEventMultiplexer )
++        : SlideChangeBase( leavingSlide,
++                           pEnteringSlide,
++                           pSoundPlayer,
++                           rViewContainer,
++                           rScreenUpdater,
++                           rEventMultiplexer ),
++          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:
++    RGBColor maFadeColor;
++    bool    mbFirstTurn;
++};
++
++void CutSlideChange::performIn(
++    const ::cppcanvas::CustomSpriteSharedPtr&   rSprite,
++    const ViewEntry&                            /*rViewEntry*/,
++    const ::cppcanvas::CanvasSharedPtr&         /*rDestinationCanvas*/,
++    double                                      t )
++{
++    ENSURE_OR_THROW(
++        rSprite,
++        "CutSlideChange::performIn(): Invalid sprite" );
++    
++    // After 2/3rd of the active time, display new slide
++    rSprite->setAlpha( t > 2/3.0 ? 1.0 : 0.0 );
++}
++
++void CutSlideChange::performOut(
++    const ::cppcanvas::CustomSpriteSharedPtr&  rSprite,
++    const ViewEntry&                           rViewEntry,
++    const ::cppcanvas::CanvasSharedPtr&        rDestinationCanvas,
++    double                                     t )
++{
++    ENSURE_OR_THROW(
++        rSprite,
++        "CutSlideChange::performOut(): Invalid sprite" );
++    ENSURE_OR_THROW(
++        rDestinationCanvas,
++        "FadingSlideChange::performOut(): Invalid dest canvas" );
++    
++    if( mbFirstTurn )
++    {
++        mbFirstTurn = false;
++            
++        // clear page to given fade color. 'Leaving' slide is
++        // painted atop of that
++        fillPage( rDestinationCanvas,
++                  getEnteringSlideSizePixel( rViewEntry.mpView ),
++                  maFadeColor );
++    }
++        
++    // Until 1/3rd of the active time, display old slide.
++    rSprite->setAlpha( t > 1/3.0 ? 0.0 : 1.0 );
++}
++
+ class MovingSlideChange : public SlideChangeBase
+ {
+     /// Direction vector for leaving slide,
+@@ -883,6 +966,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
+                             pSoundPlayer );
+                     }
+ 
++                    case 0:
+                     case animations::TransitionType::FADE:
+                     {
+                         // black page:
+@@ -914,16 +998,27 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
+                                                   "SlideTransitionFactory::createSlideTransition(): Unknown FADE subtype" );
+                         }
+ 
+-                        return NumberAnimationSharedPtr( 
+-                            new FadingSlideChange(
+-                                leavingSlide,
+-                                pEnteringSlide,
+-                                comphelper::make_optional(
+-                                    rTransitionFadeColor),
+-                                pSoundPlayer,
+-                                rViewContainer,
+-                                rScreenUpdater,
+-                                rEventMultiplexer ));
++                        if( nTransitionType )
++                            return NumberAnimationSharedPtr( 
++                                new FadingSlideChange(
++                                    leavingSlide,
++                                    pEnteringSlide,
++                                    comphelper::make_optional(
++                                        rTransitionFadeColor),
++                                    pSoundPlayer,
++                                    rViewContainer,
++                                    rScreenUpdater,
++                                    rEventMultiplexer ));
++                        else
++                            return NumberAnimationSharedPtr( 
++                                new CutSlideChange(
++                                    leavingSlide,
++                                    pEnteringSlide,
++                                    rTransitionFadeColor,
++                                    pSoundPlayer,
++                                    rViewContainer,
++                                    rScreenUpdater,
++                                    rEventMultiplexer ));
+                     }
+                 }
+             }
+diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx b/slideshow/source/engine/transitions/transitionfactorytab.cxx
+index d5be3d2..ed3f7dd 100644
+--- slideshow/source/engine/transitions/transitionfactorytab.cxx
++++ slideshow/source/engine/transitions/transitionfactorytab.cxx
+@@ -2018,6 +2018,20 @@ static const TransitionInfo lcl_transitionInfo[] =
+         true,                   // 'out' by parameter sweep inversion
+         false                   // scale isotrophically to target size
+     },
++    // this is the cut through black fade (does not fade, but does a
++    // hard cut)
++    {
++        0,
++        animations::TransitionSubType::FADEOVERCOLOR,
++        TransitionInfo::TRANSITION_SPECIAL,
++        // TODO(F2): Setup parameters
++        0.0,                    // no rotation
++        1.0,                    // no scaling
++        1.0,                    // no scaling
++        TransitionInfo::REVERSEMETHOD_IGNORE,
++        true,                   // 'out' by parameter sweep inversion
++        false                   // scale isotrophically to target size
++    },
+     
+     {
+         // mapped to RandomWipe:

Added: trunk/patches/dev300/transogl-transitions-newsflash.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/transogl-transitions-newsflash.diff	Sat Aug  2 00:46:36 2008
@@ -0,0 +1,99 @@
+ sd/source/filter/pptin.cxx                         |    4 ---
+ .../engine/OGLTrans/OGLTrans_TransitionImpl.cxx    |   25 +++++++++++++++++++++++
+ .../engine/OGLTrans/OGLTrans_TransitionImpl.hxx    |    1 +
+ .../engine/OGLTrans/OGLTrans_TransitionerImpl.cxx  |    5 +++++
+ 4 files changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/sd/source/filter/pptin.cxx b/sd/source/filter/pptin.cxx
+index bb73ddc..61c08d9 100644
+--- sd/source/filter/pptin.cxx
++++ sd/source/filter/pptin.cxx
+@@ -1796,12 +1796,8 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
+ 									break;
+ 									case PPT_TRANSITION_TYPE_NEWSFLASH :
+ 									{
+-										pPage->setTransitionType( animations::TransitionType::FOURBOXWIPE );
+-										pPage->setTransitionSubtype( animations::TransitionSubType::CORNERSOUT );
+-/*
+ 										pPage->setTransitionType( animations::TransitionType::ZOOM );
+ 										pPage->setTransitionSubtype( animations::TransitionSubType::ROTATEIN );
+-*/
+ 									}
+ 									break;
+ 									case PPT_TRANSITION_TYPE_SMOOTHFADE :
+diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
+index c84b322..bf9883f 100644
+--- slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
+@@ -744,7 +744,9 @@ void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScal
+         t = nT1;
+     t = intervalInter(t,nT0,nT1);
+     glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ());
++    glScaled(SlideWidthScale,SlideHeightScale,1);
+     glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
++    glScaled(1/SlideWidthScale,1/SlideHeightScale,1);
+     glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-origin.getZ());
+ }
+ 
+@@ -1234,3 +1236,26 @@ void OGLTransitionImpl::makeDissolve()
+ 
+     mnRequiredGLVersion = 2.0;
+ }
++
++void OGLTransitionImpl::makeNewsflash()
++{
++    Primitive Slide;
++    
++    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
++    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
++    Slide.Operations.push_back(new SRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0,0,0),3000,true,0,0.5));
++    Slide.Operations.push_back(new SScale(basegfx::B3DVector(0.01,0.01,0.01),basegfx::B3DVector(0,0,0),true,0,0.5));
++    Slide.Operations.push_back(new STranslate(basegfx::B3DVector(-10000, 0, 0),false, 0.5, 2));
++    maLeavingSlidePrimitives.push_back(Slide);
++
++    Slide.Operations.clear();
++    Slide.Operations.push_back(new SRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0,0,0),-3000,true,0.5,1));
++    Slide.Operations.push_back(new STranslate(basegfx::B3DVector(-100, 0, 0),false, -1, 1));
++    Slide.Operations.push_back(new STranslate(basegfx::B3DVector(100, 0, 0),false, 0.5, 1));
++    Slide.Operations.push_back(new SScale(basegfx::B3DVector(0.01,0.01,0.01),basegfx::B3DVector(0,0,0),false,-1,1));
++    Slide.Operations.push_back(new SScale(basegfx::B3DVector(100,100,100),basegfx::B3DVector(0,0,0),true,0.5,1));
++    maEnteringSlidePrimitives.push_back(Slide);
++
++    OverallOperations.push_back(new SRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0.2,0.2,0),1080,true,0,1));
++}
++
+diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
+index 30e1748..2dcabd0 100644
+--- slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
+@@ -98,6 +98,7 @@ public:
+     void makeVenetianBlinds( bool vertical, int parts );
+     void makeStatic();
+     void makeDissolve();
++    void makeNewsflash();
+ 
+     /** 2D replacements
+      */
+diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+index 2682e94..8e2d0b9 100644
+--- slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+@@ -903,6 +903,8 @@ public:
+             return sal_True;
+         } else if( transitionType == animations::TransitionType::IRISWIPE && transitionSubType == animations::TransitionSubType::DIAMOND ) {
+             return sal_True;
++        } else if( transitionType == animations::TransitionType::ZOOM && transitionSubType == animations::TransitionSubType::ROTATEIN ) {
++            return sal_True;
+         } else
+             return sal_False;
+     }
+@@ -981,6 +983,9 @@ public:
+         } else if( transitionType == animations::TransitionType::IRISWIPE && transitionSubType == animations::TransitionSubType::DIAMOND ) {
+             pTransition = new OGLTransitionImpl();
+             pTransition->makeDiamond();
++        } else if( transitionType == animations::TransitionType::ZOOM && transitionSubType == animations::TransitionSubType::ROTATEIN ) {
++            pTransition = new OGLTransitionImpl();
++            pTransition->makeNewsflash();
+         }
+ 
+         rtl::Reference<OGLTransitionerImpl> xRes(



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]