diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-25 12:18:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-01 10:08:40 +0200 |
commit | b879adc316d6628fad7be35e758052860171bcf2 (patch) | |
tree | 1f65afe787b1cc680bcd055a90e878047f395052 /uui/source/iahndl-ssl.cxx | |
parent | c82d932510c88a12b260b1684522efbc69f07b26 (diff) |
convert UUI module from String to OUString
Change-Id: I0dfcdb0b95112b5ee18b05d0c496059292be65c4
Diffstat (limited to 'uui/source/iahndl-ssl.cxx')
-rw-r--r-- | uui/source/iahndl-ssl.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index c75b82202779..41117b861a69 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -52,23 +52,25 @@ using namespace com::sun::star; namespace { -String -getContentPart( const String& _rRawString ) +OUString +getContentPart( const OUString& _rRawString ) { // search over some parts to find a string static char const * aIDs[] = { "CN=", "OU=", "O=", "E=", NULL }; - String sPart; + OUString sPart; int i = 0; while ( aIDs[i] ) { - String sPartId = OUString::createFromAscii( aIDs[i++] ); - xub_StrLen nContStart = _rRawString.Search( sPartId ); - if ( nContStart != STRING_NOTFOUND ) + OUString sPartId = OUString::createFromAscii( aIDs[i++] ); + sal_Int32 nContStart = _rRawString.indexOf( sPartId ); + if ( nContStart != -1 ) { - nContStart = nContStart + sPartId.Len(); - xub_StrLen nContEnd - = _rRawString.Search( sal_Unicode( ',' ), nContStart ); - sPart = String( _rRawString, nContStart, nContEnd - nContStart ); + nContStart = nContStart + sPartId.getLength(); + sal_Int32 nContEnd = _rRawString.indexOf( sal_Unicode( ',' ), nContStart ); + if ( nContEnd != -1 ) + sPart = _rRawString.copy( nContStart, nContEnd - nContStart ); + else + sPart = _rRawString.copy( nContStart ); break; } } |