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 73ea0802ddd390c9ffc99bb32f60110e7746d311 Author: Damjan Jovanovic <dam...@apache.org> AuthorDate: Fri Jan 3 01:35:28 2025 +0200 Win64 fixes for fpicker. Patch by: me --- .../source/win32/filepicker/FileOpenDlg.cxx | 34 +++++++++++----------- .../source/win32/filepicker/FileOpenDlg.hxx | 10 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/main/fpicker/source/win32/filepicker/FileOpenDlg.cxx index 1fa8b1ce4d..8af4603402 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); @@ -568,12 +568,12 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc( OSL_ASSERT(pImpl); // subclass the base dialog for WM_NCDESTROY processing - pImpl->m_pfnBaseDlgProc = - reinterpret_cast<WNDPROC>( - SetWindowLong( - hwndDlg, - GWL_WNDPROC, - reinterpret_cast<LONG>(CFileOpenDialog::BaseDlgProc))); + pImpl->m_pfnBaseDlgProc = + reinterpret_cast<WNDPROC>( + 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); @@ -583,7 +583,7 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc( case WM_NOTIFY: { pImpl = getCurrentInstance(hwndDlg); - return pImpl->onWMNotify( + return pImpl->onWMNotify( hChildDlg, reinterpret_cast<LPOFNOTIFY>(lParam)); } @@ -592,8 +592,8 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc( pImpl = getCurrentInstance(hwndDlg); OSL_ASSERT(pImpl); - return pImpl->onCtrlCommand( - hChildDlg, LOWORD(wParam), HIWORD(lParam)); + return pImpl->onCtrlCommand( + hChildDlg, LOWORD(wParam), HIWORD(lParam)); } } @@ -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 22b9fc0939..4a1bbe647e 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