diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-09-09 23:35:25 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-13 11:30:48 +0000 |
commit | 3e55e00662b50b02c289ca4a1d94d4306bd8c86b (patch) | |
tree | 8d8f33abc07e0f78bfcd8e291e81fcc307918912 /cui | |
parent | 06bdd144eaf504b87cc918c4debf76bdeadea735 (diff) |
String to OUString
This removes nearly all ToLowerAscii() calls.
Conflicts:
linguistic/source/convdic.cxx
linguistic/source/convdiclist.cxx
linguistic/source/dlistimp.cxx
sc/source/filter/html/htmlexp.cxx
Change-Id: Iddcaacfb7383e1df3d2f13751a3c788eba953fdd
Reviewed-on: https://gerrit.libreoffice.org/5895
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hlmailtp.cxx | 27 |
2 files changed, 14 insertions, 15 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 9e7392e3779f..ab3786a083a7 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -120,7 +120,7 @@ void SvxHyperlinkInternetTp::FillDlgFields ( String& aStrURL ) // set additional controls for FTP: Username / Password if ( aStrScheme.SearchAscii( sFTPScheme ) == 0 ) { - if ( String(aURL.GetUser()).ToLowerAscii().SearchAscii ( sAnonymous ) == 0 ) + if ( aURL.GetUser().toAsciiLowerCase().startsWith( sAnonymous ) ) setAnonymousFTPUser(); else setFTPUser(aURL.GetUser(), aURL.GetPass()); diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 1a5090cf570d..d799c6ce2db5 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -94,30 +94,29 @@ SvxHyperlinkMailTp::~SvxHyperlinkMailTp () void SvxHyperlinkMailTp::FillDlgFields ( String& aStrURL ) { - const sal_Char sMailtoScheme[] = INET_MAILTO_SCHEME; - INetURLObject aURL( aStrURL ); - String aStrScheme = GetSchemeFromURL( aStrURL ); + OUString aStrScheme = GetSchemeFromURL( aStrURL ); // set URL-field and additional controls - String aStrURLc ( aStrURL ); + OUString aStrURLc ( aStrURL ); // set additional controls for EMail: - if ( aStrScheme.SearchAscii( sMailtoScheme ) == 0 ) + if ( aStrScheme.startsWith( INET_MAILTO_SCHEME ) ) { // Find mail-subject - String aStrSubject, aStrTmp ( aStrURLc ); + OUString aStrSubject, aStrTmp( aStrURLc ); + + sal_Int32 nPos = aStrTmp.toAsciiLowerCase().indexOf( "subject" ); - const sal_Char sSubject[] = "subject"; - xub_StrLen nPos = aStrTmp.ToLowerAscii().SearchAscii( sSubject, 0 ); - nPos = aStrTmp.Search( sal_Unicode( '=' ), nPos ); + if ( nPos != -1 ) + nPos = aStrTmp.indexOf( '=', nPos ); - if ( nPos != STRING_NOTFOUND ) - aStrSubject = aStrURLc.Copy( nPos+1, aStrURLc.Len() ); + if ( nPos != -1 ) + aStrSubject = aStrURLc.copy( nPos+1 ); - nPos = aStrURLc.Search ( sal_Unicode( '?' ), 0); + nPos = aStrURLc.indexOf( '?' ); - aStrURLc = aStrURLc.Copy( 0, ( nPos == STRING_NOTFOUND ? - aStrURLc.Len() : nPos ) ); + if ( nPos != -1 ) + aStrURLc = aStrURLc.copy( 0, nPos ); maEdSubject.SetText ( aStrSubject ); } |