You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2026/08/06 12:49:18 UTC

(openoffice) branch AOO42X updated (0c620f18d9 -> c72d3ad509)

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

jimjag pushed a change to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


    from 0c620f18d9 Revert changes to menu button
     new 1a61f9a5d8 Change the return type of Get10ThSec() to clock_t, so it works regardless of the size of the integer type.
     new c902fb22cb In ImplPreparePolyDraw(), nCurrPoints and nCurrPoint should be sal_uInt32, just like pPoints points to, which they are assigned from or related to. Commit 30f18d3fb8fe7eacd8ee5f353bc7c60bfbf18ac5 didn't fix all the uses of the pointer size change it made.
     new d24f51a2dd Add "version" as a library on Windows, and link to it so we can find functions like VerQueryValueW() on Win64.
     new a1206e9491 vcl/basic/sfx2/unixODBC: Win64 (x64) source fixes
     new 6aa83eaaa4 wParam is already a UINT_PTR, an integer type, so no need to cast it.
     new c72d3ad509 Only build the StarBasic "DLL manager" on x86 Win32, instead of any Windows system that isn't AMD64. It only supports x86 Win32 and never supported anything else; there were discussions on bugs 112064 and 126277 about other platforms, but development never got completed and merged.

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/basic/source/runtime/dllmgr.cxx        |  6 +++++-
 main/sfx2/source/bastyp/progress.cxx        |  2 +-
 main/sfx2/source/view/sfxbasecontroller.cxx |  6 +++---
 main/solenv/gbuild/platform/windows.mk      |  1 +
 main/unixODBC/inc/sqltypes.h                |  1 +
 main/vcl/Library_vcl.mk                     |  1 +
 main/vcl/inc/win/wincomp.hxx                | 14 +++++++-------
 main/vcl/source/window/scrwnd.cxx           |  2 +-
 main/vcl/win/source/gdi/salgdi.cxx          |  8 ++++----
 main/vcl/win/source/window/salframe.cxx     |  4 ++--
 10 files changed, 26 insertions(+), 19 deletions(-)


(openoffice) 03/06: Add "version" as a library on Windows, and link to it so we can find functions like VerQueryValueW() on Win64.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit d24f51a2dd758cb59751449a22371c521fc65330
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Fri Jan 3 00:36:02 2025 +0200

    Add "version" as a library on Windows, and link to it so we
    can find functions like VerQueryValueW() on Win64.
    
    Patch by: me
    
    (cherry picked from commit 29ca9883b9ac0322aa31cde268e099f436837510)
---
 main/solenv/gbuild/platform/windows.mk | 1 +
 main/vcl/Library_vcl.mk                | 1 +
 2 files changed, 2 insertions(+)

diff --git a/main/solenv/gbuild/platform/windows.mk b/main/solenv/gbuild/platform/windows.mk
index 979fea9448..53caa48c2e 100644
--- a/main/solenv/gbuild/platform/windows.mk
+++ b/main/solenv/gbuild/platform/windows.mk
@@ -526,6 +526,7 @@ gb_Library_PLAINLIBS_NONE += \
 	user32 \
 	uuid \
 	uwinapi \
+	version \
 	winmm \
 	winspool \
 	ws2_32 \
diff --git a/main/vcl/Library_vcl.mk b/main/vcl/Library_vcl.mk
index 2cf3b5c7c1..48d28c22e6 100644
--- a/main/vcl/Library_vcl.mk
+++ b/main/vcl/Library_vcl.mk
@@ -529,6 +529,7 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\
 	shell32 \
 	user32 \
 	uuid \
+	version \
 	winspool \
 	$(gb_STDLIBS) \
 ))


(openoffice) 02/06: In ImplPreparePolyDraw(), nCurrPoints and nCurrPoint should be sal_uInt32, just like pPoints points to, which they are assigned from or related to. Commit 30f18d3fb8fe7eacd8ee5f353bc7c60bfbf18ac5 didn't fix all the uses of the pointer size change it made.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit c902fb22cbea4d355e59ed59eab410f36290585c
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Thu Jan 2 21:59:02 2025 +0200

    In ImplPreparePolyDraw(), nCurrPoints and nCurrPoint should be sal_uInt32,
    just like pPoints points to, which they are assigned from or related to.
    Commit 30f18d3fb8fe7eacd8ee5f353bc7c60bfbf18ac5 didn't fix all the uses
    of the pointer size change it made.
    
    Patch by: me
    
    (cherry picked from commit 48f8cc8f699b12f766e669922446071e6902869c)
---
 main/vcl/win/source/gdi/salgdi.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/vcl/win/source/gdi/salgdi.cxx b/main/vcl/win/source/gdi/salgdi.cxx
index 53453a0ec3..b4017433ec 100644
--- a/main/vcl/win/source/gdi/salgdi.cxx
+++ b/main/vcl/win/source/gdi/salgdi.cxx
@@ -633,9 +633,9 @@ void ImplPreparePolyDraw( bool						bCloseFigures,
     {
         const POINT* pCurrPoint = reinterpret_cast<const POINT*>( *pPtAry++ );
         const BYTE* pCurrFlag = *pFlgAry++;
-        const sal_uLong nCurrPoints = *pPoints++;
+        const sal_uInt32 nCurrPoints = *pPoints++;
         const bool bHaveFlagArray( pCurrFlag );
-        sal_uLong nCurrPoint;
+        sal_uInt32 nCurrPoint;
 
         if( nCurrPoints )
         {


(openoffice) 01/06: Change the return type of Get10ThSec() to clock_t, so it works regardless of the size of the integer type.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1a61f9a5d8c18413d7c8e8c30f2f50ba7a43a929
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Fri Jan 3 07:01:21 2025 +0200

    Change the return type of Get10ThSec() to clock_t, so it works
    regardless of the size of the integer type.
    
    Patch by: me
    
    (cherry picked from commit 448dc86220cf9531c9c48d1efc4e906d246b1899)
---
 main/sfx2/source/bastyp/progress.cxx        | 2 +-
 main/sfx2/source/view/sfxbasecontroller.cxx | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/main/sfx2/source/bastyp/progress.cxx b/main/sfx2/source/bastyp/progress.cxx
index efacc2cfd1..f360c0574a 100644
--- a/main/sfx2/source/bastyp/progress.cxx
+++ b/main/sfx2/source/bastyp/progress.cxx
@@ -110,7 +110,7 @@ struct SfxProgress_Impl
 #define aTypeLibInfo aProgressTypeLibImpl
 
 //========================================================================
-extern sal_uIntPtr Get10ThSec();
+extern clock_t Get10ThSec();
 
 // -----------------------------------------------------------------------
 
diff --git a/main/sfx2/source/view/sfxbasecontroller.cxx b/main/sfx2/source/view/sfxbasecontroller.cxx
index bb174eeeb6..015084586b 100644
--- a/main/sfx2/source/view/sfxbasecontroller.cxx
+++ b/main/sfx2/source/view/sfxbasecontroller.cxx
@@ -220,9 +220,9 @@ sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup )
         return sal_False;
 }
 
-sal_uInt32 Get10ThSec()
+clock_t Get10ThSec()
 {
-	sal_uInt32 n10Ticks = 10 * (sal_uInt32)clock();
+	clock_t n10Ticks = 10 * clock();
 	return n10Ticks / CLOCKS_PER_SEC;
 }
 
@@ -246,7 +246,7 @@ friend class SfxBaseController;
     SfxWorkWindow*          pWorkWindow;
     sal_Int32               _nRange;
     sal_Int32               _nValue;
-	long					_nStartTime;
+	clock_t					_nStartTime;
 public:
                             SfxStatusIndicator(SfxBaseController* pController, SfxWorkWindow* pWork)
                                 : xOwner( pController )


(openoffice) 05/06: wParam is already a UINT_PTR, an integer type, so no need to cast it.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 6aa83eaaa466b803080d784cb71839f7ed768cd8
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Thu Jan 2 22:14:16 2025 +0200

    wParam is already a UINT_PTR, an integer type, so no need to cast it.
    
    Patch by: me
    
    (cherry picked from commit 1e5d8e72b5147bf84598caafc702eb279f3a8b41)
---
 main/vcl/win/source/window/salframe.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/vcl/win/source/window/salframe.cxx b/main/vcl/win/source/window/salframe.cxx
index 703fd76bef..ba3c544e1a 100644
--- a/main/vcl/win/source/window/salframe.cxx
+++ b/main/vcl/win/source/window/salframe.cxx
@@ -6249,12 +6249,12 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
             break;
 #if WINVER >= 0x0500
         case WM_IME_REQUEST:
-            if ( static_cast<int>( wParam ) == IMR_RECONVERTSTRING )
+            if ( wParam == IMR_RECONVERTSTRING )
             {
                 nRet = ImplHandleIMEReconvertString( hWnd, lParam );
                 rDef = FALSE;
             }
-	    else if( static_cast<int>( wParam ) == IMR_CONFIRMRECONVERTSTRING )
+	    else if( wParam == IMR_CONFIRMRECONVERTSTRING )
 	    {
 		nRet = ImplHandleIMEConfirmReconvertString( hWnd, lParam );
 		rDef = FALSE;


(openoffice) 04/06: vcl/basic/sfx2/unixODBC: Win64 (x64) source fixes

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit a1206e9491ccbbf780e702eafe9236f8d87e3483
Author: Peter Kovacs <pe...@apache.org>
AuthorDate: Wed Jul 22 00:55:30 2026 +0200

    vcl/basic/sfx2/unixODBC: Win64 (x64) source fixes
    
    Source-level fixes needed to compile/link these modules for Windows x86-64
    (VS2008 x64).  Each is arch-neutral or arch-guarded, so the x86 build is
    unchanged; isolated here so they can be cherry-picked onto the dmake
    windows-amd64 branch / upstream.
    
    - vcl/inc/win/wincomp.hxx: the pointer/handle class- and window-long indices
      GCL_HCURSOR/GCL_HICON/GCL_HBRBACKGROUND and GWL_HINSTANCE do not exist on
      Win64; use GCLP_*/GWLP_* with SetClassLongPtr/GetClassLongPtr/
      GetWindowLongPtr and (LONG_PTR) casts (compile on x86 too).
    - vcl/win/source/window/salframe.cxx: PtrToInt(wParam) misused on the integer
      IME request code (WPARAM is 64-bit on x64) -> static_cast<int>.
    - vcl/win/source/gdi/salgdi.cxx: ImplPreparePolyDraw took const sal_uLong* while
      the drawPolyPolygon* callers pass const sal_uInt32* (distinct pointer types on
      x64) -> sal_uInt32*.
    - vcl/source/window/scrwnd.cxx: Max(sal_uIntPtr, 1UL) ambiguous on x64 (sal_uIntPtr
      is 64-bit, 1UL is unsigned long) -> Max(..., sal_uIntPtr(1UL)).
    - basic/source/runtime/dllmgr.cxx: the DllMgr_call32/callFp trampolines (wnt.asm)
      are x86 stdcall only; guard #if defined WNT -> #if defined(WNT) && !defined(_WIN64)
      so x64 uses the existing not-implemented stub (Basic Declare'd DLL calls
      unsupported on x64 until an x64 trampoline is written).
    - sfx2/source/bastyp/progress.cxx: extern Get10ThSec declared sal_uIntPtr but the
      definition returns sal_uInt32; these coincide on x86 but diverge on x64 (link
      error) -> declare sal_uInt32.
    - unixODBC/inc/sqltypes.h: the _WIN64 branch uses INT64/UINT64 for SQLLEN/SQLULEN
      without pulling them in -> #include <basetsd.h> (arch-guarded).
    
    Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
    (cherry picked from commit ca1383cbf9353b4189783687c37e993025edf764)
    (cherry picked from commit a82fa8aef582f462d3f5518690eb9c6c33e5e8d0)
    (cherry picked from commit 30f18d3fb8fe7eacd8ee5f353bc7c60bfbf18ac5)
---
 main/basic/source/runtime/dllmgr.cxx    |  6 +++++-
 main/unixODBC/inc/sqltypes.h            |  1 +
 main/vcl/inc/win/wincomp.hxx            | 14 +++++++-------
 main/vcl/source/window/scrwnd.cxx       |  2 +-
 main/vcl/win/source/gdi/salgdi.cxx      |  4 ++--
 main/vcl/win/source/window/salframe.cxx |  4 ++--
 6 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/main/basic/source/runtime/dllmgr.cxx b/main/basic/source/runtime/dllmgr.cxx
index d31420340b..6a3adcdc7e 100644
--- a/main/basic/source/runtime/dllmgr.cxx
+++ b/main/basic/source/runtime/dllmgr.cxx
@@ -60,7 +60,11 @@
    variables accordingly.
 */
 
-#if defined WNT // only 32-bit Windows, actually
+#if defined(WNT) && !defined(_WIN64) // only 32-bit Windows: the DllMgr_call32/callFp
+                                     // trampolines (wnt.asm) are x86 stdcall only.
+                                     // x64 falls through to the not-implemented stub
+                                     // below (Basic Declare'd DLL calls unsupported on
+                                     // x64 until an x64 trampoline is written).
 
 extern "C" {
 
diff --git a/main/unixODBC/inc/sqltypes.h b/main/unixODBC/inc/sqltypes.h
index 399f702834..31171490b6 100644
--- a/main/unixODBC/inc/sqltypes.h
+++ b/main/unixODBC/inc/sqltypes.h
@@ -146,6 +146,7 @@ typedef unsigned char		SQLVARCHAR;
  *  New Win64 datatypes
  */
 #ifdef _WIN64
+#include <basetsd.h>			/* INT64 / UINT64 (not otherwise pulled in here) */
 typedef INT64			SQLLEN;
 typedef UINT64			SQLULEN;
 typedef UINT64			SQLSETPOSIROW;
diff --git a/main/vcl/inc/win/wincomp.hxx b/main/vcl/inc/win/wincomp.hxx
index e0bea9893b..60cc88b02c 100644
--- a/main/vcl/inc/win/wincomp.hxx
+++ b/main/vcl/inc/win/wincomp.hxx
@@ -146,37 +146,37 @@ inline HFONT GetWindowFont( HWND hWnd )
 
 inline void SetClassCursor( HWND hWnd, HCURSOR hCursor )
 {
-	SetClassLong( hWnd, GCL_HCURSOR, (DWORD)hCursor );
+	SetClassLongPtr( hWnd, GCLP_HCURSOR, (LONG_PTR)hCursor );
 }
 
 inline HCURSOR GetClassCursor( HWND hWnd )
 {
-	return (HCURSOR)GetClassLong( hWnd, GCL_HCURSOR );
+	return (HCURSOR)GetClassLongPtr( hWnd, GCLP_HCURSOR );
 }
 
 inline void SetClassIcon( HWND hWnd, HICON hIcon )
 {
-	SetClassLong( hWnd, GCL_HICON, (DWORD)hIcon );
+	SetClassLongPtr( hWnd, GCLP_HICON, (LONG_PTR)hIcon );
 }
 
 inline HICON GetClassIcon( HWND hWnd )
 {
-	return (HICON)GetClassLong( hWnd, GCL_HICON );
+	return (HICON)GetClassLongPtr( hWnd, GCLP_HICON );
 }
 
 inline HBRUSH SetClassBrush( HWND hWnd, HBRUSH hBrush )
 {
-	return (HBRUSH)SetClassLong( hWnd, GCL_HBRBACKGROUND, (DWORD)hBrush );
+	return (HBRUSH)SetClassLongPtr( hWnd, GCLP_HBRBACKGROUND, (LONG_PTR)hBrush );
 }
 
 inline HBRUSH GetClassBrush( HWND hWnd )
 {
-	return (HBRUSH)GetClassLong( hWnd, GCL_HBRBACKGROUND );
+	return (HBRUSH)GetClassLongPtr( hWnd, GCLP_HBRBACKGROUND );
 }
 
 inline HINSTANCE GetWindowInstance( HWND hWnd )
 {
-	return (HINSTANCE)GetWindowLong( hWnd, GWL_HINSTANCE );
+	return (HINSTANCE)GetWindowLongPtr( hWnd, GWLP_HINSTANCE );
 }
 
 // ------------------------
diff --git a/main/vcl/source/window/scrwnd.cxx b/main/vcl/source/window/scrwnd.cxx
index eeb0c43811..9cd21452b5 100644
--- a/main/vcl/source/window/scrwnd.cxx
+++ b/main/vcl/source/window/scrwnd.cxx
@@ -394,7 +394,7 @@ IMPL_LINK( ImplWheelWindow, ImplScrollHdl, Timer*, EMPTYARG )
 			pWindow->Command( aCEvt );
 			if( aDel.IsDead() )
 				return 0;
-			mnRepaintTime = Max( Time::GetSystemTicks() - nTime, 1UL );
+			mnRepaintTime = Max( Time::GetSystemTicks() - nTime, sal_uIntPtr(1UL) );
 			ImplRecalcScrollValues();
 		}
 	}
diff --git a/main/vcl/win/source/gdi/salgdi.cxx b/main/vcl/win/source/gdi/salgdi.cxx
index b4017433ec..2aedc1c1fb 100644
--- a/main/vcl/win/source/gdi/salgdi.cxx
+++ b/main/vcl/win/source/gdi/salgdi.cxx
@@ -622,7 +622,7 @@ void ImplClearHDCCache( SalData* pData )
 // Make sure pWinPointAry and pWinFlagAry are big enough
 void ImplPreparePolyDraw( bool						bCloseFigures,
                           sal_uLong 					nPoly,
-                          const sal_uLong* 				pPoints,
+                          const sal_uInt32* 				pPoints,
                           const SalPoint* const* 	pPtAry,
                           const BYTE* const* 		pFlgAry,
                           POINT* 					pWinPointAry,
@@ -1601,7 +1601,7 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
 				"WinSalGraphics::DrawPolyPolygonBezier(): POINT != SalPoint" );
 
     sal_uLong nCurrPoly, nTotalPoints;
-    const sal_uLong* pCurrPoints = pPoints;
+    const sal_uInt32* pCurrPoints = pPoints;
     for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly )
         nTotalPoints += *pCurrPoints++;
 
