diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-06 09:38:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-06 09:38:06 +0100 |
commit | 1426eb8a9a8cc150f2330135f28384e5193c6c2b (patch) | |
tree | d20f2a986211206eee5e0025da76cb1356d51c0c /basctl | |
parent | d289b56c655dae12a26316f40473c46377e18a44 (diff) |
Clean up a usage of OUStringBuffer
Change-Id: I05205763502fb20e056cc80f50a37b93232e5743
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 0468e1265472..035d9b06df8b 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 |