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 --- ucb/source/ucp/file/bc.cxx | 2 +- ucb/source/ucp/webdav/SerfSession.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index a08e033e0314..2c551af31595 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -1085,7 +1085,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, if( m_nState & Deleted ) return; - if( aTransferInfo.SourceURL.compareToAscii( "file:",5 ) != 0 ) + if( !aTransferInfo.SourceURL.startsWith( "file:" ) ) { m_pMyShell->installError( nMyCommandIdentifier, TASKHANDLING_TRANSFER_INVALIDSCHEME ); diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx index 57696dad839c..0a98c4edf2c1 100644 --- a/ucb/source/ucp/webdav/SerfSession.cxx +++ b/ucb/source/ucp/webdav/SerfSession.cxx @@ -418,12 +418,12 @@ apr_status_t SerfSession::verifySerfCertificateChain ( while (nIndex >= 0) { const ::rtl::OUString sToken (sServerCertificateSubject.getToken(0, ',', nIndex)); - if (sToken.compareToAscii("CN=", 3) == 0) + if (sToken.startsWith("CN=")) { sServerCertificateSubject = sToken.copy(3); break; } - else if (sToken.compareToAscii(" CN=", 4) == 0) + else if (sToken.startsWith(" CN=")) { sServerCertificateSubject = sToken.copy(4); break; -- cgit v1.2.3