diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-02 17:20:50 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-02 17:20:50 +0100 |
commit | 27a44ea7b53b055ca861e7bec2698e2f14933098 (patch) | |
tree | bf055cd61a01d96891c6a976789ca0f2d035ab3d | |
parent | CWS-TOOLING: integrate CWS impresspaintbrush01 (diff) | |
parent | #i106183# added fix as described tin task (diff) | |
download | core-27a44ea7b53b055ca861e7bec2698e2f14933098.tar.gz core-27a44ea7b53b055ca861e7bec2698e2f14933098.zip |
CWS-TOOLING: integrate CWS ooo32gsl03_DEV300
-rw-r--r-- | avmedia/source/quicktime/player.cxx | 75 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindowbase_impl.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 8 |
5 files changed, 56 insertions, 41 deletions
diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index e8289570b5ae..29332698016e 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,44 +109,58 @@ 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 - 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) { @@ -220,10 +231,10 @@ void SAL_CALL Player::setMediaTime( double fTime ) { OSL_TRACE ("Player::setMediaTime"); - if ( mpMovie ) - { - [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)]; - } + if ( mpMovie ) + { + [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)]; + } } // ------------------------------------------------------------------------------ @@ -244,7 +255,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; } diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index b7cab51005f4..c49ccd62915c 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 05acc545c77b..2506c179f413 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 e72b606f3b53..934b0f78ca3e 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 05b5b5e5aca6..55e0347e6522 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; } |