From ba0a57702cdef7a0389c06841711d7e3079d471c Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 29 Jun 2013 21:24:12 +0200 Subject: 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 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold --- shell/source/backends/gconfbe/gconfaccess.cxx | 2 +- shell/source/cmdmail/cmdmailmsg.cxx | 2 +- shell/source/cmdmail/cmdmailsuppl.cxx | 2 +- shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 2 +- shell/source/win32/workbench/TestSmplMail.cxx | 2 +- shell/source/win32/workbench/TestSysShExec.cxx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'shell/source') diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index d1b4b0deb542..790d6e630564 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -70,7 +70,7 @@ GConfClient* getGconfClient() mClient = gconf_client_get_default(); if (!mClient) { - throw uno::RuntimeException(OUString("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL); + throw uno::RuntimeException("GconfBackend:GconfLayer: Cannot Initialize Gconf connection",NULL); } static const char * const PreloadValuesList[] = diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 298da1d05fac..20ca8f7acd94 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -153,7 +153,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() ) return makeAny( m_Attachments ); - throw NoSuchElementException( OUString("key not found: ") + aName, + throw NoSuchElementException("key not found: " + aName, static_cast < XNameAccess * > (this) ); } diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 7687faed8b41..05b16f2dc42f 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -161,7 +161,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Retrieve the value for "Program" node and append it feed senddoc with it // using the (undocumented) --mailclient switch - xNameAccess->getByName( OUString("Program") ) >>= aMailer; + xNameAccess->getByName("Program") >>= aMailer; if( !aMailer.isEmpty() ) { diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 49c134467920..9ea07be1a223 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -53,7 +53,7 @@ namespace NULL, error.getRef()); if(!proxy) - throw RuntimeException(OUString("couldnt get a proxy!"),NULL); + throw RuntimeException("couldnt get a proxy!",NULL); return proxy; } } diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx index f4d6bba45c0a..f0fbb18e6a9c 100644 --- a/shell/source/win32/workbench/TestSmplMail.cxx +++ b/shell/source/win32/workbench/TestSmplMail.cxx @@ -88,7 +88,7 @@ int SAL_CALL main(int , char*, char* ) try { Reference< XSimpleMailClientSupplier > xSmplMailClientSuppl( - g_xFactory->createInstance( OUString("com.sun.star.system.SimpleSystemMail") ), UNO_QUERY ); + g_xFactory->createInstance("com.sun.star.system.SimpleSystemMail"), UNO_QUERY ); if ( !xSmplMailClientSuppl.is() ) { diff --git a/shell/source/win32/workbench/TestSysShExec.cxx b/shell/source/win32/workbench/TestSysShExec.cxx index 9a2d84cd0717..6d6ffb302420 100644 --- a/shell/source/win32/workbench/TestSysShExec.cxx +++ b/shell/source/win32/workbench/TestSysShExec.cxx @@ -91,7 +91,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) //------------------------------------------------- Reference< XSystemShellExecute > xSysShExec( - g_xFactory->createInstance( OUString("com.sun.star.system.SystemShellExecute") ), UNO_QUERY ); + g_xFactory->createInstance("com.sun.star.system.SystemShellExecute"), UNO_QUERY ); if ( !xSysShExec.is() ) { -- cgit