1 --- slideshow/source/engine/shapes/viewmediashape.cxx.old 2009-04-02 10:36:30.000000000 +0000
2 +++ slideshow/source/engine/shapes/viewmediashape.cxx 2009-04-06 16:42:09.000000000 +0000
4 #include <vcl/window.hxx>
5 #include <vcl/javachild.hxx>
6 #include <vcl/salbtype.hxx>
8 +#include <vcl/sysdata.hxx>
11 #include <basegfx/tools/canvastools.hxx>
12 #include <basegfx/numeric/ftools.hxx>
13 @@ -148,7 +151,11 @@ namespace slideshow
14 mxPlayerWindow.clear();
18 + mpMediaWindow = ::std::auto_ptr< SystemChildWindow >();
20 mpMediaWindow = ::std::auto_ptr< JavaChildWindow >();
25 @@ -299,7 +306,8 @@ namespace slideshow
26 aDeviceParams[ 0 ] >>= aImplName;
28 if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
29 - RTL_CONSTASCII_STRINGPARAM("VCL") ))
30 + RTL_CONSTASCII_STRINGPARAM("VCL") ) || aImplName.endsWithIgnoreAsciiCaseAsciiL(
31 + RTL_CONSTASCII_STRINGPARAM("Cairo") ) )
33 implInitializeVCLBasedPlayerWindow( rBounds, aDeviceParams );
35 @@ -405,6 +413,7 @@ namespace slideshow
36 bool ViewMediaShape::implInitializeVCLBasedPlayerWindow( const ::basegfx::B2DRectangle& rBounds,
37 const uno::Sequence< uno::Any >& rVCLDeviceParams)
39 + OSL_TRACE( "ViewMediaShape::implInitializeVCLBasedPlayerWindow" );
40 if( !mpMediaWindow.get() && !rBounds.isEmpty() )
43 @@ -426,28 +435,46 @@ namespace slideshow
45 if( !rRangePix.isEmpty() )
47 - uno::Sequence< uno::Any > aArgs( 2 );
48 + uno::Sequence< uno::Any > aArgs( 3 );
49 awt::Rectangle aAWTRect( rRangePix.getMinX(),
51 rRangePix.getMaxX() - rRangePix.getMinX(),
52 rRangePix.getMaxY() - rRangePix.getMinY() );
55 + OSL_TRACE( "created sys child window for viewmediashape" );
56 + mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
58 mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) );
60 mpMediaWindow->SetBackground( Color( COL_BLACK ) );
61 mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X,
65 + mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
66 + mpMediaWindow->EnableEraseBackground( FALSE );
67 + mpMediaWindow->EnablePaint( FALSE );
68 + mpMediaWindow->SetForwardKey( TRUE );
69 + mpMediaWindow->SetMouseTransparent( TRUE );
70 mpMediaWindow->Show();
75 aArgs[ 0 ] = uno::makeAny(
76 sal::static_int_cast<sal_IntPtr>(
77 mpMediaWindow->getParentWindowHandleForJava()) );
80 + aArgs[ 0 ] = uno::makeAny ( (sal_Int32) 0 );
82 aAWTRect.X = aAWTRect.Y = 0;
83 aArgs[ 1 ] = uno::makeAny( aAWTRect );
85 + const SystemEnvData *pSystemData = mpMediaWindow->GetSystemData();
86 + OSL_TRACE( "xwindow id: %ld", pSystemData->aWindow );
87 + aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
90 mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
92 --- slideshow/source/engine/shapes/viewmediashape.hxx.old 2009-04-02 10:36:30.000000000 +0000
93 +++ slideshow/source/engine/shapes/viewmediashape.hxx 2009-04-06 16:42:09.000000000 +0000
95 #include "viewlayer.hxx"
97 class JavaChildWindow;
98 +class SystemChildWindow;
100 namespace com { namespace sun { namespace star { namespace drawing {
102 @@ -158,7 +159,11 @@ namespace slideshow
103 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams );
105 ViewLayerSharedPtr mpViewLayer;
107 + ::std::auto_ptr< SystemChildWindow > mpMediaWindow;
109 ::std::auto_ptr< JavaChildWindow > mpMediaWindow;
111 mutable ::com::sun::star::awt::Point maWindowOffset;
112 mutable ::basegfx::B2DRectangle maBounds;