summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-28 18:00:14 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-28 18:00:14 +0000
commit50f9ae5a90c6a73890c9c4b12aedf90fa48b8bcf (patch)
tree09a5ab58eb894d3ccb7ea711626513fab27f9c41
parentce6b62881d7aa295c3dc715e9a61e9a0e700aefd (diff)
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
-rw-r--r--bridges/source/remote/urp/urp_environment.cxx18
-rw-r--r--bridges/test/java_uno/acquire/makefile.mk12
-rw-r--r--bridges/test/java_uno/any/makefile.mk2
-rw-r--r--bridges/test/java_uno/equals/TestEquals.java3
-rw-r--r--bridges/test/java_uno/equals/makefile.mk2
-rw-r--r--bridges/test/java_uno/nativethreadpool/makefile.mk15
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx4
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx4
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx55
-rw-r--r--codemaker/test/cppumaker/makefile.mk6
-rw-r--r--codemaker/test/cppumaker/test_codemaker_cppumaker.cxx16
-rw-r--r--codemaker/test/cppumaker/types.idl4
-rw-r--r--cppu/inc/typelib/typedescription.h24
-rw-r--r--cppu/source/typelib/static_types.cxx72
-rw-r--r--cppu/source/uno/lbmap.cxx22
-rw-r--r--cppuhelper/source/component_context.cxx2
-rw-r--r--stoc/source/invocation/invocation.cxx27
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx23
18 files changed, 110 insertions, 201 deletions
diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx
index 5d1c4b9ab741..fd0c56ba4376 100644
--- a/bridges/source/remote/urp/urp_environment.cxx
+++ b/bridges/source/remote/urp/urp_environment.cxx
@@ -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 );
+ }
}
}
diff --git a/bridges/test/java_uno/acquire/makefile.mk b/bridges/test/java_uno/acquire/makefile.mk
index c9f04f503180..d027c067dad7 100644
--- a/bridges/test/java_uno/acquire/makefile.mk
+++ b/bridges/test/java_uno/acquire/makefile.mk
@@ -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) $@
diff --git a/bridges/test/java_uno/any/makefile.mk b/bridges/test/java_uno/any/makefile.mk
index d02c5fc4d93c..1957194f856a 100644
--- a/bridges/test/java_uno/any/makefile.mk
+++ b/bridges/test/java_uno/any/makefile.mk
@@ -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) $@
diff --git a/bridges/test/java_uno/equals/TestEquals.java b/bridges/test/java_uno/equals/TestEquals.java
index 8cd0c8049ad9..31b735473c9b 100644
--- a/bridges/test/java_uno/equals/TestEquals.java
+++ b/bridges/test/java_uno/equals/TestEquals.java
@@ -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,
diff --git a/bridges/test/java_uno/equals/makefile.mk b/bridges/test/java_uno/equals/makefile.mk
index 787da9a88370..4064b5e48f09 100644
--- a/bridges/test/java_uno/equals/makefile.mk
+++ b/bridges/test/java_uno/equals/makefile.mk
@@ -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 \
diff --git a/bridges/test/java_uno/nativethreadpool/makefile.mk b/bridges/test/java_uno/nativethreadpool/makefile.mk
index 5eb7a8cb3a88..c8f7a778f051 100644
--- a/bridges/test/java_uno/nativethreadpool/makefile.mk
+++ b/bridges/test/java_uno/nativethreadpool/makefile.mk
@@ -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)
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index b59f18f81e17..82bc6506a51f 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
@@ -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 }
+};
}
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index fc01c0ffb7c3..bc52ec509c52 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
@@ -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 }
+};
}
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 9622c25c4c4e..79e4f0a2e522 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -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";
}
diff --git a/codemaker/test/cppumaker/makefile.mk b/codemaker/test/cppumaker/makefile.mk
index db4227155f0a..bab3dcbb30ea 100644
--- a/codemaker/test/cppumaker/makefile.mk
+++ b/codemaker/test/cppumaker/makefile.mk
@@ -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 $<
diff --git a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
index ba29d1822650..2f5c75fc1d92 100644
--- a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
+++ b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
@@ -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 {
diff --git a/codemaker/test/cppumaker/types.idl b/codemaker/test/cppumaker/types.idl
index 798d7e088ee0..e6de0e1c5379 100644
--- a/codemaker/test/cppumaker/types.idl
+++ b/codemaker/test/cppumaker/types.idl
@@ -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"
diff --git a/cppu/inc/typelib/typedescription.h b/cppu/inc/typelib/typedescription.h
index 80f8fdfcfdfa..6e188f934044 100644
--- a/cppu/inc/typelib/typedescription.h
+++ b/cppu/inc/typelib/typedescription.h
@@ -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
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index f0787c19ae5c..c1221e4e84a3 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -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"
}
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 91eefb4097b1..131f5c8b137e 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -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( () )
{
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 132eb6c40841..50103466b4a2 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -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);
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 37e0e23cd701..aaa6cbe81f65 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -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 )
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 78dffbcb9c32..9076a01d7bd5 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -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
*****************************************************************************/