editeng/source/editeng/edtspell.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit d7e7bf139a615f68345c36572d12219bcf2c2658 Author: László Németh <laszlo.nem...@collabora.com> Date: Fri Sep 25 11:51:04 2015 +0200 tdf#93141 Calc/Impress: remove last colon of emoji short names AutoCorrect Emoji replacements were incomplete in Calc cells and Impress text boxes, keeping the terminating colon: :omega: -> Ω: Corrected by this patch: :omega: -> Ω Change-Id: I0d1f6f9ec9c31a7b37e0c9afaaad17dcee568dd5 diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index 4ba31d7..547c377 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -713,9 +713,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?!");
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits