[Libreoffice-commits] .: fpicker/source

Tor Lillqvist tml at kemper.freedesktop.org
Mon Jan 24 17:18:35 PST 2011


 fpicker/source/win32/filepicker/FileOpenDlg.cxx     |   16 ++++++++--------
 fpicker/source/win32/filepicker/FileOpenDlg.hxx     |    4 ++--
 fpicker/source/win32/filepicker/WinFileOpenImpl.cxx |    8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit a7161ae45aa773ff228a2ed027e9eee1c67f3b6c
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Jan 25 03:18:11 2011 +0200

    Stricter type correctness to avoid 64-bit compilation errors

diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
index 8155cc6..ffd9fa3 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
@@ -560,8 +560,8 @@ void SAL_CALL CFileOpenDialog::handleInitDialog(HWND hwndDlg, HWND hwndChild)
 // 
 //------------------------------------------------------------------------
 
-unsigned int CALLBACK CFileOpenDialog::ofnHookProc( 
-    HWND hChildDlg, unsigned int uiMsg, WPARAM wParam, LPARAM lParam)
+UINT_PTR CALLBACK CFileOpenDialog::ofnHookProc(
+    HWND hChildDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
 {
     HWND hwndDlg = GetParent(hChildDlg);
     CFileOpenDialog* pImpl = NULL;
@@ -577,10 +577,10 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
             // subclass the base dialog for WM_NCDESTROY processing 
             pImpl->m_pfnBaseDlgProc = 
                 reinterpret_cast<WNDPROC>( 
-                    SetWindowLong(
-                        hwndDlg, 
-                        GWL_WNDPROC, 
-                        reinterpret_cast<LONG>(CFileOpenDialog::BaseDlgProc)));                                                                                              
+                    SetWindowLongPtr(
+                        hwndDlg,
+                        GWLP_WNDPROC,
+                        reinterpret_cast<LONG_PTR>(CFileOpenDialog::BaseDlgProc)));
             // connect the instance handle to the window            
             SetProp(hwndDlg, CURRENT_INSTANCE, pImpl);
             pImpl->handleInitDialog(hwndDlg, hChildDlg);
@@ -621,8 +621,8 @@ LRESULT CALLBACK CFileOpenDialog::BaseDlgProc(
         pImpl = reinterpret_cast<CFileOpenDialog*>(
             RemoveProp(hWnd,CURRENT_INSTANCE));
                 
-        SetWindowLong(hWnd, GWL_WNDPROC, 
-            reinterpret_cast<LONG>(pImpl->m_pfnBaseDlgProc));
+        SetWindowLongPtr(hWnd, GWLP_WNDPROC,
+            reinterpret_cast<LONG_PTR>(pImpl->m_pfnBaseDlgProc));
     }
     else
     {
diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.hxx b/fpicker/source/win32/filepicker/FileOpenDlg.hxx
index 8446605..4ad6776 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.hxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.hxx
@@ -303,9 +303,9 @@ private:
     WNDPROC	    		m_pfnBaseDlgProc;
 
     // callback function
-    static unsigned int CALLBACK ofnHookProc( 
+    static UINT_PTR CALLBACK ofnHookProc( 
         HWND hChildDlg, // handle to child dialog box
-        unsigned int uiMsg,     // message identifier
+        UINT uiMsg,     // message identifier
         WPARAM wParam,  // message parameter
         LPARAM lParam   // message parameter
     );
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index 45f0586..8e31612 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -533,8 +533,8 @@ LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc(
     
     case WM_NCDESTROY:
         // restore the old window proc
-        SetWindowLong(hWnd, GWL_WNDPROC, 
-            reinterpret_cast<LONG>(pImpl->m_pfnOldDlgProc));
+        SetWindowLongPtr(hWnd, GWLP_WNDPROC, 
+            reinterpret_cast<LONG_PTR>(pImpl->m_pfnOldDlgProc));
 
         lResult = CallWindowProc( 
             reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc), 
@@ -885,8 +885,8 @@ void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg)
     // subclass the dialog window
     m_pfnOldDlgProc = 
         reinterpret_cast<WNDPROC>( 
-            SetWindowLong( hwndDlg, GWL_WNDPROC, 
-            reinterpret_cast<LONG>(SubClassFunc)));    
+            SetWindowLongPtr( hwndDlg, GWLP_WNDPROC, 
+            reinterpret_cast<LONG_PTR>(SubClassFunc)));    
 }
 
 //-----------------------------------------------------------------------------------------


More information about the Libreoffice-commits mailing list