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