[ooo-build-commit] Branch 'ooo/OOO320' - avmedia/source svx/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Nov 12 00:31:02 PST 2009


 avmedia/source/quicktime/player.cxx            |   81 +++++++++++++------------
 avmedia/source/quicktime/player.hxx            |    2 
 avmedia/source/viewer/mediawindowbase_impl.cxx |    4 -
 svx/source/svdraw/svdotextdecomposition.cxx    |    8 +-
 svx/source/svdraw/svdpage.cxx                  |    8 ++
 5 files changed, 59 insertions(+), 44 deletions(-)

New commits:
commit 15d255a9ec6ad45779ce63dcc101b2287036c8c5
Author: Oliver Bolte <obo at openoffice.org>
Date:   Wed Nov 11 14:21:16 2009 +0000

    CWS-TOOLING: integrate CWS ooo32gsl03
    2009-11-04 20:19:30 +0100 hdu  r277364 : #i105769# final cleanup of the trapezoid converter for OOO320
    2009-11-04 18:54:50 +0100 hdu  r277363 : #i105769# force intersection point to be bit-identical on each involved segment
    2009-11-03 08:04:26 +0100 hdu  r277308 : #i105769# remove elimination of horizontal segments out of intersection solver again
    2009-11-02 19:06:32 +0100 hdu  r277304 : #i105769# adjust my intersection-solver for the needs of the trapezoid converter
    2009-11-02 11:03:31 +0100 hdu  r277291 : #i105769# start integrating my intersection-solver
    2009-10-28 17:04:53 +0100 cl  r277246 : #i106369# only hide placeholder on master page not all text shapes
    2009-10-28 17:00:22 +0100 aw  r277245 : #i106183# added fix as described tin task
    2009-10-27 18:08:07 +0100 pl  r277229 : #i106351# avoid early exits when changing state
    2009-10-27 16:25:59 +0100 aw  r277217 : #i103454# need to set all PaperSizes (three) at the Outliner to get the right layout
    2009-10-27 13:29:43 +0100 pl  r277201 : #i106261# do not confuse stop with start
    2009-10-27 12:48:36 +0100 pl  r277199 : #i106261# avoid duplicate initialization

diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx
index a66c77e..aa2d86d 100644
--- a/avmedia/source/quicktime/player.cxx
+++ b/avmedia/source/quicktime/player.cxx
@@ -100,8 +100,6 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
     if ((result == noErr) && (mnVersion >= QT701))
     {
       // we have version 7.01 or later, initialize
-      mpMovie = [QTMovie movie];
-      [mpMovie retain];
       mbInitialized = true;
     }
     [pool release];
@@ -111,43 +109,57 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
 
 Player::~Player()
 {
-    if( mbInitialized )
+    if( mpMovie )
     {
-        if( mpMovie )
-        {
-            [mpMovie release];
-            mpMovie = nil;
-        }
-
+        [mpMovie release];
+        mpMovie = nil;
     }
 }
+// ------------------------------------------------------------------------------
 
+QTMovie* Player::getMovie()
+{
+    OSL_ASSERT( mpMovie ); 
+    return mpMovie;
+}
 
 // ------------------------------------------------------------------------------
 
 bool Player::create( const ::rtl::OUString& rURL )
 {
     bool    bRet = false;
-    NSAutoreleasePool* pool	= [[NSAutoreleasePool alloc] init];
-    NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ;
-//	NSString * aNSStringEscaped = [aNSStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    NSURL* aURL = [NSURL URLWithString:aNSStr ];
-
-    // create the Movie
-    
+    // create the Movie    
     if( mbInitialized )
     {
+        NSAutoreleasePool* pool	= [[NSAutoreleasePool alloc] init];
+        
+        if( mpMovie )
+        {
+            [mpMovie release];
+            mpMovie = nil;
+        }
+        
+        NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ;
+        NSURL* aURL = [NSURL URLWithString:aNSStr ];
 
-        mpMovie = [mpMovie initWithURL:aURL error:nil];
+
+        NSError* pErr = nil;
+        mpMovie = [QTMovie movieWithURL:aURL error:&pErr];
         if(mpMovie)
         {
             [mpMovie retain];
             maURL = rURL;
             bRet = true;
         }
+        if( pErr )
+        {
+            OSL_TRACE( "NSMovie create failed with error %ld (%s)",
+                       (long)[pErr code],
+                       [[pErr localizedDescription] cString]
+                       );
+        }
+        [pool release];
     }
-    
-    [pool release];
 
     return bRet;
 }
@@ -159,10 +171,10 @@ void SAL_CALL Player::start(  )
 {
   OSL_TRACE ("Player::start");
 
-  if ( mbInitialized && mpMovie )
-    {
+  if( mpMovie )
+  {
       [mpMovie play];
-    }
+  }
 }
 
 // ------------------------------------------------------------------------------
