summaryrefslogtreecommitdiffstats
path: root/extensions/source/ole
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 17:03:35 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 17:03:35 +1000
commit97eb00c75e173d4c8d0b483a7941ad3d2f23783e (patch)
tree7974a8b9423c56982646366b0859dfb2a1a88d50 /extensions/source/ole
parenttdf#43157: convert sd module away from OSL_ASSERT to assert (diff)
downloadcore-97eb00c75e173d4c8d0b483a7941ad3d2f23783e.tar.gz
core-97eb00c75e173d4c8d0b483a7941ad3d2f23783e.zip
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
Diffstat (limited to 'extensions/source/ole')
-rw-r--r--extensions/source/ole/oleobjw.cxx24
-rw-r--r--extensions/source/ole/unoobjw.cxx8
-rw-r--r--extensions/source/ole/unotypewrapper.cxx4
3 files changed, 18 insertions, 18 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index d88b5c077622..43fc37670a53 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -111,7 +111,7 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl()
XInterface * xIntRoot = static_cast<OWeakObject *>(this);
#if OSL_DEBUG_LEVEL > 0
acquire(); // make sure we don't delete us twice because of Reference
- assert( Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY).get() == xIntRoot );
+ OSL_ASSERT( Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY).get() == xIntRoot );
#endif
// remove entries in global maps
@@ -324,7 +324,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
dispparams.cNamedArgs = 1;
dispparams.rgvarg = & varArg;
- assert(aDescPut || aVarDesc);
+ OSL_ASSERT(aDescPut || aVarDesc);
VARTYPE vt = 0;
DISPID dispid = 0;
@@ -506,7 +506,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
throw UnknownPropertyException(msg);
}
// write-only should not be possible
- assert( aDescGet || ! aDescPut);
+ OSL_ASSERT( aDescGet || ! aDescPut);
HRESULT hr;
DISPPARAMS dispparams = {nullptr, nullptr, 0, 0};
@@ -999,7 +999,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
{
//We should not run into this block, because invokeWithDispIdComTlb should
//have been called instead.
- assert(false);
+ OSL_ASSERT(false);
}
@@ -1171,7 +1171,7 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
// 2.parameter is a boolean which indicates if the COM pointer was a IUnknown or IDispatch
// 3.parameter is a Sequence<Type>
o2u_attachCurrentThread();
- assert(aArguments.getLength() == 3);
+ OSL_ASSERT(aArguments.getLength() == 3);
m_spUnknown= *static_cast<IUnknown* const *>(aArguments[0].getValue());
m_spUnknown.QueryInterface( & m_spDispatch.p);
@@ -1898,7 +1898,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
{
//optional arg
//e.g: call func(x) in basic : func() ' no arg supplied
- assert(paramFlags & PARAMFLAG_FOPT);
+ OSL_ASSERT(paramFlags & PARAMFLAG_FOPT);
arRefArgs[revIndex].vt = VT_ERROR;
arRefArgs[revIndex].scode = DISP_E_PARAMNOTFOUND;
}
@@ -2171,7 +2171,7 @@ void IUnknownWrapper_Impl::getFuncDescForInvoke(const OUString & sFuncName,
}
bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
{
- assert(m_spDispatch);
+ OSL_ASSERT(m_spDispatch);
LPOLESTR lpsz = const_cast<LPOLESTR> (reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id);
return hr == S_OK;
@@ -2179,7 +2179,7 @@ bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** pFuncDesc)
{
- assert( * pFuncDesc == nullptr);
+ OSL_ASSERT( * pFuncDesc == nullptr);
buildComTlbIndex();
typedef TLBFuncIndexMap::const_iterator cit;
//We assume there is only one entry with the function name. A property
@@ -2201,7 +2201,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
//the actual name as obtained from ITypeInfo
OUString sRealName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(memberName)));
cit itOrg = m_mapComFunc.find(sRealName);
- assert(itOrg != m_mapComFunc.end());
+ OSL_ASSERT(itOrg != m_mapComFunc.end());
// maybe this is a property, if so we need
// to store either both id's ( put/get ) or
// just the get. Storing both is more consistent
@@ -2220,7 +2220,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
pair<cit, cit> p = m_mapComFunc.equal_range(sFuncName.toAsciiLowerCase());
int numEntries = 0;
for ( ;p.first != p.second; p.first ++, numEntries ++);
- assert( ! (numEntries > 3) );
+ OSL_ASSERT( ! (numEntries > 3) );
#endif
if( itIndex != m_mapComFunc.end())
{
@@ -2249,7 +2249,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
void IUnknownWrapper_Impl::getPropDesc(const OUString & sFuncName, FUNCDESC ** pFuncDescGet,
FUNCDESC** pFuncDescPut, VARDESC** pVarDesc)
{
- assert( * pFuncDescGet == nullptr && * pFuncDescPut == nullptr);
+ OSL_ASSERT( * pFuncDescGet == nullptr && * pFuncDescPut == nullptr);
buildComTlbIndex();
typedef TLBFuncIndexMap::const_iterator cit;
pair<cit, cit> p = m_mapComFunc.equal_range(sFuncName);
@@ -2275,7 +2275,7 @@ void IUnknownWrapper_Impl::getPropDesc(const OUString & sFuncName, FUNCDESC ** p
for ( int i = 0 ;p.first != p.second; p.first ++, i ++)
{
// There are a maximum of two entries, property put and property get
- assert( ! (i > 2) );
+ OSL_ASSERT( ! (i > 2) );
ITypeInfo* pType= getTypeInfo();
FUNCDESC * pFuncDesc = nullptr;
if (SUCCEEDED( pType->GetFuncDesc(p.first->second, & pFuncDesc)))
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 6f2f20725d7a..db6398364656 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -273,15 +273,15 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/,
}
catch(const BridgeRuntimeError&)
{
- assert(false);
+ OSL_ASSERT(false);
}
catch(const Exception&)
{
- assert(false);
+ OSL_ASSERT(false);
}
catch(...)
{
- assert(false);
+ OSL_ASSERT(false);
}
return ret;
@@ -400,7 +400,7 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id,
else if(info.eMemberType == MemberType_PROPERTY)
variantToAny( & varParam, anyParam, info.aType);
else
- assert(false);
+ OSL_ASSERT(false);
pParams[countArgs - (i + 1)]= anyParam;
}// end for / iterating over all parameters
diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx
index bf511432e81f..ef576a11aaa4 100644
--- a/extensions/source/ole/unotypewrapper.cxx
+++ b/extensions/source/ole/unotypewrapper.cxx
@@ -25,7 +25,7 @@
bool createUnoTypeWrapper(BSTR sTypeName, VARIANT * pVar)
{
bool ret = false;
- assert(sTypeName && pVar);
+ OSL_ASSERT(sTypeName && pVar);
CComObject< UnoTypeWrapper>* pObj;
VariantClear(pVar);
if( SUCCEEDED( CComObject<UnoTypeWrapper>::CreateInstance( &pObj)))
@@ -35,7 +35,7 @@ bool createUnoTypeWrapper(BSTR sTypeName, VARIANT * pVar)
pVar->pdispVal= CComQIPtr<IDispatch>(pObj->GetUnknown());
//now set the value, e.i. the name of the type
CComQIPtr<IUnoTypeWrapper> spType(pVar->pdispVal);
- assert(spType);
+ OSL_ASSERT(spType);
if (SUCCEEDED(spType->put_Name(sTypeName)))
{
ret = true;