diff options
author | Oliver Specht <oliver.specht@cib.de> | 2023-11-15 16:49:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-11-15 22:19:59 +0100 |
commit | 7a4a5de2d932b6edfc53b6742029e266c52fa127 (patch) | |
tree | 7e1b78d1c09d0511f03f4257a698f017ecb0abdb /cui | |
parent | fed7b3068dcea2ebf65314c4f212350720631706 (diff) |
tdf#157992 update error position after modifying input
a manual fix in the text changes the start/end position of the error
that needs to be updateed to find the correct error text when applying the change
Change-Id: I91b0801d5a08ee9e2508493cce03b8112c48a542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159449
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 80e1301dcaf8..3ad9c2b196b0 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1571,6 +1571,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) //start position if (!IsUndoEditMode() && bIsErrorActive) { + aAttribList.clear(); + m_xEditEngine->GetCharAttribs(0, aAttribList); const EECharAttrib* pFontColor = FindCharAttrib(nCursor, EE_CHAR_COLOR, aAttribList); const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); if (pFontColor && pErrorAttrib) @@ -2035,7 +2037,6 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const aPortion1.eLanguage = eLang; aPortion1.sText = m_xEditEngine->GetText(ESelection(0, nStart, 0, aStart->nPosition)); - bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end(); if( bIsIgnoreError ) { |