basctl/source/basicide/baside2b.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 1426eb8a9a8cc150f2330135f28384e5193c6c2b Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Jan 6 09:38:06 2017 +0100 Clean up a usage of OUStringBuffer Change-Id: I05205763502fb20e056cc80f50a37b93232e5743 diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 0468e12..035d9b0 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2620,7 +2620,7 @@ TextView* CodeCompleteListBox::GetParentEditView() void CodeCompleteListBox::InsertSelectedEntry() { - if( !aFuncBuffer.toString().isEmpty() ) + if( !aFuncBuffer.isEmpty() ) { // if the user typed in something: remove, and insert GetParentEditView()->SetSelection( pCodeCompleteWindow->pParent->GetLastHighlightPortionTextSelection() ); @@ -2725,7 +2725,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt ) HideAndRestoreFocus(); break; case KEY_BACKSPACE: case KEY_DELETE: - if( !aFuncBuffer.toString().isEmpty() ) + if( !aFuncBuffer.isEmpty() ) { //if there was something inserted by tab: add it to aFuncBuffer TextSelection aSel( GetParentEditView()->GetSelection() ); @@ -2736,10 +2736,9 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt ) if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != aFuncBuffer.toString() ) { - aFuncBuffer.setLength(0); - aFuncBuffer = aFuncBuffer.append(aTabInsertedStr); + aFuncBuffer = aTabInsertedStr; } - aFuncBuffer = aFuncBuffer.remove(aFuncBuffer.getLength()-1, 1); + aFuncBuffer.remove(aFuncBuffer.getLength()-1, 1); SetMatchingEntries(); } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits