CWS-TOOLING: integrate CWS sb109

2009-04-21 13:42:45 +0200 sb  r271035 : removed obsolete psprint dependency
2009-04-21 10:33:31 +0200 sb  r271024 : changes to previous -c270971 so that build does not break for USE_SHELL!=bash (but instead resulting bridgetest_xxx scripts are nonfunctional)
2009-04-21 08:56:48 +0200 sb  r271017 : merged in cws/sb107 -c 268250 (avoid warnings about format specifier and argument mismatch (on 64bit debug builds))
2009-04-20 16:42:27 +0200 sb  r270995 : #i98625# add make_xxx functions for C++ representations of UNO polystructs; fixed and adapted tests (patch by thb, slightly adapted)
2009-04-20 14:23:45 +0200 sb  r270981 : #i84751# selective performance improvements (patch by mmeeks, slightly adapted)
2009-04-20 13:39:50 +0200 sb  r270978 : #i99711# removed dead code (patch by cmc, slightly modified)
2009-04-20 11:59:39 +0200 sb  r270972 : #i97975# avoid crashes during shutdown (patch by cmc, slightly modified)
2009-04-20 11:57:52 +0200 sb  r270971 : made tests work again after LD_LIBRARY_PATH clean up
2009-04-20 09:49:32 +0200 sb  r270963 : #i95593# made tests work again after LD_LIBRARY_PATH cleanup
2009-04-17 13:52:33 +0200 sb  r270941 : merged in cws/sb107 -c 270023 (added svn:ignore)
2009-04-15 13:46:24 +0200 sb  r270841 : #i92131# dead code elimination (based on a patch by cmc)
2009-04-15 13:29:27 +0200 sb  r270839 : #i100743# use a FastLess for the Data map (based on a patch my mmeeks)
2009-04-15 13:12:11 +0200 sb  r270837 : #i100583# dead code elimination (patch by cmc)
2009-04-15 13:02:19 +0200 sb  r270835 : avoid bogus Solaris C++ compiler warning when building with debug=x
2009-04-15 11:49:46 +0200 sb  r270828 : adapted to cleared LD_LIBRARY_PATH
2009-04-15 10:49:48 +0200 sb  r270826 : #i101101# for performance reasons, do not put ComponentContext in unsafe appartment
2009-04-15 10:08:20 +0200 sb  r270824 : #i99113# removed duplicated stocservices.uno lib from basis layer
This commit is contained in:
Ivo Hinkelmann 2009-04-28 18:00:14 +00:00
parent ce6b62881d
commit 50f9ae5a90
18 changed files with 110 additions and 201 deletions

View File

@ -182,6 +182,7 @@ struct StaticSingleton
{
~StaticSingleton()
{
::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
g_bStaticDestructorsCalled = sal_True;
}
};
@ -267,7 +268,13 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote
}
// in case, that the static destructors already have been called, no
// tiding up is done.
if( ! g_bStaticDestructorsCalled && ! pContext->m_pBridgeImpl->m_bDisposed )
bool tidyUp;
{
::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
tidyUp = ! g_bStaticDestructorsCalled &&
! pContext->m_pBridgeImpl->m_bDisposed;
}
if( tidyUp )
{
// TODO : not threadsafe
// synchronization with dispatch methods needed !
@ -335,9 +342,12 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote
pImpl->m_pReader = 0;
}
// delete the stubs
releaseStubs( pEnvRemote );
::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
if( ! g_bStaticDestructorsCalled )
{
// delete the stubs
releaseStubs( pEnvRemote );
}
}
}

View File

