Kaydet (Commit) 7be74f1b authored tarafından Caolán McNamara's avatar Caolán McNamara

OUString::copy second arg is len, not index

Change-Id: I54729ad816efd4e51e13c0a2985c591920750d59
üst b249776e
......@@ -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;
}
......
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