[Libreoffice-commits] core.git: starmath/source
Marcos Paulo de Souza
marcos.souza.org at gmail.com
Fri Aug 30 13:05:56 PDT 2013
starmath/source/edit.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 6c5ee38b09fd59d415850ad7d5e85ee791b18b91
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Thu Aug 29 19:06:48 2013 -0300
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 at linuxafundo.com.br>
Reviewed-by: Marcos Souza <marcos.souza.org at gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 0459866..313614a 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;
More information about the Libreoffice-commits
mailing list