diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-19 13:51:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-19 13:52:11 +0100 |
commit | 7be74f1bc55ee8d41d91738ec4ab89b6cfd4f875 (patch) | |
tree | 73590ecafdb062bf9c7e9a8f98cc19bcebc74087 /starmath | |
parent | b249776e52846c74c44ebe9e9b00364f3acda97f (diff) |
OUString::copy second arg is len, not index
Change-Id: I54729ad816efd4e51e13c0a2985c591920750d59
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/edit.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index a1a541fca4cc..e95e85fe48f8 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -436,7 +436,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) sal_Int32 index = selected.indexOf("\n", aSelection.nEndPos); if (index != -1) { - selected = selected.copy(index, sal_Int32(aSelection.nEndPos)); + selected = selected.copy(index, sal_Int32(aSelection.nEndPos-index)); if (selected.trim().isEmpty()) autoClose = true; } @@ -447,7 +447,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) autoClose = true; else { - selected = selected.copy(aSelection.nEndPos, length); + selected = selected.copy(aSelection.nEndPos); if (selected.trim().isEmpty()) autoClose = true; } |