diff --git a/main/vcl/win/source/window/salframe.cxx b/main/vcl/win/source/window/salframe.cxx
index 7e0fe04a44..703fd76bef 100644
--- a/main/vcl/win/source/window/salframe.cxx
+++ b/main/vcl/win/source/window/salframe.cxx
@@ -6249,12 +6249,12 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
             break;
 #if WINVER >= 0x0500
         case WM_IME_REQUEST:
-            if ( PtrToInt( wParam ) == IMR_RECONVERTSTRING )
+            if ( static_cast<int>( wParam ) == IMR_RECONVERTSTRING )
             {
                 nRet = ImplHandleIMEReconvertString( hWnd, lParam );
                 rDef = FALSE;
             }
-	    else if( PtrToInt( wParam ) == IMR_CONFIRMRECONVERTSTRING )
+	    else if( static_cast<int>( wParam ) == IMR_CONFIRMRECONVERTSTRING )
 	    {
 		nRet = ImplHandleIMEConfirmReconvertString( hWnd, lParam );
 		rDef = FALSE;


(openoffice) 06/06: Only build the StarBasic "DLL manager" on x86 Win32, instead of any Windows system that isn't AMD64. It only supports x86 Win32 and never supported anything else; there were discussions on bugs 112064 and 126277 about other platforms, but development never got completed and merged.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit c72d3ad509d2621c6a04e4dbd120b39eab53d519
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Fri Jan 3 06:36:10 2025 +0200

    Only build the StarBasic "DLL manager" on x86 Win32, instead of
    any Windows system that isn't AMD64. It only supports x86 Win32
    and never supported anything else; there were discussions on
    bugs 112064 and 126277 about other platforms, but development
    never got completed and merged.
    
    Patch by: me
    
    (cherry picked from commit 14a9b8c1d9d8a83e7aea66b019fb3c6483f0b402)
---
 main/basic/source/runtime/dllmgr.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/basic/source/runtime/dllmgr.cxx b/main/basic/source/runtime/dllmgr.cxx
index 6a3adcdc7e..3135d76fe7 100644
--- a/main/basic/source/runtime/dllmgr.cxx
+++ b/main/basic/source/runtime/dllmgr.cxx
@@ -60,7 +60,7 @@
    variables accordingly.
 */
 
-#if defined(WNT) && !defined(_WIN64) // only 32-bit Windows: the DllMgr_call32/callFp
+#if defined(WNT) && defined(INTEL)   // only 32-bit Windows: the DllMgr_call32/callFp
                                      // trampolines (wnt.asm) are x86 stdcall only.
                                      // x64 falls through to the not-implemented stub
                                      // below (Basic Declare'd DLL calls unsupported on