@@ -171,11 +183,10 @@ void SAL_CALL Player::stop(  )
     throw (uno::RuntimeException)
 {
     OSL_TRACE ("Player::stop");
-    if ( mpMovie )
+    if( mpMovie )
     {
-      [mpMovie stop];
+        [mpMovie stop];
     }
-    
 }
 
 // ------------------------------------------------------------------------------
@@ -185,7 +196,7 @@ sal_Bool SAL_CALL Player::isPlaying()
 {
     bool bRet = false;
 
-    if ( mbInitialized )
+    if ( mpMovie )
     {
         if ([mpMovie rate] != 0)
         {
@@ -219,11 +230,11 @@ void SAL_CALL Player::setMediaTime( double fTime )
     throw (uno::RuntimeException)
 {
     OSL_TRACE ("Player::setMediaTime");
-
-  if ( mpMovie )
-  {
-      [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)];
-  }
+    
+    if ( mpMovie )
+    {
+        [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)];
+    }
 }
 
 // ------------------------------------------------------------------------------
@@ -243,7 +254,6 @@ double SAL_CALL Player::getMediaTime(  )
   {
       stop();
   }
-  
 
   return position;
 }
@@ -256,7 +266,6 @@ void SAL_CALL Player::setStopTime( double fTime )
     OSL_TRACE ("Player::setStopTime %f", fTime);
 
     mnStopTime = fTime;
-    
 }
 
 // ------------------------------------------------------------------------------
@@ -264,9 +273,7 @@ void SAL_CALL Player::setStopTime( double fTime )
 double SAL_CALL Player::getStopTime(  )
     throw (uno::RuntimeException)
 {
-    double fRet = 0.0;
-
-    fRet = mnStopTime;
+    double fRet = mnStopTime;
 
     return fRet;
 }
@@ -277,7 +284,7 @@ void SAL_CALL Player::setRate( double fRate )
     throw (uno::RuntimeException)
 {
     OSL_TRACE ("Player::setRate");
-
+    
     // Quicktime: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards
     if ( mpMovie )
     {
diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx
index 6698381..ccc360e 100644
--- a/avmedia/source/quicktime/player.hxx
+++ b/avmedia/source/quicktime/player.hxx
@@ -83,7 +83,7 @@ public:
     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
     
-    QTMovie* getMovie() { return mpMovie; }
+    QTMovie* getMovie();
 
 private:
     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx
index d7b4210..8fb63bd 100644
--- a/avmedia/source/viewer/mediawindowbase_impl.cxx
+++ b/avmedia/source/viewer/mediawindowbase_impl.cxx
@@ -147,9 +147,9 @@ void MediaWindowBaseImpl::stopPlayingInternal( bool bStop )
     if( isPlaying() )
     {
         if( bStop )
-            mxPlayer->start();
-        else
             mxPlayer->stop();
+        else
+            mxPlayer->start();
     }
 }
 
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index de1f8dd..434efde 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -818,15 +818,16 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
     {
         // cell text is formated neither like a text object nor like a object
         // text, so use a special setup here
+        // #i106214# To work with an unchangeable PaperSize (CellSize in
+        // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have to be used
         rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
+        rOutliner.SetMinAutoPaperSize(aAnchorTextSize);
         rOutliner.SetPaperSize(aAnchorTextSize);
         rOutliner.SetUpdateMode(true);
         rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
-        rOutliner.SetControlWord(nOriginalControlWord);
     }
     else
     {
-
         if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
         {
             // #i103454# maximal paper size hor/ver needs to be limited to text
@@ -854,9 +855,10 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
         rOutliner.SetPaperSize(aNullSize);
         rOutliner.SetUpdateMode(true);
         rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
-        rOutliner.SetControlWord(nOriginalControlWord);
     }
 
+    rOutliner.SetControlWord(nOriginalControlWord);
+
     // now get back the layouted text size from outliner
     const Size aOutlinerTextSiz(rOutliner.GetPaperSize());
     const basegfx::B2DVector aOutlinerScale(aOutlinerTextSiz.Width(), aOutlinerTextSiz.Height());
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 8f4d8cd..dfbba7b 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -671,7 +671,13 @@ const Rectangle& SdrObjList::GetAllObjSnapRect() const
 
 const Rectangle& SdrObjList::GetAllObjBoundRect() const
 {
-    if (bRectsDirty) {
+    // #i106183# for deep group hierarchies like in chart2, the invalidates
+    // through the hierarchy are not correct; use a 2nd hint for the needed
+    // recalculation. Future versions will have no bool flag at all, but
+    // just aOutRect in empty state to representate an invalid state, thus
+    // it's a step in the right direction.
+    if (bRectsDirty || aOutRect.IsEmpty())
+    {
         ((SdrObjList*)this)->RecalcRects();
         ((SdrObjList*)this)->bRectsDirty=FALSE;
     }


More information about the ooo-build-commit mailing list