Kaydet (Commit) d7e7bf13 authored tarafından László Németh's avatar László Németh

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
üst 6f70cf83
......@@ -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?!");
......
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