[Libreoffice-commits] core.git: extensions/source ucb/source
Thomas Arnhold
thomas at arnhold.org
Wed Mar 20 07:07:13 PDT 2013
extensions/source/update/ui/updatecheckui.cxx | 2 +-
ucb/source/ucp/webdav/DAVProperties.cxx | 20 +++++++-------------
2 files changed, 8 insertions(+), 14 deletions(-)
New commits:
commit 11878c68c6e22373c95d4b7707aaf2c91e6a1fa1
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Mar 20 15:04:03 2013 +0100
Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)
Now all should be gone.
Change-Id: Iaaaebfbb85535d95eab6a2043e7d5e2e845d9782
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index d11c3a4..1286d18 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -393,7 +393,7 @@ void SAL_CALL UpdateCheckUI::notifyEvent(const document::EventObject& rEvent)
{
SolarMutexGuard aGuard;
- if( rEvent.EventName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("OnPrepareViewClosing") ) == 0 )
+ if( rEvent.EventName.startsWith( "OnPrepareViewClosing" ) )
{
RemoveBubbleWindow( true );
}
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 2c1b781..5b018b6 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -52,7 +52,7 @@ const ::rtl::OUString DAVProperties::EXECUTABLE =
void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
SerfPropName & rName )
{
- if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "DAV:" ) ) == 0 )
+ if ( rFullName.startsWith( "DAV:" ) )
{
rName.nspace = "DAV:";
rName.name
@@ -60,8 +60,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
rFullName.copy( RTL_CONSTASCII_LENGTH( "DAV:" ) ),
RTL_TEXTENCODING_UTF8 ) );
}
- else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "http://apache.org/dav/props/" ) ) == 0 )
+ else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
{
rName.nspace = "http://apache.org/dav/props/";
rName.name
@@ -71,8 +70,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
"http://apache.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
}
- else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "http://ucb.openoffice.org/dav/props/" ) ) == 0 )
+ else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
{
rName.nspace = "http://ucb.openoffice.org/dav/props/";
rName.name
@@ -82,8 +80,7 @@ void DAVProperties::createSerfPropName( const rtl::OUString & rFullName,
"http://ucb.openoffice.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
}
- else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "<prop:" ) ) == 0 )
+ else if ( rFullName.startsWith( "<prop:" ) )
{
// Support for 3rd party namespaces/props
@@ -147,18 +144,15 @@ void DAVProperties::createUCBPropName( const char * nspace,
rFullName = aNameSpace;
rFullName += aName;
- if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "DAV:" ) ) == 0 )
+ if ( rFullName.startsWith( "DAV:" ) )
{
// Okay, Just concat strings.
}
- else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "http://apache.org/dav/props/" ) ) == 0 )
+ else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
{
// Okay, Just concat strings.
}
- else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
- "http://ucb.openoffice.org/dav/props/" ) ) == 0 )
+ else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
{
// Remove namespace from our own properties.
rFullName = rFullName.copy(
More information about the Libreoffice-commits
mailing list