summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 21:24:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 21:52:54 +0000
commitba0a57702cdef7a0389c06841711d7e3079d471c (patch)
tree223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /vcl
parentSVGWriter: fix build with C++98 compilers (diff)
downloadcore-ba0a57702cdef7a0389c06841711d7e3079d471c.tar.gz
core-ba0a57702cdef7a0389c06841711d7e3079d471c.zip
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 'vcl')
-rw-r--r--vcl/aqua/source/dtrans/DragSource.cxx8
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx2
-rw-r--r--vcl/aqua/source/dtrans/OSXTransferable.cxx6
-rw-r--r--vcl/aqua/source/dtrans/aqua_clipboard.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx2
-rw-r--r--vcl/source/helper/canvasbitmap.cxx4
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx2
7 files changed, 15 insertions, 15 deletions
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<OWeakObject*>(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<OWeakObject*>(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<OWeakObject*>(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<OWeakObject*>(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<OWeakObject*>(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<XTransferable*>(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<XTransferable*>(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<XTransferable*>(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<XClipboardEx*>(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<XClipboardEx*>(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<XClipboardEx*>(this), 1);
mClipboardListeners.remove(listener);
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index c38186baab11..c814b0555b56 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -220,7 +220,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
if ( xPropSet.is() )
{
sal_Int16 nBitsPerPixel = 24;
- if ( xPropSet->getPropertyValue( OUString("BitsPerPixel") ) >>= nBitsPerPixel )
+ if ( xPropSet->getPropertyValue("BitsPerPixel") >>= nBitsPerPixel )
{
bTrueColorJPG = nBitsPerPixel != 8;
}
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 1a54a3d31706..118f3066aa83 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -675,7 +675,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
- throw lang::IndexOutOfBoundsException(OUString("Palette index out of range"),
+ throw lang::IndexOutOfBoundsException("Palette index out of range",
static_cast<rendering::XBitmapPalette*>(this));
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex));
@@ -697,7 +697,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
- throw lang::IndexOutOfBoundsException(OUString("Palette index out of range"),
+ throw lang::IndexOutOfBoundsException("Palette index out of range",
static_cast<rendering::XBitmapPalette*>(this));
return sal_False; // read-only implementation
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 228413b105f2..b50fae1b1815 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -923,7 +923,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY);
uno::Reference < XFilter > xFilter(
- ::comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.document.PDFFilter")),
+ ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.PDFFilter"),
UNO_QUERY);
if (xFilter.is())