summaryrefslogtreecommitdiff
path: root/extensions/source/ole
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /extensions/source/ole
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff)
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'extensions/source/ole')
-rw-r--r--extensions/source/ole/oleobjw.cxx26
-rw-r--r--extensions/source/ole/servreg.cxx8
2 files changed, 17 insertions, 17 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 8710478b9229..2814850ff221 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -408,15 +408,15 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
throw RuntimeException();
break;
case DISP_E_OVERFLOW:
- throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("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(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw IllegalArgumentException(rtl::OUString("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(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("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:
@@ -426,7 +426,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
throw RuntimeException();
break;
case DISP_E_PARAMNOTOPTIONAL:
- throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")),static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("call to OLE object failed"),static_cast<XInterface*>(
static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr);
break;
default:
@@ -489,7 +489,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
{
if ( pInfo && m_sTypeName.getLength() == 0 )
{
- m_sTypeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") );
+ m_sTypeName = rtl::OUString("IDispatch");
CComBSTR sName;
if ( SUCCEEDED( pInfo->GetDocumentation( -1, &sName, NULL, NULL, NULL ) ) )
@@ -506,7 +506,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
if ( SUCCEEDED( pTypeLib->GetDocumentation( -1, &sName, NULL, NULL, NULL ) ) )
{
rtl::OUString sLibName( reinterpret_cast<const sal_Unicode*>(LPCOLESTR(sName)));
- m_sTypeName = sLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".") ) ).concat( sTmp );
+ m_sTypeName = sLibName.concat( rtl::OUString(".") ).concat( sTmp );
}
}
@@ -1177,7 +1177,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
}
if( !bConvRet) // conversion of return or out parameter failed
- throw CannotConvertException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Call to COM object failed. Conversion of return or out value failed")),
+ throw CannotConvertException( rtl::OUString("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
@@ -1201,15 +1201,15 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
throw IllegalArgumentException();
break;
case DISP_E_OVERFLOW:
- throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("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(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw IllegalArgumentException(rtl::OUString("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(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")),static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("call to OLE object failed"),static_cast<XInterface*>(
static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::UNKNOWN, uArgErr);
break;
case DISP_E_UNKNOWNINTERFACE:
@@ -1219,7 +1219,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
throw RuntimeException() ;
break;
case DISP_E_PARAMNOTOPTIONAL:
- throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("call to OLE object failed")), static_cast<XInterface*>(
+ throw CannotConvertException(rtl::OUString("call to OLE object failed"), static_cast<XInterface*>(
static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr);
break;
default:
@@ -1528,7 +1528,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const ::rtl::OUString& aNa
"returned DISP_E_NONAMEDARGS",0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr ));
break;
case DISP_E_OVERFLOW:
- throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[automation bridge] Call failed.")),
+ throw CannotConvertException(rtl::OUString("[automation bridge] Call failed."),
static_cast<XInterface*>(
static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr);
break;
@@ -2160,7 +2160,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(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[automation bridge] Call failed.")),
+ throw CannotConvertException(rtl::OUString("[automation bridge] Call failed."),
static_cast<XInterface*>(
static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr);
break;
diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx
index 4aa61c85a551..66333dd0f820 100644
--- a/extensions/source/ole/servreg.cxx
+++ b/extensions/source/ole/servreg.cxx
@@ -78,28 +78,28 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL oleautobridge_component_getFacto
if (pServiceManager && aImplName.equals( reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleConverter2") ))
{
xFactory= createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverter2")),
+ OUString("com.sun.star.comp.ole.OleConverter2"),
ConverterProvider_CreateInstance2, seqServiceNames,
&globalModuleCount.modCnt );
}
else if (pServiceManager && aImplName.equals( reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleConverterVar1") ))
{
xFactory= createSingleFactory( reinterpret_cast<XMultiServiceFactory*>(pServiceManager),
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverterVar1")),
+ OUString("com.sun.star.comp.ole.OleConverterVar1"),
ConverterProvider_CreateInstanceVar1, seqServiceNames,
&globalModuleCount.modCnt );
}
else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleClient")))
{
xFactory= createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleClient")),
+ OUString("com.sun.star.comp.ole.OleClient"),
OleClient_CreateInstance, seqServiceNames,
&globalModuleCount.modCnt);
}
else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleServer")))
{
xFactory= createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleServer")),
+ OUString("com.sun.star.comp.ole.OleServer"),
OleServer_CreateInstance, seqServiceNames,
&globalModuleCount.modCnt);
}