Kaydet (Commit) 6c5ee38b authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Norbert Thiebaud

fdo#32059: Fix this once and for all

Fix a regression from 356b2f0e.

This regression was about the setSelection function. We inserted the command with a space
in the right side of the string, but our selection was not counting the " " character.

So, reasign the variable with the space solve this issue.

Change-Id: Ic48f1afaec89c6eefe73d051d3b0eba7edbf557e
Reviewed-on: https://gerrit.libreoffice.org/5688Reviewed-by: 's avatarRicardo Montania <ricardo@linuxafundo.com.br>
Reviewed-by: 's avatarMarcos Souza <marcos.souza.org@gmail.com>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 5b7dff55
...@@ -790,9 +790,9 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand) ...@@ -790,9 +790,9 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
// put a space before a new command if not in the beginning of a line // put a space before a new command if not in the beginning of a line
if (aSelection.nStartPos > 0 && aCurrentFormula[nStartIndex - 1] != ' ') if (aSelection.nStartPos > 0 && aCurrentFormula[nStartIndex - 1] != ' ')
pEditView->InsertText(" " + aText); aText = " " + aText;
else
pEditView->InsertText(aText); pEditView->InsertText(aText);
// Remember start of the selection and move the cursor there afterwards. // Remember start of the selection and move the cursor there afterwards.
aSelection.nEndPara = aSelection.nStartPara; aSelection.nEndPara = aSelection.nStartPara;
......
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