diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-26 11:27:22 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-27 11:16:11 +0200 |
commit | b3a8056a499ca2a5cb809fcec52aebddd4e17f23 (patch) | |
tree | 176da629cc41ffba02616c8b8caf919da77eb9da /vcl | |
parent | b3c860acf3a9e0806f2e4451a6f8ceb74565f57d (diff) |
Related: fdo#38838 remove UniString::SearchBackward
Change-Id: Ia474ee07b1bd411eae8cd1ddd55c4fa83dbd5f47
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/window/salmenu.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx index 350be25eed40..5d29c2358ca7 100644 --- a/vcl/aqua/source/window/salmenu.cxx +++ b/vcl/aqua/source/window/salmenu.cxx @@ -676,19 +676,19 @@ void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem, AquaSalMenuItem *pAquaSalMenuItem = (AquaSalMenuItem *) i_pSalMenuItem; // Delete mnemonics - String aText( comphelper::string::remove(i_rText, '~') ); + OUString aText( comphelper::string::remove(i_rText, '~') ); /* #i90015# until there is a correct solution strip out any appended (.*) in menubar entries */ if( mbMenuBar ) { - xub_StrLen nPos = aText.SearchBackward( sal_Unicode( '(' ) ); - if( nPos != STRING_NOTFOUND ) + sal_Int32 nPos = aText.lastIndexOf( sal_Unicode( '(' ) ); + if( nPos != -1 ) { - xub_StrLen nPos2 = aText.Search( sal_Unicode( ')' ) ); - if( nPos2 != STRING_NOTFOUND ) - aText.Erase( nPos, nPos2-nPos+1 ); + sal_Int32 nPos2 = aText.indexOf( sal_Unicode( ')' ) ); + if( nPos2 != -1 ) + aText = aText.replaceAt( nPos, nPos2-nPos+1, "" ); } } |