Kaydet (Commit) bc909149 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

stoc: Use appropriate OUString functions on string constants

Change-Id: If8c20c8a0958016c14007406244fc8ab9a742933
üst 9b03a827
......@@ -44,13 +44,12 @@ namespace stoc_corefl
static const sal_Int32 CACHE_SIZE = 256;
#define SERVICENAME "com.sun.star.reflection.CoreReflection"
#define IMPLNAME "com.sun.star.comp.stoc.CoreReflection"
static Sequence< OUString > core_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
seqNames.getArray()[0] = OUString( SERVICENAME );
seqNames.getArray()[0] = "com.sun.star.reflection.CoreReflection";
return seqNames;
}
......
......@@ -523,8 +523,7 @@ Any Invocation_Impl::getValue( const OUString& PropertyName )
{
}
throw UnknownPropertyException(
OUString("cannot get value ") + PropertyName );
throw UnknownPropertyException( "cannot get value " + PropertyName );
}
......@@ -621,7 +620,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>&
if (nFParamsLen != InParams.getLength())
{
throw IllegalArgumentException(
OUString("incorrect number of parameters passed invoking function ") + FunctionName,
"incorrect number of parameters passed invoking function " + FunctionName,
(OWeakObject *) this, (sal_Int16) 1 );
}
......
......@@ -48,7 +48,6 @@
#include <com/sun/star/reflection/InvocationTargetException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#define SERVICENAME "com.sun.star.script.InvocationAdapterFactory"
#define IMPLNAME "com.sun.star.comp.stoc.InvocationAdapterFactory"
......@@ -63,8 +62,7 @@ namespace stoc_invadp
static Sequence< OUString > invadp_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
seqNames.getArray()[0] =
OUString(SERVICENAME);
seqNames.getArray()[0] = "com.sun.star.script.InvocationAdapterFactory";
return seqNames;
}
......
......@@ -945,7 +945,7 @@ Sequence< OUString > AccessController::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
Sequence< OUString > aSNS( 1 );
aSNS[0] = OUString(SERVICE_NAME);
aSNS[0] = SERVICE_NAME;
return aSNS;
}
......
......@@ -510,7 +510,7 @@ Sequence< OUString > FilePolicy::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
Sequence< OUString > aSNS( 1 );
aSNS[0] = OUString("com.sun.star.security.Policy");
aSNS[0] = "com.sun.star.security.Policy";
return aSNS;
}
......
......@@ -776,7 +776,7 @@ void OServiceManager::setPropertyValue(
else
{
throw UnknownPropertyException(
OUString("unknown property ") + PropertyName,
"unknown property " + PropertyName,
(OWeakObject *)this );
}
}
......@@ -1238,8 +1238,8 @@ void OServiceManager::remove( const Any & Element )
if (iFind == m_ImplementationNameMap.end())
{
throw NoSuchElementException(
OUString("element is not in: ")
+ implName, static_cast< OWeakObject * >(this) );
"element is not in: " + implName,
static_cast< OWeakObject * >(this) );
}
xEle = iFind->second;
}
......
......@@ -50,7 +50,7 @@ using namespace css::script;
using namespace css::registry;
using namespace cppu;
using namespace osl;
#define SERVICENAME "com.sun.star.script.Converter"
#define IMPLNAME "com.sun.star.comp.stoc.TypeConverter"
namespace stoc_services
......@@ -58,7 +58,7 @@ namespace stoc_services
Sequence< OUString > tcv_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
seqNames.getArray()[0] = OUString(SERVICENAME);
seqNames.getArray()[0] = "com.sun.star.script.Converter";
return seqNames;
}
......
......@@ -230,8 +230,7 @@ OUString getImplementationName() {
css::uno::Sequence< OUString > getSupportedServiceNames() {
css::uno::Sequence< OUString > s(1);
s[0] = OUString(
"com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand");
s[0] = "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand";
return s;
}
......
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