Kaydet (Commit) 1b66ced2 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Managed C++ to C++/CLI conversion also for the debug code

Change-Id: Ibb4f5e386644a67905421d2f9c33336a119fca88
üst d4214aab
......@@ -276,8 +276,8 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_initEnvironment( uno_Environment * uno_cl
uno_cli_env->pExtEnv = 0;
//Set the console to print Trace messages
#if OSL_DEBUG_LEVEL >= 1
System::Diagnostics::Trace::get_Listeners()->
Add( new System::Diagnostics::TextWriterTraceListener(System::Console::get_Out()));
System::Diagnostics::Trace::Listeners->
Add( gcnew System::Diagnostics::TextWriterTraceListener(System::Console::Out));
#endif
OSL_ASSERT( 0 == uno_cli_env->pContext );
......
......@@ -1584,7 +1584,7 @@ void Bridge::map_to_cli(
{
if (info != nullptr)
{
OSL_ASSERT(info->get_IsByRef());
OSL_ASSERT(info->IsByRef);
info= info->GetElementType();
*cli_data= System::Enum::ToObject(info, *(System::Int32*) uno_data);
}
......@@ -1661,10 +1661,10 @@ void Bridge::map_to_cli(
ctorInfo = arCtorInfo[i];
break;
}
OSL_ASSERT(arParamInfo[0]->get_ParameterType()->Equals(__typeof(System::String))
&& arParamInfo[1]->get_ParameterType()->Equals(__typeof(System::Object))
&& arParamInfo[0]->get_Position() == 0
&& arParamInfo[1]->get_Position() == 1);
OSL_ASSERT(arParamInfo[0]->ParameterType->Equals(System::String::typeid)
&& arParamInfo[1]->ParameterType->Equals(System::Object::typeid)
&& arParamInfo[0]->Position == 0
&& arParamInfo[1]->Position == 1);
//Prepare parameters for constructor
int numArgs = arParamInfo->Length;
array<System::Object^>^ args = gcnew array<System::Object^>(numArgs);
......
......@@ -285,10 +285,10 @@ bool UnoInterfaceProxy::CanCastTo(System::Type^ fromType,
UnoInterfaceProxy ^ proxy =
static_cast< UnoInterfaceProxy ^ >(
srr::RemotingServices::GetRealProxy( obj ) );
OSL_ASSERT( 0 != proxy->findInfo( fromType ) );
OSL_ASSERT( nullptr != proxy->findInfo( fromType ) );
m_listAdditionalProxies->Add( proxy );
m_nlistAdditionalProxies = m_listAdditionalProxies->Count;
OSL_ASSERT( 0 != findInfo( fromType ) );
OSL_ASSERT( nullptr != findInfo( fromType ) );
return true;
}
}
......@@ -337,7 +337,7 @@ srrm::IMessage^ UnoInterfaceProxy::invokeObject(
if (m_Equals_String->Equals(sMethod))
{
// Object.Equals
OSL_ASSERT(args->get_Length() == 1);
OSL_ASSERT(args->Length == 1);
srrp::RealProxy^ rProxy = srr::RemotingServices::GetRealProxy(args[0]);
bool bDone = false;
if (rProxy)
......@@ -433,7 +433,7 @@ srrm::IMessage^ UnoInterfaceProxy::Invoke(srrm::IMessage^ callmsg)
System::Type^ typeBeingCalled = loadCliType(sTypeName);
UnoInterfaceInfo^ info = findInfo( typeBeingCalled );
OSL_ASSERT( 0 != info );
OSL_ASSERT( nullptr != info );
// ToDo do without string conversion, a OUString is not needed here
// get the type description of the call
......
......@@ -78,7 +78,7 @@ System::Object^ Bridge::call_uno(uno_Interface * pUnoI,
uno_ret = (mem + (nParams * sizeof (void *)));
largest * uno_args_mem = (largest *)(mem + (nParams * sizeof (void *)) + return_size);
OSL_ASSERT( (0 == nParams) || (nParams == args->get_Length()) );
OSL_ASSERT( (0 == nParams) || (nParams == args->Length) );
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
typelib_MethodParameter const & param = pParams[ nPos ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment