From 937b63af3322f7f8b5e869b2c7431a2deaec3113 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 9 Mar 2013 22:47:20 +0100 Subject: use startsWith() instead of compareToAscii() brain damage... Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff --- xmlhelp/source/cxxhelp/provider/databases.cxx | 14 +++++++------- xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xmlhelp') diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 33f1c1c724de..8660b53464cd 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -466,31 +466,31 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU { current = rtl::OUString( lineBuffer,pos ); - if( current.compareToAscii( "Title",5 ) == 0 ) + if( current.startsWith("Title") ) { title = current.copy( current.indexOf(sal_Unicode( '=' ) ) + 1 ); } - else if( current.compareToAscii( "Start",5 ) == 0 ) + else if( current.startsWith("Start") ) { startid = current.copy( current.indexOf('=') + 1 ); } - else if( current.compareToAscii( "Language",8 ) == 0 ) + else if( current.startsWith("Language") ) { lang_ = current.copy( current.indexOf('=') + 1 ); } - else if( current.compareToAscii( "Program",7 ) == 0 ) + else if( current.startsWith("Program") ) { program = current.copy( current.indexOf('=') + 1 ); } - else if( current.compareToAscii( "Heading",7 ) == 0 ) + else if( current.startsWith("Heading") ) { heading = current.copy( current.indexOf('=') + 1 ); } - else if( current.compareToAscii( "FullText",8 ) == 0 ) + else if( current.startsWith("FullText") ) { fulltext = current.copy( current.indexOf('=') + 1 ); } - else if( current.compareToAscii( "Order",5 ) == 0 ) + else if( current.startsWith("Order") ) { order = current.copy( current.indexOf('=') + 1 ); } diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index 386f4662f8f8..f82117de342a 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -519,7 +519,7 @@ bool URLParameter::scheme() { // Correct extension help links as sometimes the // module is missing resulting in a misformed URL - if( m_aExpr.compareToAscii( "vnd.sun.star.help:///", 21 ) == 0 ) + if( m_aExpr.startsWith("vnd.sun.star.help:///") ) { sal_Int32 nLen = m_aExpr.getLength(); rtl::OUString aLastStr = -- cgit