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

leginee pushed a commit to branch bazel-migration
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit d14d772a5bd66969dee8b8ef850cba39d09a196f
Author: Peter Kovacs <[email protected]>
AuthorDate: Fri Jul 24 12:05:26 2026 +0200

    crashrep/fpicker/cui: Win64 (x64) source fixes
    
    Backport the Win64 source fixes from origin/windows-amd64 (dmake-era
    reference); meaningful hunks only -- the reference branch carries heavy
    whitespace churn -- and each compiles unchanged on x86 (dmake-backportable).
    
    - crashrep soreport.cpp (8740daf50e): GWL_ -> GWLP_ + *LongPtr, dialog
      procs BOOL -> INT_PTR, CONTEXT.Eip/Ebp -> Rip/Rbp (guarded by
      INTEL/X86_64), DWORD -> DWORD64 for SymGetSymFromAddr64.
    - fpicker FileOpenDlg + WinFileOpenImpl (73ea0802dd, b077179428): same
      GWL_ -> GWLP_ subclass cluster, OFN hook-proc returns -> UINT_PTR,
      lCustData/lResult LONG -> LONG_PTR/LRESULT pointer-truncation fixes.
    - cui optdict.cxx (93b3eead64): 0LU -> sal_uLong(0LU), resolving a
      0-vs-NULL overload ambiguity (int-type vs pointer overload) that only
      bites once sal_uLong widens on x64.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    (cherry picked from commit 25104ebbcafb3621565a09fbe219747935cb24c9)
---
 main/crashrep/source/win32/soreport.cpp            | 76 +++++++++++++---------
 main/cui/source/options/optdict.cxx                |  4 +-
 .../source/win32/filepicker/FileOpenDlg.cxx        | 22 +++----
 .../source/win32/filepicker/FileOpenDlg.hxx        | 10 +--
 .../source/win32/filepicker/WinFileOpenImpl.cxx    | 14 ++--
 .../source/win32/filepicker/WinFileOpenImpl.hxx    |  4 +-
 6 files changed, 71 insertions(+), 59 deletions(-)

diff --git a/main/crashrep/source/win32/soreport.cpp 
b/main/crashrep/source/win32/soreport.cpp
index d3c95500bc..3059ec481c 100644
--- a/main/crashrep/source/win32/soreport.cpp
+++ b/main/crashrep/source/win32/soreport.cpp
@@ -166,7 +166,7 @@ static FILE *_tmpfile(void)
 
                        if ( IsValidHandle( hFile ) )
                        {
-                               int fd = _open_osfhandle( (int)hFile, 0 );
+                               int fd = _open_osfhandle( (intptr_t)hFile, 0 );
 
                                fp = _fdopen( fd, "w+b" );
                        }
@@ -666,7 +666,7 @@ BOOL WriteReportFile( CrashReportParams *pParams )
 
                        if ( hFile )
                        {
-                               int     fd = _open_osfhandle( (LONG)hFile, 
_O_TEXT );
+                               int     fd = _open_osfhandle( (intptr_t)hFile, 
_O_TEXT );
                                FILE    *fp = _fdopen( fd, "w+t" );
                                CHAR    szTitle[1024] = "";
                                CHAR    szBuildId[1024] = "";
@@ -858,7 +858,7 @@ void ApplySystemFont( HWND hwndDlg )
 }
 */
 
