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 /dtrans/source | |
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 'dtrans/source')
-rw-r--r-- | dtrans/source/cnttype/wbench/testcnttype.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/generic/clipboardmanager.cxx | 8 | ||||
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.cxx | 18 |
3 files changed, 14 insertions, 14 deletions
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index 6f8017f54520..2bc3e990b626 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -184,7 +184,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) } Reference< XMimeContentTypeFactory > - xMCntTypeFactory( g_xFactory->createInstance( OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY ); + xMCntTypeFactory( g_xFactory->createInstance("com.sun.star.datatransfer.MimeContentTypeFactory"), UNO_QUERY ); if ( !xMCntTypeFactory.is( ) ) { diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 696ca9ca030a..d4f6f9dbdb7d 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -84,7 +84,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& // object is disposed already if (rBHelper.bDisposed) - throw DisposedException(OUString("object is disposed."), + throw DisposedException("object is disposed.", static_cast < XClipboardManager * > (this)); ClipboardMap::iterator iter = @@ -105,13 +105,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl // check parameter if (!xClipboard.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast < XClipboardManager * > (this), 1); // the name "default" is reserved for internal use OUString aName = xClipboard->getName(); if ( m_aDefaultName == aName ) - throw IllegalArgumentException(OUString("name reserved"), + throw IllegalArgumentException("name reserved", static_cast < XClipboardManager * > (this), 1); // try to add new clipboard to the list @@ -154,7 +154,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() MutexGuard aGuard(m_aMutex); if (rBHelper.bDisposed) - throw DisposedException(OUString("object is disposed."), + throw DisposedException("object is disposed.", static_cast < XClipboardManager * > (this)); if (rBHelper.bInDispose) diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 5a2c1e9daac6..ef7d410aa039 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -83,7 +83,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -103,7 +103,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -117,7 +117,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -135,7 +135,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -149,7 +149,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -170,12 +170,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast< XClipboardEx* >( this ), 1 ); @@ -190,12 +190,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast< XClipboardEx* >( this ), 1 ); |