cui/source/dialogs/SpellDialog.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7a4a5de2d932b6edfc53b6742029e266c52fa127
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Wed Nov 15 16:49:58 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Nov 15 22:19:59 2023 +0100

    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.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

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 )
                 {

Reply via email to