chart49: merge with DEV300_m89

This commit is contained in:
Ingrid Halama 2010-10-07 19:02:44 +02:00
commit a55ac28c70
165 changed files with 6440 additions and 2625 deletions

View File

@ -38,6 +38,7 @@
#include <osl/mutex.hxx>
#include "rtl/ustring.hxx"
#include "rtl/instance.hxx"
#include <bridges/remote/context.h>
#include <bridges/remote/remote.h>
@ -109,17 +110,9 @@ ContextMap;
static MyCounter thisCounter( "DEBUG : Context" );
#endif
class ContextAdmin;
ContextAdmin *g_pTheContext = 0;
class ContextAdmin
{
public:
static ContextAdmin *getInstance();
// listener administration
void addContextListener( remote_contextListenerFunc listener , void *pObject );
void removeContextListener( remote_contextListenerFunc listener , void *pObject );
@ -138,7 +131,7 @@ public:
void revokeContext( uno_Context *pRemoteContext );
uno_Context *get( rtl_uString *pHost );
uno_Context *getContext( rtl_uString *pHost );
rtl_uString ** getConnectionList(
sal_Int32 *pnStringCount, MemAlloc memAlloc );
@ -152,19 +145,6 @@ private:
List m_lstListener;
};
ContextAdmin *ContextAdmin::getInstance()
{
if( ! g_pTheContext ) {
::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
if( ! g_pTheContext ) {
//TODO This memory is leaked; see #i63473# for when this should be
// changed again:
g_pTheContext = new ContextAdmin;
}
}
return g_pTheContext;
}
void ContextAdmin::addContextListener( remote_contextListenerFunc listener , void *pObject )
{
::osl::MutexGuard guard( m_mutex );
@ -209,7 +189,7 @@ uno_Context *ContextAdmin::createAndRegisterContext( remote_Connection *pConnect
{
::osl::MutexGuard guard( m_mutex );
uno_Context *pContext = get( pIdStr );
uno_Context *pContext = getContext( pIdStr );
if( pContext )
{
pContext->release( pContext );
@ -245,7 +225,7 @@ void ContextAdmin::revokeContext( uno_Context *pRemoteContext )
}
uno_Context *ContextAdmin::get( rtl_uString *pHost )
uno_Context *ContextAdmin::getContext( rtl_uString *pHost )
{
::osl::MutexGuard guard( m_mutex );
@ -267,6 +247,10 @@ rtl_uString ** ContextAdmin::getConnectionList(
::osl::MutexGuard guard( m_mutex );
*pnStringCount = m_mapContext.size();
if (*pnStringCount == 0)
return NULL;
rtl_uString **ppReturn = ( rtl_uString ** )
memAlloc( sizeof( rtl_uString * ) * m_mapContext.size() );
memset( ppReturn , 0 , sizeof( rtl_uString * ) * m_mapContext.size() );
@ -283,6 +267,7 @@ rtl_uString ** ContextAdmin::getConnectionList(
}
struct theContextAdmin : public rtl::Static<ContextAdmin, theContextAdmin> {};
/*****************************
* remote_ContextImpl implementation
@ -379,7 +364,7 @@ void remote_ContextImpl::thisDispose( remote_Context *pRemoteC )
if( ! pImpl->m_bDisposed )
{
pImpl->m_bDisposed = sal_True;
ContextAdmin::getInstance()->revokeContext( (uno_Context * ) pRemoteC );
theContextAdmin::get().revokeContext( (uno_Context * ) pRemoteC );
if( pImpl->m_pInstanceProvider )
{
@ -456,7 +441,7 @@ using namespace remote_context;
extern "C" remote_Context * SAL_CALL
remote_getContext( rtl_uString *pIdString )
{
return (remote_Context *) ContextAdmin::getInstance()->get( pIdString );
return (remote_Context *) theContextAdmin::get().getContext(pIdString);
}
@ -469,7 +454,7 @@ remote_createContext( remote_Connection *pConnection,
remote_InstanceProvider *pProvider )
{
remote_ContextImpl *p = (remote_ContextImpl * )
ContextAdmin::getInstance()->createAndRegisterContext(
theContextAdmin::get().createAndRegisterContext(
pConnection ,
pIdStr ,
pDescription,
@ -483,17 +468,17 @@ remote_createContext( remote_Connection *pConnection,
extern "C" void SAL_CALL
remote_addContextListener( remote_contextListenerFunc listener, void *pObject )
{
ContextAdmin::getInstance()->addContextListener( listener , pObject );
theContextAdmin::get().addContextListener( listener , pObject );
}
extern "C" void SAL_CALL
remote_removeContextListener( remote_contextListenerFunc listener , void *pObject )
{
ContextAdmin::getInstance()->removeContextListener( listener , pObject );
theContextAdmin::get().removeContextListener( listener , pObject );
}
extern "C" rtl_uString ** SAL_CALL
remote_getContextList( sal_Int32 *pnStringCount, MemAlloc memAlloc )
{
return ContextAdmin::getInstance()->getConnectionList( pnStringCount , memAlloc );
return theContextAdmin::get().getConnectionList( pnStringCount , memAlloc );
}

View File

@ -29,49 +29,6 @@
#ifdef __cplusplus
/* environment type names for supported compilers */
#if defined (_MSC_VER)
#if (_MSC_VER < 1000)
#error "ms visual c++ version must be at least 4.2"
#elif (_MSC_VER < 1100) // MSVC 4.x
#pragma warning( disable: 4290 )
#define TMP_CPPU_ENV msci
#elif (_MSC_VER < 1600) // MSVC 5-9
#define TMP_CPPU_ENV msci
#else
#error "ms visual c++ version must be between 4.2 and 9.x"
#endif /* (_MSC_VER < 1000) */
/* sunpro cc */
#elif defined (__SUNPRO_CC)
#if ((__SUNPRO_CC >= 0x5000 && __SUNPRO_CC < 0x6000) || (__SUNPRO_CC >= 0x500 && __SUNPRO_CC < 0x600))
#define TMP_CPPU_ENV sunpro5
#elif
#error "sunpro cc version must be 5.x"
provoking error here, because PP ignores #error
#endif /* defined (__SUNPRO_CC) */
/* g++ 2.x, 3.0 */
#elif defined (__GNUC__)
#if (__GNUC__ == 2 && __GNUC_MINOR__ == 91)
#define TMP_CPPU_ENV gcc2
#elif (__GNUC__ == 2 && __GNUC_MINOR__ == 95)
#define TMP_CPPU_ENV gcc2
#elif (__GNUC__ == 2)
#error "Tested gcc 2 versions are 2.91 and 2.95. Patch uno/lbnames.h to try your gcc 2 version."
#elif (__GNUC__ == 3 && __GNUC_MINOR__ <= 4)
#define __CPPU_ENV gcc3
#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)
#define __CPPU_ENV gcc3
#elif (__GNUC__ == 3)
#error "Tested gcc 3 version is <= 3.4. Patch uno/lbnames.h to try your gcc 3 version."
#else
#error "Supported gcc majors are 2 , 3 and 4 <= 4.4. Unsupported gcc major version."
#endif /* defined (__GNUC__) */
#endif /* defined (_MSC_VER) */
#if (! defined (CPPU_ENV) && defined (TMP_CPPU_ENV))
#define CPPU_ENV TMP_CPPU_ENV
#endif
#ifdef CPPU_ENV
#define CPPU_STRINGIFY_EX( x ) #x
@ -87,8 +44,6 @@ provoking error here, because PP ignores #error
#endif /* CPPU_ENV */
#undef TMP_CPPU_ENV
#endif /* __cplusplus */
/** Environment type name for binary C UNO. */

View File

@ -106,11 +106,9 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext()
1, aParameters, 1, pExceptions );
typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
#if ! defined CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++reinterpret_cast< typelib_TypeDescription * >( pTD )->
nStaticRefCount;
#endif
s_type_XCurrentContext = pTD;
}
}

View File

@ -42,6 +42,7 @@ namespace cppu_threadpool {
m_cndWait( osl_createCondition() )
{
osl_resetCondition( m_cndWait );
m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
}
JobQueue::~JobQueue()
@ -68,7 +69,7 @@ namespace cppu_threadpool {
{
// synchronize with the dispose calls
MutexGuard guard( m_mutex );
if( DisposedCallerAdmin::getInstance()->isDisposed( nDisposeId ) )
if( m_DisposedCallerAdmin->isDisposed( nDisposeId ) )
{
return 0;
}

View File

@ -34,6 +34,8 @@
#include <osl/conditn.h>
#include <osl/mutex.hxx>
#include <boost/shared_ptr.hpp>
namespace cppu_threadpool
{
extern "C" typedef void (SAL_CALL RequestFun)(void *);
@ -48,6 +50,9 @@ namespace cppu_threadpool
typedef ::std::list < sal_Int64 > CallStackList;
class DisposedCallerAdmin;
typedef boost::shared_ptr<DisposedCallerAdmin> DisposedCallerAdminHolder;
class JobQueue
{
public:
@ -73,6 +78,7 @@ namespace cppu_threadpool
sal_Int32 m_nToDo;
sal_Bool m_bSuspended;
oslCondition m_cndWait;
DisposedCallerAdminHolder m_DisposedCallerAdmin;
};
}

View File

@ -31,6 +31,8 @@
#include <osl/diagnose.h>
#include <uno/threadpool.h>
#include <rtl/instance.hxx>
#include "thread.hxx"
#include "jobqueue.hxx"
#include "threadpool.hxx"
@ -98,20 +100,17 @@ namespace cppu_threadpool {
} while( pCurrent );
}
ThreadAdmin* ThreadAdmin::getInstance()
struct theThreadAdmin : public rtl::StaticWithInit< ThreadAdminHolder, theThreadAdmin >
{
static ThreadAdmin *pThreadAdmin = 0;
if( ! pThreadAdmin )
{
MutexGuard guard( Mutex::getGlobalMutex() );
if( ! pThreadAdmin )
{
static ThreadAdmin admin;
pThreadAdmin = &admin;
}
ThreadAdminHolder operator () () {
ThreadAdminHolder aRet(new ThreadAdmin());
return aRet;
}
return pThreadAdmin;
};
ThreadAdminHolder& ThreadAdmin::getInstance()
{
return theThreadAdmin::get();
}
// ----------------------------------------------------------------------------------
@ -119,12 +118,13 @@ namespace cppu_threadpool {
const ByteSequence &aThreadId,
sal_Bool bAsynchron )
: m_thread( 0 )
, m_aThreadAdmin( ThreadAdmin::getInstance() )
, m_pQueue( pQueue )
, m_aThreadId( aThreadId )
, m_bAsynchron( bAsynchron )
, m_bDeleteSelf( sal_True )
{
ThreadAdmin::getInstance()->add( this );
m_aThreadAdmin->add( this );
}
@ -166,7 +166,7 @@ namespace cppu_threadpool {
void ORequestThread::onTerminated()
{
ThreadAdmin::getInstance()->remove( this );
m_aThreadAdmin->remove( this );
if( m_bDeleteSelf )
{
delete this;
@ -175,6 +175,8 @@ namespace cppu_threadpool {
void ORequestThread::run()
{
ThreadPoolHolder theThreadPool = cppu_threadpool::ThreadPool::getInstance();
while ( m_pQueue )
{
if( ! m_bAsynchron )
@ -197,7 +199,7 @@ namespace cppu_threadpool {
if( m_pQueue->isEmpty() )
{
ThreadPool::getInstance()->revokeQueue( m_aThreadId , m_bAsynchron );
theThreadPool->revokeQueue( m_aThreadId , m_bAsynchron );
// Note : revokeQueue might have failed because m_pQueue.isEmpty()
// may be false (race).
}
@ -211,7 +213,7 @@ namespace cppu_threadpool {
uno_releaseIdFromCurrentThread();
}
cppu_threadpool::ThreadPool::getInstance()->waitInPool( this );
theThreadPool->waitInPool( this );
}
}
}

View File

@ -37,6 +37,8 @@
namespace cppu_threadpool {
class JobQueue;
class ThreadAdmin;
typedef boost::shared_ptr<ThreadAdmin> ThreadAdminHolder;
//-----------------------------------------
// private thread class for the threadpool
@ -61,6 +63,7 @@ namespace cppu_threadpool {
private:
oslThread m_thread;
ThreadAdminHolder m_aThreadAdmin;
JobQueue *m_pQueue;
::rtl::ByteSequence m_aThreadId;
sal_Bool m_bAsynchron;
@ -71,7 +74,7 @@ namespace cppu_threadpool {
{
public:
~ThreadAdmin ();
static ThreadAdmin *getInstance();
static ThreadAdminHolder &getInstance();
void add( ORequestThread * );
void remove( ORequestThread * );
void join();

View File

@ -33,6 +33,7 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <rtl/instance.hxx>
#include <uno/threadpool.h>
@ -44,19 +45,17 @@ using namespace ::osl;
namespace cppu_threadpool
{
DisposedCallerAdmin *DisposedCallerAdmin::getInstance()
struct theDisposedCallerAdmin :
public rtl::StaticWithInit< DisposedCallerAdminHolder, theDisposedCallerAdmin >
{
static DisposedCallerAdmin *pDisposedCallerAdmin = 0;
if( ! pDisposedCallerAdmin )
{
MutexGuard guard( Mutex::getGlobalMutex() );
if( ! pDisposedCallerAdmin )
{
static DisposedCallerAdmin admin;
pDisposedCallerAdmin = &admin;
}
DisposedCallerAdminHolder operator () () {
return DisposedCallerAdminHolder(new DisposedCallerAdmin());
}
return pDisposedCallerAdmin;
};
DisposedCallerAdminHolder DisposedCallerAdmin::getInstance()
{
return theDisposedCallerAdmin::get();
}
DisposedCallerAdmin::~DisposedCallerAdmin()
@ -107,6 +106,21 @@ namespace cppu_threadpool
//-------------------------------------------------------------------------------
struct theThreadPool :
public rtl::StaticWithInit< ThreadPoolHolder, theThreadPool >
{
ThreadPoolHolder operator () () {
ThreadPoolHolder aRet(new ThreadPool());
return aRet;
}
};
ThreadPool::ThreadPool()
{
m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
}
ThreadPool::~ThreadPool()
{
#if OSL_DEBUG_LEVEL > 1
@ -116,19 +130,9 @@ namespace cppu_threadpool
}
#endif
}
ThreadPool *ThreadPool::getInstance()
ThreadPoolHolder ThreadPool::getInstance()
{
static ThreadPool *pThreadPool = 0;
if( ! pThreadPool )
{
MutexGuard guard( Mutex::getGlobalMutex() );
if( ! pThreadPool )
{
static ThreadPool pool;
pThreadPool = &pool;
}
}
return pThreadPool;
return theThreadPool::get();
}
@ -136,7 +140,7 @@ namespace cppu_threadpool
{
if( nDisposeId )
{
DisposedCallerAdmin::getInstance()->dispose( nDisposeId );
m_DisposedCallerAdmin->dispose( nDisposeId );
MutexGuard guard( m_mutex );
for( ThreadIdHashMap::iterator ii = m_mapQueue.begin() ;
@ -171,7 +175,7 @@ namespace cppu_threadpool
void ThreadPool::stopDisposing( sal_Int64 nDisposeId )
{
DisposedCallerAdmin::getInstance()->stopDisposing( nDisposeId );
m_DisposedCallerAdmin->stopDisposing( nDisposeId );
}
/******************
@ -400,7 +404,7 @@ struct uno_ThreadPool_Hash
typedef ::std::hash_set< uno_ThreadPool, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
typedef ::std::hash_map< uno_ThreadPool, ThreadPoolHolder, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
static ThreadpoolHashSet *g_pThreadpoolHashSet;
@ -420,7 +424,7 @@ uno_threadpool_create() SAL_THROW_EXTERN_C()
// Just ensure that the handle is unique in the process (via heap)
uno_ThreadPool h = new struct _uno_ThreadPool;
g_pThreadpoolHashSet->insert( h );
g_pThreadpoolHashSet->insert( ThreadpoolHashSet::value_type(h, ThreadPool::getInstance()) );
return h;
}

View File

@ -30,6 +30,8 @@
#include <rtl/byteseq.hxx>
#include <boost/shared_ptr.hpp>
#include "jobqueue.hxx"
@ -76,12 +78,15 @@ namespace cppu_threadpool {
typedef ::std::list < struct ::cppu_threadpool::WaitingThread * > WaitingThreadList;
class DisposedCallerAdmin;
typedef boost::shared_ptr<DisposedCallerAdmin> DisposedCallerAdminHolder;
class DisposedCallerAdmin
{
public:
~DisposedCallerAdmin();
static DisposedCallerAdmin *getInstance();
static DisposedCallerAdminHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@ -92,11 +97,15 @@ namespace cppu_threadpool {
DisposedCallerList m_lst;
};
class ThreadPool;
typedef boost::shared_ptr<ThreadPool> ThreadPoolHolder;
class ThreadPool
{
public:
ThreadPool();
~ThreadPool();
static ThreadPool *getInstance();
static ThreadPoolHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@ -124,6 +133,8 @@ namespace cppu_threadpool {
::osl::Mutex m_mutexWaitingThreadList;
WaitingThreadList m_lstThreads;
DisposedCallerAdminHolder m_DisposedCallerAdmin;
};
} // end namespace cppu_threadpool

View File

@ -168,10 +168,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("type") );
::typelib_typedescriptionreference_new(
&s_aTypes[typelib_TypeClass_TYPE], typelib_TypeClass_TYPE, sTypeName.pData );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[typelib_TypeClass_TYPE]->nStaticRefCount;
#endif
}
// any
if (! s_aTypes[typelib_TypeClass_ANY])
@ -179,10 +177,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("any") );
::typelib_typedescriptionreference_new(
&s_aTypes[typelib_TypeClass_ANY], typelib_TypeClass_ANY, sTypeName.pData );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[typelib_TypeClass_ANY]->nStaticRefCount;
#endif
}
// string
if (! s_aTypes[typelib_TypeClass_STRING])
@ -190,10 +186,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("string") );
::typelib_typedescriptionreference_new(
&s_aTypes[typelib_TypeClass_STRING], typelib_TypeClass_STRING, sTypeName.pData );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[typelib_TypeClass_STRING]->nStaticRefCount;
#endif
}
// XInterface
if (! s_aTypes[typelib_TypeClass_INTERFACE])
@ -220,10 +214,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
::typelib_typedescription_register( (typelib_TypeDescription **)&pTD );
::typelib_typedescriptionreference_acquire(
s_aTypes[typelib_TypeClass_INTERFACE] = ((typelib_TypeDescription *)pTD)->pWeakRef );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[typelib_TypeClass_INTERFACE]->nStaticRefCount;
#endif
::typelib_typedescription_release( (typelib_TypeDescription*)pTD );
::typelib_typedescriptionreference_release( pMembers[0] );
@ -252,10 +244,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
typelib_typedescription_register( &pTD1 );
typelib_typedescriptionreference_acquire(
s_aTypes[typelib_TypeClass_EXCEPTION] = pTD1->pWeakRef );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[typelib_TypeClass_EXCEPTION]->nStaticRefCount;
#endif
// RuntimeException
OUString sTypeName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException") );
::typelib_typedescription_new(
@ -302,10 +292,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
{
OUString aTypeName( OUString::createFromAscii( s_aTypeNames[eTypeClass] ) );
::typelib_typedescriptionreference_new( &s_aTypes[eTypeClass], eTypeClass, aTypeName.pData );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++s_aTypes[eTypeClass]->nStaticRefCount;
#endif
}
}
}
@ -327,10 +315,8 @@ void SAL_CALL typelib_static_type_init(
OUString aTypeName( OUString::createFromAscii( pTypeName ) );
::typelib_typedescriptionreference_new( ppRef, eTypeClass, aTypeName.pData );
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++((*ppRef)->nStaticRefCount);
#endif
}
}
}
@ -364,10 +350,8 @@ void SAL_CALL typelib_static_sequence_type_init(
*ppRef = (typelib_TypeDescriptionReference *)pReg;
OSL_ASSERT( *ppRef == pReg->pWeakRef );
}
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++((*ppRef)->nStaticRefCount);
#endif
}
}
}
@ -450,10 +434,8 @@ void init(
*ppRef = (typelib_TypeDescriptionReference *)pReg;
OSL_ASSERT( *ppRef == pReg->pWeakRef );
}
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++((*ppRef)->nStaticRefCount);
#endif
}
}
}
@ -551,10 +533,8 @@ void SAL_CALL typelib_static_mi_interface_type_init(
*ppRef = (typelib_TypeDescriptionReference *)pReg;
OSL_ASSERT( *ppRef == pReg->pWeakRef );
}
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++((*ppRef)->nStaticRefCount);
#endif
}
}
}
@ -593,10 +573,8 @@ void SAL_CALL typelib_static_enum_type_init(
*ppRef = (typelib_TypeDescriptionReference *)pReg;
OSL_ASSERT( *ppRef == pReg->pWeakRef );
}
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++(*(sal_Int32 *)&(*ppRef)->pReserved);
#endif
}
}
}
@ -660,10 +638,8 @@ void SAL_CALL typelib_static_array_type_init(
OSL_ASSERT( *ppRef == pReg->pWeakRef );
} else
delete [] pDimensions;
#ifndef CPPU_LEAK_STATIC_DATA
// another static ref
// another static ref:
++((*ppRef)->nStaticRefCount);
#endif
}
}
}

View File

@ -264,17 +264,9 @@ inline void TypeDescriptor_Init_Impl::callChain(
}
}
// never called
#if defined(CPPU_LEAK_STATIC_DATA) && defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
static void dumb_sunpro5_must_have_dtor_stl_hashmap_code_if_compiled_with_minus_g() SAL_THROW( () )
{
delete (WeakMap_Impl *)0xbeef1e;
}
#endif
//__________________________________________________________________________________________________
TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
{
#ifndef CPPU_LEAK_STATIC_DATA
if( pCache )
{
TypeDescriptionList_Impl::const_iterator aIt = pCache->begin();
@ -303,7 +295,6 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
for( i = 0; i < nSize; i++ )
{
typelib_TypeDescriptionReference * pTDR = ppTDR[i];
sal_Int32 nStaticCounts = pTDR->nStaticRefCount;
OSL_ASSERT( pTDR->nRefCount > pTDR->nStaticRefCount );
pTDR->nRefCount -= pTDR->nStaticRefCount;
@ -355,9 +346,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
#endif
delete pCallbacks;
pCallbacks = 0;
#endif // CPPU_LEAK_STATIC_DATA
// todo: maybe into leak block
if( pMutex )
{
delete pMutex;

View File

@ -139,6 +139,7 @@ struct EnvironmentsData
::osl::Mutex mutex;
OUString2EnvironmentMap aName2EnvMap;
EnvironmentsData() : isDisposing(false) {}
~EnvironmentsData();
inline void getEnvironment(
@ -147,6 +148,8 @@ struct EnvironmentsData
inline void getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen,
uno_memAlloc memAlloc, const OUString & rEnvDcp );
bool isDisposing;
};
namespace
@ -595,9 +598,14 @@ static void SAL_CALL defenv_harden(
*ppHardEnv = 0;
}
EnvironmentsData & rData = theEnvironmentsData::get();
if (rData.isDisposing)
return;
uno_DefaultEnvironment * that = (uno_DefaultEnvironment *)pEnv;
{
::osl::MutexGuard guard( theEnvironmentsData::get().mutex );
::osl::MutexGuard guard( rData.mutex );
if (1 == ::osl_incrementInterlockedCount( &that->nRef )) // is dead
{
that->nRef = 0;
@ -914,6 +922,7 @@ static void SAL_CALL unoenv_releaseInterface(
EnvironmentsData::~EnvironmentsData()
{
::osl::MutexGuard guard( mutex );
isDisposing = true;
for ( OUString2EnvironmentMap::const_iterator iPos( aName2EnvMap.begin() );
iPos != aName2EnvMap.end(); ++iPos )
@ -928,11 +937,7 @@ EnvironmentsData::~EnvironmentsData()
#if OSL_DEBUG_LEVEL > 1
::uno_dumpEnvironment( 0, pHard, 0 );
#endif
#if defined CPPU_LEAK_STATIC_DATA
pHard->environmentDisposing = 0; // set to null => wont be called
#else
(*pHard->dispose)( pHard ); // send explicit dispose
#endif
(*pHard->release)( pHard );
}
}

View File

@ -51,12 +51,3 @@ CFLAGS += -Ob0
.ENDIF
.ENDIF
# other stuff
.IF "$(cppu_no_leak)" == ""
.IF "$(bndchk)" == ""
CFLAGS += -DCPPU_LEAK_STATIC_DATA
.ENDIF
.ENDIF

View File

@ -87,6 +87,9 @@ typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)(
typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
/** Function pointer declaration.
@obsolete component_writeInfo should no longer be used in new components
Function writes component registry info, at least writing the supported service names.
@param pServiceManager

View File

@ -72,6 +72,8 @@ struct ImplementationEntry
/** Helper function for implementation of the component_writeInfo()-function.
@obsolete component_writeInfo should no longer be used in new components
@param pServiceManager The first parameter passed to component_writeInfo()-function
(This is an instance of the service manager, that creates the factory).
@param pRegistryKey The second parameter passed to the component_writeInfo()-function.
@ -90,9 +92,9 @@ sal_Bool component_writeInfoHelper(
@param pImplName The implementation-name to be instantiated ( This is the
first parameter passed to the component_getFactory
@param pServiceManager The first parameter passed to component_writeInfo()-function
@param pServiceManager The second parameter passed to component_getFactory()-function
(This is a of the service manager, that creates the factory).
@param pRegistryKey The second parameter passed to the component_writeInfo()-function.
@param pRegistryKey The third parameter passed to the component_getFactory()-function.
This is a reference to the registry key, where the implementation
data has been written to.
@param entries Each element of the entries-array must contains a function pointer

View File

@ -44,6 +44,17 @@
namespace cppu
{
namespace detail {
union element_alias
{
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > *pAsSequence;
::com::sun::star::uno::XInterface * pAsInterface;
element_alias() : pAsInterface(0) {}
};
}
//===================================================================
class OInterfaceContainerHelper;
/**
@ -95,7 +106,9 @@ public:
private:
OInterfaceContainerHelper & rCont;
sal_Bool bIsList;
void * pData;
detail::element_alias aData;
sal_Int32 nRemain;
OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ) SAL_THROW( () );
@ -222,14 +235,14 @@ public:
private:
friend class OInterfaceIteratorHelper;
/**
bIsList == TRUE -> pData of type Sequence< XInterfaceSequence >,
otherwise pData == of type (XEventListener *)
bIsList == TRUE -> aData.pAsSequence of type Sequence< XInterfaceSequence >,
otherwise aData.pAsInterface == of type (XEventListener *)
*/
void * pData;
detail::element_alias aData;
::osl::Mutex & rMutex;
/** TRUE -> used by an iterator. */
sal_Bool bInUse;
/** TRUE -> pData is of type Sequence< XInterfaceSequence >. */
/** TRUE -> aData.pAsSequence is of type Sequence< XInterfaceSequence >. */
sal_Bool bIsList;
OInterfaceContainerHelper( const OInterfaceContainerHelper & ) SAL_THROW( () );

View File

@ -65,6 +65,8 @@ SAL_CALL loadSharedLibComponentFactory(
directory. The resulting path of the library will be checked against environment variable
CPLD_ACCESSPATH if set.
@obsolete component_writeInfo should no longer be used in new components
@param rLibName name of the library
@param rPath optional path
@param xMgr service manager to be provided to the component

View File

@ -75,11 +75,6 @@ public final class JavaSupplier extends WeakBase implements XSupplier {
: null;
}
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(
implementationName, serviceName, regKey);
}
private static final String implementationName
= JavaSupplier.class.getName();
private static final String serviceName

View File

@ -427,10 +427,3 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
extern "C" sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return cppu::component_writeInfoHelper(
serviceManager, registryKey, entries);
}

View File

@ -37,6 +37,8 @@ PACKAGE = test/cppuhelper/propertysetmixin/comp
ENABLE_EXCEPTIONS := TRUE
my_components = $(TARGET).cpp $(TARGET).java
.INCLUDE: settings.mk
.IF "$(OS)" == "WNT"
@ -75,51 +77,62 @@ JARFILES = java_uno.jar juh.jar jurt.jar ridl.jar
ALLTAR: test
$(MISC)/$(TARGET)/types.urd: types.idl
- $(MKDIR) $(@:d)
$(MKDIRHIER) $(@:d)
$(IDLC) -O$(@:d) -I$(SOLARIDLDIR) -cid -we $<
$(MISC)/$(TARGET)/types.rdb: $(MISC)/$(TARGET)/types.urd
- $(RM) $@
$(REGMERGE) $@ /UCR $<
$(MISC)/$(TARGET)/uno.rdb: $(MISC)/$(TARGET)/types.rdb $(SHL2TARGETN) \
$(MISC)/$(TARGET)/$(TARGET).uno.jar $(MISC)/$(TARGET)/bootstrap.rdb
- $(MKDIR) $(@:d)
$(COPY) $(SOLARBINDIR)/types.rdb $@
$(REGMERGE) $@ / $(MISC)/$(TARGET)/types.rdb
$(REGCOMP) -register -r $@ -wop -c javaloader.uno -c javavm.uno \
-c reflection.uno -c stocservices.uno -c $(SHL2TARGETN)
$(REGCOMP) -register -br $(MISC)/$(TARGET)/bootstrap.rdb -r $@ \
-c $(my_file)$(PWD)/$(MISC)/$(TARGET)/$(TARGET).uno.jar \
-env:URE_INTERNAL_JAVA_DIR=$(my_file)$(SOLARBINDIR)
$(MISC)/$(TARGET)/bootstrap.rdb:
- $(MKDIR) $(@:d)
$(COPY) $(SOLARBINDIR)/types.rdb $@
$(REGCOMP) -register -r $@ -wop -c javaloader.uno -c javavm.uno \
-c stocservices.uno
$(MISC)/$(TARGET)/cppumaker.flag: $(MISC)/$(TARGET)/types.rdb
$(CPPUMAKER) -O$(MISC)/$(TARGET)/inc -BUCR -Gc \
-X$(SOLARBINDIR)/types.rdb $<
-X$(SOLARBINDIR)/udkapi.rdb $<
$(TOUCH) $@
$(SLOFILES): $(MISC)/$(TARGET)/cppumaker.flag
$(MISC)/$(TARGET)/javamaker.flag: $(MISC)/$(TARGET)/types.rdb
$(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -Gc -X$(SOLARBINDIR)/types.rdb $<
$(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -Gc -X$(SOLARBINDIR)/udkapi.rdb $<
$(TOUCH) $@
$(JAVATARGET): $(MISC)/$(TARGET)/javamaker.flag
$(MISC)/$(TARGET)/services.rdb .ERRREMOVE: $(SOLARENV)/bin/packcomponents.xslt \
$(MISC)/$(TARGET)/services.input \
$(my_components:^"$(MISC)/$(TARGET)/":+".component")
$(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \
$(SOLARENV)/bin/packcomponents.xslt $(MISC)/$(TARGET)/services.input
$(MISC)/$(TARGET)/services.input:
$(MKDIRHIER) $(@:d)
echo \
'<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
> $@
$(MISC)/$(TARGET)/$(TARGET).cpp.component .ERRREMOVE: \
$(SOLARENV)/bin/createcomponent.xslt $(TARGET).cpp.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_INBUILD_NATIVE)$(SHL2TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt $(TARGET).cpp.component
$(MISC)/$(TARGET)/$(TARGET).java.component .ERRREMOVE: \
$(SOLARENV)/bin/createcomponent.xslt $(TARGET).java.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_INBUILD_JAVA)$(TARGET).uno.jar' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt $(TARGET).java.component
$(MISC)/$(TARGET)/$(TARGET).uno.jar: $(JAVATARGET) \
$(MISC)/$(TARGET)/javamaker.flag manifest
jar cfm $@ manifest -C $(CLASSDIR) test/cppuhelper/propertysetmixin
test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/uno.rdb
test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(MISC)/$(TARGET)/$(TARGET).uno.jar \
$(MISC)/$(TARGET)/types.rdb $(MISC)/$(TARGET)/services.rdb
$(CPPUNITTESTER) $(SHL1TARGETN) \
-env:URE_INTERNAL_JAVA_DIR=$(my_file)$(SOLARBINDIR) \
'-env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/udkapi.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb' \
'-env:UNO_SERVICES=$(my_file)$(SOLARXMLDIR)/ure/services.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb'\
-env:URE_INTERNAL_LIB_DIR=$(my_file)$(SOLARSHAREDBIN) \
-env:arg-reg=$(MISC)/$(TARGET)/uno.rdb -env:arg-path=$(SOLARSHAREDBIN)
-env:URE_INTERNAL_JAVA_DIR=$(my_file)$(SOLARBINDIR) \
-env:OOO_INBUILD_SHAREDLIB_DIR=$(my_file)$(PWD)/$(DLLDEST) \
-env:OOO_INBUILD_JAR_DIR=$(my_file)$(PWD)/$(MISC)/$(TARGET)
.END

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="test.cppuhelper.propertysetmixin.comp.CppSupplier">
<service name="test.cppuhelper.propertysetmixin.CppSupplier"/>
</implementation>
</component>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.Java2"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="test.cppuhelper.propertysetmixin.comp.JavaSupplier">
<service name="test.cppuhelper.propertysetmixin.JavaSupplier"/>
</implementation>
</component>

View File

@ -52,21 +52,19 @@
#include "com/sun/star/beans/XPropertySetInfo.hpp"
#include "com/sun/star/beans/XVetoableChangeListener.hpp"
#include "com/sun/star/lang/XComponent.hpp"
#include "com/sun/star/lang/XMultiComponentFactory.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "cppuhelper/bootstrap.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/servicefactory.hxx"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
#include "osl/mutex.hxx"
#include "rtl/bootstrap.hxx"
#include "rtl/ref.hxx"
#include "rtl/string.h"
#include "rtl/textenc.h"
@ -98,14 +96,6 @@ std::ostream & operator <<(std::ostream & out, css::uno::Any const & value) {
out << "com::sun::star::uno::Any[" << value.getValueType() << ", ...]";
}
rtl::OUString getArgument(rtl::OUString const & name) {
rtl::OUString val;
CPPUNIT_ASSERT(
rtl::Bootstrap::get(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("arg-")) + name, val));
return val;
}
class BoundListener:
public cppu::WeakImplHelper1< css::beans::XPropertyChangeListener >
{
@ -178,7 +168,7 @@ class Test: public CppUnit::TestFixture {
public:
virtual void setUp();
void finish();
virtual void tearDown();
void testCppEmpty1() { testEmpty1(getCppSupplier()); }
@ -199,7 +189,6 @@ public:
CPPUNIT_TEST(testJavaEmpty1);
CPPUNIT_TEST(testJavaEmpty2);
CPPUNIT_TEST(testJavaFull);
CPPUNIT_TEST(finish);
CPPUNIT_TEST_SUITE_END();
private:
@ -221,30 +210,15 @@ private:
css::uno::Reference< test::cppuhelper::propertysetmixin::XSupplier >
const & supplier) const;
static css::uno::Reference< css::uno::XComponentContext > m_context;
css::uno::Reference< css::uno::XComponentContext > m_context;
};
void Test::setUp() {
// For whatever reason, on W32 it does not work to create/destroy a fresh
// component context for each test in Test::setUp/tearDown; therefore, a
// single component context is used for all tests and destroyed in the last
// pseudo-test "finish":
if (!m_context.is()) {
css::uno::Reference< css::lang::XMultiComponentFactory > factory(
cppu::createRegistryServiceFactory(
getArgument(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("reg"))),
sal_False,
getArgument(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("path")))),
css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::beans::XPropertySet >(
factory, css::uno::UNO_QUERY_THROW)->getPropertyValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")))
>>= m_context;
}
m_context = cppu::defaultBootstrap_InitialComponentContext();
CPPUNIT_ASSERT(m_context.is());
}
void Test::finish() {
void Test::tearDown() {
css::uno::Reference< css::lang::XComponent >(
m_context, css::uno::UNO_QUERY_THROW)->dispose();
}
@ -671,8 +645,6 @@ void Test::testFull(
} catch (css::beans::UnknownPropertyException &) {}
}
css::uno::Reference< css::uno::XComponentContext > Test::m_context;
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}

View File

@ -380,9 +380,15 @@ SAL_CALL defaultBootstrap_InitialComponentContext(
Bootstrap const & bootstrap )
SAL_THROW( (Exception) )
{
OUString bootstrapPath( get_this_libpath() );
OUString iniDir;
OUString bootstrapPath;
if (!bootstrap.getFrom(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URE_INTERNAL_LIB_DIR")),
bootstrapPath))
{
bootstrapPath = get_this_libpath();
}
OUString iniDir;
osl_getProcessWorkingDir(&iniDir.pData);
Reference<lang::XMultiComponentFactory> smgr_XMultiComponentFactory(

View File

@ -99,15 +99,15 @@ OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper &
// worst case, two iterators at the same time
rCont.copyAndResetInUse();
bIsList = rCont_.bIsList;
pData = rCont_.pData;
aData = rCont_.aData;
if( bIsList )
{
rCont.bInUse = sal_True;
nRemain = ((Sequence< Reference< XInterface > >*)pData)->getLength();
nRemain = aData.pAsSequence->getLength();
}
else if( pData )
else if( aData.pAsInterface )
{
((XInterface *)pData)->acquire();
aData.pAsInterface->acquire();
nRemain = 1;
}
else
@ -120,7 +120,7 @@ OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW( () )
{
MutexGuard aGuard( rCont.rMutex );
// bResetInUse protect the iterator against recursion
bShared = pData == rCont.pData && rCont.bIsList;
bShared = aData.pAsSequence == rCont.aData.pAsSequence && rCont.bIsList;
if( bShared )
{
OSL_ENSURE( rCont.bInUse, "OInterfaceContainerHelper must be in use" );
@ -132,10 +132,10 @@ OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW( () )
{
if( bIsList )
// Sequence owned by the iterator
delete (Sequence< Reference< XInterface > >*)pData;
else if( pData )
delete aData.pAsSequence;
else if( aData.pAsInterface )
// Interface is acquired by the iterator
((XInterface*)pData)->release();
aData.pAsInterface->release();
}
}
@ -146,9 +146,9 @@ XInterface * OInterfaceIteratorHelper::next() SAL_THROW( () )
nRemain--;
if( bIsList )
// typecase to const,so the getArray method is faster
return ((const Sequence< Reference< XInterface > >*)pData)->getConstArray()[nRemain].get();
else if( pData )
return (XInterface*)pData;
return aData.pAsSequence->getConstArray()[nRemain].get();
else if( aData.pAsInterface )
return aData.pAsInterface;
}
// exception
return 0;
@ -159,15 +159,14 @@ void OInterfaceIteratorHelper::remove() SAL_THROW( () )
if( bIsList )
{
OSL_ASSERT( nRemain >= 0 &&
nRemain < ((const Sequence< Reference< XInterface > >*)pData)->getLength() );
XInterface * p =
((const Sequence< Reference< XInterface > >*)pData)->getConstArray()[nRemain].get();
nRemain < aData.pAsSequence->getLength() );
XInterface * p = aData.pAsSequence->getConstArray()[nRemain].get();
rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >( &p ) );
}
else
{
OSL_ASSERT( 0 == nRemain );
rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >(&pData));
rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >(&aData.pAsInterface));
}
}
@ -177,8 +176,7 @@ void OInterfaceIteratorHelper::remove() SAL_THROW( () )
OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) SAL_THROW( () )
: pData( 0 )
, rMutex( rMutex_ )
: rMutex( rMutex_ )
, bInUse( sal_False )
, bIsList( sal_False )
{
@ -188,17 +186,17 @@ OInterfaceContainerHelper::~OInterfaceContainerHelper() SAL_THROW( () )
{
OSL_ENSURE( !bInUse, "~OInterfaceContainerHelper but is in use" );
if( bIsList )
delete (Sequence< Reference< XInterface > >*)pData;
else if( pData )
((XInterface*)pData)->release();
delete aData.pAsSequence;
else if( aData.pAsInterface )
aData.pAsInterface->release();
}
sal_Int32 OInterfaceContainerHelper::getLength() const SAL_THROW( () )
{
MutexGuard aGuard( rMutex );
if( bIsList )
return ((Sequence< Reference< XInterface > >*)pData)->getLength();
else if( pData )
return aData.pAsSequence->getLength();
else if( aData.pAsInterface )
return 1;
return 0;
}
@ -207,10 +205,10 @@ Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const
{
MutexGuard aGuard( rMutex );
if( bIsList )
return *(Sequence< Reference< XInterface > >*)pData;
else if( pData )
return *aData.pAsSequence;
else if( aData.pAsInterface )
{
Reference<XInterface> x( (XInterface *)pData );
Reference<XInterface> x( aData.pAsInterface );
return Sequence< Reference< XInterface > >( &x, 1 );
}
return Sequence< Reference< XInterface > >();
@ -224,9 +222,9 @@ void OInterfaceContainerHelper::copyAndResetInUse() SAL_THROW( () )
// this should be the worst case. If a iterator is active
// and a new Listener is added.
if( bIsList )
pData = new Sequence< Reference< XInterface > >( *(Sequence< Reference< XInterface > >*)pData );
else if( pData )
((XInterface*)pData)->acquire();
aData.pAsSequence = new Sequence< Reference< XInterface > >( *aData.pAsSequence );
else if( aData.pAsInterface )
aData.pAsInterface->acquire();
bInUse = sal_False;
}
@ -241,25 +239,25 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> &
if( bIsList )
{
sal_Int32 nLen = ((Sequence< Reference< XInterface > >*)pData)->getLength();
realloc( *(Sequence< Reference< XInterface > >*)pData, nLen +1 );
((Sequence< Reference< XInterface > >*)pData)->getArray()[ nLen ] = rListener;
sal_Int32 nLen = aData.pAsSequence->getLength();
realloc( *aData.pAsSequence, nLen +1 );
aData.pAsSequence->getArray()[ nLen ] = rListener;
return nLen +1;
}
else if( pData )
else if( aData.pAsInterface )
{
Sequence< Reference< XInterface > > * pSeq = new Sequence< Reference< XInterface > >( 2 );
Reference<XInterface> * pArray = pSeq->getArray();
pArray[0] = (XInterface *)pData;
pArray[0] = aData.pAsInterface;
pArray[1] = rListener;
((XInterface *)pData)->release();
pData = pSeq;
aData.pAsInterface->release();
aData.pAsSequence = pSeq;
bIsList = sal_True;
return 2;
}
else
{
pData = rListener.get();
aData.pAsInterface = rListener.get();
if( rListener.is() )
rListener->acquire();
return 1;
@ -275,8 +273,8 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface
if( bIsList )
{
const Reference<XInterface> * pL = ((const Sequence< Reference< XInterface > >*)pData)->getConstArray();
sal_Int32 nLen = ((Sequence< Reference< XInterface > >*)pData)->getLength();
const Reference<XInterface> * pL = aData.pAsSequence->getConstArray();
sal_Int32 nLen = aData.pAsSequence->getLength();
sal_Int32 i;
for( i = 0; i < nLen; i++ )
{
@ -284,7 +282,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface
// more faster.
if( pL[i].get() == rListener.get() )
{
sequenceRemoveElementAt( *(Sequence< Reference< XInterface > >*)pData, i );
sequenceRemoveElementAt( *aData.pAsSequence, i );
break;
}
}
@ -296,30 +294,30 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface
{
if( pL[i] == rListener )
{
sequenceRemoveElementAt(*(Sequence< Reference< XInterface > >*)pData, i );
sequenceRemoveElementAt(*aData.pAsSequence, i );
break;
}
}
}
if( ((Sequence< Reference< XInterface > >*)pData)->getLength() == 1 )
if( aData.pAsSequence->getLength() == 1 )
{
XInterface * p = ((const Sequence< Reference< XInterface > >*)pData)->getConstArray()[0].get();
XInterface * p = aData.pAsSequence->getConstArray()[0].get();
p->acquire();
delete (Sequence< Reference< XInterface > >*)pData;
pData = p;
delete aData.pAsSequence;
aData.pAsInterface = p;
bIsList = sal_False;
return 1;
}
else
return ((Sequence< Reference< XInterface > >*)pData)->getLength();
return aData.pAsSequence->getLength();
}
else if( pData && Reference<XInterface>( (XInterface*)pData ) == rListener )
else if( aData.pAsInterface && Reference<XInterface>( aData.pAsInterface ) == rListener )
{
((XInterface *)pData)->release();
pData = 0;
aData.pAsInterface->release();
aData.pAsInterface = 0;
}
return pData ? 1 : 0;
return aData.pAsInterface ? 1 : 0;
}
void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) SAL_THROW( () )
@ -328,10 +326,10 @@ void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) SAL_
OInterfaceIteratorHelper aIt( *this );
// Container freigeben, falls im disposing neue Einträge kommen
OSL_ENSURE( !bIsList || bInUse, "OInterfaceContainerHelper not in use" );
if( !bIsList && pData )
((XInterface *)pData)->release();
if( !bIsList && aData.pAsInterface )
aData.pAsInterface->release();
// set the member to null, the iterator delete the values
pData = NULL;
aData.pAsInterface = NULL;
bIsList = sal_False;
bInUse = sal_False;
aGuard.clear();
@ -358,10 +356,10 @@ void OInterfaceContainerHelper::clear() SAL_THROW( () )
OInterfaceIteratorHelper aIt( *this );
// Container freigeben, falls im disposing neue Einträge kommen
OSL_ENSURE( !bIsList || bInUse, "OInterfaceContainerHelper not in use" );
if( !bIsList && pData )
((XInterface *)pData)->release();
if( !bIsList && aData.pAsInterface )
aData.pAsInterface->release();
// set the member to null, the iterator delete the values
pData = 0;
aData.pAsInterface = 0;
bIsList = sal_False;
bInUse = sal_False;
// release mutex before aIt destructor call

View File

@ -28,13 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppuhelper.hxx"
#if OSL_DEBUG_LEVEL > 0
#include <stdio.h>
#endif
#include <vector>
#include "rtl/string.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/bootstrap.hxx"
#include "osl/diagnose.h"
#include "osl/file.h"
@ -46,6 +42,7 @@
#include "cppuhelper/servicefactory.hxx"
#include "cppuhelper/bootstrap.hxx"
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/lang/XInitialization.hpp"
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
@ -64,6 +61,7 @@ using namespace ::rtl;
using namespace ::osl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
namespace css = com::sun::star;
namespace cppu
{
@ -417,39 +415,42 @@ Reference< XComponentContext > bootstrapInitialContext(
keys.getConstArray();
for ( sal_Int32 nPos = keys.getLength(); nPos--; )
{
Reference< registry::XRegistryKey > const & xKey2 =
pKeys[ nPos ];
try
{
OUStringBuffer buf( 32 );
buf.appendAscii(
RTL_CONSTASCII_STRINGPARAM("/singletons/") );
buf.append(
xKey2->getKeyName().copy(
sizeof("/SINGLETONS") /* -\0 +'/' */ ) );
entry.name = buf.makeStringAndClear();
entry.value <<= xKey2->getStringValue();
context_values.push_back( entry );
}
catch (Exception & rExc)
{
#if OSL_DEBUG_LEVEL > 0
OString aStr(
OUStringToOString(
xKey2->getKeyName().copy( 11 ),
RTL_TEXTENCODING_ASCII_US ) );
OString aStr2(
OUStringToOString(
rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
fprintf(
stderr,
"### failed reading singleton [%s]"
" service name from registry: %s\n",
aStr.getStr(), aStr2.getStr() );
#else
(void) rExc; // avoid warning about unused variable
#endif
css::uno::Sequence< rtl::OUString > impls(
css::uno::Reference< css::registry::XRegistryKey >(
pKeys[nPos]->openKey(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"REGISTERED_BY"))),
css::uno::UNO_SET_THROW)->getAsciiListValue());
switch (impls.getLength()) {
case 0:
throw css::uno::DeploymentException(
(pKeys[nPos]->getKeyName() +
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"/REGISTERED_BY is empty"))),
css::uno::Reference< css::uno::XInterface >());
case 1:
break;
default:
OSL_TRACE(
("arbitrarily chosing \"%s\" among multiple"
" implementations for \"%s\""),
rtl::OUStringToOString(
impls[0], RTL_TEXTENCODING_UTF8).getStr(),
rtl::OUStringToOString(
pKeys[nPos]->getKeyName(),
RTL_TEXTENCODING_UTF8).getStr());
break;
}
context_values.push_back(
ContextEntry_Init(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("/singletons/")) +
pKeys[nPos]->getKeyName().copy(
RTL_CONSTASCII_LENGTH("/SINGLETONS/"))),
css::uno::makeAny(impls[0]),
true));
}
}
}

View File

@ -2,7 +2,6 @@ pt cpputools : cppuhelper offuh LIBXML2:libxml2 NULL
pt cpputools usr1 - all pt_mkout NULL
pt cpputools\prj get - all pt_prj NULL
pt cpputools\source\registercomponent nmake - all pt_regcomp NULL
pt cpputools\source\regcomplazy nmake - all pt_regcomplazy NULL
pt cpputools\source\regsingleton nmake - all pt_regsingleton NULL
pt cpputools\source\unoexe nmake - all pt_unoexe NULL
pt cpputools\source\sp2bv nmake - all pt_sp2bv NULL

View File

@ -1,8 +1,6 @@
..\%__SRC%\bin\regcomp.exe %_DEST%\bin%_EXT%\regcomp.exe
..\%__SRC%\bin\regcomp %_DEST%\bin%_EXT%\regcomp
..\%__SRC%\bin\regcomp %_DEST%\bin%_EXT%\regcomp.bin
..\%__SRC%\bin\regcomplazy.exe %_DEST%\bin%_EXT%\regcomplazy.exe
..\%__SRC%\bin\regcomplazy %_DEST%\bin%_EXT%\regcomplazy
..\%__SRC%\bin\uno.exe %_DEST%\bin%_EXT%\uno.exe
..\%__SRC%\bin\uno %_DEST%\bin%_EXT%\uno
..\%__SRC%\bin\uno %_DEST%\bin%_EXT%\uno.bin

View File

@ -1,282 +0,0 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <stdio.h>
#include "sal/main.h"
#include <osl/diagnose.h>
#include <osl/thread.h>
#include <osl/file.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <vector>
#include <registry/registry.hxx>
#define OUSTR(x) ::rtl::OUString::createFromAscii( x )
#define OSToOUS(x) ::rtl::OStringToOUString(x, osl_getThreadTextEncoding())
#define OUSToOS(x) ::rtl::OUStringToOString(x, osl_getThreadTextEncoding())
using namespace ::rtl;
typedef ::std::vector< ::rtl::OString > OSVector;
struct CompDescriptor {
OString sImplementationName;
OString sComponentName;
OString sLoaderName;
OSVector vSupportedServices;
};
typedef ::std::vector< CompDescriptor > CDescrVector;
static void print_options() SAL_THROW( () )
{
printf(
"\nusage: regcomplazy [-v]registry_file cmp_descr_file ...\n\n"
"Register a cmponent using a comp description file.\n"
"Option -v prints verbose output on stdout.\n" );
}
static bool checkImplValue(RegistryValueList<sal_Char*>* pValueList, OString sImplName) {
for (sal_uInt32 i=0; i < pValueList->getLength(); i++) {
if (sImplName.equals(pValueList->getElement(i)))
return true;
}
return false;
}
//==================================================================================================
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
if (argc < 3)
{
print_options();
return 1;
}
bool bVerbose = false;
int nPos = 1;
if ('-' == argv[ nPos ][ 0 ] && 'v' == argv[ nPos ][ 1 ])
{
if ('\0' != argv[ nPos ][ 2 ])
{
print_options();
return 1;
}
bVerbose = true;
++nPos;
}
OUString sys_path( OUSTR( argv[ nPos ] ) );
OUString reg_url;
oslFileError rc = osl_getFileURLFromSystemPath( sys_path.pData, &reg_url.pData );
if (osl_File_E_None != rc)
{
if (bVerbose)
fprintf( stderr, "\nERROR: cannot make file url out of %s\n", argv[nPos]);
return 1;
}
FILE* fDescr = fopen(argv[ ++nPos ], "r");
OStringBuffer sBuffer(512);
if ( fDescr) {
size_t totalSize = 0;
size_t readSize = 0;
char pBuffer[513];
while ( !feof(fDescr) )
{
if ( (readSize = fread(pBuffer, 1, 512, fDescr)) > 0
&& !ferror(fDescr) ) {
totalSize += readSize;
if (totalSize >= 512)
sBuffer.ensureCapacity(totalSize * 2);
sBuffer.append(pBuffer, readSize);
}
}
fclose(fDescr);
fDescr = 0; // just to be sure noone tries to use the file ever after
}
OString sDescr = sBuffer.makeStringAndClear();
sal_Int32 nTokenIndex = 0;
CDescrVector vDescr;
CompDescriptor descr;
bool bFirst = true;
do {
OString sTmp = sDescr.getToken(0, '\x0A', nTokenIndex);
OString sToken(sTmp);
if (sTmp.pData->buffer[sTmp.getLength()-1] == '\x0D')
sToken = sTmp.copy(0, sTmp.getLength()-1);
if ( sToken.indexOf("[ComponentDescriptor]") >= 0) {
if (bFirst)
bFirst = false;
else
vDescr.push_back(descr);
descr = CompDescriptor();
}
else if ( sToken.indexOf("ImplementationName=") >= 0) {
descr.sImplementationName = sToken.copy(19);
}
else if ( sToken.indexOf("ComponentName=") >= 0) {
descr.sComponentName = sToken.copy(14);
}
else if ( sToken.indexOf("LoaderName=") >= 0) {
descr.sLoaderName = sToken.copy(11);
}
else if ( (sToken.indexOf("[SupportedServices]") < 0) &&
(sToken.getLength() > 0) &&
(sToken.pData->buffer[0] != '[') ) {
descr.vSupportedServices.push_back(sToken);
}
} while (nTokenIndex >= 0 );
// insert the last descriptor
vDescr.push_back(descr);
Registry *pReg = new Registry;
RegistryKey rootKey, key, subKey, serviceKey;
if (pReg->open(reg_url, REG_READWRITE))
{
if (pReg->create(reg_url))
{
if (bVerbose)
fprintf(stderr, "ERROR: open registry \"%s\" failed\n", argv[1]);
return 1;
}
}
if (pReg->openRootKey(rootKey)) {
if (bVerbose)
fprintf(stderr, "ERROR: open root key failed\n");
return 1;
}
CDescrVector::const_iterator comp_iter = vDescr.begin();
do {
OString sImplName = (*comp_iter).sImplementationName;
OUStringBuffer sbImpl;
sbImpl.appendAscii("/IMPLEMENTATIONS/");
sbImpl.append(OSToOUS(sImplName));
OUString sImplKeyName = sbImpl.makeStringAndClear();
if (rootKey.openKey(sImplKeyName, key) == REG_NO_ERROR) {
if (bVerbose) {
fprintf(stderr, "WARNING: implementation entry for \"%s\" already exists, existing entries are overwritten\n", sImplName.getStr());
}
} else {
if (rootKey.createKey(sImplKeyName, key)) {
if (bVerbose) {
fprintf(stderr, "ERROR: can't create new implementation entry \"%s\".\n", sImplName.getStr());
}
return 1;
}
}
OString sLoaderName = (*comp_iter).sLoaderName;
OUString usKeyName(OUSTR("UNO/ACTIVATOR"));
key.createKey(usKeyName, subKey);
subKey.setValue(OUString(), RG_VALUETYPE_STRING,
(sal_Char*)sLoaderName.getStr(), sLoaderName.getLength()+1);
OString sCompName = (*comp_iter).sComponentName;
usKeyName = OUSTR("UNO/LOCATION");
key.createKey(usKeyName, subKey);
subKey.setValue(OUString(), RG_VALUETYPE_STRING,
(sal_Char*)sCompName.getStr(), sCompName.getLength()+1);
usKeyName = OUSTR("UNO/SERVICES");
key.createKey(usKeyName, subKey);
rootKey.createKey(OUSTR("/SERVICES"), serviceKey);
OSVector::const_iterator serv_iter = ((*comp_iter).vSupportedServices).begin();
OUString usServiceKeyName;
do {
usServiceKeyName = OSToOUS(*serv_iter);
// write service key in impl section
subKey.createKey(usServiceKeyName, key);
if (serviceKey.openKey(usServiceKeyName, key) == REG_NO_ERROR) {
RegistryValueList<sal_Char*> valueList;
serviceKey.getStringListValue(usServiceKeyName, valueList);
if ( checkImplValue(&valueList, sImplName) ) {
serv_iter++;
continue;
}
sal_uInt32 nServices = valueList.getLength()+1;
sal_Char** pImplList = (sal_Char**)rtl_allocateZeroMemory(
nServices * sizeof(sal_Char*));
pImplList[0] = (sal_Char*)rtl_allocateZeroMemory(
sImplName.getLength()+1 * sizeof(sal_Char));
rtl_copyMemory(pImplList[0], (sal_Char*)sImplName.getStr(),
sImplName.getLength()+1);
for (sal_uInt32 i=0; i < valueList.getLength(); i++) {
pImplList[i+1]=valueList.getElement(i);
}
key.setStringListValue(OUString(), pImplList, nServices);
// free memory
rtl_freeMemory(pImplList[0]);
rtl_freeMemory(pImplList);
} else {
serviceKey.createKey(usServiceKeyName, key);
sal_Char* pImplList[1];
pImplList[0] = (sal_Char*)rtl_allocateZeroMemory(
sImplName.getLength()+1 * sizeof(sal_Char));
rtl_copyMemory(pImplList[0], (sal_Char*)sImplName.getStr(),
sImplName.getLength()+1);
key.setStringListValue(OUString(), pImplList, 1);
// free memory
rtl_freeMemory(pImplList[0]);
}
serv_iter++;
} while (serv_iter != (*comp_iter).vSupportedServices.end());
comp_iter++;
} while (comp_iter != vDescr.end());
key.closeKey();
subKey.closeKey();
serviceKey.closeKey();
rootKey.closeKey();
pReg->close();
return 0;
}

View File

@ -5,3 +5,8 @@
..\source\stm\stm.xml %_DEST%\xml%_EXT%\streams.uno.xml
..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*
..\%__SRC%\misc\acceptor.component %_DEST%\xml%_EXT%\acceptor.component
..\%__SRC%\misc\connector.component %_DEST%\xml%_EXT%\connector.component
..\%__SRC%\misc\streams.component %_DEST%\xml%_EXT%\streams.component
..\%__SRC%\misc\textinstream.component %_DEST%\xml%_EXT%\textinstream.component
..\%__SRC%\misc\textoutstream.component %_DEST%\xml%_EXT%\textoutstream.component

View File

@ -521,12 +521,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -59,3 +59,11 @@ DEF1NAME= $(SHL1TARGET)
.ENDIF # L10N_framework
.INCLUDE : target.mk
ALLTAR : $(MISC)/textinstream.component
$(MISC)/textinstream.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt textinstream.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt textinstream.component

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.io.TextInputStream">
<service name="com.sun.star.io.TextInputStream"/>
</implementation>
</component>

View File

@ -319,12 +319,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -60,3 +60,11 @@ DEF1NAME= $(SHL1TARGET)
.ENDIF # L10N_framework
.INCLUDE : target.mk
ALLTAR : $(MISC)/textoutstream.component
$(MISC)/textoutstream.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt textoutstream.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt textoutstream.component

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.io.TextOutputStream">
<service name="com.sun.star.io.TextOutputStream"/>
</implementation>
</component>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.io.Acceptor">
<service name="com.sun.star.connection.Acceptor"/>
</implementation>
</component>

View File

@ -366,12 +366,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -71,3 +71,11 @@ DEF1NAME= $(SHL1TARGET)
.ENDIF # L10N_framework
.INCLUDE : target.mk
ALLTAR : $(MISC)/acceptor.component
$(MISC)/acceptor.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
acceptor.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt acceptor.component

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.io.Connector">
<service name="com.sun.star.connection.Connector"/>
</implementation>
</component>

View File

@ -278,12 +278,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -71,3 +71,11 @@ DEF1NAME= $(SHL1TARGET)
.ENDIF # L10N_framework
.INCLUDE : target.mk
ALLTAR : $(MISC)/connector.component
$(MISC)/connector.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
connector.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt connector.component

View File

@ -110,12 +110,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -75,3 +75,10 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
ALLTAR : $(MISC)/streams.component
$(MISC)/streams.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
streams.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt streams.component

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.io.Pump">
<service name="com.sun.star.io.Pump"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.DataInputStream">
<service name="com.sun.star.io.DataInputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.DataOutputStream">
<service name="com.sun.star.io.DataOutputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.MarkableInputStream">
<service name="com.sun.star.io.MarkableInputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.MarkableOutputStream">
<service name="com.sun.star.io.MarkableOutputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.ObjectInputStream">
<service name="com.sun.star.io.ObjectInputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.ObjectOutputStream">
<service name="com.sun.star.io.ObjectOutputStream"/>
</implementation>
<implementation name="com.sun.star.comp.io.stm.Pipe">
<service name="com.sun.star.io.Pipe"/>
</implementation>
</component>

View File

@ -28,7 +28,6 @@ package com.sun.star.comp;
import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.comp.juhtest.SmoketestCommandEnvironment;
@ -62,20 +61,4 @@ public class JavaUNOHelperServices {
return xFactory;
}
/**
* Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns true if the operation succeeded
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return Factory.writeRegistryServiceInfo(SmoketestCommandEnvironment.class.getName(),
SmoketestCommandEnvironment.getServiceNames(),
regKey);
}
}

View File

@ -2,5 +2,6 @@
..\%__SRC%\bin\juh*.dll %_DEST%\bin%_EXT%\juh*.dll
..\%__SRC%\lib\libjuh*.so %_DEST%\lib%_EXT%\libjuh*.so
..\%__SRC%\lib\libjuh*.dylib %_DEST%\lib%_EXT%\libjuh*.dylib
..\%__SRC%\misc\juh.component %_DEST%\xml%_EXT%\juh.component
..\%__SRC%\bin\juh_src.zip %COMMON_DEST%\bin%_EXT%\juh_src.zip

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.Java2"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.juhtest.SmoketestCommandEnvironment">
<service name="com.sun.star.deployment.test.SmoketestCommandEnvironment"/>
</implementation>
</component>

View File

@ -50,4 +50,9 @@ ZIP1LIST=com -x "*makefile.mk"
.INCLUDE : target.mk
ALLTAR : $(MISC)/juh.component
$(MISC)/juh.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
juh.component
$(XSLTPROC) --nonet --stringparam uri '$(COMPONENTPREFIX_URE_JAVA)juh.jar' \
-o $@ $(SOLARENV)/bin/createcomponent.xslt juh.component

View File

@ -93,18 +93,6 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ {
return xSingleServiceFactory;
}
/**
* Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns true if the operation succeeded
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(BridgeFactory.class.getName(), __serviceName, regKey);
}
/**
* Creates a remote bridge and memorizes it under <code>sName</code>.
* <p>

View File

@ -83,21 +83,6 @@ public final class Acceptor implements XAcceptor {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(Acceptor.class.getName(),
__serviceName, regKey);
}
/**
* Constructs a new <code>Acceptor</code> that uses the given service
* factory to create a specific <code>XAcceptor</code>.

View File

@ -83,21 +83,6 @@ public class Connector implements XConnector {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(Connector.class.getName(),
__serviceName, regKey);
}
/**
* Constructs a new <code>Connector</code> that uses the given service
* factory to create a specific <code>XConnector</code>.

View File

@ -85,20 +85,6 @@ public class ConstantInstanceProvider implements XInstanceProvider {
return xSingleServiceFactory;
}
/**
* Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns true if the operation succeeded
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(ConstantInstanceProvider.class.getName(), __serviceName, regKey);
}
protected XMultiServiceFactory _serviceManager;
protected String _serviceName;
protected Object _instance;

View File

@ -85,19 +85,6 @@ public class PipedConnection implements XConnection {
return xSingleServiceFactory;
}
/**
* Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns true if the operation succeeded
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(PipedConnection.class.getName(), __serviceName, regKey);
}
/**
* The amount of time in milliseconds, to wait to
* see check the buffers.

View File

@ -154,18 +154,4 @@ public class UrlResolver {
return xSingleServiceFactory;
}
/**
* Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns true if the operation succeeded
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(_UrlResolver.class.getName(), _UrlResolver.__serviceName, regKey);
}
}

View File

@ -83,21 +83,6 @@ public final class pipeAcceptor implements XAcceptor {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(
pipeAcceptor.class.getName(), __serviceName, regKey);
}
/**
* Accepts a connection request via the described pipe.
*

View File

@ -83,21 +83,6 @@ public final class pipeConnector implements XConnector {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(
pipeConnector.class.getName(), __serviceName, regKey);
}
/**
* Connects via the described pipe to a waiting server.
*

View File

@ -88,21 +88,6 @@ public final class socketAcceptor implements XAcceptor {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(
socketAcceptor.class.getName(), __serviceName, regKey);
}
/**
* Accepts a connection request via the described socket.
*

View File

@ -88,21 +88,6 @@ public final class socketConnector implements XConnector {
: null;
}
/**
* Writes the service information into the given registry key.
*
* <p>This method is called by the <code>JavaLoader</code>.</p>
*
* @param regKey the registry key.
* @return <code>true</code> if the operation succeeded.
*
* @see com.sun.star.comp.loader.JavaLoader
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return FactoryHelper.writeRegistryServiceInfo(
socketConnector.class.getName(), __serviceName, regKey);
}
/**
* Connects via the described socket to a waiting server.
*

View File

@ -39,6 +39,7 @@
#include <com/sun/star/util/Color.idl>
#endif
#include <com/sun/star/awt/XItemList.idl>
//=============================================================================
@ -225,6 +226,11 @@ published service UnoControlComboBoxModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
/** allows mmanipulating the list of items in the combo box more fine-grained than the
<member>StringItemList</member> property.
*/
[optional] interface XItemList;
};
//=============================================================================

View File

@ -213,8 +213,19 @@ published service UnoControlListBoxModel
/** allows mmanipulating the list of items in the list box more fine-grained than the
<member>StringItemList</member> property.
@since OOo 3.3
*/
[optional] interface XItemList;
/** specifies where an item separator - a horizontal line - is drawn.
<p>If this is not <NULL/>, then a horizontal line will be drawn between the item at the given position,
and the following item.</p>
@since OOo 3.3
*/
[optional, property, maybevoid] short ItemSeparatorPos;
};
//=============================================================================

View File

@ -40,7 +40,13 @@ module com { module sun { module star { module configuration {
*/
interface XUpdate {
void insertExtensionXcsFile([in] boolean shared, [in] string fileUri);
void insertExtensionXcuFile([in] boolean shared, [in] string fileUri);
void removeExtensionXcuFile([in] string fileUri);
// fileUri must exactly match corresponding insertExtensionXcuFile
// argument
void insertModificationXcuFile(
[in] string fileUri, [in] sequence< string > includedPaths,
[in] sequence< string > excludedPaths);

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: VersionException.idl,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: VersionException.idl,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: KeyUsage.idl,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XLibraryContainer2.idl,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify

View File

@ -49,10 +49,8 @@ IDLFILES=\
XPersistentLibraryContainer.idl\
XStorageBasedLibraryContainer.idl\
ModuleSizeExceededRequest.idl\
XVBACompat.idl\
XVBAModuleInfo.idl\
ModuleInfo.idl\
ModuleType.idl\
ModuleType.idl
# ------------------------------------------------------------------

View File

@ -0,0 +1,140 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_VBAEventId_idl__
#define __com_sun_star_script_vba_VBAEventId_idl__
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
/** Constants used to identify VBA document events.
<p>If one of these events is fired, a specific VBA macro in a specific
document code module will be executed.</p>
<p>Each event expects some specific arguments to be passed to
<member>XVBAEventProcessor::processVbaEvent</member>.</p>
@see XVBAEventProcessor
*/
constants VBAEventId
{
//=========================================================================
/** An identifier not corresponding to any VBA document event. */
const long NO_EVENT = -1;
//=========================================================================
// Global events (identifiers from 1 to 999)
/** New document opened from template. No arguments. */
const long AUTO_NEW = 1;
/** Document opened (loaded). No arguments. */
const long AUTO_OPEN = 2;
/** Document about to be closed. No arguments. */
const long AUTO_CLOSE = 3;
/** Application start. No arguments. */
const long AUTO_EXEC = 4;
/** Application exit. No arguments. */
const long AUTO_EXIT = 5;
//=========================================================================
// MS Word (identifiers from 1001 to 1999)
/** New text document opened from template. No arguments. */
const long DOCUMENT_NEW = 1001;
/** Text document opened (loaded). No arguments. */
const long DOCUMENT_OPEN = 1002;
/** Document about to be closed. No arguments. */
const long DOCUMENT_CLOSE = 1003;
//=========================================================================
// MS Excel (identifiers from 2001 to 2999)
//-------------------------------------------------------------------------
// document events (2001-2099)
/** Document activated. No arguments. */
const long WORKBOOK_ACTIVATE = 2001;
/** Document deactivated. No arguments. */
const long WORKBOOK_DEACTIVATE = 2002;
/** Document opened (loaded). No arguments. */
const long WORKBOOK_OPEN = 2003;
/** Document about to be closed. Arguments: [out] boolean bCancel. */
const long WORKBOOK_BEFORECLOSE = 2004;
/** Document about to be printed. Arguments: [out] boolean bCancel. */
const long WORKBOOK_BEFOREPRINT = 2005;
/** Document about to be saved. Arguments: boolean bSaveAs, [out] boolean bCancel. */
const long WORKBOOK_BEFORESAVE = 2006;
/** Document has been saved. Arguments: boolean bSuccess. */
const long WORKBOOK_AFTERSAVE = 2007;
/** New sheet inserted. Arguments: short nSheet. */
const long WORKBOOK_NEWSHEET = 2008;
/** Document window has been activated. No arguments. */
const long WORKBOOK_WINDOWACTIVATE = 2009;
/** Document window has been deactivated. No arguments. */
const long WORKBOOK_WINDOWDEACTIVATE = 2010;
/** Document window has been resized. No arguments. */
const long WORKBOOK_WINDOWRESIZE = 2011;
//-------------------------------------------------------------------------
// sheet events (2101-2199)
/** Worksheet has been activated (made visible). Arguments: short nSheet. */
const long WORKSHEET_ACTIVATE = 2101;
/** Worksheet has been activated (made visible). Arguments: short nSheet. */
const long WORKSHEET_DEACTIVATE = 2102;
/** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */
const long WORKSHEET_BEFOREDOUBLECLICK = 2103;
/** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */
const long WORKSHEET_BEFORERIGHTCLICK = 2104;
/** Cells in sheet have been recalculated. Arguments: short nSheet. */
const long WORKSHEET_CALCULATE = 2105;
/** Cells in sheet have been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */
const long WORKSHEET_CHANGE = 2106;
/** Selection in sheet has been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */
const long WORKSHEET_SELECTIONCHANGE = 2107;
/** Hyperlink has been clicked. Arguments: XCell aCell. */
const long WORKSHEET_FOLLOWHYPERLINK = 2108;
//=========================================================================
/** Implementations are allowed to use identifiers above this value for any
internal purpose. */
const long USERDEFINED_START = 1000000;
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -0,0 +1,49 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_VBAEventProcessor_idl__
#define __com_sun_star_script_vba_VBAEventProcessor_idl__
#include <com/sun/star/script/vba/XVBAEventProcessor.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
service VBAEventProcessor : XVBAEventProcessor
{
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -0,0 +1,50 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__
#define __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__
#include <com/sun/star/script/vba/VBAEventProcessor.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
service VBASpreadsheetEventProcessor
{
service VBAEventProcessor;
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -0,0 +1,50 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_VBATextEventProcessor_idl__
#define __com_sun_star_script_vba_VBATextEventProcessor_idl__
#include <com/sun/star/script/vba/VBAEventProcessor.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
service VBATextEventProcessor
{
service VBAEventProcessor;
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XLibraryContainer.idl,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@ -27,23 +24,27 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_XVBACompat_idl__
#define __com_sun_star_script_XVBACompat_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#ifndef __com_sun_star_script_vba_XVBACompatibility_idl__
#define __com_sun_star_script_vba_XVBACompatibility_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
//=============================================================================
module com { module sun { module star { module script {
module com { module sun { module star { module script { module vba {
interface XVBACompat: com::sun::star::uno::XInterface
interface XVBACompatibility
{
//-------------------------------------------------------------------------
[attribute] boolean VBACompatibilityMode;
//-------------------------------------------------------------------------
};
}; }; }; }; };
//=============================================================================
[attribute ] boolean VBACompatModeOn;
}; }; }; };
};
#endif

View File

@ -0,0 +1,106 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_XVBAEventProcessor_idl__
#define __com_sun_star_script_vba_XVBAEventProcessor_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/script/provider/ScriptFrameworkErrorException.idl>
#include <com/sun/star/util/VetoException.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
/** Executes VBA event handlers.
*/
interface XVBAEventProcessor
{
//-------------------------------------------------------------------------
/** Returns whether a VBA event handler exists.
@param nEventId
The identifier of the event. Must be a constant from <type>VBAEventId</type>.
@param aArgs
Additional arguments needed to identify some event handlers, e.g. a
sheet index for spreadsheet events.
@return
<TRUE/>, if the VBA event handler exists.
@throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
if the passed event identifier is not supported, or if the passed
specifier is required but invalid.
**/
boolean hasVbaEventHandler( [in] long nEventId, [in] sequence< any > aArgs )
raises (::com::sun::star::lang::IllegalArgumentException);
//-------------------------------------------------------------------------
/** Executes a VBA event handler.
@param nEventId
The identifier of the event. Must be a constant from <type>VBAEventId</type>.
@param aArgs
The input arguments needed to create the argument list of the VBA
event handler.
@throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
if the passed event identifier is not supported, or if the passed
arguments do not conform to the arguments expected by the specified
event.
@throws <type scope="::com::sun::star::script::provider">ScriptFrameworkErrorException</type>
if the VBA event handler could not be invoked. Reasons may be, that
handling of VBA events is not enabled, that the VBA event handler
macro has not been found, or that the execution of the macro has
been aborted with an error.
@throws <type scope="::com::sun::star::util">VetoException</type>
if the VBA event handler has indicated to veto the event.
**/
void processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs )
raises (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::script::provider::ScriptFrameworkErrorException,
::com::sun::star::util::VetoException);
//-------------------------------------------------------------------------
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XLibraryContainer.idl,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@ -27,47 +24,52 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_XVBACompat_idl__
#define __com_sun_star_script_XVBACompat_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#ifndef __com_sun_star_script_vba_XVBAModuleInfo_idl__
#define __com_sun_star_script_vba_XVBAModuleInfo_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_script_ModuleInfo_idl__
#include <com/sun/star/script/ModuleInfo.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
#endif
#ifndef __com_sun_star_container_ElementExistException_idl__
#include <com/sun/star/container/ElementExistException.idl>
#endif
#ifndef __com_sun_star_lang_WrappedTargetException_idl__
#include <com/sun/star/lang/WrappedTargetException.idl>
#endif
#ifndef __com_sun_star_container_NoSuchElementException_idl__
#include <com/sun/star/container/NoSuchElementException.idl>
#endif
//=============================================================================
module com { module sun { module star { module script {
module com { module sun { module star { module script { module vba {
interface XVBAModuleInfo: com::sun::star::uno::XInterface
interface XVBAModuleInfo
{
//-------------------------------------------------------------------------
com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName )
com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName )
raises( com::sun::star::container::NoSuchElementException,
com::sun::star::lang::WrappedTargetException );
boolean hasModuleInfo( [in] string ModuleName );
//-------------------------------------------------------------------------
boolean hasModuleInfo( [in] string ModuleName );
//-------------------------------------------------------------------------
void insertModuleInfo( [in] string ModuleName,
[in] com::sun::star::script::ModuleInfo ModuleInfo )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::container::ElementExistException,
com::sun::star::lang::WrappedTargetException );
//-------------------------------------------------------------------------
void removeModuleInfo( [in] string ModuleName )
raises( com::sun::star::container::NoSuchElementException,
com::sun::star::lang::WrappedTargetException );
}; }; }; };
//-------------------------------------------------------------------------
};
}; }; }; }; };
//=============================================================================
#endif

View File

@ -0,0 +1,52 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..$/..$/..$/..$/..
PRJNAME=offapi
TARGET=cssscriptvba
PACKAGE=com$/sun$/star$/script$/vba
# --- Settings -----------------------------------------------------
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# ------------------------------------------------------------------------
IDLFILES=\
VBAEventId.idl \
VBAEventProcessor.idl \
VBASpreadsheetEventProcessor.idl \
VBATextEventProcessor.idl \
XVBACompatibility.idl \
XVBAEventProcessor.idl \
XVBAModuleInfo.idl
# ------------------------------------------------------------------
.INCLUDE : target.mk
.INCLUDE : $(PRJ)$/util$/target.pmk

View File

@ -156,6 +156,14 @@ published service DataPilotSourceDimension
*/
[property] sequence< com::sun::star::sheet::TableFilterField > Filter;
//-------------------------------------------------------------------------
/** contains flags that control the usage of the dimension.
@see com::sun::star::sheet::DimensionFlags
*/
[readonly, property, optional] long Flags;
};
//=============================================================================

View File

@ -0,0 +1,74 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_sheet_DimensionFlags_idl__
#define __com_sun_star_sheet_DimensionFlags_idl__
//=============================================================================
module com { module sun { module star { module sheet {
//=============================================================================
/** used to specify flags for a dimension in a data pilot source.
@see com::sun::star::sheet::DataPilotSourceDimension
*/
published constants DimensionFlags
{
//-------------------------------------------------------------------------
/** The dimension cannot be used in column orientation.
*/
const long NO_COLUMN_ORIENTATION = 1;
//-------------------------------------------------------------------------
/** The dimension cannot be used in row orientation.
*/
const long NO_ROW_ORIENTATION = 2;
//-------------------------------------------------------------------------
/** The dimension cannot be used in page orientation.
*/
const long NO_PAGE_ORIENTATION = 4;
//-------------------------------------------------------------------------
/** The dimension cannot be used in data orientation.
*/
const long NO_DATA_ORIENTATION = 8;
};
//=============================================================================
}; }; }; };
#endif

View File

@ -122,6 +122,7 @@ IDLFILES=\
DatabaseRange.idl\
DatabaseRanges.idl\
DatabaseRangesEnumeration.idl\
DimensionFlags.idl\
DocumentSettings.idl\
ExternalDocLink.idl\
ExternalDocLinks.idl\

2
offapi/com/sun/star/text/PrintPreviewSettings.idl Normal file → Executable file
View File

@ -39,6 +39,8 @@
//=============================================================================
/** These properties describe the printing of the content of a text document.
*
* @deprecated since OOo 3.3
*/
published service PrintPreviewSettings
{

View File

@ -3,6 +3,7 @@ oa offapi usr1 - all oa_mkout NULL
oa offapi\com\sun\star\script nmake - all oa_script oa_embed NULL
oa offapi\com\sun\star\script\browse nmake - all oa_sfbrowse NULL
oa offapi\com\sun\star\script\provider nmake - all oa_sfprovider NULL
oa offapi\com\sun\star\script\vba nmake - all oa_script_vba NULL
oa offapi\com\sun\star\auth nmake - all oa_auth NULL
oa offapi\com\sun\star\accessibility nmake - all oa_accessibility oa_awt NULL
oa offapi\com\sun\star\awt nmake - all oa_awt NULL
@ -21,10 +22,10 @@ oa offapi\com\sun\star\datatransfer\dnd nmake - all oa_datatrans_dnd oa_awt NULL
oa offapi\com\sun\star\deployment nmake - all oa_deployment oa_ucb oa_xml_input NULL
oa offapi\com\sun\star\deployment\test nmake - all oa_deploymenttest oa_ucb NULL
oa offapi\com\sun\star\deployment\ui nmake - all oa_deployment_ui oa_awt oa_ui_dialogs NULL
oa offapi\com\sun\star\embed nmake - all oa_embed NULL
oa offapi\com\sun\star\document nmake - all oa_docu oa_embed NULL
oa offapi\com\sun\star\drawing nmake - all oa_draw NULL
oa offapi\com\sun\star\drawing\framework nmake - all oa_draw_framework NULL
oa offapi\com\sun\star\embed nmake - all oa_embed NULL
oa offapi\com\sun\star\form nmake - all oa_form oa_inspection NULL
oa offapi\com\sun\star\form\component nmake - all oa_fcomp oa_form oa_form_submission NULL
oa offapi\com\sun\star\form\inspection nmake - all oa_finsp oa_fcomp oa_inspection NULL
@ -105,4 +106,4 @@ oa offapi\com\sun\star\rendering nmake - all oa_rendering oa_geometry NU
oa offapi\com\sun\star\rdf nmake - all oa_rdf oa_datatransfer oa_text NULL
oa offapi\com\sun\star\office nmake - all oa_office oa_text NULL
oa offapi\drafts\com\sun\star\form nmake - all oa_drafts_form NULL
oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL
oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_script_vba oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL

View File

@ -69,6 +69,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\scanner
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools
@ -185,6 +186,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\drafts\com\sun\star\form
..\com\sun\star\script\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script
..\com\sun\star\script\browse\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse
..\com\sun\star\script\provider\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider
..\com\sun\star\script\vba\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba
..\com\sun\star\sdb\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb
..\com\sun\star\sdb\application\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application
..\com\sun\star\sdb\tools\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools

View File

@ -95,6 +95,7 @@ UNOIDLDBFILES= \
$(UCR)$/cssdomevents.db \
$(UCR)$/cssscanner.db \
$(UCR)$/cssscript.db \
$(UCR)$/cssscriptvba.db \
$(UCR)$/csssdb.db \
$(UCR)$/csssdbc.db \
$(UCR)$/csssdbcx.db \

View File

@ -72,6 +72,7 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbc
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbcx
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\style
@ -271,6 +272,8 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf
..\%__SRC%\inc\offuh\com\sun\star\scanner\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\script\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\script\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\smarttags\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags\*.hdl

View File

@ -9,12 +9,11 @@ mkdir: %_DEST%\lib%_EXT%\pyuno
..\%__SRC%\lib\unohelper.py %_DEST%\lib%_EXT%\pyuno\unohelper.py
..\%__SRC%\lib\pythonloader.py %_DEST%\lib%_EXT%\pyuno\pythonloader.py
..\%__SRC%\lib\uno.py %_DEST%\lib%_EXT%\pyuno\uno.py
..\%__SRC%\lib\pyuno_services.rdb %_DEST%\bin%_EXT%\pyuno_services.rdb
..\%__SRC%\misc\pythonloader.component %_DEST%\xml\pythonloader.component
..\%__SRC%\bin\unohelper.py %_DEST%\bin%_EXT%\pyuno\unohelper.py
..\%__SRC%\bin\pythonloader.py %_DEST%\bin%_EXT%\pyuno\pythonloader.py
..\%__SRC%\bin\uno.py %_DEST%\bin%_EXT%\pyuno\uno.py
..\%__SRC%\bin\pyuno_services.rdb %_DEST%\bin%_EXT%\pyuno_services.rdb
..\%__SRC%\bin\pyuno.pyd %_DEST%\bin%_EXT%\pyuno.pyd
..\%__SRC%\bin\pyuno.dll %_DEST%\bin%_EXT%\pyuno.dll
..\%__SRC%\bin\pythonl*.dll %_DEST%\bin%_EXT%\pythonl*.dll

View File

@ -73,40 +73,22 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)
SLOFILES= $(SLO)$/pyuno_loader.obj
#COMPONENTS= \
# tcv \
# inv \
# corefl \
# insp \
# invadp \
# proxyfac \
# pythonloader.uno \
COMPONENTS= \
stocservices.uno \
invocation.uno \
introspection.uno \
invocadapt.uno \
proxyfac.uno \
reflection.uno \
.$/pythonloader.uno
# --- Targets ------------------------------------------------------
ALL : ALLTAR \
$(DLLDEST)$/pythonloader.py \
$(DLLDEST)$/pyuno_services.rdb
$(DLLDEST)$/pythonloader.py
.ENDIF # L10N_framework
.INCLUDE : target.mk
.IF "$(L10N_framework)"==""
$(DLLDEST)$/%.py: %.py
cp $? $@
$(DLLDEST)$/pyuno_services.rdb : makefile.mk $(DLLDEST)$/$(DLLPRE)$(TARGET)$(DLLPOST)
-rm -f $@ $(DLLDEST)$/pyuno_services.tmp $(DLLDEST)$/pyuno_services.rdb
cd $(DLLDEST) && $(REGCOMP) -register -r pyuno_services.tmp -wop $(foreach,i,$(COMPONENTS) -c $(i))
cd $(DLLDEST) && mv pyuno_services.tmp pyuno_services.rdb
.ENDIF # L10N_framework
ALLTAR : $(MISC)/pythonloader.component
$(MISC)/pythonloader.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt pythonloader.component
$(XSLTPROC) --nonet --stringparam uri \
'vnd.sun.star.expand:$$OOO_BASE_DIR/program/$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt pythonloader.component

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="org.openoffice.comp.pyuno.Loader">
<service name="com.sun.star.loader.Python"/>
</implementation>
</component>

View File

@ -229,12 +229,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -15,3 +15,6 @@
..\%__SRC%\lib\dynamicloader.uno.so %_DEST%\lib%_EXT%\dynamicloader.uno.so
..\%__SRC%\lib\uuresolver.uno.so %_DEST%\lib%_EXT%\uuresolver.uno.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*
..\%__SRC%\misc\bridgefac.component %_DEST%\xml%_EXT%\bridgefac.component
..\%__SRC%\misc\remotebridge.component %_DEST%\xml%_EXT%\remotebridge.component
..\%__SRC%\misc\uuresolver.component %_DEST%\xml%_EXT%\uuresolver.component

View File

@ -62,3 +62,11 @@ DEF1NAME= $(SHL1TARGET)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
ALLTAR : $(MISC)/remotebridge.component
$(MISC)/remotebridge.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt remotebridge.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt remotebridge.component

View File

@ -457,12 +457,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.remotebridges.Bridge.various">
<service name="com.sun.star.bridge.Bridge"/>
<service name="com.sun.star.bridge.IiopBridge"/>
<service name="com.sun.star.bridge.UrpBridge"/>
</implementation>
</component>

View File

@ -381,34 +381,6 @@ extern "C" {
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
sal_Bool SAL_CALL component_writeInfo(XMultiServiceFactory *, XRegistryKey * pRegistryKey) {
sal_Bool bRes = sal_False;
if (pRegistryKey) {
try {
OUString x = OUString::createFromAscii("/");
x += ::dynamic_loader::DynamicLoader::implname;
x += OUString::createFromAscii("/UNO/SERVICES");
Reference<XRegistryKey> xNewKey(pRegistryKey->createKey(x));
const Sequence<OUString> rSNL = ::dynamic_loader::DynamicLoader::getSupportedServiceNames_Static();
const OUString * pArray = rSNL.getConstArray();
for (sal_Int32 nPos = rSNL.getLength(); nPos--;)
xNewKey->createKey(pArray[nPos]);
bRes = sal_True;
}
catch (InvalidRegistryException &) {
OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
}
}
return bRes;
}
void * SAL_CALL component_getFactory(const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, XRegistryKey *) {
void * pRet = 0;

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.remotebridges.BridgeFactory">
<service name="com.sun.star.bridge.BridgeFactory"/>
</implementation>
</component>

View File

@ -481,12 +481,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -64,3 +64,10 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
ALLTAR : $(MISC)/bridgefac.component
$(MISC)/bridgefac.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
bridgefac.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt bridgefac.component

View File

@ -62,3 +62,11 @@ DEF1NAME= $(SHL1TARGET)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
ALLTAR : $(MISC)/uuresolver.component
$(MISC)/uuresolver.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
uuresolver.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt uuresolver.component

View File

@ -239,12 +239,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--**********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.bridge.UnoUrlResolver">
<service name="com.sun.star.bridge.UnoUrlResolver"/>
</implementation>
</component>

View File

@ -31,6 +31,7 @@
#include <cstdlib>
#include <iostream>
#include "preextstl.h"
#include "cppunit/CompilerOutputter.h"
#include "cppunit/TestResult.h"
#include "cppunit/TestResultCollector.h"
@ -38,6 +39,7 @@
#include "cppunit/extensions/TestFactoryRegistry.h"
#include "cppunit/plugin/PlugInManager.h"
#include "cppunit/portability/Stream.h"
#include "postextstl.h"
#include "osl/thread.h"
#include "rtl/process.h"
#include "rtl/string.hxx"

View File

@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS = TRUE
.INCLUDE: settings.mk
#building with stlport, but cppunit was not built with stlport
.IF "$(USE_SYSTEM_STL)"!="YES"
.IF "$(SYSTEM_CPPUNIT)"=="YES"
CFLAGSCXX+=-DADAPT_EXT_STL
.ENDIF
.ENDIF
CFLAGSCXX += $(CPPUNIT_CFLAGS)
OBJFILES = $(APP1OBJS)

Some files were not shown because too many files have changed in this diff Show More