sw/source/uibase/app/apphdl.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1e89ae7b072d463ed319a6485e67dee2ca61e676
Author:     Justin Luth <[email protected]>
AuthorDate: Fri Oct 10 14:07:46 2025 -0400
Commit:     Justin Luth <[email protected]>
CommitDate: Wed Oct 15 13:22:00 2025 +0200

    tdf#142118 sw: immediately apply Application color 'Spelling mistakes'
    
    This patch builds on the patch for tdf#157365.
    
    The problem was that the squiggly spelling error indicators
    were not changing to the newly chosen color
    (until their paragraph was marked as dirty by editing).
    
    Ideally this invalidation could be done once
    (for all applications) via LinguMgr::GetSpellChecker()
    launchEvent SPELL_WRONG_WORDS_AGAIN.
    
    However, at the moment, only SW seems to be able to process
    a mass restart of the spell checker anyway,
    so this sw-only patch will do for now.
    
    Note that no matter what I tried,
    I couldn't trigger an immediate repaint of everything.
    But with this patch it repaints with the new color after:
    -scrolling back on-screen
    -zoom changes
    -edit (everything AFTER the edit point)
    -switch to web view and back
    -click on SwHeaderFooterArea
    ...
    -anything that causes a repaint after IdleJob::Layout
    
    Change-Id: I880f7706e261e1e8996b5df8cfefafe0c4b4fad2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192180
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5dc3baf1144c..958c687332b9 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -972,6 +972,13 @@ void 
SwModule::ConfigurationChanged(utl::ConfigurationBroadcaster* pBrdCst, Conf
         const SwViewColors aViewColors(*m_pColorConfig);
         SwViewOption aViewOption = *GetViewOption(/*Web=*/false);
 
+        if (aViewColors.m_aSpellColor != aViewOption.GetSpellColor()
+            || aViewColors.m_aGrammarColor != aViewOption.GetGrammarColor())
+        {
+            SwModule::CheckSpellChanges(/*OnlineSpelling=*/false, 
/*IsSpellWrongAgain=*/true,
+                                        /*bIsSpellAllAgain=*/false, 
/*bSmartTags=*/false);
+        }
+
         // if not LOKit, then update the module defaults (for reload/open/new 
etc.)
         if (!bKit && aViewColors != aViewOption.GetColorConfig())
         {

Reply via email to