diff options
Diffstat (limited to 'slideshow/source/engine/shapes')
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 12 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/shapeimporter.cxx | 11 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewmediashape.cxx | 36 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewmediashape.hxx | 5 |
4 files changed, 21 insertions, 43 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 68e3830523e0..dec32a95262d 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -308,19 +308,19 @@ sal_Int32 getNextActionOffset( MetaAction * pCurrAct ) switch (pCurrAct->GetType()) { case META_TEXT_ACTION: { MetaTextAction * pAct = static_cast<MetaTextAction *>(pCurrAct); - return (pAct->GetLen() == (USHORT)STRING_LEN + return (pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen()); } case META_TEXTARRAY_ACTION: { MetaTextArrayAction * pAct = static_cast<MetaTextArrayAction *>(pCurrAct); - return (pAct->GetLen() == (USHORT)STRING_LEN + return (pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen()); } case META_STRETCHTEXT_ACTION: { MetaStretchTextAction * pAct = static_cast<MetaStretchTextAction *>(pCurrAct); - return (pAct->GetLen() == (USHORT)STRING_LEN + return (pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen()); } case META_FLOATTRANSPARENT_ACTION: { @@ -358,12 +358,12 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, // update modes) VirtualDevice aVDev; aVDev.SetOutputSizePixel( aAnimSize ); - aVDev.EnableMapMode( FALSE ); + aVDev.EnableMapMode( sal_False ); // setup mask VDev (alpha VDev is currently rather slow) VirtualDevice aVDevMask; aVDevMask.SetOutputSizePixel( aAnimSize ); - aVDevMask.EnableMapMode( FALSE ); + aVDevMask.EnableMapMode( sal_False ); switch( aAnimation.GetCycleMode() ) { @@ -392,7 +392,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, break; } - for( USHORT i=0, nCount=aAnimation.Count(); i<nCount; ++i ) + for( sal_uInt16 i=0, nCount=aAnimation.Count(); i<nCount; ++i ) { const AnimationBitmap& rAnimBmp( aAnimation.Get(i) ); switch(rAnimBmp.eDisposal) diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 355a16c58608..5971082a4242 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -416,8 +416,8 @@ ShapeSharedPtr ShapeImporter::createShape( aGraphAttrs.SetChannelG( nGreen ); aGraphAttrs.SetChannelB( nBlue ); aGraphAttrs.SetGamma( nGamma ); - aGraphAttrs.SetTransparency( static_cast<BYTE>(nTransparency) ); - aGraphAttrs.SetRotation( static_cast<USHORT>(nRotation*10) ); + aGraphAttrs.SetTransparency( static_cast<sal_uInt8>(nTransparency) ); + aGraphAttrs.SetRotation( static_cast<sal_uInt16>(nRotation*10) ); text::GraphicCrop aGraphCrop; if( getPropertyValue( aGraphCrop, xPropSet, OUSTR("GraphicCrop") )) @@ -654,20 +654,13 @@ ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const& sal_Int32 nOrdNumStart, bool bConvertingMasterPage ) : mxPage( xActualPage ), -#ifdef ENABLE_PRESENTER_EXTRA_UI mxPagesSupplier( xPagesSupplier ), -#else - mxPagesSupplier( NULL ), -#endif mrContext( rContext ), maPolygons(), maShapesStack(), mnAscendingPrio( nOrdNumStart ), mbConvertingMasterPage( bConvertingMasterPage ) { -#ifndef ENABLE_PRESENTER_EXTRA_UI - (void)xPagesSupplier; -#endif uno::Reference<drawing::XShapes> const xShapes( xPage, uno::UNO_QUERY_THROW ); maShapesStack.push( XShapesEntry(xShapes) ); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index fc3bfacde25c..f46ac03cab23 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -40,7 +40,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <vcl/window.hxx> -#include <vcl/javachild.hxx> +#include <vcl/syschild.hxx> #include <vcl/salbtype.hxx> #ifdef GSTREAMER #include <vcl/sysdata.hxx> @@ -157,11 +157,7 @@ namespace slideshow mxPlayerWindow.clear(); } -#ifdef GSTREAMER mpMediaWindow = ::std::auto_ptr< SystemChildWindow >(); -#else - mpMediaWindow = ::std::auto_ptr< JavaChildWindow >(); -#endif // shutdown player if( mxPlayer.is() ) @@ -446,30 +442,24 @@ namespace slideshow rRangePix.getMaxX() - rRangePix.getMinX(), rRangePix.getMaxY() - rRangePix.getMinY() ); -#ifdef GSTREAMER - OSL_TRACE( "created sys child window for viewmediashape" ); + mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new + SystemChildWindow( pWindow, WB_CLIPCHILDREN ) ); mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new SystemChildWindow( pWindow, WB_CLIPCHILDREN ) ); -#else - mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) ); -#endif mpMediaWindow->SetBackground( Color( COL_BLACK ) ); - mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, - aAWTRect.Y ), - Size( aAWTRect.Width, - aAWTRect.Height )); + mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ), + Size( aAWTRect.Width, aAWTRect.Height ) ); mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - mpMediaWindow->EnableEraseBackground( FALSE ); - mpMediaWindow->EnablePaint( FALSE ); - mpMediaWindow->SetForwardKey( TRUE ); - mpMediaWindow->SetMouseTransparent( TRUE ); + mpMediaWindow->EnableEraseBackground( sal_False ); + mpMediaWindow->EnablePaint( sal_False ); + mpMediaWindow->SetForwardKey( sal_True ); + mpMediaWindow->SetMouseTransparent( sal_True ); mpMediaWindow->Show(); if( mxPlayer.is() ) { #ifndef GSTREAMER aArgs[ 0 ] = uno::makeAny( - sal::static_int_cast<sal_IntPtr>( - mpMediaWindow->getParentWindowHandleForJava()) ); + sal::static_int_cast< sal_IntPtr >( mpMediaWindow->GetParentWindowHandle() ) ); #else aArgs[ 0 ] = uno::makeAny ( (sal_Int32) 0 ); #endif @@ -481,6 +471,8 @@ namespace slideshow aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow ); #endif + aArgs[ 2 ] = uno::makeAny( reinterpret_cast< sal_IntPtr >( mpMediaWindow.get() ) ); + mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) ); if( mxPlayerWindow.is() ) @@ -541,9 +533,7 @@ namespace slideshow if( mxPlayer.is() ) { - aArgs[ 0 ] = uno::makeAny( - sal::static_int_cast<sal_Int32>( - aWNDVal) ); + aArgs[ 0 ] = uno::makeAny( sal::static_int_cast< sal_Int32 >( aWNDVal) ); aArgs[ 1 ] = uno::makeAny( aAWTRect ); mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) ); diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index 4815f2dc9e6a..5eba4a8c6a42 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -37,7 +37,6 @@ #include "viewlayer.hxx" -class JavaChildWindow; class SystemChildWindow; namespace com { namespace sun { namespace star { namespace drawing { @@ -157,11 +156,7 @@ namespace slideshow const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams ); ViewLayerSharedPtr mpViewLayer; -#ifdef GSTREAMER ::std::auto_ptr< SystemChildWindow > mpMediaWindow; -#else - ::std::auto_ptr< JavaChildWindow > mpMediaWindow; -#endif mutable ::com::sun::star::awt::Point maWindowOffset; mutable ::basegfx::B2DRectangle maBounds; |