diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-18 21:03:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-19 21:11:02 +0000 |
commit | ca02d728082a86780d68ede7b9d565128dbc0434 (patch) | |
tree | 8c0a857ad73f89d592295f99e5f72a0c96e55e57 /basic/source/app | |
parent | e4ff699291ddab16d70aa9b11c717e34dfbe5414 (diff) |
remove [Byte]String::EraseAllChars
Diffstat (limited to 'basic/source/app')
-rw-r--r-- | basic/source/app/app.cxx | 7 | ||||
-rw-r--r-- | basic/source/app/status.cxx | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index 9eb83c8b503d..72f3ab0cd5e3 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -1028,11 +1028,13 @@ sal_Bool BasicFrame::CompileAll() } // Setup menu -#define MENU2FILENAME( Name ) Name.Copy( Name.SearchAscii(" ") +1).EraseAllChars( '~' ) +#define MENU2FILENAME( Name ) comphelper::string::remove(Name.Copy(Name.SearchAscii(" ")+1), '~') + #define LRUNr( nNr ) \ rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("LRU")) \ .append(static_cast<sal_Int32>(nNr)) \ .makeStringAndClear() + String FILENAME2MENU( sal_uInt16 nNr, String aName ) { String aRet; @@ -1536,8 +1538,7 @@ long BasicFrame::Command( short nID, sal_Bool bChecked ) { MenuBar* pMenu = GetMenuBar(); PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW ); - String aName = pWinMenu->GetItemText( nID ); - aName.EraseAllChars( L'~' ); + rtl::OUString aName = comphelper::string::remove(pWinMenu->GetItemText(nID), '~'); AppWin* pWin = FindWin( aName ); if ( pWin ) pWin->ToTop(); diff --git a/basic/source/app/status.cxx b/basic/source/app/status.cxx index b50aeee5b117..7cfde2d51fcb 100644 --- a/basic/source/app/status.cxx +++ b/basic/source/app/status.cxx @@ -34,6 +34,7 @@ #include "appwin.hxx" #include "status.hxx" +#include <comphelper/string.hxx> #include <vcl/decoview.hxx> StatusLine::StatusLine( BasicFrame* p ) @@ -82,7 +83,7 @@ IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB ) nFirstWinPos += pTTB->GetItemPos( pTTB->GetCurItemId() ) / 2; - AppWin* pWin = pFrame->FindWin( pWinMenu->GetItemText( pWinMenu->GetItemId( nFirstWinPos ) ).EraseAllChars( L'~' ) ); + AppWin* pWin = pFrame->FindWin(comphelper::string::remove(pWinMenu->GetItemText(pWinMenu->GetItemId(nFirstWinPos)), '~')); if ( pWin ) { pWin->Minimize( sal_False ); |