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 /filter/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 'filter/source')
-rw-r--r-- | filter/source/graphic/GraphicExportDialog.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/mscodec.cxx | 10 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 2 | ||||
-rw-r--r-- | filter/source/t602/t602filter.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 6 |
6 files changed, 15 insertions, 15 deletions
diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx index 9d3af13b744b..d26339420811 100644 --- a/filter/source/graphic/GraphicExportDialog.cxx +++ b/filter/source/graphic/GraphicExportDialog.cxx @@ -126,15 +126,15 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum if ( xServiceInfo.is() ) { - if ( xServiceInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) ) + if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) { aConfigPath = OUString( "Office.Impress/Layout/Other/MeasureUnit" ); } - else if ( xServiceInfo->supportsService( OUString( "com.sun.star.drawing.DrawingDocument" ) ) ) + else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") ) { aConfigPath = OUString( "Office.Draw/Layout/Other/MeasureUnit" ); } - else if ( xServiceInfo->supportsService( OUString( "com.sun.star.text.TextDocument" ) ) ) + else if ( xServiceInfo->supportsService("com.sun.star.text.TextDocument") ) { aConfigPath = OUString( "Office.Writer/Layout/Other/MeasureUnit" ); } diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 4eb15f7d081b..b9118228a742 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -168,15 +168,15 @@ sal_Bool MSCodec_Xor95::InitCodec( const uno::Sequence< beans::NamedValue >& aDa sal_Bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( OUString( "XOR95EncryptionKey" ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("XOR95EncryptionKey", uno::Sequence< sal_Int8 >() ); if ( aKey.getLength() == 16 ) { (void)memcpy( mpnKey, aKey.getConstArray(), 16 ); bResult = sal_True; - mnKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault( OUString( "XOR95BaseKey" ), (sal_Int16)0 ); - mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault( OUString( "XOR95PasswordHash" ), (sal_Int16)0 ); + mnKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95BaseKey", (sal_Int16)0 ); + mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95PasswordHash", (sal_Int16)0 ); } else OSL_FAIL( "Unexpected key size!\n" ); @@ -293,12 +293,12 @@ sal_Bool MSCodec_Std97::InitCodec( const uno::Sequence< beans::NamedValue >& aDa sal_Bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( OUString( "STD97EncryptionKey" ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< sal_Int8 >() ); if ( aKey.getLength() == RTL_DIGEST_LENGTH_MD5 ) { (void)memcpy( m_pDigestValue, aKey.getConstArray(), RTL_DIGEST_LENGTH_MD5 ); - uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault( OUString( "STD97UniqueID" ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 >() ); if ( aUniqueID.getLength() == 16 ) { (void)memcpy( m_pDocId, aUniqueID.getConstArray(), 16 ); diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 0088fc7b2c37..a8b56a02bf53 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -137,7 +137,7 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen uno::Reference< container::XIndexContainer > xPopup( xCfgManager->createSettings(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xPopup, uno::UNO_QUERY_THROW ); // set name for menubar - xProps->setPropertyValue( OUString("UIName"), uno::makeAny( rName ) ); + xProps->setPropertyValue("UIName", uno::makeAny( rName ) ); if ( xPopup.is() ) { uno::Sequence< beans::PropertyValue > aPopupMenu( 4 ); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index cc922bcbed03..41307b7b6631 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7358,7 +7358,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) aXFillBitmapItem.GetGraphicObject().GetUniqueID(), RTL_TEXTENCODING_ASCII_US); - xPropSet->setPropertyValue( OUString("FillBitmapURL"), Any( aURL ) ); + xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) ); const XFillBmpStretchItem aStretchItem(( const XFillBmpStretchItem&)pObj->GetMergedItem( XATTR_FILLBMP_STRETCH )); const XFillBmpTileItem aTileItem(( const XFillBmpTileItem&)pObj->GetMergedItem( XATTR_FILLBMP_TILE )); diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 9218eb75483e..e2549afa5d22 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -995,12 +995,12 @@ sal_Bool T602ImportFilterDialog::OptionsDlg() ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895); ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2); any <<= ous; - xPSetCodeLB->setPropertyValue(OUString( "StringItemList" ), any); + xPSetCodeLB->setPropertyValue("StringItemList", any); Sequence < sal_Int16 > shr(1); shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0; any <<= shr; - xPSetCodeLB->setPropertyValue(OUString( "SelectedItems" ), any); + xPSetCodeLB->setPropertyValue("SelectedItems", any); Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel"); Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index b5c82909b07e..55b7d4dcd0e9 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -115,7 +115,7 @@ static bool checkComponent( Reference< XComponent >& rxComponent, const OUString if ( rServiceName == "com.sun.star.drawing.DrawingDocument" ) { // so if we want a draw we need to check if its not an impress - if( !xInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument") ) ) + if( !xInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) return true; } else @@ -475,8 +475,8 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) { try { - xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance( OUString( "com.sun.star.document.ExportGraphicObjectResolver" ) ) ); - xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance( OUString( "com.sun.star.document.ExportEmbeddedObjectResolver" ) ) ); + xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportGraphicObjectResolver") ); + xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportEmbeddedObjectResolver") ); } catch( const Exception& ) { |