This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch windows-amd64
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 9b64d14c8db820b12fd46309c893e56e42d4b053
Author: Damjan Jovanovic <dam...@apache.org>
AuthorDate: Thu Jan 2 21:38:09 2025 +0200

    Win64 compatibility for:
    SetWindowLong() -> SetWindowLongPtr()
    GetWindowLong() -> GetWindowLongPtr()
    
    Patch by: me
---
 main/vcl/inc/win/saldata.hxx        | 8 ++++----
 main/vcl/win/source/app/saldata.cxx | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/main/vcl/inc/win/saldata.hxx b/main/vcl/inc/win/saldata.hxx
index 6fc4b3c1b5..d9dd581c49 100644
--- a/main/vcl/inc/win/saldata.hxx
+++ b/main/vcl/inc/win/saldata.hxx
@@ -344,8 +344,8 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const 
char* pStr2 );
 // -----------------
 
 // A/W-Wrapper
-LONG        ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong );
-LONG        ImplGetWindowLong( HWND hWnd, int nIndex );
+LONG_PTR        ImplSetWindowLong( HWND hWnd, int nIndex, LONG_PTR newLong );
+LONG_PTR        ImplGetWindowLong( HWND hWnd, int nIndex );
 BOOL    ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
 BOOL    ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
 BOOL    ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT 
wMsgFilterMax );
@@ -354,7 +354,7 @@ LONG        ImplDispatchMessage( CONST MSG *lpMsg );
 
 inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis )
 {
-    ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis );
+    ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG_PTR)pThis );
 }
 
 inline WinSalFrame* GetWindowPtr( HWND hWnd )
@@ -364,7 +364,7 @@ inline WinSalFrame* GetWindowPtr( HWND hWnd )
 
 inline void SetSalObjWindowPtr( HWND hWnd, WinSalObject* pThis )
 {
-    ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis );
+    ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG_PTR)pThis );
 }
 
 inline WinSalObject* GetSalObjWindowPtr( HWND hWnd )
diff --git a/main/vcl/win/source/app/saldata.cxx 
b/main/vcl/win/source/app/saldata.cxx
index a75ee9e0ad..2750b68a6a 100644
--- a/main/vcl/win/source/app/saldata.cxx
+++ b/main/vcl/win/source/app/saldata.cxx
@@ -114,16 +114,16 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const 
char* pStr2 )
 
 // =======================================================================
 
-LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong )
+LONG_PTR ImplSetWindowLong( HWND hWnd, int nIndex, LONG_PTR newLong )
 {
-       return SetWindowLongW( hWnd, nIndex, dwNewLong );
+       return SetWindowLongPtrW( hWnd, nIndex, newLong );
 }
 
 // -----------------------------------------------------------------------
 
-LONG ImplGetWindowLong( HWND hWnd, int nIndex )
+LONG_PTR ImplGetWindowLong( HWND hWnd, int nIndex )
 {
-       return GetWindowLongW( hWnd, nIndex );
+       return GetWindowLongPtrW( hWnd, nIndex );
 }
 
 // -----------------------------------------------------------------------

Reply via email to