fix(bug38): intercept F5/Esc in CEF sidebar so Impress slideshow keys reach LO#61
Closed
Pher217 wants to merge 132 commits into
Closed
fix(bug38): intercept F5/Esc in CEF sidebar so Impress slideshow keys reach LO#61Pher217 wants to merge 132 commits into
Pher217 wants to merge 132 commits into
Conversation
- Add AIAssistantPanel.cxx/hxx for sidebar AI chat functionality - Add chatpanel.ui for the chat interface - Update SwPanelFactory.cxx to register the AI panel - Update sw/Library_sw.mk to include AI panel in build - Add officelabs module with AgentConnection and DocumentController - Integrate with officelabs backend for AI assistance
- Add build.log and config_attempt1.log for build tracking - Update autogen.sh with configuration changes
- Update config.guess and config.sub - Add backup files for configuration scripts
- ChatPanel: Docking window for AI chat interface - AgentConnection: HTTP client for backend communication - DocumentController: Document context extraction Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added ChatPanel class for the AI chat interface with docking capabilities. - Introduced new identifiers for AI chat integration in sfxsids.hrc. - Updated Library_officelabs.mk to include new source files. - Removed obsolete AgentConnection and DocumentController implementations. This commit enhances the OfficeLabs integration by providing a user interface for AI interactions and streamlining backend communication. Change-Id: I1234567890abcdef1234567890abcdef12345678
Build fixes for Windows compilation with Visual Studio 2026: - Fix CScript syntax: Change /e:javascript to //E:JScript in libxml2, libxslt, and xmlsec configure scripts for Windows Script Host - Add --fuzz=3 to patch applications for glm, lpsolve, and redland to handle line number offsets in patches - Regenerate clang-cl patches with correct line numbers for glm and redland - Disable non-critical lpsolve const patch that fails to apply - Fix ATL include paths in so_activex and oleautobridge libraries (change foreach loop to direct -I flag) - Add cygpath conversion for harfbuzz meson build to handle Cygwin-to-Windows path translation for cl.exe - Add -k || true workaround for libgpg-error and libassuan mkheader compilation issues on Windows Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Pher
Co-Authored-By: Pher
…gconf Co-Authored-By: Pher
- Updated gpgmepp and libassuan makefiles to ensure proper handling of resource files during the build process. - Added necessary library paths for libgpg-error and libassuan on Windows. - Improved environment setup by exporting the PATH variable to include local binaries. These changes aim to resolve build issues and improve compatibility with Windows environments. Co-Authored-By: Pher
- Update ExternalProject_gpgmepp.mk configuration - Fix disable-versioninfo.patch.1 for Windows build - Update build.log with current progress Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove failing Skia patches (fix-pch.patch.1, fix-semaphore-include.patch.1) - Fix OfficeLabs Library include order for proper SDK header resolution - Fix git binary discovery in g script - Fix CRLF line endings in solenv/bin scripts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Pher
Update ChatPanel.hxx to use vcl/toolkit/ include paths for widget headers (fixed.hxx, edit.hxx, button.hxx) which were reorganized in modern LibreOffice. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ChatPanel.hxx: Add VCL_INTERNALS define for deprecated toolkit headers - ChatPanel.cxx: Fix OUString literal conversion (use u"..."_ustr) - ChatPanelChildWindow.cxx: Add missing GetInfo() implementation - AIAssistantPanel.hxx: Fix vcl/weld include paths and add TextView.hxx All OfficeLabs code now compiles successfully. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Pher
…kes ruler visible
…s surface for ruler
… text colors for Home button visibility
…th correct button text colors
…ields, skip native tab/button rendering, ruler contrast
LineWidthValueSet: replace hardcoded blue selection fill and COL_WHITE text/line colors with GetHighlightColor/GetHighlightTextColor so the line width selector respects the active dark/light theme. ThemePanel: replace COL_LIGHTGRAY label background and border colors with GetDialogColor/GetDialogTextColor/GetShadowColor so document theme color-set swatches render correctly in dark mode.
Panel::mxContents (the GtkBox 'contents' from panel.ui) was never getting a background color assigned, so it defaulted to white on Windows. All panel content areas (Character, Paragraph, Page, etc.) appeared white behind their widgets even though the deck and title bars were dark. Set mxContents->set_background(Theme::Color_PanelBackground) in the constructor and refresh it in DataChanged() so the panel content area matches the active theme.
CreateChildFrame() creates a VclBin with no explicit background, so it defaulted to system white. All AWT sidebar panels (Character, Paragraph, Page, etc.) rendered white content areas because the panel content is embedded into this VclBin, not directly into mxContents. Fix: after CreateChildFrame(), get the VclBin via VCLUnoHelper and call SetBackground(Wallpaper(panelBg)). Also refresh on DataChanged() for theme switching.
VclContainer (VclBox, VclGrid, VclBin) sets SetPaintTransparent(true) in its constructor. When set_background() is called on a parent container (e.g. the sidebar PanelLayout root), only the root gets SetPaintTransparent(false) and the explicit background color. Nested VclGrid/VclBox widgets created from .ui files remain paint-transparent. On Windows, these transparent children show white instead of the parent's dark background because WS_CLIPCHILDREN and window creation order prevent the parent from painting under them. Fix: after setting the root container background, recursively walk all child windows and make any paint-transparent ones explicitly opaque with the same background color. This ensures nested containers in sidebar panels (Character, Paragraph, Page, etc.) match the dark theme instead of defaulting to white.
- Replace Windows .ico files: soffice.ico, writer_app.ico, calc_app.ico, impress_app.ico - Update sidebar panel icon to OfficeLabs brand (lc_aideck.png + 32px variant) - Update Sidebar.xcu to reference new lc_aideck icon instead of lc_basicideappear - All icons converted from 1024x1024 source PNGs using PIL - ICO files created with 256x256 primary size for taskbar compatibility
…eming fix: use theme-aware colors in sidebar panel rendering
…ors() Deck.cxx and TabBar.cxx had Color(0x28, 0x2A, 0x36) hardcoded for sidebar backgrounds, ignoring the selected theme. Now uses GetOLColors().bg/surface which reads from officelabs_theme.txt. Also fixed Theme.cxx bDark check to treat midnight-blue as dark (was only checking for 'dark', not 'midnight-blue').
Replace generated simplified icons with proper Apple-style icons from officelabs-core/officelabs-icons source assets: - soffice.ico: Blue orbs with sparkle (main app) - writer_app.ico: Blue document with text lines - calc_app.ico: Green 3x3 grid - impress_app.ico: Orange presentation board All icons normalized to 512x512 canvas, PNG-encoded at 7 sizes (16-256px), brightness and saturation boosted for taskbar clarity.
Replace GetDarkShadowColor/GetShadowColor with GetWindowTextColor for ruler tick marks, numbers, indent markers, and tab stops. WindowTextColor is designed to contrast with WindowColor (the ruler background), ensuring proper visibility across light, dark, and midnight-blue themes.
fix: ruler contrast in dark/blue themes
Replaces the default LibreOffice Colibre brand shell SVGs (about, logo, logo-sc, and their _inverted variants) with the OfficeLabs wordmark: teal diamond icon + 'OfficeLabs' text in Segoe UI/Helvetica.
Shifts surface colors from Dracula blue-tinted (#1A1B26, #282A36) to pure neutral darks (#0F0F0F, #1A1A1A, #2A2A2A) and text to pure white. Reduces teal/purple tint in backgrounds for a cleaner dark mode.
Theme switching via cefQuery is no longer needed — theme is now set at startup via junction/env var rather than runtime IPC. Removes: - handleSwitchTheme() method declaration and implementation (~90 lines) - switchTheme dispatch in OnQuery - Windows.h / XRestartManager includes pulled in only for that handler
…cleanup brand + theme + CEF cleanup (3 commits)
…Services() The first configmgr access at app.cxx:502 (officecfg::Setup::Office::OfficeRestartInProgress::get()) has no surrounding try-catch. When Components::Components() throws a RuntimeException (e.g. due to a corrupt or partially-written user profile on second cold launch), the exception propagates uncaught through Desktop::Init() → InitVCL() → ImplSVMain() → soffice_main(), killing the process silently before any window appears. This is the root cause of the P0 profile-rewrite crash: wipe profile, first launch OK (creates profile from scratch), second launch crashes before window. --safe-mode bypasses configmgr init on the hot path, which is why it always works. Fix: wrap the three unprotected officecfg::get() calls in try/catch blocks that route to SetBootstrapError(BE_OFFICECONFIG_BROKEN), allowing the existing safe- mode recovery path to activate instead of dying silently. - app.cxx: wrap lines 502-506 (OfficeRestartInProgress + FirstRun checks) - appinit.cxx RegisterServices(): wrap ooSetupConnectionURL::get() and CreateTemporaryDirectory() (which re-throws RuntimeException from SvtPathOptions)
…ite-crash fix: P0 profile-rewrite crash — catch configmgr RuntimeException in Desktop::Init/RegisterServices
… reach LO Root cause: WebViewCefClient had no CefKeyboardHandler, so pressing F5 while the AI sidebar had keyboard focus was consumed by CEF as a browser page-reload instead of being dispatched to LibreOffice as .uno:Presentation. Fix: add CefKeyboardHandler to WebViewCefClient. OnPreKeyEvent intercepts VK_F5 and VK_ESCAPE (with/without Shift), calls SetForegroundWindow on the LO frame HWND, then PostMessage(WM_KEYDOWN) so the LO accelerator table fires. All other keys pass through to CEF unchanged. Acceptance criteria: F5 starts Impress fullscreen presentation, Shift+F5 starts from current slide, Esc exits the running slideshow, no regression in Writer/Calc (VK_F5/VK_ESCAPE are not bound there while sidebar is not focused).
|
Thank you for your contribution. We use GitHub as a read-only mirror, so please submit your patch into our own code review system: https://wiki.documentfoundation.org/Development/GetInvolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
WebViewCefClienthad noCefKeyboardHandler, so pressing F5 while the AI sidebar had keyboard focus was consumed by CEF as a browser page-reload instead of being dispatched to LibreOffice as.uno:Presentation.This happens because:
registrymodifications.xcusetsLastActiveDeck = AIDeckforPresentationDocument, so the AI panel auto-opens and the CEF popup appears when Impress loads.WS_POPUPwindow).CefKeyboardHandler, F5 goes to Chrome's default keybinding (refresh page). LibreOffice never sees it.Confirmed not the cause:
main.xcdis correct:.uno:PresentationforPresentationDocumentslideshowlo.dll/sdlo.dllare installed and registeredFix
Added
CefKeyboardHandlertoWebViewCefClient:GetKeyboardHandler()returnsthisOnPreKeyEvent()interceptsVK_F5andVK_ESCAPE(before CEF processes them)SetForegroundWindow(hFrame)+PostMessage(hFrame, WM_KEYDOWN, ...)→ the LO accelerator table firesfalse(pass through to CEF unchanged)lpwith Shift scan-code setFiles changed
officelabs/inc/officelabs/WebViewPanel.hxx— addedgetFrameHwnd()accessorofficelabs/source/WebViewPanel.cxx—CefKeyboardHandleronWebViewCefClientAcceptance criteria
Build note
This is a C++ change in the
officelabslibrary. Requires a full LO fork rebuild before testing in the installed product (make officelabs.buildor full incremental CI build).