summaryrefslogtreecommitdiff
path: root/extensions
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
parentd0a99cc2ed76be220f7e868e332ba19f6e48a440 (diff)
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx2
-rw-r--r--extensions/source/config/ldap/ldapuserprofilebe.cxx2
-rw-r--r--extensions/source/ole/oleobjw.cxx24
-rw-r--r--extensions/source/ole/unoobjw.cxx8
-rw-r--r--extensions/source/ole/unotypewrapper.cxx4
-rw-r--r--extensions/source/update/check/download.cxx8
-rw-r--r--extensions/source/update/check/updatecheck.cxx10
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx2
-rw-r--r--extensions/source/update/check/updatehdl.cxx2
-rw-r--r--extensions/source/update/check/updateprotocol.cxx2
-rw-r--r--extensions/source/update/feed/updatefeed.cxx12
-rw-r--r--extensions/test/ole/OleClient/funcs.cxx2
-rw-r--r--extensions/workben/pythonautotest.cxx72
-rw-r--r--extensions/workben/pythontest.cxx2
-rw-r--r--extensions/workben/testcomponent.cxx2
15 files changed, 77 insertions, 77 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 0b94c9bf7751..5d2982315f25 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -170,7 +170,7 @@ void LdapConnection::initConnection()
void LdapConnection::getUserProfile(
const OUString& aUser, LdapData * data)
{
- assert(data != nullptr);
+ OSL_ASSERT(data != nullptr);
if (!isValid()) { connectSimple(); }
OUString aUserDn =findUserDn( aUser );
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index 1c1374b32451..54d60e335c50 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -90,7 +90,7 @@ bool LdapUserProfileBe::readLdapConfiguration(
css::uno::Reference< css::uno::XComponentContext > const & context,
LdapDefinition * definition, OUString * loggedOnUser)
{
- assert(context.is() && definition != nullptr && loggedOnUser != nullptr);
+ OSL_ASSERT(context.is() && definition != nullptr && loggedOnUser != nullptr);
const OUString kReadOnlyViewService("com.sun.star.configuration.ConfigurationAccess") ;
const OUString kComponent("org.openoffice.LDAP/UserDirectory");
const OUString kServerDefiniton("ServerDefinition");
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;
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index 97f4e372c522..4b4afea5523d 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -104,7 +104,7 @@ static void openFile( OutData& out )
static inline OString
getStringValue(const uno::Reference< container::XNameAccess >& xNameAccess, const OUString& aName)
{
- assert(xNameAccess->hasByName(aName));
+ OSL_ASSERT(xNameAccess->hasByName(aName));
uno::Any aValue = xNameAccess->getByName(aName);
return OUStringToOString(aValue.get<OUString>(), RTL_TEXTENCODING_UTF8);
@@ -115,7 +115,7 @@ static inline sal_Int32
getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess,
const OUString& aName)
{
- assert(xNameAccess->hasByName(aName));
+ OSL_ASSERT(xNameAccess->hasByName(aName));
uno::Any aValue = xNameAccess->getByName(aName);
sal_Int32 n = -1;
@@ -191,7 +191,7 @@ Download::getProxyForURL(const OUString& rURL, OString& rHost, sal_Int32& rPort)
"com.sun.star.configuration.ConfigurationAccess", aArgumentList ),
uno::UNO_QUERY_THROW );
- assert(xNameAccess->hasByName("ooInetProxyType"));
+ OSL_ASSERT(xNameAccess->hasByName("ooInetProxyType"));
uno::Any aValue = xNameAccess->getByName("ooInetProxyType");
sal_Int32 nProxyType = aValue.get< sal_Int32 >();
@@ -336,7 +336,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
bool
Download::start(const OUString& rURL, const OUString& rFile, const OUString& rDestinationDir)
{
- assert( m_aHandler.is() );
+ OSL_ASSERT( m_aHandler.is() );
OutData out(m_aCondition);
OUString aFile( rFile );
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 2aa4da72b3ad..0538f40403aa 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -991,7 +991,7 @@ UpdateCheck::enableAutoCheck(bool enable)
void
UpdateCheck::enableDownload(bool enable, bool paused)
{
- assert(nullptr == m_pThread);
+ OSL_ASSERT(nullptr == m_pThread);
State eState = DISABLED;
if( enable )
@@ -1198,7 +1198,7 @@ UpdateCheck::showDialog(bool forceCheck)
break;
case NOT_INITIALIZED:
- assert( false );
+ OSL_ASSERT( false );
break;
}
@@ -1233,7 +1233,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
bool bSuppressBubble = aInfo.BuildId.equals(m_aUpdateInfo.BuildId);
m_aUpdateInfo = aInfo;
- assert(DISABLED == m_eState || CHECK_SCHEDULED == m_eState);
+ OSL_ASSERT(DISABLED == m_eState || CHECK_SCHEDULED == m_eState);
// Ignore leading non direct download if we get direct ones
std::vector< DownloadSource >::iterator iter = m_aUpdateInfo.Sources.begin();
@@ -1253,7 +1253,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
}
rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext, *this);
- assert( rModel.is() );
+ OSL_ASSERT( rModel.is() );
// Decide whether to use alternate release note pos ..
bool autoDownloadEnabled = rModel->isAutoDownloadEnabled();
@@ -1368,7 +1368,7 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble)
m_eUpdateState = eState;
rtl::Reference<UpdateHandler> aUpdateHandler(getUpdateHandler());
- assert( aUpdateHandler.is() );
+ OSL_ASSERT( aUpdateHandler.is() );
UpdateInfo aUpdateInfo(m_aUpdateInfo);
OUString aImageName(m_aImageName);
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index d6bbb033ecdc..e61f7edc3e63 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -422,7 +422,7 @@ UpdateCheckConfig::clearUpdateFound()
m_xContainer->removeByName(aName);
} catch(const lang::WrappedTargetException& ) {
// Can not remove value, probably in share layer
- assert(false);
+ OSL_ASSERT(false);
m_xContainer->replaceByName(aName, uno::makeAny(OUString()));
}
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 4e0be50fb5f6..13ba54392c0f 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -1040,7 +1040,7 @@ void UpdateHandler::createDialog()
{
if ( !mxContext.is() )
{
- assert( false );
+ OSL_ASSERT( false );
return;
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index 905d05723401..93c6508e42f1 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -114,7 +114,7 @@ checkForUpdates(
if( !rxContext.is() )
throw uno::RuntimeException( "checkForUpdates: empty component context" );
- assert( rxContext->getServiceManager().is() );
+ OSL_ASSERT( rxContext->getServiceManager().is() );
// XPath implementation
uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create(rxContext);
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index e3fdaf38936e..28c092c76a81 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -224,8 +224,8 @@ public:
sal_Bool SAL_CALL hasMoreElements() override { return m_nCount < m_nNodes; };
uno::Any SAL_CALL nextElement() override
{
- assert( m_xNodeList.is() );
- assert( m_xUpdateInformationProvider.is() );
+ OSL_ASSERT( m_xNodeList.is() );
+ OSL_ASSERT( m_xUpdateInformationProvider.is() );
if( !(m_nCount < m_nNodes ) )
throw container::NoSuchElementException(OUString::number(m_nCount), *this);
@@ -516,7 +516,7 @@ UpdateInformationProvider::load(const OUString& rURL)
uno::Reference< xml::dom::XElement >
UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode >& rxNode)
{
- assert(m_xDocumentBuilder.is());
+ OSL_ASSERT(m_xDocumentBuilder.is());
uno::Reference< xml::dom::XElement > xElement(rxNode, uno::UNO_QUERY_THROW);
@@ -526,7 +526,7 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode
uno::Reference< xml::dom::XDocument > xUpdateXML =
m_xDocumentBuilder->parse(load(xElement->getAttribute( "src" )));
- assert( xUpdateXML.is() );
+ OSL_ASSERT( xUpdateXML.is() );
if( xUpdateXML.is() )
return xUpdateXML->getDocumentElement();
@@ -561,7 +561,7 @@ uno::Reference< xml::dom::XNode >
UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& rxNode,
const OUString& rName)
{
- assert(m_xXPathAPI.is());
+ OSL_ASSERT(m_xXPathAPI.is());
try {
return m_xXPathAPI->selectSingleNode(rxNode, "./atom:" + rName);
} catch (const xml::xpath::XPathException &) {
@@ -577,7 +577,7 @@ UpdateInformationProvider::getUpdateInformationEnumeration(
OUString const & extensionId
)
{
- assert(m_xDocumentBuilder.is());
+ OSL_ASSERT(m_xDocumentBuilder.is());
// reset cancelled flag
m_bCancelled.reset();
diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx
index d3f3dc5d28d2..8070b085a608 100644
--- a/extensions/test/ole/OleClient/funcs.cxx
+++ b/extensions/test/ole/OleClient/funcs.cxx
@@ -163,7 +163,7 @@ bool equalSequences(const Any& orig, const Any& returned)
{
if (orig.getValueTypeClass() != TypeClass_SEQUENCE)
{
- assert(0);
+ OSL_ASSERT(0);
return false;
}
TypeDescription td(orig.getValueTypeRef());
diff --git a/extensions/workben/pythonautotest.cxx b/extensions/workben/pythonautotest.cxx
index f80ca28306e1..e4804608bf5e 100644
--- a/extensions/workben/pythonautotest.cxx
+++ b/extensions/workben/pythonautotest.cxx
@@ -279,7 +279,7 @@ void TestListener::cmdLine()
void TestListener::detach()
{
- assert( m_pDebuggingRef );
+ OSL_ASSERT( m_pDebuggingRef );
m_pDebuggingRef = 0;
}
@@ -299,15 +299,15 @@ void checkInvokation( const XInvokationRef &xInvoke )
UsrAny anyList;
// check exporting an object as an invokation
- assert( xInvoke->hasProperty( L"list" ) );
+ OSL_ASSERT( xInvoke->hasProperty( L"list" ) );
anyList = xInvoke->getValue( L"list" );
- assert( anyList.getReflection() == XInvokation_getReflection() );
+ OSL_ASSERT( anyList.getReflection() == XInvokation_getReflection() );
XInvokationRef *pRef = ( XInvokationRef * ) anyList.get();
- assert( (*pRef).is() );
+ OSL_ASSERT( (*pRef).is() );
- assert( (*pRef)->hasMethod( L"append" ) );
- assert( (*pRef)->hasMethod( L"count" ) );
+ OSL_ASSERT( (*pRef)->hasMethod( L"append" ) );
+ OSL_ASSERT( (*pRef)->hasMethod( L"count" ) );
Sequence<UsrAny> seq(1);
UsrAny any( (INT32) 1);
@@ -319,7 +319,7 @@ void checkInvokation( const XInvokationRef &xInvoke )
any = (*pRef)->invoke( L"append" , seq , Sequence<INT16>(), Sequence<UsrAny>() );
any = (*pRef)->invoke( L"count" , seq , Sequence<INT16>(), Sequence<UsrAny>() );
- assert( nOldSize + 1 == any.getINT32() );
+ OSL_ASSERT( nOldSize + 1 == any.getINT32() );
}
// just for testing !
@@ -424,30 +424,30 @@ int SAL_CALL main (int argc, char **argv)
*****/
// get/set an int !
{
- assert( xInvoke->hasProperty( L"nIntTest" ) );
+ OSL_ASSERT( xInvoke->hasProperty( L"nIntTest" ) );
UsrAny any = xInvoke->getValue( L"nIntTest" );
- assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
- assert( any.getINT32() == 5 );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( any.getINT32() == 5 );
// simple test: set an int !
xInvoke->setValue( L"nIntTest" , UsrAny( (INT32) 10 ) );
any = xInvoke->getValue( L"nIntTest" );
- assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
- assert( any.getINT32() == 10 );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( any.getINT32() == 10 );
}
// call a python method !
{
xEngine->run( L"def foo():\n"
L" return 'this is foo'\n" , XInterfaceRef() , Sequence<UsrAny> () );
- assert( xInvoke->hasMethod( L"foo" ) );
+ OSL_ASSERT( xInvoke->hasMethod( L"foo" ) );
UsrAny any = xInvoke->invoke( L"foo" ,
Sequence<UsrAny>(),
Sequence<INT16>() ,
Sequence<UsrAny> () );
- assert( any.getString() == L"this is foo" );
+ OSL_ASSERT( any.getString() == L"this is foo" );
}
@@ -456,7 +456,7 @@ int SAL_CALL main (int argc, char **argv)
try {
xInvoke->invoke( L"foo" , Sequence<UsrAny>(1) , Sequence<INT16>(), Sequence<UsrAny> () );
// wrong number of arguments
- assert( 0 );
+ OSL_ASSERT( 0 );
}
catch ( IllegalArgumentException& e ) {
}
@@ -477,21 +477,21 @@ int SAL_CALL main (int argc, char **argv)
*******/
{
XIntrospectionAccessRef xIntrospection = xInvoke->getIntrospection();
- assert( xIntrospection.is() );
+ OSL_ASSERT( xIntrospection.is() );
// no further test, simply call them
xIntrospection->getMethods(0);
xIntrospection->getProperties(0);
- assert( xIntrospection->getSuppliedMethodConcepts() == 0 );
- assert( xIntrospection->getSuppliedPropertyConcepts() == 0 );
+ OSL_ASSERT( xIntrospection->getSuppliedMethodConcepts() == 0 );
+ OSL_ASSERT( xIntrospection->getSuppliedPropertyConcepts() == 0 );
Property prop = xIntrospection->getProperty( L"nIntTest" ,0 );
- assert( prop.Name == L"nIntTest" );
- assert( prop.Type->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( prop.Name == L"nIntTest" );
+ OSL_ASSERT( prop.Type->getTypeClass() == TypeClass_LONG );
XIdlMethodRef method = xIntrospection->getMethod( L"foo" , 0 );
- assert( method->getName() == L"foo" );
+ OSL_ASSERT( method->getName() == L"foo" );
}
@@ -543,8 +543,8 @@ int SAL_CALL main (int argc, char **argv)
xEngine->run( L"import testmodul\n"
L"x = testmodul.testmethod()\n" , XInterfaceRef() , Sequence<UsrAny>() );
UsrAny any = xInvoke->getValue( L"x" );
- assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
- assert( any.getINT32() == 42 );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( any.getINT32() == 42 );
}
// check other imports
@@ -553,11 +553,11 @@ int SAL_CALL main (int argc, char **argv)
xEngine->run( L"import math\n"
L"dMathTest = math.exp(0)\n" , XInterfaceRef() , Sequence<UsrAny> () );
- assert( xInvoke->hasProperty( L"dMathTest" ) );
+ OSL_ASSERT( xInvoke->hasProperty( L"dMathTest" ) );
UsrAny any = xInvoke->getValue( L"dMathTest" );
- assert( any.getReflection()->getTypeClass() == TypeClass_DOUBLE );
- assert( any.getDouble() == 1. );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_DOUBLE );
+ OSL_ASSERT( any.getDouble() == 1. );
}
// Test connection to root object !
@@ -568,36 +568,36 @@ int SAL_CALL main (int argc, char **argv)
L"z = y.value\n" , XInterfaceRef() , Sequence<UsrAny> () );
UsrAny any = xInvoke->getValue( L"x" );
- assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
- assert( any.getINT32() == 15 );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( any.getINT32() == 15 );
any = xInvoke->getValue( L"z" );
- assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
- assert( any.getINT32() == 15 );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ OSL_ASSERT( any.getINT32() == 15 );
}
// Test exactName interface
{
UsrAny any = xInvoke->getValue( L"__builtins__" );
- assert( any.getReflection()->getTypeClass() == TypeClass_INTERFACE );
+ OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_INTERFACE );
XInvokationRef rInv( *((XInterfaceRef *) any.get() ), USR_QUERY );
- assert( rInv.is() );
+ OSL_ASSERT( rInv.is() );
XExactNameRef rName( *((XInterfaceRef*) any.get() ), USR_QUERY );
- assert( rName.is() );
+ OSL_ASSERT( rName.is() );
UString str = rName->getExactName( L"SYNTAXERROR" );
- assert( str.len() );
+ OSL_ASSERT( str.len() );
}
// Test exactName interface of the engine itself
{
XExactNameRef rName( xInvoke , USR_QUERY );
- assert( rName.is() );
+ OSL_ASSERT( rName.is() );
UString str = rName->getExactName( L"STARDIV" );
- assert( str.len() );
+ OSL_ASSERT( str.len() );
}
diff --git a/extensions/workben/pythontest.cxx b/extensions/workben/pythontest.cxx
index c12d83ee40fd..b7174dbe12ab 100644
--- a/extensions/workben/pythontest.cxx
+++ b/extensions/workben/pythontest.cxx
@@ -433,7 +433,7 @@ void CmdDebugger::dumpVarToStream( const char *pc , const UsrAny &aValue, FILE *
void CmdDebugger::detach()
{
- assert( m_pDebuggingRef );
+ OSL_ASSERT( m_pDebuggingRef );
m_bIsRunning = FALSE;
m_pDebuggingRef = 0;
diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx
index b62c045843e3..e9bed4c909b4 100644
--- a/extensions/workben/testcomponent.cxx
+++ b/extensions/workben/testcomponent.cxx
@@ -62,7 +62,7 @@ int SAL_CALL main (int argc, char **argv)
// create service manager
// XMultiServiceFactoryRef xSMgr = getProcessServiceManager();
XMultiServiceFactoryRef xSMgr = createRegistryServiceManager();
- assert( xSMgr.is() );
+ OSL_ASSERT( xSMgr.is() );
registerUsrServices( xSMgr );
setProcessServiceManager( xSMgr );