summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/edtspell.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 8b50d9f58e55..510545d88b0f 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -743,9 +743,13 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos,
pCurNode->GetString(), rSttPos, nEndPos, *this, aLanguageTag);
if( pFnd && pFnd->IsTextOnly() )
{
+
+ // replace also last colon of keywords surrounded by colons (for example, ":name:")
+ bool replaceLastChar = pFnd->GetShort()[0] == ':' && pFnd->GetShort().endsWith(":");
+
// then replace
EditSelection aSel( EditPaM( pCurNode, rSttPos ),
- EditPaM( pCurNode, nEndPos ) );
+ EditPaM( pCurNode, nEndPos + (replaceLastChar ? 1 : 0) ));
aSel = mpEditEngine->DeleteSelection(aSel);
SAL_WARN_IF(nCursor < nEndPos, "editeng",
"Cursor in the heart of the action?!");