@ -107,11 +107,15 @@ $(BIN)$/testacquire-java-server$(SCRIPTEXT):
$(GIVE_EXEC_RIGHTS) $@
$(BIN)$/testacquire-native-client$(SCRIPTEXT):
echo uno -c com.sun.star.test.bridges.testacquire.impl -l $(SHL1TARGETN:f) \
-ro $(TARGET).rdb -- $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@
echo '$(AUGMENT_LIBRARY_PATH)' uno \
-c com.sun.star.test.bridges.testacquire.impl \
-l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb -- \
$(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@
$(GIVE_EXEC_RIGHTS) $@
$(BIN)$/testacquire-native-server$(SCRIPTEXT):
echo uno -c com.sun.star.test.bridges.testacquire.impl -l $(SHL1TARGETN:f) \
-ro $(TARGET).rdb -u $(TEST_JAVAUNO_ACQUIRE_UNO_URL) --singleaccept > $@
echo '$(AUGMENT_LIBRARY_PATH)' uno \
-c com.sun.star.test.bridges.testacquire.impl \
-l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb \
-u $(TEST_JAVAUNO_ACQUIRE_UNO_URL) --singleaccept > $@
$(GIVE_EXEC_RIGHTS) $@

View File

@ -115,7 +115,7 @@ $(OUT)$/bin$/TestRemote$(SCRIPTEXT) : $(JAVACLASSFILES)
$(OUT)$/bin$/TestJni$(SCRIPTEXT) : $(JAVACLASSFILES)
-rm -f $@
echo java -classpath \
echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \
.$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
-Djava.library.path=..$/lib test.java_uno.anytest.TestJni >> $@
$(GIVE_EXEC_RIGHTS) $@

View File

@ -197,7 +197,8 @@ public final class TestEquals {
loader.activate(
"com.sun.star.test.bridges."
+ "testequals.impl",
"", "testequals.uno", null));
"", "../lib/testequals.uno",
null));
XTestInterface test = (XTestInterface)
UnoRuntime.queryInterface(
XTestInterface.class,

View File

@ -86,7 +86,7 @@ $(MISC)$/$(TARGET).rdb: types.idl
$(SLOFILES) $(JAVACLASSFILES): $(MISC)$/$(TARGET).rdb
$(BIN)$/testequals$(SCRIPTEXT): $(BIN)$/testequals_services.rdb
echo java -classpath \
echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \
..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\
..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
test.java_uno.equals.TestEquals $(SOLARBINDIR)$/types.rdb \

View File

@ -101,25 +101,24 @@ $(BIN)$/$(TARGET).rdb .ERRREMOVE: $(MISC)$/$(TARGET)$/types.rdb \
$(REGCOMP) -register -r $(MISC)$/$(TARGET)$/bootstrap.rdb \
-c javaloader.uno$(DLLPOST) -c javavm.uno$(DLLPOST) \
-c stocservices.uno$(DLLPOST)
.IF "$(GUI)" == "WNT"
.IF "$(GUI)" == "WNT" || "$(USE_SHELL)" != "bash"
ERROR -- missing platform
.ELSE # GUI, WNT
+ setenv OO_JAVA_PROPERTIES RuntimeLib=$(JVM_LIB_URL) ; \
+ export OO_JAVA_PROPERTIES='RuntimeLib=$(JVM_LIB_URL)' && \
$(REGCOMP) -register -r $@ -c file://$(PWD)/$(BIN)$/$(TARGET).uno.jar \
-br $(MISC)$/$(TARGET)$/bootstrap.rdb -classpath $(EXEC_CLASSPATH) \
-env:URE_INTERNAL_JAVA_DIR=file://$(SOLARBINDIR)
.ENDIF # GUI, WNT
test .PHONY: $(SHL1TARGETN) $(BIN)$/$(TARGET).uno.jar $(BIN)$/$(TARGET).rdb
.IF "$(GUI)" == "WNT"
.IF "$(GUI)" == "WNT" || "$(USE_SHELL)" != "bash"
ERROR -- missing platform
.ELSE # GUI, WNT
uno -c test.javauno.nativethreadpool.server -l $(SHL2TARGETN) \
-ro $(BIN)$/$(TARGET).rdb \
$(AUGMENT_LIBRARY_PATH) uno -c test.javauno.nativethreadpool.server \
-l $(SHL2TARGETN) -ro $(BIN)$/$(TARGET).rdb \
-u 'uno:socket,host=localhost,port=3830;urp;test' --singleaccept &
+ setenv OO_JAVA_PROPERTIES RuntimeLib=$(JVM_LIB_URL) ; \
setenv CLASSPATH \
$(EXEC_CLASSPATH)$(PATH_SEPERATOR)$(BIN)$/$(TARGET).uno.jar ; \
+ $(AUGMENT_LIBRARY_PATH) OO_JAVA_PROPERTIES='RuntimeLib=$(JVM_LIB_URL)' \
CLASSPATH=$(EXEC_CLASSPATH)$(PATH_SEPERATOR)$(BIN)$/$(TARGET).uno.jar \
uno -c test.javauno.nativethreadpool.client -l $(SHL1TARGETN) \
-ro $(BIN)$/$(TARGET).rdb \
-env:URE_INTERNAL_JAVA_DIR=file://$(SOLARBINDIR)

View File

@ -167,7 +167,9 @@ css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
cppu::ImplementationEntry entries[] = {
{ &create, &getImplementationName, &getSupportedServiceNames,
&cppu::createSingleComponentFactory, 0, 0 } };
&cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
}

