summaryrefslogtreecommitdiffstats
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-28 12:50:02 +0200
committerNoel Grandin <noel@peralex.com>2014-05-29 09:01:40 +0200
commitebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (patch)
tree2ce9446ed312a1a7aed53183b19ecc9fefabea8a /scripting
parentremove unnecessary NULL parameter passed to UNO Exception (diff)
downloadcore-ebc0a15515c2e29259a7e229cfbdfb5d26fc3006.tar.gz
core-ebc0a15515c2e29259a7e229cfbdfb5d26fc3006.zip
remove more unnecesary OUString constructor use
when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basmethnode.cxx2
-rw-r--r--scripting/source/basprov/basprov.cxx25
2 files changed, 6 insertions, 21 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index 70ddb1f249e3..6a7b3428f352 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -276,7 +276,7 @@ namespace basprov
else
{
throw IllegalArgumentException(
- OUString( "BasicMethodNodeImpl::invoke: function name not supported!" ),
+ "BasicMethodNodeImpl::invoke: function name not supported!",
Reference< XInterface >(), 1 );
}
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 915c2d5b4f5e..5bffe2a38863 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -69,17 +69,7 @@ namespace basprov
static OUString getImplementationName_BasicProviderImpl()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.scripting.ScriptProviderForBasic" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.scripting.ScriptProviderForBasic" );
}
@@ -210,7 +200,7 @@ namespace basprov
if ( aArguments.getLength() != 1 )
{
throw IllegalArgumentException(
- OUString( "BasicProviderImpl::initialize: incorrect argument count." ),
+ "BasicProviderImpl::initialize: incorrect argument count.",
*this,
1
);
@@ -225,7 +215,7 @@ namespace basprov
if ( !xModel.is() )
{
throw IllegalArgumentException(
- OUString( "BasicProviderImpl::initialize: unable to determine the document model from the script invocation context." ),
+ "BasicProviderImpl::initialize: unable to determine the document model from the script invocation context.",
*this,
1
);
@@ -236,7 +226,7 @@ namespace basprov
if ( !( aArguments[0] >>= m_sScriptingContext ) )
{
throw IllegalArgumentException(
- OUString( "BasicProviderImpl::initialize: incorrect argument type " ).concat( aArguments[0].getValueTypeName() ),
+ OUString( "BasicProviderImpl::initialize: incorrect argument type " ) + aArguments[0].getValueTypeName(),
*this,
1
);
@@ -319,8 +309,7 @@ namespace basprov
OUString aDescription = sfUri->getName();
- OUString aLocation = sfUri->getParameter(
- OUString("location") );
+ OUString aLocation = sfUri->getParameter( OUString("location") );
sal_Int32 nIndex = 0;
// In some strange circumstances the Library name can have an
@@ -418,10 +407,6 @@ namespace basprov
OUString BasicProviderImpl::getName( ) throw (RuntimeException, std::exception)
{
- // TODO
-
- SolarMutexGuard aGuard;
-
return OUString("Basic");
}