summaryrefslogtreecommitdiff
path: root/basic
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 /basic
parent8a7ede404ca4980f169c4ce634805ea5c1b6b56e (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 'basic')
-rw-r--r--basic/source/classes/errobject.cxx2
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/uno/namecont.cxx16
-rw-r--r--basic/source/uno/scriptcont.cxx8
4 files changed, 14 insertions, 14 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index 7cfce56eff4a..139939d984ab 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -164,7 +164,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u
throw (uno::RuntimeException)
{
if ( !Number.hasValue() )
- throw uno::RuntimeException( OUString("Missing Required Parameter"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing Required Parameter", uno::Reference< uno::XInterface >() );
Number >>= m_nNumber;
Description >>= m_sDescription;
Source >>= m_sSource;
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 09746adfe131..3ef3255a3030 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -221,7 +221,7 @@ SbxObject* StarBASIC::getVBAGlobals( )
{
try
{
- xDocFac->createInstance( OUString( "ooo.vba.VBAGlobals" ) );
+ xDocFac->createInstance("ooo.vba.VBAGlobals");
}
catch(const Exception& )
{
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index efcaed41ee5a..b6abe419ef3d 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1455,10 +1455,10 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
if ( xProps.is() )
{
- xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) );
+ xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) );
// #87671 Allow encryption
- xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
+ xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) );
Reference< XOutputStream > xOutput = xElementStream->getOutputStream();
Reference< XNameContainer > xLib( pLib );
@@ -1596,10 +1596,10 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
if ( xProps.is() )
{
OUString aMime("text/xml");
- xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) );
+ xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) );
// #87671 Allow encryption
- xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
+ xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) );
xOut = xInfoStream->getOutputStream();
}
@@ -2070,10 +2070,10 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
throw uno::RuntimeException();
}
OUString aMime( "text/xml" );
- xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) );
+ xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) );
// #87671 Allow encryption
- xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
+ xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) );
xOut = xInfoStream->getOutputStream();
}
@@ -2698,7 +2698,7 @@ void SAL_CALL SfxLibraryContainer::initializeFromDocument( const Reference< XSto
try
{
Reference< XServiceInfo > xSI( _rxDocument, UNO_QUERY_THROW );
- if ( xSI->supportsService( OUString("com.sun.star.document.OfficeDocument")))
+ if ( xSI->supportsService("com.sun.star.document.OfficeDocument"))
{
xDocStorage.set( _rxDocument->getDocumentStorage(), UNO_QUERY_THROW );
}
@@ -2913,7 +2913,7 @@ void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompa
{
Reference< XModel > xModel( mxOwnerDocument ); // weak-ref -> ref
Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
- xFactory->createInstance( OUString( "ooo.vba.VBAGlobals"));
+ xFactory->createInstance("ooo.vba.VBAGlobals");
}
catch(const Exception& )
{
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 33fbc60c190e..635cccae173c 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -292,7 +292,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
{
Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref
Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
- xFactory->createInstance( OUString( "ooo.vba.VBAGlobals" ) );
+ xFactory->createInstance("ooo.vba.VBAGlobals");
}
catch(const Exception& )
{
@@ -322,7 +322,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
{
Reference<frame::XModel > xModel( mxOwnerDocument );
Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW );
- mxCodeNameAccess.set( xSF->createInstance( OUString("ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY );
+ mxCodeNameAccess.set( xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), UNO_QUERY );
}
catch(const Exception& ) {}
@@ -699,7 +699,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
throw uno::RuntimeException();
}
OUString aMime( "text/xml" );
- xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) );
+ xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) );
// Set encryption key
setStreamKey( xSourceStream, pLib->maPassword );
@@ -843,7 +843,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
throw uno::RuntimeException();
}
OUString aMime( "text/xml" );
- xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) );
+ xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) );
Reference< XOutputStream > xOut = xSourceStream->getOutputStream();
Reference< XNameContainer > xLib( pLib );