Kaydet (Commit) 2bd890e1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wint-to-pointer-cast

Change-Id: Iec98a5a3df5dcfcd3fcf658bf27e9b5fe57ffc44
(cherry picked from commit 6cd09d31)
üst 8b36af7e
...@@ -113,7 +113,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : ...@@ -113,7 +113,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
Player::~Player() Player::~Player()
{ {
if( mnFrameWnd ) if( mnFrameWnd )
::DestroyWindow( (HWND) mnFrameWnd ); ::DestroyWindow( mnFrameWnd );
::CoUninitialize(); ::CoUninitialize();
} }
...@@ -207,7 +207,7 @@ const IVideoWindow* Player::getVideoWindow() const ...@@ -207,7 +207,7 @@ const IVideoWindow* Player::getVideoWindow() const
return mpVW; return mpVW;
} }
void Player::setNotifyWnd( int nNotifyWnd ) void Player::setNotifyWnd( HWND nNotifyWnd )
{ {
mbAddWindow = false; mbAddWindow = false;
if( mpME ) if( mpME )
...@@ -266,14 +266,14 @@ void SAL_CALL Player::start( ) ...@@ -266,14 +266,14 @@ void SAL_CALL Player::start( )
} }
if ( !mnFrameWnd ) if ( !mnFrameWnd )
{ {
mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL, mnFrameWnd = ::CreateWindow( mpWndClass->lpszClassName, NULL,
0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
(HWND) NULL, NULL, mpWndClass->hInstance, 0 ); (HWND) NULL, NULL, mpWndClass->hInstance, 0 );
if ( mnFrameWnd ) if ( mnFrameWnd )
{ {
::ShowWindow((HWND) mnFrameWnd, SW_HIDE); ::ShowWindow(mnFrameWnd, SW_HIDE);
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this ); ::SetWindowLong( mnFrameWnd, 0, (DWORD) this );
// mpVW->put_Owner( (OAHWND) mnFrameWnd ); // mpVW->put_Owner( (OAHWND) mnFrameWnd );
setNotifyWnd( mnFrameWnd ); setNotifyWnd( mnFrameWnd );
} }
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX #ifndef INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
#define INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX #define INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
#include <sal/config.h>
#include <WinDef.h>
#include "wincommon.hxx" #include "wincommon.hxx"
#include "com/sun/star/media/XPlayer.hpp" #include "com/sun/star/media/XPlayer.hpp"
...@@ -59,7 +63,7 @@ public: ...@@ -59,7 +63,7 @@ public:
bool create( const OUString& rURL ); bool create( const OUString& rURL );
void setNotifyWnd( int nNotifyWnd ); void setNotifyWnd( HWND nNotifyWnd );
long processEvent(); long processEvent();
const IVideoWindow* getVideoWindow() const; const IVideoWindow* getVideoWindow() const;
...@@ -105,7 +109,7 @@ private: ...@@ -105,7 +109,7 @@ private:
IVideoWindow* mpVW; IVideoWindow* mpVW;
IDDrawExclModeVideo* mpEV; IDDrawExclModeVideo* mpEV;
long mnUnmutedVolume; long mnUnmutedVolume;
int mnFrameWnd; HWND mnFrameWnd;
bool mbMuted; bool mbMuted;
bool mbLooping; bool mbLooping;
bool mbAddWindow; bool mbAddWindow;
......
...@@ -195,7 +195,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Playe ...@@ -195,7 +195,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Playe
Window::~Window() Window::~Window()
{ {
if( mnFrameWnd ) if( mnFrameWnd )
::DestroyWindow( (HWND) mnFrameWnd ); ::DestroyWindow( mnFrameWnd );
} }
void Window::ImplLayoutVideoWindow() void Window::ImplLayoutVideoWindow()
...@@ -296,16 +296,16 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments ) ...@@ -296,16 +296,16 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
rArguments[ 0 ] >>= nWnd; rArguments[ 0 ] >>= nWnd;
rArguments[ 1 ] >>= aRect; rArguments[ 1 ] >>= aRect;
mnParentWnd = static_cast<int>(nWnd); mnParentWnd = reinterpret_cast<HWND>(nWnd);
mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL, mnFrameWnd = ::CreateWindow( mpWndClass->lpszClassName, NULL,
WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
aRect.X, aRect.Y, aRect.Width, aRect.Height, aRect.X, aRect.Y, aRect.Width, aRect.Height,
(HWND) mnParentWnd, NULL, mpWndClass->hInstance, 0 ); mnParentWnd, NULL, mpWndClass->hInstance, 0 );
if( mnFrameWnd ) if( mnFrameWnd )
{ {
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this ); ::SetWindowLong( mnFrameWnd, 0, (DWORD) this );
pVideoWindow->put_Owner( (OAHWND) mnFrameWnd ); pVideoWindow->put_Owner( (OAHWND) mnFrameWnd );
pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd ); pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd );
...@@ -387,7 +387,7 @@ void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal ...@@ -387,7 +387,7 @@ void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal
{ {
if( mnFrameWnd ) if( mnFrameWnd )
{ {
::SetWindowPos( (HWND) mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 ); ::SetWindowPos( mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 );
ImplLayoutVideoWindow(); ImplLayoutVideoWindow();
} }
} }
...@@ -401,7 +401,7 @@ awt::Rectangle SAL_CALL Window::getPosSize() ...@@ -401,7 +401,7 @@ awt::Rectangle SAL_CALL Window::getPosSize()
{ {
::RECT aWndRect; ::RECT aWndRect;
if( ::GetClientRect( (HWND) mnFrameWnd, &aWndRect ) ) if( ::GetClientRect( mnFrameWnd, &aWndRect ) )
{ {
aRet.X = aWndRect.left; aRet.X = aWndRect.left;
aRet.Y = aWndRect.top; aRet.Y = aWndRect.top;
...@@ -423,7 +423,7 @@ void SAL_CALL Window::setVisible( sal_Bool bVisible ) ...@@ -423,7 +423,7 @@ void SAL_CALL Window::setVisible( sal_Bool bVisible )
if( pVideoWindow ) if( pVideoWindow )
pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE ); pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE );
::ShowWindow( (HWND) mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE ); ::ShowWindow( mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE );
} }
} }
...@@ -431,14 +431,14 @@ void SAL_CALL Window::setEnable( sal_Bool bEnable ) ...@@ -431,14 +431,14 @@ void SAL_CALL Window::setEnable( sal_Bool bEnable )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
if( mnFrameWnd ) if( mnFrameWnd )
::EnableWindow( (HWND) mnFrameWnd, bEnable ); ::EnableWindow( mnFrameWnd, bEnable );
} }
void SAL_CALL Window::setFocus( ) void SAL_CALL Window::setFocus( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
if( mnFrameWnd ) if( mnFrameWnd )
::SetFocus( (HWND) mnFrameWnd ); ::SetFocus( mnFrameWnd );
} }
void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener ) void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX #ifndef INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
#define INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX #define INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
#include <sal/config.h>
#include <WinDef.h>
#include "wincommon.hxx" #include "wincommon.hxx"
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.h> #include <cppuhelper/interfacecontainer.h>
...@@ -101,8 +105,8 @@ private: ...@@ -101,8 +105,8 @@ private:
::cppu::OMultiTypeInterfaceContainerHelper maListeners; ::cppu::OMultiTypeInterfaceContainerHelper maListeners;
css::media::ZoomLevel meZoomLevel; css::media::ZoomLevel meZoomLevel;
Player& mrPlayer; Player& mrPlayer;
int mnFrameWnd; HWND mnFrameWnd;
int mnParentWnd; HWND mnParentWnd;
int mnPointerType; int mnPointerType;
void ImplLayoutVideoWindow(); void ImplLayoutVideoWindow();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment