diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:24:12 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:52:54 +0000 |
commit | ba0a57702cdef7a0389c06841711d7e3079d471c (patch) | |
tree | 223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /testtools | |
parent | 8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff) |
remove OUString wrap for string literals
For some functions and all kinds of Exceptions.
CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException
createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService
bash command:
for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
| cut -d ':' -f1 | sort -u
| xargs sed -i
-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
-e "s/\($i.*\)\"+ /\1\" + /g";
done
Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'testtools')
-rw-r--r-- | testtools/source/performance/ubtest.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index 9c1413f5bdb9..1b48a730bab9 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -479,7 +479,7 @@ Reference< XInterface > TestImpl::getDirect() OUString("com.sun.star.comp.performance.PerformanceTestObject"), _xSMgr, Reference< XRegistryKey >() ) ); if (! xFac.is()) - throw RuntimeException( OUString("no test object available!"), Reference< XInterface >() ); + throw RuntimeException("no test object available!", Reference< XInterface >() ); _xDirect = xFac->createInstance(); } } @@ -566,7 +566,7 @@ static void benchmark( { Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY ); if (! xBench.is()) - throw RuntimeException( OUString("illegal test object!"), Reference< XInterface >() ); + throw RuntimeException("illegal test object!", Reference< XInterface >() ); sal_Int64 i; sal_uInt32 tStart, tEnd; @@ -1060,14 +1060,14 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // pseudo mapping uno<->uno: does nothing! Mapping aMapping( aCppEnv.get(), aAnoCppEnv.get(), OUString("pseudo") ); if (! aMapping.is()) - throw RuntimeException( OUString("no pseudo mapping available!"), Reference< XInterface >() ); + throw RuntimeException("no pseudo mapping available!", Reference< XInterface >() ); Reference< XInterface > xMapped; Reference< XInterface > xDirect( getDirect() ); aMapping.mapInterface( reinterpret_cast< void ** >( &xMapped ), xDirect.get(), ::getCppuType( &xDirect ) ); if (! xMapped.is()) - throw RuntimeException( OUString("mapping object failed!"), Reference< XInterface >() ); + throw RuntimeException("mapping object failed!", Reference< XInterface >() ); sal_uInt32 nStart = getSystemTicks(); benchmark( aSheets[ "mapped in process" ], xMapped, nLoop / 100 ); @@ -1082,7 +1082,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // start server process oslSecurity hSecurity = osl_getCurrentSecurity(); if (! hSecurity) - throw RuntimeException( OUString("cannot get current security handle!"), Reference< XInterface >() ); + throw RuntimeException("cannot get current security handle!", Reference< XInterface >() ); OUString aArgs[] = { OUString("-c"), @@ -1129,7 +1129,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) osl_freeSecurityHandle( hSecurity ); if (! hProcess) - throw RuntimeException( OUString("cannot start server process!"), Reference< XInterface >() ); + throw RuntimeException("cannot start server process!", Reference< XInterface >() ); osl_freeProcessHandle( hProcess ); // wait three seconds @@ -1168,7 +1168,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) { // java benchmark( aSheets[ "java in process" ], - _xSMgr->createInstance(OUString("com.sun.star.comp.benchmark.JavaTestObject")), + _xSMgr->createInstance("com.sun.star.comp.benchmark.JavaTestObject"), nLoop / 1000 ); } |