summaryrefslogtreecommitdiff
path: root/stoc
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 /stoc
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
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/invocation/invocation.cxx27
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx23
2 files changed, 2 insertions, 48 deletions
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
*****************************************************************************/