From 0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 17 Dec 2014 15:47:01 +0100 Subject: Introduce rtl::OUStringLiteral1 ...to use single ASCII character literals "more directly" in the OUString API (instead of having to go via an intermediary OUString ctor call). Especially useful for character literals that are defined as const variables or via macros ("direct" uses of character literals in the OUString API can often simply be replaced with single-character string literals, for improved readability). (The functions overloaded for OUStringLiteral1 are those that are actually used by the existing LO code; more could potentially be added. The asymmetry in the operator ==/!= parameter types is by design, though---writing code like 'x' == s is an abomination that shall not be abetted.) Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f --- ucb/source/ucp/ext/ucpext_content.cxx | 2 +- ucb/source/ucp/ext/ucpext_datasupplier.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 93af251b0e9d..96d05e18d391 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -352,7 +352,7 @@ namespace ucb { namespace ucp { namespace ext OUString sRelativeURL( sURL.copy( sRootURL.getLength() ) ); // cut the extension ID - const OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + OUString( '/' ) ); + const OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + "/" ); if ( !sRelativeURL.match( sSeparatedExtensionId ) ) { SAL_INFO( "ucb.ucp.ext", "illegal URL structure - no extension ID" ); diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index 048767cfa21a..d439e6051691 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -159,7 +159,7 @@ namespace ucb { namespace ucp { namespace ext const OUString& rLocalId = (*pExtInfo)[0]; ResultListEntry aEntry; - aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + OUString( '/' ); + aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + "/"; m_pImpl->m_aResults.push_back( aEntry ); } } -- cgit