Kaydet (Commit) c51fb3ad authored tarafından László Németh's avatar László Németh Kaydeden (comit) Andras Timar

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
Reviewed-on: https://gerrit.libreoffice.org/18849Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 1e15cf04)
üst 23e8d5b6
...@@ -743,9 +743,13 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, ...@@ -743,9 +743,13 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos,
pCurNode->GetString(), rSttPos, nEndPos, *this, aLanguageTag); pCurNode->GetString(), rSttPos, nEndPos, *this, aLanguageTag);
if( pFnd && pFnd->IsTextOnly() ) 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 // then replace
EditSelection aSel( EditPaM( pCurNode, rSttPos ), EditSelection aSel( EditPaM( pCurNode, rSttPos ),
EditPaM( pCurNode, nEndPos ) ); EditPaM( pCurNode, nEndPos + (replaceLastChar ? 1 : 0) ));
aSel = mpEditEngine->DeleteSelection(aSel); aSel = mpEditEngine->DeleteSelection(aSel);
SAL_WARN_IF(nCursor < nEndPos, "editeng", SAL_WARN_IF(nCursor < nEndPos, "editeng",
"Cursor in the heart of the action?!"); "Cursor in the heart of the action?!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment