Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)

Now all should be gone.

Change-Id: Iaaaebfbb85535d95eab6a2043e7d5e2e845d9782
This commit is contained in:
Thomas Arnhold
2013-03-20 15:04:03 +01:00
parent 4ea5752984
commit 11878c68c6
2 changed files with 8 additions and 14 deletions

View File

@@ -393,7 +393,7 @@ void SAL_CALL UpdateCheckUI::notifyEvent(const document::EventObject& rEvent)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if( rEvent.EventName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("OnPrepareViewClosing") ) == 0 ) if( rEvent.EventName.startsWith( "OnPrepareViewClosing" ) )
{ {
RemoveBubbleWindow( true ); RemoveBubbleWindow( true );
} }

View File

@@ -52,7 +52,7 @@ const ::rtl::OUString DAVProperties::EXECUTABLE =
void DAVProperties::createSerfPropName( const rtl::OUString & rFullName, void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
SerfPropName & rName ) SerfPropName & rName )
{ {
if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "DAV:" ) ) == 0 ) if ( rFullName.startsWith( "DAV:" ) )
{ {
rName.nspace = "DAV:"; rName.nspace = "DAV:";
rName.name rName.name
@@ -60,8 +60,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
rFullName.copy( RTL_CONSTASCII_LENGTH( "DAV:" ) ), rFullName.copy( RTL_CONSTASCII_LENGTH( "DAV:" ) ),
RTL_TEXTENCODING_UTF8 ) ); RTL_TEXTENCODING_UTF8 ) );
} }
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
"http://apache.org/dav/props/" ) ) == 0 )
{ {
rName.nspace = "http://apache.org/dav/props/"; rName.nspace = "http://apache.org/dav/props/";
rName.name rName.name
@@ -71,8 +70,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
"http://apache.org/dav/props/" ) ), "http://apache.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) ); RTL_TEXTENCODING_UTF8 ) );
} }
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
"http://ucb.openoffice.org/dav/props/" ) ) == 0 )
{ {
rName.nspace = "http://ucb.openoffice.org/dav/props/"; rName.nspace = "http://ucb.openoffice.org/dav/props/";
rName.name rName.name
@@ -82,8 +80,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
"http://ucb.openoffice.org/dav/props/" ) ), "http://ucb.openoffice.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) ); RTL_TEXTENCODING_UTF8 ) );
} }
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( else if ( rFullName.startsWith( "<prop:" ) )
"<prop:" ) ) == 0 )
{ {
// Support for 3rd party namespaces/props // Support for 3rd party namespaces/props
@@ -147,18 +144,15 @@ void DAVProperties::createUCBPropName( const char * nspace,
rFullName = aNameSpace; rFullName = aNameSpace;
rFullName += aName; rFullName += aName;
if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( if ( rFullName.startsWith( "DAV:" ) )
"DAV:" ) ) == 0 )
{ {
// Okay, Just concat strings. // Okay, Just concat strings.
} }
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
"http://apache.org/dav/props/" ) ) == 0 )
{ {
// Okay, Just concat strings. // Okay, Just concat strings.
} }
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
"http://ucb.openoffice.org/dav/props/" ) ) == 0 )
{ {
// Remove namespace from our own properties. // Remove namespace from our own properties.
rFullName = rFullName.copy( rFullName = rFullName.copy(