diff options
Diffstat (limited to 'fpicker/source/win32/filepicker/helppopupwindow.cxx')
-rw-r--r-- | fpicker/source/win32/filepicker/helppopupwindow.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx index 77e933dff183..78395ed745bb 100644 --- a/fpicker/source/win32/filepicker/helppopupwindow.cxx +++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx @@ -63,13 +63,13 @@ CHelpPopupWindow::CHelpPopupWindow( m_vMargins( 0 ), m_avCharWidth( 0 ), m_avCharHeight( 0 ), - m_hwnd( NULL ), + m_hwnd( nullptr ), m_hwndParent( hwndParent ), m_hInstance( hInstance ), - m_hBitmapShadow( NULL ), - m_hBrushShadow( NULL ) + m_hBitmapShadow( nullptr ), + m_hBrushShadow( nullptr ) { - m_bWndClassRegistered = RegisterWindowClass( ) ? sal_True : sal_False; + m_bWndClassRegistered = RegisterWindowClass( ); // create a pattern brush for the window shadow WORD aPattern[] = { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 }; @@ -101,7 +101,7 @@ void SAL_CALL CHelpPopupWindow::setText( const OUString& aHelpText ) void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y ) { - OSL_ENSURE( NULL == m_hwnd, "method should not be called twice in sequence" ); + OSL_ENSURE( nullptr == m_hwnd, "method should not be called twice in sequence" ); // we create a window with length and height of 0 // first in order to get a device context of this @@ -111,16 +111,16 @@ void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y ) m_hwnd = CreateWindowExW( 0, HELPPOPUPWND_CLASS_NAME, - NULL, + nullptr, WS_POPUP, 0, 0, 0, 0, m_hwndParent, - NULL, + nullptr, m_hInstance, - (LPVOID)this ); + this ); OSL_ENSURE( m_hwnd, "creating help popup window failed" ); @@ -204,7 +204,7 @@ void SAL_CALL CHelpPopupWindow::adjustWindowSize( sal_Int32* cx_new, sal_Int32* // adjust the window size SetWindowPos( m_hwnd, - NULL, + nullptr, 0, 0, rect.right, @@ -251,7 +251,7 @@ void SAL_CALL CHelpPopupWindow::adjustWindowPos( SetWindowPos( m_hwnd, - NULL, + nullptr, popX, popY, 0, @@ -335,7 +335,7 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc ) DrawTextW( hdc, - (PWSTR)m_HelpText.getStr( ), + m_HelpText.getStr( ), m_HelpText.getLength( ), &rect, nFormat ); @@ -381,7 +381,7 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc ) void SAL_CALL CHelpPopupWindow::onNcDestroy() { - m_hwnd = NULL; + m_hwnd = nullptr; } @@ -426,7 +426,7 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc( OSL_ASSERT( lpcs->lpCreateParams ); - CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >( + CHelpPopupWindow* pImpl = static_cast< CHelpPopupWindow* >( lpcs->lpCreateParams ); // connect the instance handle to the window @@ -441,7 +441,7 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc( case WM_PAINT: { - CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >( + CHelpPopupWindow* pImpl = static_cast< CHelpPopupWindow* >( GetPropW( hWnd, CURRENT_INSTANCE ) ); OSL_ASSERT( pImpl ); @@ -457,7 +457,7 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc( case WM_NCDESTROY: { // RemoveProp returns the saved value on success - CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >( + CHelpPopupWindow* pImpl = static_cast< CHelpPopupWindow* >( RemovePropW( hWnd, CURRENT_INSTANCE ) ); OSL_ASSERT( pImpl ); @@ -497,8 +497,8 @@ ATOM SAL_CALL CHelpPopupWindow::RegisterWindowClass( ) wndClsEx.cbSize = sizeof(wndClsEx); wndClsEx.lpfnWndProc = CHelpPopupWindow::WndProc; wndClsEx.hInstance = m_hInstance; - wndClsEx.hCursor = LoadCursor(NULL, IDC_ARROW); - wndClsEx.hbrBackground = (HBRUSH)GetStockObject( NULL_BRUSH ); + wndClsEx.hCursor = LoadCursor(nullptr, IDC_ARROW); + wndClsEx.hbrBackground = static_cast<HBRUSH>(GetStockObject( NULL_BRUSH )); wndClsEx.lpszClassName = HELPPOPUPWND_CLASS_NAME; // register the preview window class @@ -539,7 +539,7 @@ void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( ) if ( 0 == s_RegisterWndClassCount ) { if ( !UnregisterClassW( - (PCWSTR)(DWORD_PTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance ) ) + reinterpret_cast<PCWSTR>((DWORD_PTR)MAKELONG( s_ClassAtom, 0 )), m_hInstance ) ) { OSL_FAIL( "unregister window class failed" ); } |