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 /sot | |
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 'sot')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 14 | ||||
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.cxx | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 02e65bd8ff93..7a8c90a86416 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -1106,7 +1106,7 @@ sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::s return 0; OUString aMediaType; - xProps->getPropertyValue( OUString("MediaType") ) >>= aMediaType; + xProps->getPropertyValue("MediaType") >>= aMediaType; if ( !aMediaType.isEmpty() ) { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index ed0a7f5026d5..f64fcc60c4b7 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -674,7 +674,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM ::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 ); ::com::sun::star::uno::Any aAny; aAny <<= aSequ; - m_pContent->setPropertyValue( OUString("EncryptionKey"), aAny ); + m_pContent->setPropertyValue("EncryptionKey", aAny ); } } } @@ -1719,7 +1719,7 @@ void UCBStorage_Impl::Init() { // get the manifest information from the package try { - Any aAny = m_pContent->getPropertyValue( OUString("MediaType") ); + Any aAny = m_pContent->getPropertyValue("MediaType"); OUString aTmp; if ( ( aAny >>= aTmp ) && !aTmp.isEmpty() ) m_aContentType = m_aOriginalContentType = aTmp; @@ -1855,7 +1855,7 @@ void UCBStorage_Impl::ReadContent() ::ucbhelper::Content aContent( aName, xComEnv, comphelper::getProcessComponentContext() ); OUString aMediaType; - Any aAny = aContent.getPropertyValue( OUString("MediaType") ); + Any aAny = aContent.getPropertyValue("MediaType"); if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) ) pElement->m_bIsStorage = sal_True; else if ( aMediaType.isEmpty() ) @@ -2191,7 +2191,7 @@ sal_Int16 UCBStorage_Impl::Commit() pElement->m_xStream->m_aContentType = OUString("application/vnd.sun.star.oleobject"); Any aValue; aValue <<= (sal_Bool) sal_True; - pElement->m_xStream->m_pContent->setPropertyValue(OUString("Encrypted"), aValue ); + pElement->m_xStream->m_pContent->setPropertyValue("Encrypted", aValue ); } pContent = pElement->GetContent(); @@ -2203,7 +2203,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (OUString) pElement->m_aName; - pContent->setPropertyValue( OUString("Title"), aAny ); + pContent->setPropertyValue("Title", aAny ); } if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() ) @@ -2212,7 +2212,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (OUString) pElement->GetContentType(); - pContent->setPropertyValue( OUString("MediaType"), aAny ); + pContent->setPropertyValue("MediaType", aAny ); } if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO ) @@ -2263,7 +2263,7 @@ sal_Int16 UCBStorage_Impl::Commit() // clipboard format and ClassId will be retrieved from the media type when the file is loaded again Any aType; aType <<= (OUString) m_aContentType; - m_pContent->setPropertyValue( OUString("MediaType"), aType ); + m_pContent->setPropertyValue("MediaType", aType ); if ( m_bIsLinked ) { diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index ea0b9d7722aa..27411fb1512d 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -360,7 +360,7 @@ void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno:: } catch( const uno::Exception& e ) { - throw lang::WrappedTargetException( OUString( "Insert has failed!" ), + throw lang::WrappedTargetException("Insert has failed!", uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -417,7 +417,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno: { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OUString("Can't copy raw stream"), + throw lang::WrappedTargetException("Can't copy raw stream", uno::Reference< uno::XInterface >(), aCaught ); } |