starmath/source/edit.cxx | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit fc47ee6fbf67781acd07549c40a75c9272572085 Author: Marcos Paulo de Souza <marcos.souza....@gmail.com> Date: Tue Dec 15 18:37:04 2015 -0200
Fix tdf#32062: Math overwrites selected area when click on element Change-Id: I42ce83d1647d054419dbf664dfbfb2bc1cd01338 Reviewed-on: https://gerrit.libreoffice.org/20729 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f156ee6..11f0227 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -1026,6 +1026,11 @@ void SmEditWindow::InsertText(const OUString& rText) // callers OUString string(rText); + OUString selected(pEditView->GetSelected()); + // if we have text selected, use it in the first placeholder + if (!selected.isEmpty()) + string = string.replaceFirst("<?>", selected); + // put a space before a new command if not in the beginning of a line if (aSelection.nStartPos > 0 && aCurrentFormula[nStartIndex - 1] != ' ') string = " " + string; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits