Kaydet (Commit) 49dff059 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

cli_ure: fix dbglevel=2 build on windows

Some blocks are completely unused.

According to http://msdn.microsoft.com/de-de/library/ms235298.aspx

rtl_uString * __pin * pp_sInterfaces = &_sInterfaces;

should be

pin_ptr<rtl_uString *> pp_sInterfaces = &_sInterfaces;

Change-Id: I039e94649d542fb5b51231b2e0df0a4dc1170c19
Reviewed-on: https://gerrit.libreoffice.org/9318Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 82a26c4b
...@@ -1064,12 +1064,6 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data, ...@@ -1064,12 +1064,6 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
for (; nPos < nMembers; ++nPos) for (; nPos < nMembers; ++nPos)
{ {
member_type= comp_td->ppTypeRefs[nPos]; member_type= comp_td->ppTypeRefs[nPos];
#if OSL_DEBUG_LEVEL >= 2
System::String* __s;
sr::FieldInfo* arFields[];
__s = mapUnoString(comp_td->ppMemberNames[nPos]);
arFields = cliType != NULL ? cliType->GetFields() : NULL;
#endif
System::Object^ val= nullptr; System::Object^ val= nullptr;
if (cli_data != nullptr) if (cli_data != nullptr)
{ {
...@@ -1614,10 +1608,6 @@ void Bridge::map_to_cli( ...@@ -1614,10 +1608,6 @@ void Bridge::map_to_cli(
OUString usMessageMember("Message"); OUString usMessageMember("Message");
for (int i = 0; i < pCTD->nMembers; i ++) for (int i = 0; i < pCTD->nMembers; i ++)
{ {
#if OSL_DEBUG_LEVEL >= 2
System::String* sMember;
sMember = mapUnoString(pCTD->ppMemberNames[i]);
#endif
if (usMessageMember.equals(pCTD->ppMemberNames[i])) if (usMessageMember.equals(pCTD->ppMemberNames[i]))
{ {
nPos = i; nPos = i;
......
...@@ -96,8 +96,8 @@ void Cli_environment::revokeInterface(System::String^ oid, System::Type^ type) ...@@ -96,8 +96,8 @@ void Cli_environment::revokeInterface(System::String^ oid, System::Type^ type)
i = 0; i = 0;
} }
Trace::WriteLine(System::String::Format( Trace::WriteLine(System::String::Format(
new System::String(S"cli uno bridge: {0} remaining registered interfaces"), gcnew System::String("cli uno bridge: {0} remaining registered interfaces"),
__box(m_objects->get_Count() - 1))); m_objects->Count - 1));
#endif #endif
m_objects->Remove(key); m_objects->Remove(key);
} }
......
...@@ -128,8 +128,8 @@ UnoInterfaceProxy::~UnoInterfaceProxy() ...@@ -128,8 +128,8 @@ UnoInterfaceProxy::~UnoInterfaceProxy()
{ {
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
sd::Trace::WriteLine(System::String::Format( sd::Trace::WriteLine(System::String::Format(
new System::String(S"cli uno bridge: Destroying proxy " gcnew System::String("cli uno bridge: Destroying proxy "
S"for UNO object, OID: \n\t{0} \n\twith uno interfaces: "), "for UNO object, OID: \n\t{0} \n\twith uno interfaces: "),
m_oid)); m_oid));
sd::Trace::WriteLine( mapUnoString(_sInterfaces)); sd::Trace::WriteLine( mapUnoString(_sInterfaces));
...@@ -166,14 +166,6 @@ void UnoInterfaceProxy::addUnoInterface(uno_Interface* pUnoI, ...@@ -166,14 +166,6 @@ void UnoInterfaceProxy::addUnoInterface(uno_Interface* pUnoI,
{ {
UnoInterfaceInfo^ info = static_cast<UnoInterfaceInfo^>( UnoInterfaceInfo^ info = static_cast<UnoInterfaceInfo^>(
enumInfos->Current); enumInfos->Current);
#if OSL_DEBUG_LEVEL > 1
System::Type * t1;
System::Type * t2;
t1 = mapUnoType(
reinterpret_cast<typelib_TypeDescription*>(info->m_typeDesc) );
t2 = mapUnoType(
reinterpret_cast<typelib_TypeDescription*>(pTd) );
#endif
if (typelib_typedescription_equals( if (typelib_typedescription_equals(
reinterpret_cast<typelib_TypeDescription*>(info->m_typeDesc), reinterpret_cast<typelib_TypeDescription*>(info->m_typeDesc),
reinterpret_cast<typelib_TypeDescription*>(pTd))) reinterpret_cast<typelib_TypeDescription*>(pTd)))
...@@ -189,21 +181,21 @@ void UnoInterfaceProxy::addUnoInterface(uno_Interface* pUnoI, ...@@ -189,21 +181,21 @@ void UnoInterfaceProxy::addUnoInterface(uno_Interface* pUnoI,
m_listIfaces->Add(gcnew UnoInterfaceInfo(m_bridge, pUnoI, pTd)); m_listIfaces->Add(gcnew UnoInterfaceInfo(m_bridge, pUnoI, pTd));
m_numUnoIfaces = m_listIfaces->Count; m_numUnoIfaces = m_listIfaces->Count;
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
System::String * sInterfaceName = static_cast<UnoInterfaceInfo*>( System::String^ sInterfaceName = static_cast<UnoInterfaceInfo^>(
m_listIfaces->get_Item(m_numUnoIfaces - 1))->m_type->FullName; m_listIfaces[m_numUnoIfaces - 1])->m_type->FullName;
sd::Trace::WriteLine(System::String::Format( sd::Trace::WriteLine(System::String::Format(
new System::String(S"cli uno bridge: Creating proxy for uno object, " gcnew System::String("cli uno bridge: Creating proxy for uno object, "
S"id:\n\t{0}\n\t{1}"), m_oid, sInterfaceName)); "id:\n\t{0}\n\t{1}"), m_oid, sInterfaceName));
// add to the string that contains all interface names // add to the string that contains all interface names
_numInterfaces ++; _numInterfaces++;
OUStringBuffer buf(512); OUStringBuffer buf(512);
buf.append("\t"); buf.append("\t");
buf.append( OUString::valueOf((sal_Int32)_numInterfaces)); buf.append( OUString::number(_numInterfaces));
buf.append(". "); buf.append(". ");
buf.append(mapCliString(sInterfaceName)); buf.append(mapCliString(sInterfaceName));
buf.append("\n"); buf.append("\n");
OUString _sNewInterface = buf.makeStringAndClear(); OUString _sNewInterface = buf.makeStringAndClear();
rtl_uString * __pin * pp_sInterfaces = & _sInterfaces; pin_ptr<rtl_uString *> pp_sInterfaces = &_sInterfaces;
rtl_uString_newConcat( pp_sInterfaces, * pp_sInterfaces, rtl_uString_newConcat( pp_sInterfaces, * pp_sInterfaces,
_sNewInterface.pData); _sNewInterface.pData);
#endif #endif
...@@ -366,8 +358,8 @@ srrm::IMessage^ UnoInterfaceProxy::invokeObject( ...@@ -366,8 +358,8 @@ srrm::IMessage^ UnoInterfaceProxy::invokeObject(
{ {
// Object.ToString // Object.ToString
st::StringBuilder^ sb = gcnew st::StringBuilder(256); st::StringBuilder^ sb = gcnew st::StringBuilder(256);
// sb->AppendFormat(S"Uno object proxy. Implemented interface: {0}" // sb->AppendFormat("Uno object proxy. Implemented interface: {0}"
// S". OID: {1}", m_type->ToString(), m_oid); // ". OID: {1}", m_type->ToString(), m_oid);
sb->AppendFormat("Uno object proxy. OID: {0}", m_oid); sb->AppendFormat("Uno object proxy. OID: {0}", m_oid);
retMethod = sb->ToString(); retMethod = sb->ToString();
} }
...@@ -447,7 +439,7 @@ srrm::IMessage^ UnoInterfaceProxy::Invoke(srrm::IMessage^ callmsg) ...@@ -447,7 +439,7 @@ srrm::IMessage^ UnoInterfaceProxy::Invoke(srrm::IMessage^ callmsg)
OUString::unacquired( & member_type->pTypeName ); OUString::unacquired( & member_type->pTypeName );
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
System::String * pTypeName; System::String^ pTypeName;
pTypeName = mapUnoString(usTypeName.pData); pTypeName = mapUnoString(usTypeName.pData);
#endif #endif
sal_Int32 offset = usTypeName.indexOf( ':' ) + 2; sal_Int32 offset = usTypeName.indexOf( ':' ) + 2;
...@@ -664,8 +656,8 @@ CliProxy::CliProxy(Bridge const* bridge, System::Object^ cliI, ...@@ -664,8 +656,8 @@ CliProxy::CliProxy(Bridge const* bridge, System::Object^ cliI,
makeMethodInfos(); makeMethodInfos();
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
sd::Trace::WriteLine(System::String::Format( sd::Trace::WriteLine(System::String::Format(
new System::String(S"cli uno bridge: Creating proxy for cli object, " gcnew System::String("cli uno bridge: Creating proxy for cli object, "
S"id:\n\t{0}\n\t{1}"), m_oid, m_type)); "id:\n\t{0}\n\t{1}"), m_oid, m_type));
#endif #endif
} }
...@@ -673,8 +665,8 @@ CliProxy::CliProxy(Bridge const* bridge, System::Object^ cliI, ...@@ -673,8 +665,8 @@ CliProxy::CliProxy(Bridge const* bridge, System::Object^ cliI,
void CliProxy::makeMethodInfos() void CliProxy::makeMethodInfos()
{ {
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
System::Object* cliI; System::Object^ cliI;
System::Type* type; System::Type^ type;
cliI = m_cliI; cliI = m_cliI;
type = m_type; type = m_type;
#endif #endif
...@@ -706,16 +698,6 @@ void CliProxy::makeMethodInfos() ...@@ -706,16 +698,6 @@ void CliProxy::makeMethodInfos()
for (int i = 0; i < numMethods; i++) for (int i = 0; i < numMethods; i++)
m_arUnoPosToCliPos[i] = -1; m_arUnoPosToCliPos[i] = -1;
#if OSL_DEBUG_LEVEL >= 2
sr::MethodInfo* arMethodInfosDbg[];
sr::MethodInfo* arInterfaceMethodInfosDbg[];
System::Int32 arInterfaceMethodCountDbg[];
arMethodInfosDbg = m_arMethodInfos;
arInterfaceMethodInfosDbg = m_arInterfaceMethodInfos;
arInterfaceMethodCountDbg = m_arInterfaceMethodCount;
#endif
//fill m_arMethodInfos with the mappings //fill m_arMethodInfos with the mappings
// !!! InterfaceMapping.TargetMethods should be MethodInfo*[] according // !!! InterfaceMapping.TargetMethods should be MethodInfo*[] according
// to documentation // to documentation
...@@ -770,18 +752,6 @@ sr::MethodInfo^ CliProxy::getMethodInfo(int nUnoFunctionPos, ...@@ -770,18 +752,6 @@ sr::MethodInfo^ CliProxy::getMethodInfo(int nUnoFunctionPos,
const OUString& usMethodName, MethodKind methodKind) const OUString& usMethodName, MethodKind methodKind)
{ {
sr::MethodInfo^ ret = nullptr; sr::MethodInfo^ ret = nullptr;
#if OSL_DEBUG_LEVEL >= 2
System::String* sMethodNameDbg;
sr::MethodInfo* arMethodInfosDbg[];
sr::MethodInfo* arInterfaceMethodInfosDbg[];
System::Int32 arInterfaceMethodCountDbg[];
System::Int32 arUnoPosToCliPosDbg[];
sMethodNameDbg = mapUnoString(usMethodName.pData);
arMethodInfosDbg = m_arMethodInfos;
arInterfaceMethodInfosDbg = m_arInterfaceMethodInfos;
arInterfaceMethodCountDbg = m_arInterfaceMethodCount;
arUnoPosToCliPosDbg = m_arUnoPosToCliPos;
#endif
//deduct 3 for XInterface methods //deduct 3 for XInterface methods
nUnoFunctionPos -= 3; nUnoFunctionPos -= 3;
System::Threading::Monitor::Enter(m_arUnoPosToCliPos); System::Threading::Monitor::Enter(m_arUnoPosToCliPos);
...@@ -855,9 +825,9 @@ CliProxy::~CliProxy() ...@@ -855,9 +825,9 @@ CliProxy::~CliProxy()
{ {
#if OSL_DEBUG_LEVEL >= 2 #if OSL_DEBUG_LEVEL >= 2
sd::Trace::WriteLine(System::String::Format( sd::Trace::WriteLine(System::String::Format(
new System::String( gcnew System::String(
S"cli uno bridge: Destroying proxy for cli object, " "cli uno bridge: Destroying proxy for cli object, "
S"id:\n\t{0}\n\t{1}\n"), "id:\n\t{0}\n\t{1}\n"),
m_oid, m_type)); m_oid, m_type));
#endif #endif
CliEnvHolder::g_cli_env->revokeInterface(m_oid, mapUnoType(m_unoType.get())); CliEnvHolder::g_cli_env->revokeInterface(m_oid, mapUnoType(m_unoType.get()));
......
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