Kaydet (Commit) 7e72b9de authored tarafından Noel Grandin's avatar Noel Grandin

use OUString::endsWith where possible

Change-Id: Ie2b68f79a7f9a54899f1d727f9a1fc7cfb14d90a
üst fb847101
......@@ -143,7 +143,7 @@ BackendImpl::PackageImpl::PackageImpl(
initPackageHandler();
sal_Int32 segmEnd = url.getLength();
if (!url.isEmpty() && url[ url.getLength() - 1 ] == '/')
if ( url.endsWith("/") )
--segmEnd;
sal_Int32 segmStart = (url.lastIndexOf( '/', segmEnd ) + 1);
if (segmStart < 0)
......
......@@ -380,7 +380,7 @@ OString InputStream::readToElementBegin() throw (IOException, RuntimeException)
OString InputStream::readToElementEnd() throw (IOException, RuntimeException)
{
OString aText = OUStringToOString( mxTextStrm->readString( maClosingBracket, sal_False ), RTL_TEXTENCODING_ISO_8859_1 );
OSL_ENSURE( !aText.isEmpty() && (aText[ aText.getLength() - 1 ] == '>'), "InputStream::readToElementEnd - missing closing bracket of XML element" );
OSL_ENSURE( aText.endsWith(">"), "InputStream::readToElementEnd - missing closing bracket of XML element" );
return aText;
}
......
......@@ -321,7 +321,7 @@ namespace ucb { namespace ucp { namespace ext
const OUString& rId( m_pImpl->m_aResults[ i_nIndex ].sId );
const OUString sRootURL( ContentProvider::getRootURL() );
OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) );
if ( !sTitle.isEmpty() && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) )
if ( sTitle.endsWith("/") )
sTitle = sTitle.copy( 0, sTitle.getLength() - 1 );
xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xContext, getResultSet()->getProperties(), sTitle );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment