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 /extensions/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 'extensions/source')
20 files changed, 77 insertions, 77 deletions
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 909917863368..2f482e6575f1 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -104,7 +104,7 @@ namespace abp #ifdef DBG_UTIL sal_Bool bSuccess = #endif - xDialogProps->getPropertyValue( OUString( "FieldMapping" ) ) >>= aMapping; + xDialogProps->getPropertyValue("FieldMapping") >>= aMapping; DBG_ASSERT( bSuccess, "fieldmapping::invokeDialog: invalid property type for FieldMapping!" ); // and copy it into the map diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index ed7627e2bdf7..29b7f6c4f492 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -316,7 +316,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const OUSt { try { - Any a = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any a = xPropSet->getPropertyValue("LayoutManager"); a >>= xLayoutManager; } catch ( const uno::Exception& ) diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index d3598d10019e..60a1fc95e94f 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -914,7 +914,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OUString aString("SELECT * FROM "); @@ -1074,7 +1074,7 @@ void BibDataManager::setActiveDataSource(const OUString& rURL) aPropertySet->setPropertyValue("ActiveConnection", aVal); Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); if(xOldConnection.is()) xOldConnection->dispose(); @@ -1167,7 +1167,7 @@ void BibDataManager::setActiveDataTable(const OUString& rTable) Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OUString aString("SELECT * FROM "); @@ -1408,7 +1408,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( xPropSet->setPropertyValue( FM_PROP_NAME,aFieldName); xPropSet->setPropertyValue( FM_PROP_CONTROLSOURCE, makeAny( rName ) ); - xPropSet->setPropertyValue( OUString( "NativeWidgetLook" ), makeAny( (sal_Bool)sal_True ) ); + xPropSet->setPropertyValue("NativeWidgetLook", makeAny( (sal_Bool)sal_True ) ); Reference< XFormComponent > aFormComp(xModel,UNO_QUERY ); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 77dbb9a91e51..77e019c4514c 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -111,7 +111,7 @@ namespace dbp try { OUString sDataSourceName; - rContext.xForm->getPropertyValue(OUString("DataSourceName")) >>= sDataSourceName; + rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSourceName; Reference< XConnection > xConnection; bool bEmbedded = ::dbtools::isEmbeddedInDatabase( rContext.xForm, xConnection ); @@ -129,9 +129,9 @@ namespace dbp implFillTables(xConnection); OUString sCommand; - OSL_VERIFY( rContext.xForm->getPropertyValue( OUString("Command") ) >>= sCommand ); + OSL_VERIFY( rContext.xForm->getPropertyValue("Command") >>= sCommand ); sal_Int32 nCommandType = CommandType::TABLE; - OSL_VERIFY( rContext.xForm->getPropertyValue( OUString("CommandType") ) >>= nCommandType ); + OSL_VERIFY( rContext.xForm->getPropertyValue("CommandType") >>= nCommandType ); // search the entry of the given type with the given name for ( sal_uInt16 nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup ) @@ -167,13 +167,13 @@ namespace dbp xOldConn = getFormConnection(); OUString sDataSource = m_aDatasource.GetSelectEntry(); - rContext.xForm->setPropertyValue( OUString("DataSourceName"), makeAny( sDataSource ) ); + rContext.xForm->setPropertyValue("DataSourceName", makeAny( sDataSource ) ); } OUString sCommand = m_aTable.GetSelectEntry(); sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( m_aTable.GetSelectEntryPos() ) ); - rContext.xForm->setPropertyValue( OUString("Command"), makeAny( sCommand ) ); - rContext.xForm->setPropertyValue( OUString("CommandType"), makeAny( nCommandType ) ); + rContext.xForm->setPropertyValue("Command", makeAny( sCommand ) ); + rContext.xForm->setPropertyValue("CommandType", makeAny( nCommandType ) ); if ( !rContext.bEmbedded ) setFormConnection( xOldConn, sal_False ); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 32a152be18df..507525ce80a4 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -232,9 +232,9 @@ namespace dbp sal_Int32 nCommandType = CommandType::COMMAND; try { - rContext.xForm->getPropertyValue(OUString("DataSourceName")) >>= sDataSource; - rContext.xForm->getPropertyValue(OUString("Command")) >>= sCommand; - rContext.xForm->getPropertyValue(OUString("CommandType")) >>= nCommandType; + rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSource; + rContext.xForm->getPropertyValue("Command") >>= sCommand; + rContext.xForm->getPropertyValue("CommandType") >>= nCommandType; } catch(const Exception&) { @@ -298,7 +298,7 @@ namespace dbp sal_Int16 nClassId = FormComponentType::CONTROL; try { - getContext().xObjectModel->getPropertyValue(OUString("ClassId")) >>= nClassId; + getContext().xObjectModel->getPropertyValue("ClassId") >>= nClassId; } catch(const Exception&) { @@ -457,7 +457,7 @@ namespace dbp try { if ( !::dbtools::isEmbeddedInDatabase(m_aContext.xForm,xConn) ) - m_aContext.xForm->getPropertyValue(OUString("ActiveConnection")) >>= xConn; + m_aContext.xForm->getPropertyValue("ActiveConnection") >>= xConn; } catch(const Exception&) { @@ -487,7 +487,7 @@ namespace dbp } else { - m_aContext.xForm->setPropertyValue( OUString("ActiveConnection"), makeAny( _rxConn ) ); + m_aContext.xForm->setPropertyValue("ActiveConnection", makeAny( _rxConn ) ); } } catch(const Exception&) @@ -558,8 +558,8 @@ namespace dbp if (m_aContext.xForm.is()) { // collect some properties of the form - OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue(OUString("Command"))); - sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue(OUString("CommandType"))); + OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue("Command")); + sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue("CommandType")); // calculate the connection the rowset is working with Reference< XConnection > xConnection; @@ -604,7 +604,7 @@ namespace dbp // not interested in any results, only in the fields Reference< XPropertySet > xStatementProps(xStatement, UNO_QUERY); - xStatementProps->setPropertyValue(OUString("MaxRows"), makeAny(sal_Int32(0))); + xStatementProps->setPropertyValue("MaxRows", makeAny(sal_Int32(0))); // TODO: think about handling local SQLExceptions here ... Reference< XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), UNO_QUERY); diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 866a34e5227e..20eae70f083e 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -176,12 +176,12 @@ namespace dbp } // ListSourceType: SQL - getContext().xObjectModel->setPropertyValue(OUString("ListSourceType"), makeAny((sal_Int32)ListSourceType_SQL)); + getContext().xObjectModel->setPropertyValue("ListSourceType", makeAny((sal_Int32)ListSourceType_SQL)); if (isListBox()) { // BoundColumn: 1 - getContext().xObjectModel->setPropertyValue(OUString("BoundColumn"), makeAny((sal_Int16)1)); + getContext().xObjectModel->setPropertyValue("BoundColumn", makeAny((sal_Int16)1)); // build the statement to set as list source OUString sStatement = "SELECT " + @@ -189,7 +189,7 @@ namespace dbp " FROM " + OUString( getSettings().sListContentTable ); Sequence< OUString > aListSource(1); aListSource[0] = sStatement; - getContext().xObjectModel->setPropertyValue(OUString("ListSource"), makeAny(aListSource)); + getContext().xObjectModel->setPropertyValue("ListSource", makeAny(aListSource)); } else { @@ -201,7 +201,7 @@ namespace dbp } // the bound field - getContext().xObjectModel->setPropertyValue(OUString("DataField"), makeAny(OUString(getSettings().sLinkedFormField))); + getContext().xObjectModel->setPropertyValue("DataField", makeAny(OUString(getSettings().sLinkedFormField))); } catch(const Exception&) { diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index 9e315a8d5811..ef1754a002ad 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -119,28 +119,28 @@ namespace dbp aButtonPosition.Y = aShapePosition.Y + (i+1) * nTempHeight + nTopSpace; Reference< XPropertySet > xRadioModel( - xDocFactory->createInstance(OUString("com.sun.star.form.component.RadioButton")), + xDocFactory->createInstance("com.sun.star.form.component.RadioButton"), UNO_QUERY); // the label - xRadioModel->setPropertyValue(OUString("Label"), makeAny(OUString(*aLabelIter))); + xRadioModel->setPropertyValue("Label", makeAny(OUString(*aLabelIter))); // the value - xRadioModel->setPropertyValue(OUString("RefValue"), makeAny(OUString(*aValueIter))); + xRadioModel->setPropertyValue("RefValue", makeAny(OUString(*aValueIter))); // default selection if (_rSettings.sDefaultField == *aLabelIter) - xRadioModel->setPropertyValue(OUString("DefaultState"), makeAny(sal_Int16(1))); + xRadioModel->setPropertyValue("DefaultState", makeAny(sal_Int16(1))); // the connection to the database field if (0 != _rSettings.sDBField.Len()) - xRadioModel->setPropertyValue(OUString("DataField"), makeAny(OUString(_rSettings.sDBField))); + xRadioModel->setPropertyValue("DataField", makeAny(OUString(_rSettings.sDBField))); // the name for the model - xRadioModel->setPropertyValue(OUString("Name"), makeAny(sElementsName)); + xRadioModel->setPropertyValue("Name", makeAny(sElementsName)); // create a shape for the radio button Reference< XControlShape > xRadioShape( - xDocFactory->createInstance(OUString("com.sun.star.drawing.ControlShape")), + xDocFactory->createInstance("com.sun.star.drawing.ControlShape"), UNO_QUERY); Reference< XPropertySet > xShapeProperties(xRadioShape, UNO_QUERY); @@ -155,7 +155,7 @@ namespace dbp // the name of the shape if (xShapeProperties.is()) - xShapeProperties->setPropertyValue(OUString("Name"), makeAny(sElementsName)); + xShapeProperties->setPropertyValue("Name", makeAny(sElementsName)); // add to the page xPageShapes->add(xRadioShape.get()); @@ -164,7 +164,7 @@ namespace dbp // set the GroupBox as "LabelControl" for the RadioButton // (_after_ having inserted the model into the page!) - xRadioModel->setPropertyValue(OUString("LabelControl"), makeAny(_rContext.xObjectModel)); + xRadioModel->setPropertyValue("LabelControl", makeAny(_rContext.xObjectModel)); } // group the shapes diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index 8bef4db3a7dd..91c6fa92ca33 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -272,7 +272,7 @@ namespace logging // the log level sal_Int32 nLogLevel( LogLevel::OFF ); - OSL_VERIFY( xLoggerSettings->getByName( OUString( "LogLevel" ) ) >>= nLogLevel ); + OSL_VERIFY( xLoggerSettings->getByName("LogLevel") >>= nLogLevel ); _rxLogger->setLevel( nLogLevel ); // the default handler, if any diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx index 2fc4939ae9fd..4184718f4532 100644 --- a/extensions/source/logging/loghandler.cxx +++ b/extensions/source/logging/loghandler.cxx @@ -81,10 +81,10 @@ namespace logging m_rMutex.acquire(); if ( !getIsInitialized() ) - throw DisposedException( OUString( "component not initialized" ), NULL ); + throw DisposedException("component not initialized", NULL ); if ( m_rBHelper.bDisposed ) - throw DisposedException( OUString( "component already disposed" ), NULL ); + throw DisposedException("component already disposed", NULL ); // fallback settings, in case they weren't passed at construction time if ( !getFormatter().is() ) diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 57e573802729..febc7aebac80 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -182,9 +182,9 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) // currently ignore errors in this code uno::Reference< beans::XPropertySet > xFrameProps( m_xFrame, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xLMProps; - xFrameProps->getPropertyValue( OUString("LayoutManager") ) >>= xLMProps; + xFrameProps->getPropertyValue("LayoutManager") >>= xLMProps; if ( xLMProps.is() ) - xLMProps->setPropertyValue( OUString("AutomaticToolbars"), uno::makeAny( (sal_Bool)sal_False ) ); + xLMProps->setPropertyValue("AutomaticToolbars", uno::makeAny( (sal_Bool)sal_False ) ); } catch( const uno::Exception& ) {} @@ -300,7 +300,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) uno::Reference< presentation::XPresentationSupplier > xPresSuppl( m_xComponent, uno::UNO_QUERY_THROW ); uno::Reference< presentation::XPresentation > xPres( xPresSuppl->getPresentation(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xProps( xPresSuppl->getPresentation(), uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString( "IsFullScreen" ), uno::makeAny( sal_False ) ); + xProps->setPropertyValue("IsFullScreen", uno::makeAny( sal_False ) ); xPres->start(); } catch( const uno::Exception& ) diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index b3b7b525ed40..0ef5557213f8 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -405,15 +405,15 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName, throw RuntimeException(); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; case DISP_E_PARAMNOTFOUND: - throw IllegalArgumentException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw IllegalArgumentException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )) ; break; case DISP_E_TYPEMISMATCH: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::UNKNOWN, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_UNKNOWNINTERFACE: @@ -423,7 +423,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName, throw RuntimeException(); break; case DISP_E_PARAMNOTOPTIONAL: - throw CannotConvertException(OUString("call to OLE object failed"),static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed",static_cast<XInterface*>( static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr); break; default: @@ -1174,7 +1174,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, } if( !bConvRet) // conversion of return or out parameter failed - throw CannotConvertException( OUString("Call to COM object failed. Conversion of return or out value failed"), + throw CannotConvertException("Call to COM object failed. Conversion of return or out value failed", Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY ), TypeClass_UNKNOWN, FailReason::UNKNOWN, 0);// lookup error code // conversion of return or out parameter failed @@ -1198,15 +1198,15 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, throw IllegalArgumentException(); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; case DISP_E_PARAMNOTFOUND: - throw IllegalArgumentException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw IllegalArgumentException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_TYPEMISMATCH: - throw CannotConvertException(OUString("call to OLE object failed"),static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed",static_cast<XInterface*>( static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::UNKNOWN, uArgErr); break; case DISP_E_UNKNOWNINTERFACE: @@ -1216,7 +1216,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, throw RuntimeException() ; break; case DISP_E_PARAMNOTOPTIONAL: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr); break; default: @@ -1525,7 +1525,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con "returned DISP_E_NONAMEDARGS",0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("[automation bridge] Call failed."), + throw CannotConvertException("[automation bridge] Call failed.", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; @@ -2157,7 +2157,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, "returned DISP_E_NONAMEDARGS",0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("[automation bridge] Call failed."), + throw CannotConvertException("[automation bridge] Call failed.", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 404e438af421..b1f11d42c731 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -320,7 +320,7 @@ void XPlugin_Impl::handleSpecialArgs() try { uno::Reference< XPropertySet > xProp( m_xModel, UNO_QUERY ); - Any aProp = xProp->getPropertyValue( OUString( "URL" ) ); + Any aProp = xProp->getPropertyValue("URL"); aProp >>= aURL; } catch(const UnknownPropertyException &) @@ -390,7 +390,7 @@ void XPlugin_Impl::handleSpecialArgs() try { uno::Reference< XPropertySet > xProp( m_xModel, UNO_QUERY ); - Any aProp = xProp->getPropertyValue( OUString( "URL" ) ); + Any aProp = xProp->getPropertyValue("URL"); aProp >>= aURL; } catch(const UnknownPropertyException &) @@ -462,7 +462,7 @@ OUString XPlugin_Impl::getCreationURL() uno::Reference< com::sun::star::beans::XPropertySet > xPS( m_xModel, UNO_QUERY ); if( xPS.is() ) { - Any aValue = xPS->getPropertyValue( OUString("URL") ); + Any aValue = xPS->getPropertyValue("URL"); aValue >>= aRet; } return aRet; @@ -660,9 +660,9 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, { try { - xPS->setPropertyValue( OUString("URL"), aAny ); + xPS->setPropertyValue("URL", aAny ); aAny <<= mimetype; - xPS->setPropertyValue( OUString("TYPE"), aAny ); + xPS->setPropertyValue("TYPE", aAny ); } catch(...) { @@ -724,7 +724,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, { Any aAny; aAny <<= m_aDescription.Mimetype; - xPS->setPropertyValue( OUString("TYPE"), aAny ); + xPS->setPropertyValue("TYPE", aAny ); } catch(...) { @@ -1140,7 +1140,7 @@ PluginOutputStream::PluginOutputStream( XPlugin_Impl* pPlugin, sal_uInt32 len, sal_uInt32 lastmod ) : PluginStream( pPlugin, url, len, lastmod ), - m_xStream( pPlugin->getServiceManager()->createInstance( OUString("com.sun.star.io.DataOutputStream") ), UNO_QUERY ) + m_xStream( pPlugin->getServiceManager()->createInstance("com.sun.star.io.DataOutputStream"), UNO_QUERY ) { Guard< Mutex > aGuard( m_pPlugin->getMutex() ); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 789d3a85acfa..28332e210695 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -512,15 +512,15 @@ namespace pcr if ( !( xModel.is() && xBinding.is() && !sFacetName.isEmpty() ) ) return InteractiveSelectionResult_Cancelled; - xDialogProps->setPropertyValue( OUString( "FormModel" ), makeAny( xModel ) ); - xDialogProps->setPropertyValue( OUString( "Binding" ), makeAny( xBinding ) ); - xDialogProps->setPropertyValue( OUString( "FacetName" ), makeAny( sFacetName ) ); + xDialogProps->setPropertyValue("FormModel", makeAny( xModel ) ); + xDialogProps->setPropertyValue("Binding", makeAny( xBinding ) ); + xDialogProps->setPropertyValue("FacetName", makeAny( sFacetName ) ); if ( !xDialog->execute() ) // cancelled return InteractiveSelectionResult_Cancelled; - _rData = xDialogProps->getPropertyValue( OUString( "ConditionValue" ) ); + _rData = xDialogProps->getPropertyValue("ConditionValue"); return InteractiveSelectionResult_ObtainedValue; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index aaa0e94c38ff..e35dfd7239a2 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2644,10 +2644,10 @@ namespace pcr // initialize the dialog Reference< XPropertySet > xDialogProps( xDialog, UNO_QUERY_THROW ); - xDialogProps->setPropertyValue( OUString( "QueryComposer" ), makeAny( xComposer ) ); - xDialogProps->setPropertyValue( OUString( "RowSet" ), makeAny( m_xComponent ) ); - xDialogProps->setPropertyValue( OUString( "ParentWindow" ), makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) ); - xDialogProps->setPropertyValue( OUString( "Title" ), makeAny( sPropertyUIName ) ); + xDialogProps->setPropertyValue("QueryComposer", makeAny( xComposer ) ); + xDialogProps->setPropertyValue("RowSet", makeAny( m_xComponent ) ); + xDialogProps->setPropertyValue("ParentWindow", makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) ); + xDialogProps->setPropertyValue("Title", makeAny( sPropertyUIName ) ); _rClearBeforeDialog.clear(); bSuccess = ( xDialog->execute() != 0 ); diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index e08f75bd8522..2d46ae622ccf 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -602,7 +602,7 @@ namespace pcr if ( !xPSI->hasPropertyByName( PROPERTY_ANCHOR ) ) return false; Reference< XServiceInfo > xSI( m_xAssociatedShape, UNO_QUERY_THROW ); - if ( xSI->supportsService( OUString( "com.sun.star.sheet.Shape" ) ) ) + if ( xSI->supportsService("com.sun.star.sheet.Shape") ) return true; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 079e6f0b8a15..f88455a5a543 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -516,7 +516,7 @@ namespace pcr { xKeys->getByIndex( key ) >>= xKey; sal_Int32 nKeyType = 0; - xKey->getPropertyValue( OUString( "Type" ) ) >>= nKeyType; + xKey->getPropertyValue("Type") >>= nKeyType; if ( nKeyType != KeyType::FOREIGN ) continue; @@ -540,7 +540,7 @@ namespace pcr if ( xKeyColumn.is() ) { xKeyColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName; - xKeyColumn->getPropertyValue( OUString( "RelatedColumn" ) ) >>= sRelatedColumnName; + xKeyColumn->getPropertyValue("RelatedColumn") >>= sRelatedColumnName; _rLeftFields[ column ] = sColumnName; _rRightFields[ column ] = sRelatedColumnName; diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index d474093b93f3..4af7ef6426ed 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -103,7 +103,7 @@ namespace pcr if ( _rxContext.is() ) { Reference< XHierarchicalNameAccess > xTypeDescProv( - _rxContext->getValueByName( OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ), + _rxContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), UNO_QUERY_THROW ); m_xTypeDescription = Reference< XEnumTypeDescription >( xTypeDescProv->getByHierarchicalName( m_aEnumType.getTypeName() ), UNO_QUERY_THROW ); @@ -380,7 +380,7 @@ namespace pcr Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( makeAny( _rxIntrospectee ) ) ); if ( !xIntrospectionAccess.is() ) - throw RuntimeException( OUString( "The introspection service could not handle the given component." ), *this ); + throw RuntimeException("The introspection service could not handle the given component.", *this ); m_xComponent = Reference< XPropertySet >( xIntrospectionAccess->queryAdapter( XPropertySet::static_type() ), UNO_QUERY_THROW ); // now that we survived so far, remember m_xComponentIntrospectionAccess diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index eb58101ec1d6..647a2e33e0c2 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -360,7 +360,7 @@ namespace pcr ::osl::MutexGuard aGuard( m_aMutex ); if (_rxFrame.is() && haveView()) - throw RuntimeException(OUString("Unable to attach to a second frame."),*this); + throw RuntimeException("Unable to attach to a second frame.",*this); // revoke as focus listener from the old container window stopContainerWindowListening(); @@ -376,7 +376,7 @@ namespace pcr VCLXWindow* pContainerWindow = VCLXWindow::GetImplementation(xContainerWindow); Window* pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : NULL; if (!pParentWin) - throw RuntimeException(OUString("The frame is invalid. Unable to extract the container window."),*this); + throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this); if ( Construct( pParentWin ) ) { diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index a68c8d0489d4..89228a0cc15d 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -240,7 +240,7 @@ void SAL_CALL StringRepresentation::initialize(const uno::Sequence< uno::Any > & if ( m_xContext.is() ) { uno::Reference< container::XHierarchicalNameAccess > xTypeDescProv( - m_xContext->getValueByName( OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ), + m_xContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), uno::UNO_QUERY_THROW ); m_xTypeDescription.set( xTypeDescProv->getByHierarchicalName( sConstantName ), uno::UNO_QUERY_THROW ); diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 58b262789c2a..d671ebcbf4a0 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -878,7 +878,7 @@ sal_Bool SAL_CALL ScannerManager::configureScannerAndScan( ScannerContext& rCont uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); @@ -892,7 +892,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); aTwain.PerformTransfer( *this, rxListener ); @@ -905,7 +905,7 @@ ScanError SAL_CALL ScannerManager::getError( const ScannerContext& rContext ) uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); return( ( aTwain.GetState() == TWAIN_STATE_CANCELED ) ? ScanError_ScanCanceled : ScanError_ScanErrorNone ); } |