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 --- vbahelper/source/msforms/vbacontrols.cxx | 2 +- vbahelper/source/vbahelper/vbacolorformat.cxx | 2 +- vbahelper/source/vbahelper/vbashape.cxx | 6 +++--- vbahelper/source/vbahelper/vbashapes.cxx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index 90840918dcb5..e9710859d2d7 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -488,7 +488,7 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex ) } catch (const uno::Exception&) { - // throw lang::WrappedTargetException( OUString( "Can not create AXControl!" ), + // throw lang::WrappedTargetException("Can not create AXControl!", // uno::Reference< uno::XInterface >(), // uno::makeAny( e ) ); } diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx index b2dcc6695122..b3a8576fbc16 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.cxx +++ b/vbahelper/source/vbahelper/vbacolorformat.cxx @@ -66,7 +66,7 @@ ScVbaColorFormat::getRGB() throw (uno::RuntimeException) break; case ColorFormatType::LINEFORMAT_BACKCOLOR: //TODO BackColor not supported - // m_xPropertySet->setPropertyValue( OUString("Color"), uno::makeAny( nRGB ) ); + // m_xPropertySet->setPropertyValue("Color", uno::makeAny( nRGB ) ); break; case ColorFormatType::FILLFORMAT_FORECOLOR: m_xPropertySet->getPropertyValue( "FillColor" ) >>= nRGB; diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index f94d96d73a77..b25b4b810320 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -147,7 +147,7 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw else if( sShapeType == "com.sun.star.drawing.TextShape" ) return office::MsoShapeType::msoTextBox; else - throw uno::RuntimeException( OUString("the shape type do not be supported: ") + sShapeType, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("the shape type do not be supported: " + sShapeType, uno::Reference< uno::XInterface >() ); } // Attributes @@ -172,7 +172,7 @@ ScVbaShape::getAlternativeText() throw (uno::RuntimeException) { OUString sAltText; uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString( "Title" ) ) >>= sAltText; + xProps->getPropertyValue("Title") >>= sAltText; return sAltText; } @@ -180,7 +180,7 @@ void SAL_CALL ScVbaShape::setAlternativeText( const OUString& sAltText ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString( "Title" ), uno::Any( sAltText ) ); + xProps->setPropertyValue("Title", uno::Any( sAltText ) ); } double SAL_CALL diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index 57d16c081e62..9ecd72064bb2 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -415,7 +415,7 @@ ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape xPropertySet->setPropertyValue( "FillColor", uno::makeAny( sal_Int32(0xFFFFFF) ) ); xPropertySet->setPropertyValue( "TextWordWrap", uno::makeAny( text::WrapTextMode_THROUGHT ) ); //not find in OOo2.3 - //xPropertySet->setPropertyValue( OUString("Opaque"), uno::makeAny( sal_True ) ); + //xPropertySet->setPropertyValue("Opaque", uno::makeAny( sal_True ) ); } void -- cgit