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 --- vcl/aqua/source/dtrans/DragSource.cxx | 8 ++++---- vcl/aqua/source/dtrans/DropTarget.cxx | 2 +- vcl/aqua/source/dtrans/OSXTransferable.cxx | 6 +++--- vcl/aqua/source/dtrans/aqua_clipboard.cxx | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'vcl/aqua') diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 71459fbbef5f..57862241ce21 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -177,7 +177,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) { if (aArguments.getLength() < 2) { - throw Exception(OUString("DragSource::initialize: Not enough parameter."), + throw Exception("DragSource::initialize: Not enough parameter.", static_cast(this)); } @@ -195,13 +195,13 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (![mView respondsToSelector: @selector(registerMouseEventListener:)] || ![mView respondsToSelector: @selector(unregisterMouseEventListener:)]) { - throw Exception(OUString("DragSource::initialize: Provided view doesn't support mouse listener"), + throw Exception("DragSource::initialize: Provided view doesn't support mouse listener", static_cast(this)); } NSWindow* pWin = [mView window]; if( ! pWin || ![pWin respondsToSelector: @selector(getSalFrame)] ) { - throw Exception(OUString("DragSource::initialize: Provided view is not attached to a vcl frame"), + throw Exception("DragSource::initialize: Provided view is not attached to a vcl frame", static_cast(this)); } mpFrame = (AquaSalFrame*)[pWin performSelector: @selector(getSalFrame)]; @@ -210,7 +210,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (mDragSourceHelper == nil) { - throw Exception(OUString("DragSource::initialize: Cannot initialize DragSource"), + throw Exception("DragSource::initialize: Cannot initialize DragSource", static_cast(this)); } diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 27cda75f1605..fd762a9744c0 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -383,7 +383,7 @@ void DropTarget::concludeDragOperation(id /*sender*/) { if (aArguments.getLength() < 2) { - throw RuntimeException(OUString("DropTarget::initialize: Cannot install window event handler"), + throw RuntimeException("DropTarget::initialize: Cannot install window event handler", static_cast(this)); } diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx index 5655ada94ab0..7cfffcd4d7c5 100644 --- a/vcl/aqua/source/dtrans/OSXTransferable.cxx +++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx @@ -69,7 +69,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) { if (!isValidFlavor(aFlavor) || !isDataFlavorSupported(aFlavor)) { - throw UnsupportedFlavorException(OUString("AquaClipboard: Unsupported data flavor"), + throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor", static_cast(this)); } @@ -93,7 +93,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) if (dp.get() == NULL) { - throw UnsupportedFlavorException(OUString("AquaClipboard: Unsupported data flavor"), + throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor", static_cast(this)); } @@ -131,7 +131,7 @@ void OSXTransferable::initClipboardItemList() if (pboardFormats == NULL) { - throw RuntimeException(OUString("AquaClipboard: Cannot get clipboard data"), + throw RuntimeException("AquaClipboard: Cannot get clipboard data", static_cast(this)); } diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index 285f2447c25f..ac3bcaee1d60 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -102,7 +102,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard if (mPasteboard == nil) { - throw RuntimeException(OUString("AquaClipboard: Cannot create Cocoa pasteboard"), + throw RuntimeException("AquaClipboard: Cannot create Cocoa pasteboard", static_cast(this)); } } @@ -213,7 +213,7 @@ void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardLis MutexGuard aGuard(m_aMutex); if (!listener.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast(this), 1); mClipboardListeners.push_back(listener); @@ -226,7 +226,7 @@ void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboard MutexGuard aGuard(m_aMutex); if (!listener.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast(this), 1); mClipboardListeners.remove(listener); -- cgit