summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 13:55:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-21 06:05:38 +0000
commit657f067b917169f41a8432c8f329877f6e50c3f6 (patch)
tree029c5ade03fecbe0b6cee67680bd2904f2964be8 /testtools
parent778d6ddc24e927260d1002e23cf0bbcc4a0ed74c (diff)
remove some unnecessary OUStringBuffer usage
Change-Id: Iae9146a3be569107019d9c5af404b94e51e76cd5 Reviewed-on: https://gerrit.libreoffice.org/34469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'testtools')
-rw-r--r--testtools/source/performance/ubtest.cxx28
1 files changed, 5 insertions, 23 deletions
diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx
index acf09694c873..065d473d1dac 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -371,24 +371,14 @@ static void createInstance( Reference< T > & rxOut,
if (! x.is())
{
- OUStringBuffer buf( 64 );
- buf.append( "cannot get service instance \"" );
- buf.append( rServiceName );
- buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "cannot get service instance \"" + rServiceName );
}
rxOut = Reference< T >::query( x );
if (! rxOut.is())
{
- OUStringBuffer buf( 64 );
- buf.append( "service instance \"" );
- buf.append( rServiceName );
- buf.append( "\" does not support demanded interface \"" );
- const Type & rType = cppu::UnoType<T>::get();
- buf.append( rType.getTypeName() );
- buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "service instance \"" + rServiceName +
+ "\" does not support demanded interface \"" + cppu::UnoType<T>::get().getTypeName() );
}
}
@@ -490,11 +480,7 @@ Reference< XInterface > TestImpl::resolveObject( const OUString & rUnoUrl )
if (! xResolvedObject.is())
{
- OUStringBuffer buf( 32 );
- buf.append( "cannot resolve object \"" );
- buf.append( rUnoUrl );
- buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "cannot resolve object \"" + rUnoUrl + "\"!" );
}
return xResolvedObject;
@@ -987,11 +973,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
stream = ::fopen( aFileName.getStr(), "w" );
if (! stream)
{
- OUStringBuffer buf( 32 );
- buf.append( "cannot open file for writing: \"" );
- buf.append( aLogStr );
- buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "cannot open file for writing: \"" + aLogStr + "\"!" );
}
}
}