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 7bdd9075f8a4a22eeeb58de70b638f8cdc449089
Author: Peter Kovacs <[email protected]>
AuthorDate: Tue Jun 16 07:44:17 2026 +0200

    fix missing native bindings in dbg build
---
 main/staging/BUILD.bazel          |  7 ++++++-
 main/staging/soffice.exe.manifest | 12 ++++++++++++
 main/vcl/readme.md                | 15 +++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/main/staging/BUILD.bazel b/main/staging/BUILD.bazel
index 92acd954ad..59b69442f6 100644
--- a/main/staging/BUILD.bazel
+++ b/main/staging/BUILD.bazel
@@ -19,10 +19,15 @@ filegroup(
 # private assembly dependency so Windows resolves it from program/ instead of
 # WinSxS (which doesn't carry the debug CRT on non-developer machines).
 # Must be paired with Microsoft.VC90.DebugCRT.manifest (from @msvc_debug_crt).
+# It ALSO declares Microsoft.Windows.Common-Controls 6.0.0.0 — same as the 
release
+# manifest below — to enable visual styles; without it OpenThemeData() returns 
NULL,
+# IsNativeControlSupported() is FALSE for all controls, and VCL silently uses 
bitmap
+# radio/checkbox indicators (debug-only divergence from release).
 filegroup(
     name = "soffice_exe_manifest",
     srcs = [
-        # EXE application manifest — declares Microsoft.VC90.DebugCRT 
dependency.
+        # EXE application manifest — declares Microsoft.VC90.DebugCRT +
+        # Microsoft.Windows.Common-Controls (visual styles) dependencies.
         "soffice.exe.manifest",
         # Private SxS assembly manifest — tells Windows to resolve msvcr90d.dll
         # and msvcp90d.dll from program\ rather than WinSxS.
diff --git a/main/staging/soffice.exe.manifest 
b/main/staging/soffice.exe.manifest
index 244bd9a497..d60e50fe98 100644
--- a/main/staging/soffice.exe.manifest
+++ b/main/staging/soffice.exe.manifest
@@ -1,5 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <assemblyIdentity version="1.0.0.0" processorArchitecture="x86" 
name="OpenOffice" type="win32" />
+  <description>http://www.openoffice.org</description>
+  <!-- comctl32 v6: enables Windows visual styles for this process.  Without it
+       OpenThemeData() returns NULL, IsNativeControlSupported() is FALSE for 
every
+       control, and VCL falls back to bitmap radio/checkbox indicators.  The 
release
+       manifest (//main/desktop:util/soffice.exe.manifest) already declares 
this; the
+       debug manifest must too, or native theming is silently off in debug 
builds. -->
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" 
version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" 
processorArchitecture="x86"/>
+    </dependentAssembly>
+  </dependency>
   <dependency>
     <dependentAssembly>
       <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" 
version="9.0.30729.1" processorArchitecture="x86" 
publicKeyToken="1fc8b3b9a1e18e3b"/>
diff --git a/main/vcl/readme.md b/main/vcl/readme.md
index ecb12fccae..34eb82213e 100644
--- a/main/vcl/readme.md
+++ b/main/vcl/readme.md
@@ -72,6 +72,21 @@ normally drawn natively (`ImplDrawRadioButtonState` → 
`DrawNativeControl`), an
 (and thus this bug) is exercised whenever native control drawing is not active 
for the
 control, so the staged images must always be correct.
 
+### Why the fallback was active at all — the debug manifest (visual styles)
+
+`WinSalGraphics::IsNativeControlSupported` 
(win/source/gdi/salnativewidgets-luna.cxx)
+returns TRUE only if `OpenThemeData(hWnd, L"Button")` succeeds, which requires 
the
+process to have **Windows visual styles** enabled — i.e. a manifest declaring a
+dependency on `Microsoft.Windows.Common-Controls version 6.0.0.0` (comctl32 
v6).  The
+*release* app manifest (`//main/desktop:util/soffice.exe.manifest`) declares 
it, but the
+*debug* manifest (`//main/staging:soffice.exe.manifest`, used under
+`--compilation_mode=dbg`) originally declared only the VC90 CRT assemblies.  
So in debug
+builds `OpenThemeData` returned NULL, `IsNativeControlSupported` was FALSE for 
every
+control, and ALL radio/checkbox indicators fell to the bitmap path above — 
which is how
+the missing-`radio.png` bug became visible.  Fixed by adding the 
Common-Controls
+dependency to the debug manifest so debug matches release.  (Native theming 
being off in
+debug also affected the look of every other themed control, not just radios.)
+
 Triage: a missing toolbar/indicator/dialog image → `grep -a` the consuming 
`.res` for the
 bare filename.  If the string is present, the `.res` *references* (does not 
embed) the
 image, so the exact stored name MUST exist as an `images.zip` key.  A mismatch 
means

Reply via email to