From 6671fa81db0ecea4ada005bb79f55f08fb440ad4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Sep 2011 20:21:15 +0200 Subject: Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). --- dtrans/source/cnttype/mcnttype.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dtrans') diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index 952e4eab93a7..6634356468f8 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.cxx @@ -160,7 +160,7 @@ void SAL_CALL CMimeContentType::getSym( void ) { if ( m_nPos < m_ContentType.getLength( ) ) { - m_nxtSym = OUString( &m_ContentType[m_nPos], 1 ); + m_nxtSym = m_ContentType.copy(m_nPos, 1); ++m_nPos; return; } @@ -329,12 +329,11 @@ OUString SAL_CALL CMimeContentType::pValue( ) getSym( ); pvalue = quotedPValue( ); - if ( OUString( &pvalue[pvalue.getLength() - 1], 1 ) != OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) + if ( pvalue[pvalue.getLength() - 1] != '"' ) throw IllegalArgumentException( ); // remove the last quote-sign - OUString qpvalue( pvalue, pvalue.getLength( ) - 1 ); - pvalue = qpvalue; + pvalue = pvalue.copy(0, pvalue.getLength() - 1); if ( !pvalue.getLength( ) ) throw IllegalArgumentException( ); -- cgit