summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-08-29 19:06:48 -0300
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-08-30 20:05:37 +0000
commit6c5ee38b09fd59d415850ad7d5e85ee791b18b91 (patch)
treed0a71867bc5c17edc42942359f084ed015db2f4a /starmath
parent5b7dff553cf51ecc3d21a2231861390d16ccf0eb (diff)
fdo#32059: Fix this once and for all
Fix a regression from 356b2f0edfd5a01ed05976c1bdb74948ff84b5fd. 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/5688 Reviewed-by: Ricardo Montania <ricardo@linuxafundo.com.br> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/edit.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 045986623db4..313614a77dea 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -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
if (aSelection.nStartPos > 0 && aCurrentFormula[nStartIndex - 1] != ' ')
- pEditView->InsertText(" " + aText);
- else
- pEditView->InsertText(aText);
+ aText = " " + aText;
+
+ pEditView->InsertText(aText);
// Remember start of the selection and move the cursor there afterwards.
aSelection.nEndPara = aSelection.nStartPara;