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 <jluth@mail.com> Tested-by: Jenkins
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user