diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-12 17:19:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-15 09:11:33 +0200 |
commit | 33eeb70011b34a3b04a74b2237d1d6fdde030c35 (patch) | |
tree | 02185ff85c69ea96bd8ba744facbb8974c4415a6 /editeng | |
parent | 78b2f4be915b7dd9bfabe34162163b362f0a2141 (diff) |
convert include/svtools/svparser.hxx from String to OUString
Change-Id: I4d6196a9a96ad1dd236f8622a523b4702e92d76f
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/eehtml.cxx | 2 | ||||
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index b7bf858ff0ac..c322bed210f4 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -174,7 +174,7 @@ void EditHTMLParser::NextToken( int nToken ) } break; case HTML_RAWDATA: - if (IsReadStyle() && aToken.Len()) + if (IsReadStyle() && !aToken.isEmpty()) { // Each token represents a single line. maStyleSource.append(aToken); diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 90bcd84a2305..a62554438f68 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -425,9 +425,9 @@ void SvxRTFParser::ReadColorTable() case RTF_BLUE: nBlue = sal_uInt8(nTokenValue); break; case RTF_TEXTTOKEN: - if( 1 == aToken.Len() - ? aToken.GetChar( 0 ) != ';' - : STRING_NOTFOUND == aToken.Search( ';' ) ) + if( 1 == aToken.getLength() + ? aToken[ 0 ] != ';' + : -1 == aToken.indexOf( ";" ) ) break; // At least the ';' must be found // else no break !! @@ -557,7 +557,7 @@ void SvxRTFParser::ReadFontTable() break; case RTF_TEXTTOKEN: DelCharAtEnd( aToken, ';' ); - if ( aToken.Len() ) + if ( !aToken.isEmpty() ) { if( bIsAltFntNm ) sAltNm = aToken; @@ -795,14 +795,14 @@ void SvxRTFParser::ClearAttrStack() } } -String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel ) +OUString& SvxRTFParser::DelCharAtEnd( OUString& rStr, const sal_Unicode cDel ) { - if( rStr.Len() && ' ' == rStr.GetChar( 0 )) + if( !rStr.isEmpty() && ' ' == rStr[ 0 ]) rStr = comphelper::string::stripStart(rStr, ' '); - if( rStr.Len() && ' ' == rStr.GetChar( rStr.Len()-1 )) + if( !rStr.isEmpty() && ' ' == rStr[ rStr.getLength()-1 ]) rStr = comphelper::string::stripEnd(rStr, ' '); - if( rStr.Len() && cDel == rStr.GetChar( rStr.Len()-1 )) - rStr.Erase( rStr.Len()-1 ); + if( !rStr.isEmpty() && cDel == rStr[ rStr.getLength()-1 ]) + rStr = rStr.copy( 0, rStr.getLength()-1 ); return rStr; } |