View File

@ -129,7 +129,9 @@ css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
cppu::ImplementationEntry entries[] = {
{ &create, &getImplementationName, &getSupportedServiceNames,
&cppu::createSingleComponentFactory, 0, 0 } };
&cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
}

View File

@ -2490,9 +2490,8 @@ sal_Bool StructureType::dumpHxxFile(
RTFieldAccess access = RT_ACCESS_INVALID;
OString fieldName;
OString fieldType;
sal_uInt16 i = 0;
for (i=0; i < fieldCount; i++)
for (sal_uInt16 i=0; i < fieldCount; i++)
{
access = m_reader.getFieldFlags(i);
@ -2527,7 +2526,7 @@ sal_Bool StructureType::dumpHxxFile(
sal_Bool superHasMember = dumpSuperMember(o, superType, sal_True);
for (i=0; i < fieldCount; i++)
for (sal_uInt16 i=0; i < fieldCount; i++)
{
access = m_reader.getFieldFlags(i);
@ -2565,7 +2564,7 @@ sal_Bool StructureType::dumpHxxFile(
first = sal_False;
}
for (i=0; i < fieldCount; i++)
for (sal_uInt16 i=0; i < fieldCount; i++)
{
access = m_reader.getFieldFlags(i);
@ -2590,6 +2589,54 @@ sal_Bool StructureType::dumpHxxFile(
o << "{\n}\n\n";
}
if (isPolymorphic() && fieldCount > 0) {
o << indent();
dumpTemplateHead(o);
o << "\n";
o << indent();
o << "inline " << m_name;
dumpTemplateParameters(o);
o << "\n";
o << indent();
o << "make_" << m_name << "(";
for (sal_uInt16 i = 0; i < fieldCount; ++i) {
if (i > 0) {
o << ", ";
}
rtl::OString type(
rtl::OUStringToOString(
m_reader.getFieldTypeName(i), RTL_TEXTENCODING_UTF8));
if ((m_reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) != 0)
{
dumpTypeParameterName(o, type);
o << " const &";
} else {
dumpType(o, type, true, true);
}
o << " "
<< rtl::OUStringToOString(
m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8)
<< "_";
}
o << ") SAL_THROW(())\n";
o << indent() << "{\n";
inc();
o << indent() << "return " << m_name;
dumpTemplateParameters(o);
o << "(";
for (sal_uInt16 i = 0; i < fieldCount; ++i) {
if (i > 0) {
o << ", ";
}
o << rtl::OUStringToOString(
m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8)
<< "_";
}
o << ");\n";
dec();
o << indent() << "}\n\n";
}
if (codemaker::cppumaker::dumpNamespaceClose(o, m_typeName, false)) {
o << "\n";
}

View File

@ -59,8 +59,8 @@ $(SHL1OBJS): $(MISC)$/$(TARGET).cppumaker.flag
$(MISC)$/$(TARGET).cppumaker.flag: $(BIN)$/cppumaker$(EXECPOST)
$(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb
- $(MKDIRHIER) $(MISC)$/$(TARGET)$/inc
$(BIN)$/cppumaker$(EXECPOST) -O$(MISC)$/$(TARGET)$/inc -BUCR -C $< \
$(SOLARBINDIR)$/udkapi.rdb
$(AUGMENT_LIBRARY_PATH) $(BIN)$/cppumaker$(EXECPOST) \
-O$(MISC)$/$(TARGET)$/inc -BUCR -C $< $(SOLARBINDIR)$/udkapi.rdb
$(TOUCH) $@
$(MISC)$/$(TARGET).rdb: $(MISC)$/$(TARGET)$/types.urd
@ -72,4 +72,4 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl
$(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $<
test .PHONY: $(SHL1TARGETN)
testshl2 $<
$(AUGMENT_LIBRARY_PATH) testshl2 $<

View File

@ -382,7 +382,7 @@ class Test: public CppUnit::TestFixture {
public:
void testBigStruct();
void testPolyCharStruct();
void testPolyStruct();
void testExceptions();
@ -390,7 +390,7 @@ public:
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testBigStruct);
CPPUNIT_TEST(testPolyCharStruct);
CPPUNIT_TEST(testPolyStruct);
CPPUNIT_TEST(testExceptions);
CPPUNIT_TEST(testConstants);
CPPUNIT_TEST_SUITE_END();
@ -444,9 +444,13 @@ void Test::testBigStruct() {
CPPUNIT_ASSERT_EQUAL(guard.p->m22.getLength(), static_cast< sal_Int32 >(0));
CPPUNIT_ASSERT_EQUAL(guard.p->m23.getLength(), static_cast< sal_Int32 >(0));
#if defined __GNUC__ && __GNUC__ >= 3
#if defined __GNUC__ && __GNUC__ >= 3 // see CPPU_GCC3_ALIGN
CPPUNIT_ASSERT_EQUAL(
#if defined X86_64
static_cast< std::size_t >(24),
#else
static_cast< std::size_t >(16),
#endif
sizeof (test::codemaker::cppumaker::AlignmentDerivedStruct));
#endif
@ -464,7 +468,7 @@ void Test::testBigStruct() {
CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_CHAR, std->aBase.ppTypeRefs[10]->eTypeClass); // char m11;
}
void Test::testPolyCharStruct() {
void Test::testPolyStruct() {
CPPUNIT_ASSERT_EQUAL(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@ -472,6 +476,10 @@ void Test::testPolyCharStruct() {
(com::sun::star::uno::makeAny(
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
getValueType().getTypeName()));
CPPUNIT_ASSERT_EQUAL(
(test::codemaker::cppumaker::make_Struct< sal_uInt32, sal_Bool >(5, 0).
member1),
static_cast< sal_uInt32 >(5));
}
namespace {

View File

@ -28,8 +28,8 @@
*
************************************************************************/
//TODO: Do not depend on types for which C++ header files are only generated
// later in the build process in offuh:
/*TODO: Do not depend on types for which C++ header files are only generated
later in the build process in offuh: */
#include "com/sun/star/lang/ClassNotFoundException.idl"
#include "com/sun/star/lang/IllegalAccessException.idl"
#include "com/sun/star/lang/Locale.idl"

View File

@ -1144,30 +1144,6 @@ void SAL_CALL typelib_static_enum_type_init(
sal_Int32 nDefaultValue )
SAL_THROW_EXTERN_C();
/** Inits incomplete static compound type reference. Thread synchronizes on typelib init mutex.
All discriminants are handled as int64 values. The pDiscriminantTypeRef must be of
type byte, short, ..., up to hyper.
@param ppRef pointer to type reference pointer
@param pTypeName name of union type
@param pDiscriminantType discriminant type
@param nDefaultDiscriminant default discriminant
@param pDefaultType default value type of union
@param nMembers number of union members
@param pDiscriminants member discriminants
@param pMemberTypes member types
*/
void SAL_CALL typelib_static_union_type_init(
typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pDiscriminantType,
sal_Int64 nDefaultDiscriminant,
typelib_TypeDescriptionReference * pDefaultType,
sal_Int32 nMembers,
sal_Int64 * pDiscriminants,
typelib_TypeDescriptionReference ** pMemberTypes )
SAL_THROW_EXTERN_C();
/** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND, UNION,
INTERFACE and ENUM type descriptions may be partly initialized (see typelib_static_...(),
typelib_TypeDescription::bComplete). For interface type descriptions, this will also

View File

@ -671,78 +671,6 @@ void SAL_CALL typelib_static_array_type_init(
}
}
//##################################################################################################
void SAL_CALL typelib_static_union_type_init(
typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pDiscriminantTypeRef,
sal_Int64 nDefaultDiscriminant,
typelib_TypeDescriptionReference * pDefaultTypeRef,
sal_Int32 nMembers,
sal_Int64 * pDiscriminants,
typelib_TypeDescriptionReference ** pMemberTypes )
SAL_THROW_EXTERN_C()
{
if (! *ppRef)
{
MutexGuard aGuard( typelib_StaticInitMutex::get() );
if (! *ppRef)
{
OSL_ASSERT( ! TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK(typelib_TypeClass_UNION) );
OUString aTypeName( OUString::createFromAscii( pTypeName ) );
*ppRef = igetTypeByName( aTypeName.pData );
if (!*ppRef)
{
typelib_UnionTypeDescription * pUnion = 0;
::typelib_typedescription_newEmpty(
(typelib_TypeDescription **)&pUnion, typelib_TypeClass_UNION, aTypeName.pData );
// discriminant type
::typelib_typedescriptionreference_acquire( pUnion->pDiscriminantTypeRef = pDiscriminantTypeRef );
sal_Int32 nPos;
pUnion->nMembers = nMembers;
// default discriminant
if (nMembers)
{
pUnion->pDiscriminants = new sal_Int64[ nMembers ];
for ( nPos = nMembers; nPos--; )
{
pUnion->pDiscriminants[nPos] = pDiscriminants[nPos];
}
}
// default default discriminant
pUnion->nDefaultDiscriminant = nDefaultDiscriminant;
// union member types
pUnion->ppTypeRefs = new typelib_TypeDescriptionReference *[ nMembers ];
for ( nPos = nMembers; nPos--; )
{
::typelib_typedescriptionreference_acquire(
pUnion->ppTypeRefs[nPos] = pMemberTypes[nPos] );
}
// default union type
::typelib_typedescriptionreference_acquire( pUnion->pDefaultTypeRef = pDefaultTypeRef );
typelib_TypeDescription * pReg = (typelib_TypeDescription *)pUnion;
pReg->pWeakRef = (typelib_TypeDescriptionReference *)pReg;
pReg->nSize = typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment );
pReg->nAlignment = adjustAlignment( pReg->nAlignment );
pReg->bComplete = sal_False;
::typelib_typedescription_register( &pReg );
*ppRef = (typelib_TypeDescriptionReference *)pReg;
OSL_ASSERT( *ppRef == pReg->pWeakRef );
}
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
++((*ppRef)->nStaticRefCount);
#endif
}
}
}
} // extern "C"
}

View File

@ -164,29 +164,7 @@ struct MappingsData
Mutex aNegativeLibsMutex;
t_OUStringSet aNegativeLibs;
~MappingsData() SAL_THROW( () );
};
//__________________________________________________________________________________________________
MappingsData::~MappingsData() SAL_THROW( () )
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( aName2Entry.empty() && aMapping2Entry.empty(), "### unrevoked mappings!" );
t_OUString2Entry::const_iterator iPos( aName2Entry.begin() );
while (iPos != aName2Entry.end())
{
MappingEntry * pEntry = (*iPos).second;
OString aName( OUStringToOString( pEntry->aMappingName, RTL_TEXTENCODING_ASCII_US ) );
OSL_TRACE( "### unrevoked mapping: %s", aName.getStr() );
++iPos;
}
OSL_ENSURE( aCallbacks.empty(), "### callbacks left!" );
if (aCallbacks.size())
{
OString aSize( OString::valueOf( (sal_Int32)aCallbacks.size() ) );
OSL_TRACE( "### %d unrevoked callbacks", aSize.getStr() );
}
#endif
}
//--------------------------------------------------------------------------------------------------
static MappingsData & getMappingsData() SAL_THROW( () )
{

View File

@ -875,7 +875,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext(
SAL_THROW( () )
{
uno::Environment curr_env(Environment::getCurrent());
uno::Environment source_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV) ":unsafe")));
uno::Environment source_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))));
uno::Mapping curr2source(curr_env, source_env);
uno::Mapping source2curr(source_env, curr_env);

View File

@ -64,14 +64,10 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <boost/scoped_array.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
#include <stdlib.h>
#ifndef MACOSX
#include <search.h>
#endif
#define SERVICENAME "com.sun.star.script.Invocation"
#define IMPLNAME "com.sun.star.comp.stoc.Invocation"
@ -774,16 +770,6 @@ struct MemberItem
sal_Int32 nIndex;
};
// qsort compare function for MemberItem
//int __cdecl compare(const void *elem1, const void *elem2 )
extern "C" int SAL_CALL compare(const void *elem1, const void *elem2 )
{
MemberItem* pItem1 = *(MemberItem**)elem1;
MemberItem* pItem2 = *(MemberItem**)elem2;
return (int)pItem1->aName.compareTo( pItem2->aName );
}
// Implementation of getting name or info
// String sequence will be filled when pStringSeq != NULL
// Info sequence will be filled when pInfoSeq != NULL
@ -823,14 +809,11 @@ void Invocation_Impl::getInfoSequenceImpl
sal_Int32 nTotalCount = nNameAccessCount + nPropertyCount + nMethodCount;
// Create and fill array of MemberItems
MemberItem* pItems = new MemberItem[ nTotalCount ];
boost::scoped_array< MemberItem > pItems( new MemberItem[ nTotalCount ] );
const OUString* pStrings = aNameAccessNames.getConstArray();
const Property* pProps = aPropertySeq.getConstArray();
const Reference< XIdlMethod >* pMethods = aMethodSeq.getConstArray();
// Create array of MemberItem* for sorting
MemberItem** ppItems = new MemberItem*[ nTotalCount ];
// Fill array of MemberItems
sal_Int32 i, iTotal = 0;
@ -838,7 +821,6 @@ void Invocation_Impl::getInfoSequenceImpl
for( i = 0 ; i < nNameAccessCount ; i++, iTotal++ )
{
MemberItem& rItem = pItems[ iTotal ];
ppItems[ iTotal ] = &rItem;
rItem.aName = pStrings[ i ];
rItem.eMode = MemberItem::NAMEACCESS;
rItem.nIndex = i;
@ -848,7 +830,6 @@ void Invocation_Impl::getInfoSequenceImpl
for( i = 0 ; i < nPropertyCount ; i++, iTotal++ )
{
MemberItem& rItem = pItems[ iTotal ];
ppItems[ iTotal ] = &rItem;
rItem.aName = pProps[ i ].Name;
rItem.eMode = MemberItem::PROPERTYSET;
rItem.nIndex = i;
@ -858,16 +839,12 @@ void Invocation_Impl::getInfoSequenceImpl
for( i = 0 ; i < nMethodCount ; i++, iTotal++ )
{
MemberItem& rItem = pItems[ iTotal ];
ppItems[ iTotal ] = &rItem;
Reference< XIdlMethod > xMethod = pMethods[ i ];
rItem.aName = xMethod->getName();
rItem.eMode = MemberItem::METHOD;
rItem.nIndex = i;
}
// Sort pointer array
qsort( ppItems, (size_t)nTotalCount, sizeof( MemberItem* ), compare );
// Setting up result sequences
OUString* pRetStrings = NULL;
if( pStringSeq )

View File

@ -270,29 +270,6 @@ static Sequence< OUString > retrieveAsciiValueList(
return seq;
}
/*****************************************************************************
helper functions
*****************************************************************************/
OUString Point2Slash(const OUString& s)
{
OUStringBuffer ret;
sal_Int32 nIndex = 0;
do
{
OUString token( s.getToken(0, '.', nIndex) );
if (token.getLength())
{
ret.append( (sal_Unicode)'/' );
ret.append( token );
}
} while( nIndex != -1 );
return ret.makeStringAndClear();
}
/*****************************************************************************
Enumeration by ServiceName
*****************************************************************************/