diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 08:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:32 +0200 |
commit | d366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch) | |
tree | 4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /xmlhelp/source/cxxhelp/provider | |
parent | d2fa59e4025050c9b668ecff379d668f0db52639 (diff) |
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'xmlhelp/source/cxxhelp/provider')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 30 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 2 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 14 |
3 files changed, 23 insertions, 23 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index d85e674eb54c..fb16e663e520 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -320,8 +320,8 @@ void Databases::replaceName( OUString& oustring ) const while( true ) { ++idx; - idx1 = oustring.indexOf( sal_Unicode('%'),idx); - idx2 = oustring.indexOf( sal_Unicode('$'),idx); + idx1 = oustring.indexOf( '%', idx); + idx2 = oustring.indexOf( '$', idx); if(idx1 == -1 && idx2 == -1) break; @@ -408,7 +408,7 @@ const std::vector< OUString >& Databases::getModuleList( const OUString& Languag fileName = aStatus.getFileName(); // Check, whether fileName is of the form *.cfg - idx = fileName.lastIndexOf( sal_Unicode( '.' ) ); + idx = fileName.lastIndexOf( '.' ); if( idx == -1 ) continue; @@ -469,7 +469,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const OUStrin for( sal_Int32 i = 0;i < fileContent.getLength();i++ ) { sal_Unicode ch = str[ i ]; - if( ch == sal_Unicode( '\n' ) || ch == sal_Unicode( '\r' ) ) + if( ch == '\n' || ch == '\r' ) { if( pos ) { @@ -477,7 +477,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const OUStrin if( current.startsWith("Title") ) { - title = current.copy( current.indexOf(sal_Unicode( '=' ) ) + 1 ); + title = current.copy( current.indexOf( '=' ) + 1 ); } else if( current.startsWith("Start") ) { @@ -679,10 +679,10 @@ namespace chelp { if( m_xCollator.is() ) { - sal_Int32 l1 = l.indexOf( sal_Unicode( ';' ) ); + sal_Int32 l1 = l.indexOf( ';' ); sal_Int32 l3 = ( l1 == -1 ? l.getLength() : l1 ); - sal_Int32 r1 = r.indexOf( sal_Unicode( ';' ) ); + sal_Int32 r1 = r.indexOf( ';' ); sal_Int32 r3 = ( r1 == -1 ? r.getLength() : r1 ); sal_Int32 c1 = m_xCollator->compareSubstring( l,0,l3,r,0,r3 ); @@ -726,7 +726,7 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,helpdatafileproxy: int idx = -1,k; while( ( idx = ids.indexOf( ';',k = ++idx ) ) != -1 ) { - int h = ids.indexOf( sal_Unicode( '#' ),k ); + int h = ids.indexOf( '#', k ); if( h < idx ) { // found an anchor @@ -792,18 +792,18 @@ bool Databases::checkModuleMatchForExtension bool bFoundAtLeastOneModule = false; bool bModuleMatch = false; sal_Int32 nLen = doclist.getLength(); - sal_Int32 nLastFound = doclist.lastIndexOf( sal_Unicode(';') ); + sal_Int32 nLastFound = doclist.lastIndexOf( ';' ); if( nLastFound == -1 ) nLastFound = nLen; const sal_Unicode* pStr = doclist.getStr(); - sal_Int32 nFound = doclist.lastIndexOf( sal_Unicode('_') ); + sal_Int32 nFound = doclist.lastIndexOf( '_' ); while( nFound != -1 ) { // Simple optimization, stop if '_' is followed by "id" if( nLen - nFound > 2 ) { - if( pStr[ nFound + 1 ] == sal_Unicode('i') && - pStr[ nFound + 2 ] == sal_Unicode('d') ) + if( pStr[ nFound + 1 ] == 'i' && + pStr[ nFound + 2 ] == 'd' ) break; } @@ -822,7 +822,7 @@ bool Databases::checkModuleMatchForExtension nLastFound = nFound; if( nLastFound == 0 ) break; - nFound = doclist.lastIndexOf( sal_Unicode('_'), nLastFound - 1 ); + nFound = doclist.lastIndexOf( '_', nLastFound - 1 ); } if( bFoundAtLeastOneModule && !bModuleMatch ) @@ -929,8 +929,8 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar, try { // Extension jar file? Search for ? - sal_Int32 nQuestionMark1 = jar.indexOf( sal_Unicode('?') ); - sal_Int32 nQuestionMark2 = jar.lastIndexOf( sal_Unicode('?') ); + sal_Int32 nQuestionMark1 = jar.indexOf( '?' ); + sal_Int32 nQuestionMark2 = jar.lastIndexOf( '?' ); if( nQuestionMark1 != -1 && nQuestionMark2 != -1 && nQuestionMark1 != nQuestionMark2 ) { OUString aExtensionPath = jar.copy( nQuestionMark1 + 1, nQuestionMark2 - nQuestionMark1 - 1 ); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx index e4cc68e2229d..e9b3f3e43d4a 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx @@ -102,7 +102,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte OUString query = m_aURLParameter.get_query(); while( !query.isEmpty() ) { - idx = query.indexOf( sal_Unicode( ' ' ) ); + idx = query.indexOf( ' ' ); if( idx == -1 ) idx = query.getLength(); diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index 5130efdbf2c2..99447df2b05e 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -497,7 +497,7 @@ void URLParameter::parse() throw( com::sun::star::ucb::IllegalIdentifierExceptio { m_aExpr = m_aURL; - sal_Int32 lstIdx = m_aExpr.lastIndexOf( sal_Unicode( '#' ) ); + sal_Int32 lstIdx = m_aExpr.lastIndexOf( '#' ); if( lstIdx != -1 ) m_aExpr = m_aExpr.copy( 0,lstIdx ); @@ -567,7 +567,7 @@ bool URLParameter::name( bool modulePresent ) sal_Int32 length = m_aExpr.getLength(); - if( length != 0 && (m_aExpr.getStr())[0] == sal_Unicode( '/' ) ) + if( length != 0 && (m_aExpr.getStr())[0] == '/' ) { sal_Int32 idx = 1; while( idx < length && (m_aExpr.getStr())[idx] != '?' ) @@ -592,7 +592,7 @@ bool URLParameter::query() if( m_aExpr.isEmpty() ) return true; - else if( (m_aExpr.getStr())[0] == sal_Unicode( '?' ) ) + else if( (m_aExpr.getStr())[0] == '?' ) query_ = m_aExpr.copy( 1 ).trim(); else return false; @@ -604,8 +604,8 @@ bool URLParameter::query() while( !query_.isEmpty() ) { - delimIdx = query_.indexOf( sal_Unicode( '&' ) ); - equalIdx = query_.indexOf( sal_Unicode( '=' ) ); + delimIdx = query_.indexOf( '&' ); + equalIdx = query_.indexOf( '=' ); parameter = query_.copy( 0,equalIdx ).trim(); if( delimIdx == -1 ) { @@ -928,8 +928,8 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam, bool bAddExtensionPath = false; OUString aExtensionRegistryPath; - sal_Int32 nQuestionMark1 = aJar.indexOf( sal_Unicode('?') ); - sal_Int32 nQuestionMark2 = aJar.lastIndexOf( sal_Unicode('?') ); + sal_Int32 nQuestionMark1 = aJar.indexOf( '?' ); + sal_Int32 nQuestionMark2 = aJar.lastIndexOf( '?' ); if( nQuestionMark1 != -1 && nQuestionMark2 != -1 && nQuestionMark1 != nQuestionMark2 ) { aExtensionPath = aJar.copy( nQuestionMark1 + 1, nQuestionMark2 - nQuestionMark1 - 1 ); |