-BOOL CALLBACK PreviewDialogProc(
+INT_PTR CALLBACK PreviewDialogProc(
        HWND hwndDlg,
        UINT uMsg,
        WPARAM wParam,
@@ -892,8 +892,8 @@ BOOL CALLBACK PreviewDialogProc(
                        CrashReportParams *pParams = (CrashReportParams 
*)lParam;
 
                        TCHAR   szBuffer[256] = TEXT("");
-                       HINSTANCE       hInstance = (HINSTANCE)GetWindowLong( 
hwndDlg, GWL_HINSTANCE );
-                       HWND    hwndParent = (HWND)GetWindowLong( hwndDlg, 
GWL_HWNDPARENT );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr( hwndDlg, GWLP_HINSTANCE );
+                       HWND    hwndParent = (HWND)GetWindowLongPtr( hwndDlg, 
GWLP_HWNDPARENT );
 
                        GetWindowText( hwndParent, szBuffer, 
elementsof(szBuffer) );
                        SetWindowText( hwndDlg, szBuffer );
@@ -997,7 +997,7 @@ BOOL CALLBACK PreviewDialogProc(
 
 static void PreviewReport( HWND hwndParent, CrashReportParams *pParams )
 {
-       HINSTANCE       hInstance = (HINSTANCE)GetWindowLong(hwndParent, 
GWL_HINSTANCE );
+       HINSTANCE       hInstance = (HINSTANCE)GetWindowLongPtr(hwndParent, 
GWLP_HINSTANCE );
 
        WriteReportFile( pParams );
 
@@ -1028,7 +1028,7 @@ void UpdateOptionsDialogControls( HWND hwndDlg )
 
 //***************************************************************************
 
-BOOL CALLBACK OptionsDialogProc(
+INT_PTR CALLBACK OptionsDialogProc(
        HWND hwndDlg,
        UINT uMsg,
        WPARAM wParam,
@@ -1042,8 +1042,8 @@ BOOL CALLBACK OptionsDialogProc(
        case WM_INITDIALOG:
                {
                        TCHAR   szBuffer[1024] = TEXT("");
-                       HINSTANCE       hInstance = (HINSTANCE)GetWindowLong( 
hwndDlg, GWL_HINSTANCE );
-                       //HWND  hwndParent = (HWND)GetWindowLong( hwndDlg, 
GWL_HWNDPARENT );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr( hwndDlg, GWLP_HINSTANCE );
+                       //HWND  hwndParent = (HWND)GetWindowLongPtr( hwndDlg, 
GWLP_HWNDPARENT );
 
                        pParams = (CrashReportParams *)lParam;
 
@@ -1132,7 +1132,7 @@ BOOL CALLBACK OptionsDialogProc(
 
 static void OptionsDialog( HWND hwndParent, CrashReportParams *pParams )
 {
-       HINSTANCE       hInstance = (HINSTANCE)GetWindowLong(hwndParent, 
GWL_HINSTANCE );
+       HINSTANCE       hInstance = (HINSTANCE)GetWindowLongPtr(hwndParent, 
GWLP_HINSTANCE );
 
        if ( IDOK == DialogBoxParam(
                hInstance,
@@ -1158,7 +1158,7 @@ void UpdateReportDialogControls( HWND hwndDlg )
 
 //***************************************************************************
 
-BOOL CALLBACK ReportDialogProc(
+INT_PTR CALLBACK ReportDialogProc(
        HWND hwndDlg,
        UINT uMsg,
        WPARAM wParam,
@@ -1169,8 +1169,8 @@ BOOL CALLBACK ReportDialogProc(
        {
        case WM_INITDIALOG:
                {
-                       CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLong( GetParent(hwndDlg), GWL_USERDATA );
-                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
+                       CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLongPtr( GetParent(hwndDlg), GWLP_USERDATA );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE );
                        TCHAR           szBuffer[FORMATBUFSIZE];
 
                        LoadAndFormatString( hInstance, IDS_REPORT_INTRO, 
szBuffer, elementsof(szBuffer) );
@@ -1214,8 +1214,8 @@ BOOL CALLBACK ReportDialogProc(
        case WM_SHOWWINDOW:
                if ( (BOOL)wParam )
                {
-                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
-                       CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLong( GetParent(hwndDlg), GWL_USERDATA );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE );
+                       CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLongPtr( GetParent(hwndDlg), GWLP_USERDATA );
                        TCHAR           szBuffer[FORMATBUFSIZE];
 
                        LoadAndFormatString( hInstance, IDS_REPORT_CAPTION, 
szBuffer, elementsof(szBuffer) );
@@ -1236,10 +1236,10 @@ BOOL CALLBACK ReportDialogProc(
                        Edit_SetText( GetDlgItem(hwndDlg, 
IDC_EDIT_DESCRIPTION), pParams->sComment.c_str() );
 
                        /*
-                       SetWindowLong( GetDlgItem(GetParent(hwndDlg),IDFINISH), 
GWL_STYLE,
-                               GetWindowLong( 
GetDlgItem(GetParent(hwndDlg),IDFINISH), GWL_STYLE) | BS_DEFPUSHBUTTON );
-                       SetWindowLong( GetDlgItem(GetParent(hwndDlg),IDBACK), 
GWL_STYLE,
-                               GetWindowLong( 
GetDlgItem(GetParent(hwndDlg),IDBACK), GWL_STYLE) &~ BS_DEFPUSHBUTTON );
+                       SetWindowLongPtr( 
GetDlgItem(GetParent(hwndDlg),IDFINISH), GWLP_STYLE,
+                               GetWindowLongPtr( 
GetDlgItem(GetParent(hwndDlg),IDFINISH), GWLP_STYLE) | BS_DEFPUSHBUTTON );
+                       SetWindowLongPtr( 
GetDlgItem(GetParent(hwndDlg),IDBACK), GWLP_STYLE,
+                               GetWindowLongPtr( 
GetDlgItem(GetParent(hwndDlg),IDBACK), GWLP_STYLE) &~ BS_DEFPUSHBUTTON );
                                */
                        SetFocus( GetDlgItem(hwndDlg,IDC_EDIT_TITLE) );
                }
@@ -1251,7 +1251,7 @@ BOOL CALLBACK ReportDialogProc(
                        {
                                TCHAR   szBuffer[32767];
 
-                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLong( GetParent(hwndDlg), GWL_USERDATA );
+                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLongPtr( GetParent(hwndDlg), GWLP_USERDATA );
 
                                pParams->fAllowContact = Button_GetCheck( 
GetDlgItem(hwndDlg, IDC_ALLOW_CONTACT) ) ? TRUE : FALSE;
 
@@ -1272,7 +1272,7 @@ BOOL CALLBACK ReportDialogProc(
                        return TRUE;
                case IDC_OPTIONS:
                        {
-                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLong( GetParent(hwndDlg), GWL_USERDATA );
+                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLongPtr( GetParent(hwndDlg), GWLP_USERDATA );
                                OptionsDialog( GetParent(hwndDlg), pParams );
                        }
                        return TRUE;
@@ -1290,13 +1290,13 @@ BOOL CALLBACK ReportDialogProc(
 }
 //***************************************************************************
 
-BOOL CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, 
LPARAM lParam )
+INT_PTR CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, 
LPARAM lParam )
 {
        switch ( uMsg )
        {
        case WM_INITDIALOG:
                {
-                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE );
                        HWND    hwndRichEdit = GetDlgItem(hwndDlg, 
IDC_RICHEDIT21);
                        TCHAR   szBuffer[FORMATBUFSIZE];
                        TCHAR   szBuffer2[FORMATBUFSIZE];
@@ -1329,7 +1329,7 @@ BOOL CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, 
WPARAM wParam, LPARAM
        case WM_SHOWWINDOW:
                if ( (BOOL)wParam )
                {
-                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE );
                        TCHAR           szBuffer[FORMATBUFSIZE];
 
                        LoadAndFormatString( hInstance, IDS_WELCOME_CAPTION, 
szBuffer, elementsof(szBuffer) );
@@ -1380,7 +1380,7 @@ BOOL CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, 
WPARAM wParam, LPARAM
 }
 //***************************************************************************
 
-BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM 
lParam )
+INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM 
lParam )
 {
        static  HWND    hwndPages[2] = { NULL };
        static  int             iActualPage = 0;
@@ -1389,10 +1389,10 @@ BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, 
WPARAM wParam, LPARAM lParam
        {
        case WM_INITDIALOG:
                {
-                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE );
                        TCHAR           szBuffer[FORMATBUFSIZE];
 
-                       SetWindowLong( hwndDlg, GWL_USERDATA, (LONG)lParam );
+                       SetWindowLongPtr( hwndDlg, GWLP_USERDATA, (LONG)lParam 
);
                        hwndPages[0] = CreateDialog(
                                hInstance,
                                MAKEINTRESOURCE(IDD_WELCOME_PAGE),
@@ -1458,7 +1458,7 @@ BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM 
wParam, LPARAM lParam
                case IDFINISH:
                        {
                                TCHAR   szBuffer[32767];
-                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLong( hwndDlg, GWL_USERDATA );
+                               CrashReportParams       *pParams = 
(CrashReportParams*)GetWindowLongPtr( hwndDlg, GWLP_USERDATA );
 
                                pParams->fAllowContact = Button_GetCheck( 
GetDlgItem(hwndPages[1], IDC_ALLOW_CONTACT) ) ? TRUE : FALSE;
 
@@ -1725,9 +1725,21 @@ static bool WriteStackFile( FILE *fout, hash_map< 
string, string >& rLibraries,
                        STACKFRAME      frame;
 
                        ZeroMemory( &frame, sizeof(frame) );
+#if defined(INTEL)
                        frame.AddrPC.Offset = aContextRecord.Eip;
+#elif defined(X86_64)
+                       frame.AddrPC.Offset = aContextRecord.Rip;
+#else
+#error Unsupported architecture
+#endif
                        frame.AddrPC.Mode = AddrModeFlat;
+#if defined(INTEL)
                        frame.AddrFrame.Offset = aContextRecord.Ebp;
+#elif defined(X86_64)
+                       frame.AddrFrame.Offset = aContextRecord.Rbp;
+#else
+#error Unsupported architecture
+#endif
                        frame.AddrFrame.Mode = AddrModeFlat;
 
                        BOOL bSuccess;
@@ -1766,7 +1778,7 @@ static bool WriteStackFile( FILE *fout, hash_map< string, 
string >& rLibraries,
                                        {
                                                rLibraries[ GetFileName( 
moduleInfo.LoadedImageName ).c_str() ] = moduleInfo.LoadedImageName;
 
-                                               DWORD   dwRelOffset = 0;
+                                               DWORD64 dwRelOffset = 0;
                                                BYTE    
symbolBuffer[sizeof(IMAGEHLP_SYMBOL) + 256 ];
                                                PIMAGEHLP_SYMBOL        pSymbol 
= (PIMAGEHLP_SYMBOL)symbolBuffer;
 
@@ -2600,7 +2612,7 @@ void _cdecl SendingThread( void *lpArgs )
 
 //***************************************************************************
 
-BOOL CALLBACK SendingStatusDialogProc(
+INT_PTR CALLBACK SendingStatusDialogProc(
        HWND hwndDlg,
        UINT uMsg,
        WPARAM wParam,
@@ -2615,8 +2627,8 @@ BOOL CALLBACK SendingStatusDialogProc(
        case WM_INITDIALOG:
                {
                        TCHAR   szBuffer[1024] = TEXT("");
-                       HINSTANCE       hInstance = (HINSTANCE)GetWindowLong( 
hwndDlg, GWL_HINSTANCE );
-                       //HWND  hwndParent = (HWND)GetWindowLong( hwndDlg, 
GWL_HWNDPARENT );
+                       HINSTANCE       hInstance = 
(HINSTANCE)GetWindowLongPtr( hwndDlg, GWLP_HINSTANCE );
+                       //HWND  hwndParent = (HWND)GetWindowLongPtr( hwndDlg, 
GWLP_HWNDPARENT );
 
                        pRequest = (RequestParams *)lParam;
 
diff --git a/main/cui/source/options/optdict.cxx 
b/main/cui/source/options/optdict.cxx
index 9980cfdc6f..953fb3235b 100644
--- a/main/cui/source/options/optdict.cxx
+++ b/main/cui/source/options/optdict.cxx
@@ -543,8 +543,8 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 
nId )
 
        if (aWordsLB.GetEntryCount())
        {
-               aWordED   .SetText( aWordsLB.GetEntryText(0LU, 0) );
-               aReplaceED.SetText( aWordsLB.GetEntryText(0LU, 1) );
+               aWordED   .SetText( aWordsLB.GetEntryText(sal_uLong(0LU), 0) );
+               aReplaceED.SetText( aWordsLB.GetEntryText(sal_uLong(0LU), 1) );
        }
 
        LeaveWait();
diff --git a/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx 
b/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx
index 5637c38f0b..7f3aaf6bc5 100644
--- a/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx
+++ b/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx
@@ -144,7 +144,7 @@ CFileOpenDialog::CFileOpenDialog(
        }
 
        // set a pointer to myself as ofn parameter
-       m_ofn.lCustData = reinterpret_cast<long>(this);
+       m_ofn.lCustData = reinterpret_cast<LPARAM>(this);
 }
 
 //------------------------------------------------------------------------
@@ -430,7 +430,7 @@ rtl::OUString SAL_CALL 
CFileOpenDialog::getCurrentFileName() const
 //
 //------------------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CFileOpenDialog::onShareViolation(const rtl::OUString&)
+UINT_PTR SAL_CALL CFileOpenDialog::onShareViolation(const rtl::OUString&)
 {
        return 0;
 }
@@ -439,7 +439,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onShareViolation(const 
rtl::OUString&)
 //
 //------------------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CFileOpenDialog::onFileOk()
+UINT_PTR SAL_CALL CFileOpenDialog::onFileOk()
 {
        return 0;
 }
@@ -489,7 +489,7 @@ void SAL_CALL CFileOpenDialog::onTypeChanged(sal_uInt32)
 //
 //------------------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, sal_uInt16, 
sal_uInt16)
+UINT_PTR SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, sal_uInt16, sal_uInt16)
 {
        return 0;
 }
@@ -498,7 +498,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, 
sal_uInt16, sal_uInt16)
 //
 //------------------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify )
+UINT_PTR SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify )
 {
        switch(lpOfNotify->hdr.code)
        {
@@ -553,7 +553,7 @@ void SAL_CALL CFileOpenDialog::handleInitDialog(HWND 
hwndDlg, HWND hwndChild)
 //
 //------------------------------------------------------------------------
 
-unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
+UINT_PTR CALLBACK CFileOpenDialog::ofnHookProc(
        HWND hChildDlg, unsigned int uiMsg, WPARAM wParam, LPARAM lParam)
 {
     HWND hwndDlg = GetParent(hChildDlg);
@@ -570,10 +570,10 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
             // subclass the base dialog for WM_NCDESTROY processing
             pImpl->m_pfnBaseDlgProc =
                        reinterpret_cast<WNDPROC>(
-                               SetWindowLong(
+                               SetWindowLongPtr(
                                    hwndDlg,
-                                   GWL_WNDPROC,
-                        reinterpret_cast<LONG>(CFileOpenDialog::BaseDlgProc)));
+                                   GWLP_WNDPROC,
+                        
reinterpret_cast<LONG_PTR>(CFileOpenDialog::BaseDlgProc)));
             // connect the instance handle to the window
             SetProp(hwndDlg, CURRENT_INSTANCE, pImpl);
                    pImpl->handleInitDialog(hwndDlg, hChildDlg);
@@ -614,8 +614,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/main/fpicker/source/win32/filepicker/FileOpenDlg.hxx 
b/main/fpicker/source/win32/filepicker/FileOpenDlg.hxx
index 16075788ba..2c10cc6258 100644
--- a/main/fpicker/source/win32/filepicker/FileOpenDlg.hxx
+++ b/main/fpicker/source/win32/filepicker/FileOpenDlg.hxx
@@ -244,8 +244,8 @@ protected:
        virtual void SAL_CALL postModal(sal_Int16 nDialogResult);
 
        // message handler, to be overwritten by subclasses
-       virtual sal_uInt32 SAL_CALL onShareViolation(const rtl::OUString& 
aPathName);
-       virtual sal_uInt32 SAL_CALL onFileOk();
+       virtual UINT_PTR SAL_CALL onShareViolation(const rtl::OUString& 
aPathName);
+       virtual UINT_PTR SAL_CALL onFileOk();
        virtual void SAL_CALL onSelChanged(HWND hwndListBox);
        virtual void SAL_CALL onHelp();
 
@@ -256,9 +256,9 @@ protected:
 
        virtual void SAL_CALL onInitDialog(HWND hwndDlg) = 0;
 
-       virtual sal_uInt32 SAL_CALL onCtrlCommand(HWND hwndDlg, sal_uInt16 
ctrlId, sal_uInt16 notifyCode);
+       virtual UINT_PTR SAL_CALL onCtrlCommand(HWND hwndDlg, sal_uInt16 
ctrlId, sal_uInt16 notifyCode);
 
-       sal_uInt32 SAL_CALL onWMNotify(HWND hwndChild, LPOFNOTIFYW lpOfNotify);
+       UINT_PTR SAL_CALL onWMNotify(HWND hwndChild, LPOFNOTIFYW lpOfNotify);
 
        // we use non-virtual functions to do necessary work before
        // calling the virtual functions (see Gamma: Template method)
@@ -300,7 +300,7 @@ 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
                WPARAM wParam,  // message parameter
diff --git a/main/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx 
b/main/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index 5d45db5614..0fa46dcb29 100644
--- a/main/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/main/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -508,7 +508,7 @@ inline sal_Bool SAL_CALL 
CWinFileOpenImpl::IsCustomControlHelpRequested(LPHELPIN
 LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc(
     HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam)
 {
-       unsigned int lResult = 0;
+       LRESULT lResult = 0;
 
     CWinFileOpenImpl* pImpl = 
dynamic_cast<CWinFileOpenImpl*>(getCurrentInstance(hWnd));
 
@@ -553,8 +553,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),
@@ -654,7 +654,7 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, 
LPARAM lParam)
 //
 //-----------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk()
+UINT_PTR SAL_CALL CWinFileOpenImpl::onFileOk()
 {
     m_NonExecuteFilePickerState->reset();
 
@@ -832,7 +832,7 @@ void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32)
 // onMessageCommand handler
 
//-----------------------------------------------------------------------------------------
 
-sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand(
+UINT_PTR SAL_CALL CWinFileOpenImpl::onCtrlCommand(
        HWND, sal_uInt16 ctrlId, sal_uInt16)
 {
     SetDefaultExtension();
@@ -905,8 +905,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)));
 }
 
 
//-----------------------------------------------------------------------------------------
diff --git a/main/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx 
b/main/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
index 0bbb481a9e..f10f0667d2 100644
--- a/main/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
+++ b/main/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
@@ -170,7 +170,7 @@ protected:
        virtual bool SAL_CALL preModal( );
        virtual void SAL_CALL postModal( sal_Int16 nDialogResult );
 
-       virtual sal_uInt32 SAL_CALL onFileOk();
+       virtual UINT_PTR SAL_CALL onFileOk();
        virtual void SAL_CALL onSelChanged( HWND hwndListBox );
 
        // only called back if OFN_EXPLORER is set
@@ -181,7 +181,7 @@ protected:
        // call base class method first when overloading
        virtual void SAL_CALL onInitDialog( HWND hwndDlg );
 
-       virtual sal_uInt32 SAL_CALL onCtrlCommand( HWND hwndDlg, sal_uInt16 
ctrlId, sal_uInt16 notifyCode );
+       virtual UINT_PTR SAL_CALL onCtrlCommand( HWND hwndDlg, sal_uInt16 
ctrlId, sal_uInt16 notifyCode );
 
 
        void onWMSize();

Reply via email to