replace double-checked locking patterns with thread safe local statics

Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323
Reviewed-on: https://gerrit.libreoffice.org/62839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2018-11-04 14:46:01 +01:00
parent a2058e7516
commit e128f78069
40 changed files with 472 additions and 929 deletions
@@ -225,17 +225,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
+2 -11
View File
@@ -317,17 +317,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, nullptr );
// avoiding locked counts
static RTTI * s_rtti = nullptr;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = s_rtti->getRTTI( reinterpret_cast<typelib_CompoundTypeDescription *>(pTypeDescr) );
static RTTI rtti_data;
rtti = rtti_data.getRTTI(reinterpret_cast<typelib_CompoundTypeDescription*>(pTypeDescr));
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -223,17 +223,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -262,17 +262,8 @@ namespace CPPU_CURRENT_NAMESPACE
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -236,17 +236,8 @@ namespace CPPU_CURRENT_NAMESPACE
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -222,17 +222,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -239,17 +239,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, nullptr );
// avoiding locked counts
static RTTI * s_rtti = nullptr;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = s_rtti->getRTTI(reinterpret_cast<typelib_CompoundTypeDescription *>(pTypeDescr));
static RTTI rtti_data;
rtti = rtti_data.getRTTI(reinterpret_cast<typelib_CompoundTypeDescription*>(pTypeDescr));
TYPELIB_DANGER_RELEASE( pTypeDescr );
#if !defined(ANDROID) // see TODO above
assert(rtti && "### no rtti for throwing exception!");
@@ -236,17 +236,8 @@ namespace CPPU_CURRENT_NAMESPACE
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -233,17 +233,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -234,17 +234,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -224,17 +224,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -222,17 +222,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -223,17 +223,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -223,17 +223,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();
@@ -234,17 +234,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti);
if (! rtti)
@@ -234,17 +234,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti);
if (! rtti)
@@ -317,17 +317,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, nullptr );
// avoiding locked counts
static RTTI * s_rtti = nullptr;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = s_rtti->getRTTI( reinterpret_cast<typelib_CompoundTypeDescription *>(pTypeDescr) );
static RTTI rtti_data;
rtti = rtti_data.getRTTI(reinterpret_cast<typelib_CompoundTypeDescription*>(pTypeDescr));
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -236,17 +236,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti);
if (! rtti)
@@ -233,17 +233,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
static RTTI * s_rtti = 0;
if (! s_rtti)
{
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_rtti)
{
static RTTI rtti_data;
s_rtti = &rtti_data;
}
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
static RTTI rtti_data;
rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
@@ -384,15 +384,7 @@ ExceptionInfos::~ExceptionInfos() throw ()
void * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTypeDescr ) throw ()
{
static ExceptionInfos * s_pInfos = 0;
if (! s_pInfos)
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pInfos)
{
s_pInfos = new ExceptionInfos();
}
}
static ExceptionInfos* s_pInfos = new ExceptionInfos();
assert( pTypeDescr &&
(pTypeDescr->eTypeClass == typelib_TypeClass_STRUCT ||
@@ -427,15 +419,7 @@ void * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTypeDescr ) thro
type_info * msci_getRTTI( OUString const & rUNOname )
{
static RTTInfos * s_pRTTIs = 0;
if (! s_pRTTIs)
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pRTTIs)
{
s_pRTTIs = new RTTInfos();
}
}
static RTTInfos* s_pRTTIs = new RTTInfos();
return s_pRTTIs->getRTTI( rUNOname );
}
@@ -681,19 +681,13 @@ ExceptionInfos::ExceptionInfos() throw ()
RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw ()
{
static ExceptionInfos * s_pInfos = nullptr;
if (! s_pInfos)
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pInfos)
{
SYSTEM_INFO systemInfo;
GetSystemInfo( &systemInfo );
allocationGranularity = systemInfo.dwAllocationGranularity;
static ExceptionInfos* s_pInfos = []() {
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
allocationGranularity = systemInfo.dwAllocationGranularity;
s_pInfos = new ExceptionInfos();
}
}
return new ExceptionInfos();
}();
assert( pTD &&
(pTD->eTypeClass == typelib_TypeClass_STRUCT ||
@@ -726,29 +720,13 @@ RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw
type_info * mscx_getRTTI(
OUString const & rUNOname )
{
static RTTInfos * s_pRTTIs = nullptr;
if (! s_pRTTIs)
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pRTTIs)
{
s_pRTTIs = new RTTInfos();
}
}
static RTTInfos* s_pRTTIs = new RTTInfos();
return s_pRTTIs->getRTTI( rUNOname );
}
int mscx_getRTTI_len(
OUString const & rUNOname)
{
static RTTInfos * s_pRTTIs = nullptr;
if (!s_pRTTIs)
{
MutexGuard aGuard(Mutex::getGlobalMutex());
if (!s_pRTTIs)
{
s_pRTTIs = new RTTInfos();
}
}
static RTTInfos* s_pRTTIs = new RTTInfos();
return s_pRTTIs->getRTTI_len(rUNOname);
}
+11 -29
View File
@@ -38,39 +38,21 @@
namespace {
#if (defined(__GNUC__) && defined(__APPLE__))
static OUString * s_pStaticOidPart = nullptr;
#endif
const OUString & cppu_cppenv_getStaticOIdPart()
{
#if ! (defined(__GNUC__) && defined(__APPLE__))
static OUString * s_pStaticOidPart = nullptr;
#endif
if (! s_pStaticOidPart)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (! s_pStaticOidPart)
static OUString s_aStaticOidPart = []() {
OUStringBuffer aRet(64);
aRet.append("];");
// good guid
sal_uInt8 ar[16];
::rtl_getGlobalProcessId(ar);
for (unsigned char i : ar)
{
OUStringBuffer aRet( 64 );
aRet.append( "];" );
// good guid
sal_uInt8 ar[16];
::rtl_getGlobalProcessId( ar );
for (unsigned char i : ar)
{
aRet.append( static_cast<sal_Int32>(i), 16 );
}
#if (defined(__GNUC__) && defined(__APPLE__))
s_pStaticOidPart = new OUString( aRet.makeStringAndClear() );
#else
static OUString s_aStaticOidPart(
aRet.makeStringAndClear() );
s_pStaticOidPart = &s_aStaticOidPart;
#endif
aRet.append(static_cast<sal_Int32>(i), 16);
}
}
return *s_pStaticOidPart;
return aRet.makeStringAndClear();
}();
return s_aStaticOidPart;
}
}
+13 -16
View File
@@ -44,22 +44,19 @@ typelib_TypeDescriptionReference * g_pVoidType = nullptr;
void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * pDestType )
{
// init queryInterface() td
static typelib_TypeDescription * g_pQITD = nullptr;
if (nullptr == g_pQITD)
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (nullptr == g_pQITD)
{
typelib_TypeDescriptionReference * type_XInterface =
* typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
typelib_InterfaceTypeDescription * pTXInterfaceDescr = nullptr;
TYPELIB_DANGER_GET( reinterpret_cast<typelib_TypeDescription **>(&pTXInterfaceDescr), type_XInterface );
assert(pTXInterfaceDescr->ppAllMembers);
typelib_typedescriptionreference_getDescription(
&g_pQITD, pTXInterfaceDescr->ppAllMembers[ 0 ] );
TYPELIB_DANGER_RELEASE( &pTXInterfaceDescr->aBase );
}
}
static typelib_TypeDescription* g_pQITD = []() {
typelib_TypeDescriptionReference* type_XInterface
= *typelib_static_type_getByTypeClass(typelib_TypeClass_INTERFACE);
typelib_InterfaceTypeDescription* pTXInterfaceDescr = nullptr;
TYPELIB_DANGER_GET(reinterpret_cast<typelib_TypeDescription**>(&pTXInterfaceDescr),
type_XInterface);
assert(pTXInterfaceDescr->ppAllMembers);
typelib_TypeDescription* pQITD = nullptr;
typelib_typedescriptionreference_getDescription(&pQITD,
pTXInterfaceDescr->ppAllMembers[0]);
TYPELIB_DANGER_RELEASE(&pTXInterfaceDescr->aBase);
return pQITD;
}();
uno_Any aRet, aExc;
uno_Any * pExc = &aExc;
+1 -17
View File
@@ -51,23 +51,7 @@ namespace cppu
static Bootstrap const & get_unorc()
{
static rtlBootstrapHandle s_bstrap = nullptr;
if (! s_bstrap)
{
OUString iniName(getUnoIniUri());
rtlBootstrapHandle bstrap = rtl_bootstrap_args_open( iniName.pData );
ClearableMutexGuard guard( Mutex::getGlobalMutex() );
if (s_bstrap)
{
guard.clear();
rtl_bootstrap_args_close( bstrap );
}
else
{
s_bstrap = bstrap;
}
}
static rtlBootstrapHandle s_bstrap = rtl_bootstrap_args_open(getUnoIniUri().pData);
return *reinterpret_cast<Bootstrap const *>(&s_bstrap);
}
+8 -13
View File
@@ -38,22 +38,17 @@ namespace {
#ifndef ANDROID
OUString get_this_libpath() {
static OUString s_uri;
if (s_uri.isEmpty()) {
static OUString s_uri = []() {
OUString uri;
osl::Module::getUrlFromAddress(
reinterpret_cast< oslGenericFunction >(get_this_libpath), uri);
osl::Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(get_this_libpath), uri);
sal_Int32 i = uri.lastIndexOf('/');
if (i == -1) {
throw css::uno::DeploymentException(
"URI " + uri + " is expected to contain a slash");
if (i == -1)
{
throw css::uno::DeploymentException("URI " + uri + " is expected to contain a slash");
}
uri = uri.copy(0, i);
osl::MutexGuard guard(osl::Mutex::getGlobalMutex());
if (s_uri.isEmpty()) {
s_uri = uri;
}
}
return uri.copy(0, i);
}();
return s_uri;
}
#endif
+12 -18
View File
@@ -202,26 +202,20 @@ void fillStruct(
OUString getLibDir()
{
static OUString *pLibDir;
if( !pLibDir )
{
osl::MutexGuard guard( osl::Mutex::getGlobalMutex() );
if( ! pLibDir )
{
static OUString libDir;
static OUString sLibDir = []() {
OUString libDir;
// workarounds the $(ORIGIN) until it is available
if( Module::getUrlFromAddress(
reinterpret_cast< oslGenericFunction >(getLibDir), libDir ) )
{
libDir = libDir.copy( 0, libDir.lastIndexOf('/') );
OUString name ( "PYUNOLIBDIR" );
rtl_bootstrap_set( name.pData, libDir.pData );
}
pLibDir = &libDir;
// workarounds the $(ORIGIN) until it is available
if (Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getLibDir), libDir))
{
libDir = libDir.copy(0, libDir.lastIndexOf('/'));
OUString name("PYUNOLIBDIR");
rtl_bootstrap_set(name.pData, libDir.pData);
}
}
return *pLibDir;
return libDir;
}();
return sLibDir;
}
void raisePySystemException( const char * exceptionType, const OUString & message )
+11 -21
View File
@@ -227,10 +227,7 @@ static void getExecutableDirectory_Impl(rtl_uString ** ppDirURL)
static OUString & getIniFileName_Impl()
{
osl::MutexGuard guard(osl::Mutex::getGlobalMutex());
static OUString *pStaticName = nullptr;
if (!pStaticName)
{
static OUString aStaticName = []() {
OUString fileName;
#if defined IOS
@@ -284,14 +281,10 @@ static OUString & getIniFileName_Impl()
}
#endif
static OUString theFileName;
if (fileName.getLength())
theFileName = fileName;
return fileName;
}();
pStaticName = &theFileName;
}
return *pStaticName;
return aStaticName;
}
// ensure the given file url has no final slash
@@ -395,20 +388,17 @@ namespace {
Bootstrap_Impl * get_static_bootstrap_handle()
{
osl::MutexGuard guard(osl::Mutex::getGlobalMutex());
static Bootstrap_Impl * s_handle = nullptr;
if (!s_handle)
{
static Bootstrap_Impl* s_handle = []() {
OUString iniName(getIniFileName_Impl());
s_handle = static_cast< Bootstrap_Impl * >(
rtl_bootstrap_args_open(iniName.pData));
if (!s_handle)
Bootstrap_Impl* that = static_cast<Bootstrap_Impl*>(rtl_bootstrap_args_open(iniName.pData));
if (!that)
{
Bootstrap_Impl * that = new Bootstrap_Impl( iniName );
that = new Bootstrap_Impl(iniName);
++that->_nRefCount;
s_handle = that;
}
}
return that;
}();
return s_handle;
}
+8 -9
View File
@@ -93,19 +93,18 @@ extern "C" void SAL_CALL rtl_createUuid(sal_uInt8 *pTargetUUID ,
SAL_UNUSED_PARAMETER sal_Bool)
{
{
osl::MutexGuard g(osl::Mutex::getGlobalMutex());
static rtlRandomPool pool = nullptr;
if (!pool)
{
pool = rtl_random_createPool();
if (!pool)
static rtlRandomPool pool = []() {
rtlRandomPool aPool = rtl_random_createPool();
if (!aPool)
{
abort();
// only possible way to signal failure here (rtl_createUuid
// being part of a fixed C API)
// only possible way to signal failure here (rtl_createUuid
// being part of a fixed C API)
}
}
return aPool;
}();
osl::MutexGuard g(osl::Mutex::getGlobalMutex());
if (rtl_random_getBytes(pool, pTargetUUID, 16) != rtl_Random_E_None)
{
abort();
+26 -37
View File
@@ -970,76 +970,65 @@ void Invocation_Impl::fillInfoForMethod
// XTypeProvider
Sequence< Type > SAL_CALL Invocation_Impl::getTypes()
{
static Sequence< Type > const * s_pTypes = nullptr;
if (! s_pTypes)
{
Sequence< Type > types( 4 + 10 );
Type * pTypes = types.getArray();
static Sequence<Type> s_types = [this]() {
Sequence<Type> types(4 + 10);
Type* pTypes = types.getArray();
sal_Int32 n = 0;
pTypes[ n++ ] = cppu::UnoType<XTypeProvider>::get();
pTypes[ n++ ] = cppu::UnoType<XWeak>::get();
pTypes[ n++ ] = cppu::UnoType<XInvocation>::get();
pTypes[ n++ ] = cppu::UnoType<XMaterialHolder>::get();
pTypes[n++] = cppu::UnoType<XTypeProvider>::get();
pTypes[n++] = cppu::UnoType<XWeak>::get();
pTypes[n++] = cppu::UnoType<XInvocation>::get();
pTypes[n++] = cppu::UnoType<XMaterialHolder>::get();
// Invocation does not support XExactName if direct object supports
// XInvocation, but not XExactName.
if ((_xDirect.is() && _xENDirect.is()) ||
(!_xDirect.is() && _xENIntrospection.is()))
if ((_xDirect.is() && _xENDirect.is()) || (!_xDirect.is() && _xENIntrospection.is()))
{
pTypes[ n++ ] = cppu::UnoType<XExactName>::get();
pTypes[n++] = cppu::UnoType<XExactName>::get();
}
if( _xNameContainer.is() )
if (_xNameContainer.is())
{
pTypes[ n++ ] = cppu::UnoType<XNameContainer>::get();
pTypes[n++] = cppu::UnoType<XNameContainer>::get();
}
if( _xNameReplace.is() )
if (_xNameReplace.is())
{
pTypes[ n++ ] = cppu::UnoType<XNameReplace>::get();
pTypes[n++] = cppu::UnoType<XNameReplace>::get();
}
if( _xNameAccess.is() )
if (_xNameAccess.is())
{
pTypes[ n++ ] = cppu::UnoType<XNameAccess>::get();
pTypes[n++] = cppu::UnoType<XNameAccess>::get();
}
if (_xIndexContainer.is())
{
pTypes[ n++ ] = cppu::UnoType<XIndexContainer>::get();
pTypes[n++] = cppu::UnoType<XIndexContainer>::get();
}
if (_xIndexReplace.is())
{
pTypes[ n++ ] = cppu::UnoType<XIndexReplace>::get();
pTypes[n++] = cppu::UnoType<XIndexReplace>::get();
}
if (_xIndexAccess.is())
{
pTypes[ n++ ] = cppu::UnoType<XIndexAccess>::get();
pTypes[n++] = cppu::UnoType<XIndexAccess>::get();
}
if (_xEnumerationAccess.is())
{
pTypes[ n++ ] = cppu::UnoType<XEnumerationAccess>::get();
pTypes[n++] = cppu::UnoType<XEnumerationAccess>::get();
}
if (_xElementAccess.is())
{
pTypes[ n++ ] = cppu::UnoType<XElementAccess>::get();
pTypes[n++] = cppu::UnoType<XElementAccess>::get();
}
// Invocation does not support XInvocation2, if direct object supports
// XInvocation, but not XInvocation2.
if ( ( _xDirect.is() && _xDirect2.is()) ||
(!_xDirect.is() && _xIntrospectionAccess.is() ) )
if ((_xDirect.is() && _xDirect2.is()) || (!_xDirect.is() && _xIntrospectionAccess.is()))
{
pTypes[ n++ ] = cppu::UnoType<XInvocation2>::get();
pTypes[n++] = cppu::UnoType<XInvocation2>::get();
}
types.realloc( n );
// store types
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_pTypes)
{
static Sequence< Type > s_types( types );
s_pTypes = &s_types;
}
}
return *s_pTypes;
types.realloc(n);
return types;
}();
return s_types;
}
Sequence< sal_Int8 > SAL_CALL Invocation_Impl::getImplementationId( )
+10 -23
View File
@@ -93,29 +93,16 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface(
typelib_InterfaceTypeDescription * pTypeDescr )
{
// init queryInterface() td
static typelib_TypeDescription * s_pQITD = nullptr;
if (s_pQITD == nullptr)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (s_pQITD == nullptr)
{
typelib_TypeDescription * pTXInterfaceDescr = nullptr;
TYPELIB_DANGER_GET(
&pTXInterfaceDescr,
cppu::UnoType<XInterface>::get().getTypeLibType() );
typelib_TypeDescription * pQITD = nullptr;
typelib_typedescriptionreference_getDescription(
&pQITD, reinterpret_cast< typelib_InterfaceTypeDescription * >(
pTXInterfaceDescr )->ppAllMembers[ 0 ] );
TYPELIB_DANGER_RELEASE( pTXInterfaceDescr );
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
s_pQITD = pQITD;
}
}
else
{
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
static typelib_TypeDescription* s_pQITD = []() {
typelib_TypeDescription* pTXInterfaceDescr = nullptr;
TYPELIB_DANGER_GET(&pTXInterfaceDescr, cppu::UnoType<XInterface>::get().getTypeLibType());
typelib_TypeDescription* pQITD = nullptr;
typelib_typedescriptionreference_getDescription(
&pQITD, reinterpret_cast<typelib_InterfaceTypeDescription*>(pTXInterfaceDescr)
->ppAllMembers[0]);
TYPELIB_DANGER_RELEASE(pTXInterfaceDescr);
return pQITD;
}();
void * args[ 1 ];
args[ 0 ] = &reinterpret_cast< typelib_TypeDescription * >(
+5 -13
View File
@@ -285,20 +285,12 @@ char const * FilePermission::s_actions [] = { "read", "write", "execute", "delet
static OUString const & getWorkingDir()
{
static OUString * s_workingDir = nullptr;
if (! s_workingDir)
{
static OUString s_workingDir = []() {
OUString workingDir;
::osl_getProcessWorkingDir( &workingDir.pData );
MutexGuard guard( Mutex::getGlobalMutex() );
if (! s_workingDir)
{
static OUString s_dir( workingDir );
s_workingDir = &s_dir;
}
}
return *s_workingDir;
::osl_getProcessWorkingDir(&workingDir.pData);
return workingDir;
}();
return s_workingDir;
}
FilePermission::FilePermission(
+2 -7
View File
@@ -64,13 +64,8 @@ using namespace cppu;
Reference<XMultiServiceFactory> getProcessServiceManager()
{
Reference<XMultiServiceFactory > s_x;
if (! s_x.is())
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_x.is())
s_x = createRegistryServiceFactory( OUString("stoctest.rdb"), sal_False );
}
static Reference<XMultiServiceFactory> s_x(
createRegistryServiceFactory(OUString("stoctest.rdb"), sal_False));
return s_x;
}
-2
View File
@@ -598,7 +598,6 @@ SvNumberFormatObj::~SvNumberFormatObj()
uno::Reference<beans::XPropertySetInfo> SAL_CALL SvNumberFormatObj::getPropertySetInfo()
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
static uno::Reference<beans::XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( lcl_GetNumberFormatPropertyMap() );
return aRef;
@@ -808,7 +807,6 @@ SvNumberFormatSettingsObj::~SvNumberFormatSettingsObj()
uno::Reference<beans::XPropertySetInfo> SAL_CALL SvNumberFormatSettingsObj::getPropertySetInfo()
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
static uno::Reference<beans::XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( lcl_GetNumberSettingsPropertyMap() );
return aRef;
+118 -202
View File
@@ -787,207 +787,135 @@ uno::Sequence< uno::Type > SvxShape::_getTypes()
case OBJ_MEDIA:
case OBJ_TABLE:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 12 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
}
}
return aTypeSequence;
}
// group shape
case OBJ_GRUP:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
cppu::UnoType<drawing::XShapes>::get(),
cppu::UnoType<drawing::XShapeGroup>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 14 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
*pTypes++ = cppu::UnoType<drawing::XShapes>::get();
*pTypes++ = cppu::UnoType<drawing::XShapeGroup>::get();
}
}
return aTypeSequence;
}
// connector shape
case OBJ_EDGE:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
cppu::UnoType<drawing::XConnectorShape>::get(),
// from SvxUnoTextBase::getTypes()
cppu::UnoType<text::XTextAppend>::get(),
cppu::UnoType<text::XTextCopy>::get(),
cppu::UnoType<container::XEnumerationAccess>::get(),
cppu::UnoType<text::XTextRangeMover>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 17 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
*pTypes++ = cppu::UnoType<drawing::XConnectorShape>::get();
// from SvxUnoTextBase::getTypes()
*pTypes++ = cppu::UnoType<text::XTextAppend>::get();
*pTypes++ = cppu::UnoType<text::XTextCopy>::get();
*pTypes++ = cppu::UnoType<container::XEnumerationAccess>::get();
*pTypes++ = cppu::UnoType<text::XTextRangeMover>::get();
}
}
return aTypeSequence;
}
// control shape
case OBJ_UNO:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
cppu::UnoType<drawing::XControlShape>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 13 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
*pTypes++ = cppu::UnoType<drawing::XControlShape>::get();
}
}
return aTypeSequence;
}
// 3d scene shape
case E3D_SCENE_ID|E3D_INVENTOR_FLAG:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
cppu::UnoType<drawing::XShapes>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 13 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
*pTypes++ = cppu::UnoType<drawing::XShapes>::get();
}
}
return aTypeSequence;
}
case OBJ_CUSTOMSHAPE:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
// from SvxUnoTextBase::getTypes()
cppu::UnoType<text::XText>::get(),
cppu::UnoType<container::XEnumerationAccess>::get(),
cppu::UnoType<text::XTextRangeMover>::get(),
cppu::UnoType<drawing::XEnhancedCustomShapeDefaulter>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 16 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
// from SvxUnoTextBase::getTypes()
*pTypes++ = cppu::UnoType<text::XText>::get();
*pTypes++ = cppu::UnoType<container::XEnumerationAccess>::get();
*pTypes++ = cppu::UnoType<text::XTextRangeMover>::get();
*pTypes++ = cppu::UnoType<drawing::XEnhancedCustomShapeDefaulter>::get();
}
}
return aTypeSequence;
}
// shapes with text
@@ -1009,38 +937,26 @@ uno::Sequence< uno::Type > SvxShape::_getTypes()
case OBJ_OLE2: // #i118485# Moved to shapes with text
default:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;
static uno::Sequence<uno::Type> aTypeSequence{
cppu::UnoType<drawing::XShape>::get(),
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<beans::XPropertySet>::get(),
cppu::UnoType<beans::XMultiPropertySet>::get(),
cppu::UnoType<beans::XPropertyState>::get(),
cppu::UnoType<beans::XMultiPropertyStates>::get(),
cppu::UnoType<drawing::XGluePointsSupplier>::get(),
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<lang::XUnoTunnel>::get(),
cppu::UnoType<container::XNamed>::get(),
// from SvxUnoTextBase::getTypes()
cppu::UnoType<text::XTextAppend>::get(),
cppu::UnoType<text::XTextCopy>::get(),
cppu::UnoType<container::XEnumerationAccess>::get(),
cppu::UnoType<text::XTextRangeMover>::get(),
};
if( aTypeSequence.getLength() == 0 )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
// Control these pointer again ... it can be, that another instance will be faster then these!
if( aTypeSequence.getLength() == 0 )
{
aTypeSequence.realloc( 16 );
uno::Type* pTypes = aTypeSequence.getArray();
*pTypes++ = cppu::UnoType<drawing::XShape>::get();
*pTypes++ = cppu::UnoType<lang::XComponent>::get();
*pTypes++ = cppu::UnoType<beans::XPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get();
*pTypes++ = cppu::UnoType<beans::XPropertyState>::get();
*pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get();
*pTypes++ = cppu::UnoType<drawing::XGluePointsSupplier>::get();
*pTypes++ = cppu::UnoType<container::XChild>::get();
*pTypes++ = cppu::UnoType<lang::XServiceInfo>::get();
*pTypes++ = cppu::UnoType<lang::XTypeProvider>::get();
*pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get();
*pTypes++ = cppu::UnoType<container::XNamed>::get();
// from SvxUnoTextBase::getTypes()
*pTypes++ = cppu::UnoType<text::XTextAppend>::get();
*pTypes++ = cppu::UnoType<text::XTextCopy>::get();
*pTypes++ = cppu::UnoType<container::XEnumerationAccess>::get();
*pTypes++ = cppu::UnoType<text::XTextRangeMover>::get();
}
}
return aTypeSequence;
}
}
+10 -32
View File
@@ -237,43 +237,21 @@ css::uno::Sequence< css::uno::Type > VCLXMenu::getTypes()
const bool bIsPopupMenu = IsPopupMenu();
aGuard.clear();
static ::cppu::OTypeCollection* pCollectionMenuBar = nullptr;
static ::cppu::OTypeCollection* pCollectionPopupMenu = nullptr;
if ( bIsPopupMenu )
{
if( !pCollectionPopupMenu )
{
::osl::Guard< ::osl::Mutex > aGlobalGuard( ::osl::Mutex::getGlobalMutex() );
if( !pCollectionPopupMenu )
{
static ::cppu::OTypeCollection collectionPopupMenu(
cppu::UnoType<css::lang::XTypeProvider>::get(),
cppu::UnoType<css::awt::XMenu>::get(),
cppu::UnoType<css::awt::XPopupMenu>::get(),
cppu::UnoType<css::lang::XServiceInfo>::get());
pCollectionPopupMenu = &collectionPopupMenu;
}
}
return (*pCollectionPopupMenu).getTypes();
static cppu::OTypeCollection collectionPopupMenu(
cppu::UnoType<css::lang::XTypeProvider>::get(), cppu::UnoType<css::awt::XMenu>::get(),
cppu::UnoType<css::awt::XPopupMenu>::get(),
cppu::UnoType<css::lang::XServiceInfo>::get());
return collectionPopupMenu.getTypes();
}
else
{
if( !pCollectionMenuBar )
{
::osl::Guard< ::osl::Mutex > aGlobalGuard( ::osl::Mutex::getGlobalMutex() );
if( !pCollectionMenuBar )
{
static ::cppu::OTypeCollection collectionMenuBar(
cppu::UnoType<css::lang::XTypeProvider>::get(),
cppu::UnoType<css::awt::XMenu>::get(),
cppu::UnoType<css::awt::XMenuBar>::get(),
cppu::UnoType<css::lang::XServiceInfo>::get());
pCollectionMenuBar = &collectionMenuBar;
}
}
return (*pCollectionMenuBar).getTypes();
static cppu::OTypeCollection collectionMenuBar(
cppu::UnoType<css::lang::XTypeProvider>::get(), cppu::UnoType<css::awt::XMenu>::get(),
cppu::UnoType<css::awt::XMenuBar>::get(),
cppu::UnoType<css::lang::XServiceInfo>::get());
return collectionMenuBar.getTypes();
}
}
+4 -22
View File
@@ -838,32 +838,14 @@ static bool bInitedByVCLToolkit = false;
osl::Mutex & getInitMutex()
{
static osl::Mutex * pM;
if( !pM )
{
osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
if( !pM )
{
static osl::Mutex aMutex;
pM = &aMutex;
}
}
return *pM;
static osl::Mutex aMutex;
return aMutex;
}
osl::Condition & getInitCondition()
{
static osl::Condition * pC = nullptr;
if( !pC )
{
osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
if( !pC )
{
static osl::Condition aCondition;
pC = &aCondition;
}
}
return *pC;
static osl::Condition aCondition;
return aCondition;
}
extern "C"
+181 -193
View File
@@ -90,205 +90,193 @@ struct ImplPropertyInfo
static ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
{
static ImplPropertyInfo* pPropertyInfos = nullptr;
static sal_uInt16 nElements = 0;
if( !pPropertyInfos )
{
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
if( !pPropertyInfos )
{
static ImplPropertyInfo aImplPropertyInfos [] =
{
DECL_PROP_2 ( "AccessibleName", ACCESSIBLENAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "Align", ALIGN, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Autocomplete", AUTOCOMPLETE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoHScroll", AUTOHSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_1 ( "AutoMnemonics", AUTOMNEMONICS, bool, BOUND ),
DECL_PROP_2 ( "AutoToggle", AUTOTOGGLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoVScroll", AUTOVSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "BackgroundColor", BACKGROUNDCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_2 ( "BlockIncrement", BLOCKINCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "Border", BORDER, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "BorderColor", BORDERCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Closeable", CLOSEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CurrencySymbol", CURRENCYSYMBOL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CustomUnitText", CUSTOMUNITTEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "Date", DATE, util::Date, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "DateFormat", EXTDATEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DateMax", DATEMAX, util::Date, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DateMin", DATEMIN, util::Date, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "DateShowCentury", DATESHOWCENTURY, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "DecimalAccuracy", DECIMALACCURACY, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DefaultButton", DEFAULTBUTTON, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DefaultControl", DEFAULTCONTROL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DesktopAsParent", DESKTOP_AS_PARENT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DisplayBackgroundColor", DISPLAYBACKGROUNDCOLOR, sal_Int32, BOUND, MAYBEVOID ),
DECL_PROP_2 ( "Dropdown", DROPDOWN, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EchoChar", ECHOCHAR, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EditMask", EDITMASK, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "EffectiveDefault", EFFECTIVE_DEFAULT, Any, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "EffectiveMax", EFFECTIVE_MAX, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "EffectiveMin", EFFECTIVE_MIN, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "EffectiveValue", EFFECTIVE_VALUE, Any, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Enabled", ENABLED, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EnforceFormat", ENFORCE_FORMAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "FillColor", FILLCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "FocusOnClick", FOCUSONCLICK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontRelief", FONTRELIEF, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontEmphasisMark", FONTEMPHASISMARK, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontDescriptor", FONTDESCRIPTOR, FontDescriptor, BOUND, MAYBEDEFAULT ),
static ImplPropertyInfo aImplPropertyInfos [] = {
DECL_PROP_2 ( "AccessibleName", ACCESSIBLENAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "Align", ALIGN, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Autocomplete", AUTOCOMPLETE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoHScroll", AUTOHSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_1 ( "AutoMnemonics", AUTOMNEMONICS, bool, BOUND ),
DECL_PROP_2 ( "AutoToggle", AUTOTOGGLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoVScroll", AUTOVSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "BackgroundColor", BACKGROUNDCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_2 ( "BlockIncrement", BLOCKINCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "Border", BORDER, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "BorderColor", BORDERCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Closeable", CLOSEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CurrencySymbol", CURRENCYSYMBOL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CustomUnitText", CUSTOMUNITTEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "Date", DATE, util::Date, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "DateFormat", EXTDATEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DateMax", DATEMAX, util::Date, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DateMin", DATEMIN, util::Date, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "DateShowCentury", DATESHOWCENTURY, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "DecimalAccuracy", DECIMALACCURACY, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DefaultButton", DEFAULTBUTTON, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DefaultControl", DEFAULTCONTROL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DesktopAsParent", DESKTOP_AS_PARENT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DisplayBackgroundColor", DISPLAYBACKGROUNDCOLOR, sal_Int32, BOUND, MAYBEVOID ),
DECL_PROP_2 ( "Dropdown", DROPDOWN, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EchoChar", ECHOCHAR, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EditMask", EDITMASK, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "EffectiveDefault", EFFECTIVE_DEFAULT, Any, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "EffectiveMax", EFFECTIVE_MAX, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "EffectiveMin", EFFECTIVE_MIN, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "EffectiveValue", EFFECTIVE_VALUE, Any, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Enabled", ENABLED, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "EnforceFormat", ENFORCE_FORMAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "FillColor", FILLCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "FocusOnClick", FOCUSONCLICK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontRelief", FONTRELIEF, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontEmphasisMark", FONTEMPHASISMARK, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontDescriptor", FONTDESCRIPTOR, FontDescriptor, BOUND, MAYBEDEFAULT ),
// parts of css::awt::FontDescriptor
DECL_PROP_2 ( "FontName", FONTDESCRIPTORPART_NAME, OUString,BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontStyleName", FONTDESCRIPTORPART_STYLENAME, OUString,BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontFamily", FONTDESCRIPTORPART_FAMILY, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontCharset", FONTDESCRIPTORPART_CHARSET, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontHeight", FONTDESCRIPTORPART_HEIGHT, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWidth", FONTDESCRIPTORPART_WIDTH, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontPitch", FONTDESCRIPTORPART_PITCH, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWeight", FONTDESCRIPTORPART_WEIGHT, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontCharWidth", FONTDESCRIPTORPART_CHARWIDTH, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontOrientation", FONTDESCRIPTORPART_ORIENTATION, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontSlant", FONTDESCRIPTORPART_SLANT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontUnderline", FONTDESCRIPTORPART_UNDERLINE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontStrikeout", FONTDESCRIPTORPART_STRIKEOUT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontKerning", FONTDESCRIPTORPART_KERNING, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWordLineMode", FONTDESCRIPTORPART_WORDLINEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontType", FONTDESCRIPTORPART_TYPE, sal_Int16, BOUND, MAYBEDEFAULT ),
// parts of css::awt::FontDescriptor
DECL_PROP_2 ( "FontName", FONTDESCRIPTORPART_NAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontStyleName", FONTDESCRIPTORPART_STYLENAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontFamily", FONTDESCRIPTORPART_FAMILY, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontCharset", FONTDESCRIPTORPART_CHARSET, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontHeight", FONTDESCRIPTORPART_HEIGHT, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWidth", FONTDESCRIPTORPART_WIDTH, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontPitch", FONTDESCRIPTORPART_PITCH, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWeight", FONTDESCRIPTORPART_WEIGHT, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontCharWidth", FONTDESCRIPTORPART_CHARWIDTH, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontOrientation", FONTDESCRIPTORPART_ORIENTATION, float, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontSlant", FONTDESCRIPTORPART_SLANT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontUnderline", FONTDESCRIPTORPART_UNDERLINE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontStrikeout", FONTDESCRIPTORPART_STRIKEOUT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontKerning", FONTDESCRIPTORPART_KERNING, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontWordLineMode", FONTDESCRIPTORPART_WORDLINEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "FontType", FONTDESCRIPTORPART_TYPE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "FormatKey", FORMATKEY, sal_Int32, BOUND, MAYBEVOID, TRANSIENT ),
DECL_PROP_3 ( "FormatsSupplier", FORMATSSUPPLIER, Reference< css::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ),
DECL_PROP_3 ( "FormatKey", FORMATKEY, sal_Int32, BOUND, MAYBEVOID, TRANSIENT ),
DECL_PROP_3 ( "FormatsSupplier", FORMATSSUPPLIER, Reference< css::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ),
DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< XGraphic >, BOUND, TRANSIENT ),
DECL_PROP_2 ( "GroupName", GROUPNAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpText", HELPTEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpURL", HELPURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HideInactiveSelection", HIDEINACTIVESELECTION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HighContrastMode", HIGHCONTRASTMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HScroll", HSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HardLineBreaks", HARDLINEBREAKS, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ImageAlign", IMAGEALIGN, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImagePosition", IMAGEPOSITION, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImageURL", IMAGEURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ItemSeparatorPos", ITEM_SEPARATOR_POS, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Label", LABEL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "LineColor", LINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "LineCount", LINECOUNT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LineEndFormat", LINE_END_FORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "LineIncrement", LINEINCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LiteralMask", LITERALMASK, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LiveScroll", LIVE_SCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MaxTextLen", MAXTEXTLEN, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Moveable", MOVEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_1 ( "MouseTransparent", MOUSETRANSPARENT, bool, BOUND ),
DECL_PROP_2 ( "MultiLine", MULTILINE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelection", MULTISELECTION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelectionSimpleMode", MULTISELECTION_SIMPLEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NativeWidgetLook", NATIVE_WIDGET_LOOK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NoLabel", NOLABEL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Orientation", ORIENTATION, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PaintTransparent", PAINTTRANSPARENT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PluginParent", PLUGINPARENT, sal_Int64, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PrependCurrencySymbol", CURSYM_POSITION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Printable", PRINTABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "ProgressValue", PROGRESSVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ProgressValueMax", PROGRESSVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ProgressValueMin", PROGRESSVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PushButtonType", PUSHBUTTONTYPE, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ReadOnly", READONLY, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Repeat", REPEAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoRepeat", AUTO_REPEAT, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "RepeatDelay", REPEAT_DELAY, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScaleImage", SCALEIMAGE, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "ScaleMode", IMAGE_SCALE_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "ScrollValue", SCROLLVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ScrollValueMax", SCROLLVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollValueMin", SCROLLVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollWidth", SCROLLWIDTH, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollHeight", SCROLLHEIGHT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollTop", SCROLLTOP, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollLeft", SCROLLLEFT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Sizeable", SIZEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Spin", SPIN, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinIncrement", SPININCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "SpinValue", SPINVALUE, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinValueMax", SPINVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinValueMin", SPINVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "State", STATE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StrictFormat", STRICTFORMAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StringItemList", STRINGITEMLIST, Sequence< OUString >, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TypedItemList", TYPEDITEMLIST, Sequence< Any >, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "VisualEffect", VISUALEFFECT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "SymbolColor", SYMBOL_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "Tabstop", TABSTOP, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Text", TEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "TextColor", TEXTCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "TextLineColor", TEXTLINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "Time", TIME, util::Time, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "TimeFormat", EXTTIMEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TimeMax", TIMEMAX, util::Time, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TimeMin", TIMEMIN, util::Time, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Title", TITLE, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Toggle", TOGGLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "TreatAsNumber", TREATASNUMBER, bool, BOUND, MAYBEDEFAULT,TRANSIENT ),
DECL_PROP_2 ( "TriState", TRISTATE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Unit", UNIT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "VScroll", VSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "Value", VALUE_DOUBLE, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ValueMax", VALUEMAX_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ValueMin", VALUEMIN_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ValueStep", VALUESTEP_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "VerticalAlign", VERTICALALIGN, VerticalAlignment, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "VisibleSize", VISIBLESIZE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Activated", ACTIVATED, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Complete", COMPLETE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CurrentItemID", CURRENTITEMID, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< XGraphic >, BOUND, TRANSIENT ),
DECL_PROP_2 ( "GroupName", GROUPNAME, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpText", HELPTEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpURL", HELPURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HideInactiveSelection", HIDEINACTIVESELECTION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HighContrastMode", HIGHCONTRASTMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HScroll", HSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HardLineBreaks", HARDLINEBREAKS, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ImageAlign", IMAGEALIGN, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImagePosition", IMAGEPOSITION, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImageURL", IMAGEURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ItemSeparatorPos", ITEM_SEPARATOR_POS, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Label", LABEL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "LineColor", LINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "LineCount", LINECOUNT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LineEndFormat", LINE_END_FORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "LineIncrement", LINEINCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LiteralMask", LITERALMASK, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "LiveScroll", LIVE_SCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MaxTextLen", MAXTEXTLEN, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Moveable", MOVEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_1 ( "MouseTransparent", MOUSETRANSPARENT, bool, BOUND ),
DECL_PROP_2 ( "MultiLine", MULTILINE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelection", MULTISELECTION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelectionSimpleMode", MULTISELECTION_SIMPLEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NativeWidgetLook", NATIVE_WIDGET_LOOK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NoLabel", NOLABEL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Orientation", ORIENTATION, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PaintTransparent", PAINTTRANSPARENT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PluginParent", PLUGINPARENT, sal_Int64, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PrependCurrencySymbol", CURSYM_POSITION, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Printable", PRINTABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "ProgressValue", PROGRESSVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ProgressValueMax", PROGRESSVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ProgressValueMin", PROGRESSVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "PushButtonType", PUSHBUTTONTYPE, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ReadOnly", READONLY, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Repeat", REPEAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "AutoRepeat", AUTO_REPEAT, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "RepeatDelay", REPEAT_DELAY, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScaleImage", SCALEIMAGE, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "ScaleMode", IMAGE_SCALE_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "ScrollValue", SCROLLVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ScrollValueMax", SCROLLVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollValueMin", SCROLLVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollWidth", SCROLLWIDTH, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollHeight", SCROLLHEIGHT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollTop", SCROLLTOP, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollLeft", SCROLLLEFT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Sizeable", SIZEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Spin", SPIN, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinIncrement", SPININCREMENT, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "SpinValue", SPINVALUE, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinValueMax", SPINVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SpinValueMin", SPINVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_2 ( "State", STATE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StrictFormat", STRICTFORMAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StringItemList", STRINGITEMLIST, Sequence< OUString >, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TypedItemList", TYPEDITEMLIST, Sequence< Any >, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "VisualEffect", VISUALEFFECT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "SymbolColor", SYMBOL_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "Tabstop", TABSTOP, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Text", TEXT, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "TextColor", TEXTCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "TextLineColor", TEXTLINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "Time", TIME, util::Time, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "TimeFormat", EXTTIMEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TimeMax", TIMEMAX, util::Time, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "TimeMin", TIMEMIN, util::Time, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Title", TITLE, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Toggle", TOGGLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "TreatAsNumber", TREATASNUMBER, bool, BOUND, MAYBEDEFAULT,TRANSIENT ),
DECL_PROP_2 ( "TriState", TRISTATE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Unit", UNIT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "VScroll", VSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "Value", VALUE_DOUBLE, double, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ValueMax", VALUEMAX_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ValueMin", VALUEMIN_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ValueStep", VALUESTEP_DOUBLE, double, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "VerticalAlign", VERTICALALIGN, VerticalAlignment, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_DEP_PROP_3 ( "VisibleSize", VISIBLESIZE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Activated", ACTIVATED, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Complete", COMPLETE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CurrentItemID", CURRENTITEMID, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MouseWheelBehavior", MOUSE_WHEEL_BEHAVIOUR, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StepTime", STEP_TIME, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Decoration", DECORATION, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MouseWheelBehavior", MOUSE_WHEEL_BEHAVIOUR, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StepTime", STEP_TIME, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Decoration", DECORATION, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "SelectionType", TREE_SELECTIONTYPE, css::view::SelectionType, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Editable", TREE_EDITABLE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "DataModel", TREE_DATAMODEL, Reference< css::awt::tree::XTreeDataModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "RootDisplayed", TREE_ROOTDISPLAYED, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsHandles", TREE_SHOWSHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsRootHandles", TREE_SHOWSROOTHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "RowHeight", ROW_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "InvokesStopNodeEditing", TREE_INVOKESSTOPNODEEDITING, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "URL", URL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ),
DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "RowHeaderWidth", ROW_HEADER_WIDTH, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ColumnHeaderHeight", COLUMN_HEADER_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_1 ( "GridDataModel", GRID_DATAMODEL, Reference< css::awt::grid::XGridDataModel >, BOUND ),
DECL_PROP_1 ( "ColumnModel", GRID_COLUMNMODEL, Reference< css::awt::grid::XGridColumnModel >, BOUND ),
DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, css::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ),
DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "HeaderTextColor", GRID_HEADER_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "MultiPageValue", MULTIPAGEVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "AllDialogChildren", USERFORMCONTAINEES, Reference< css::container::XNameContainer >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "ActiveSelectionBackgroundColor", ACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "InactiveSelectionBackgroundColor", INACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "ActiveSelectionTextColor", ACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "InactiveSelectionTextColor", INACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "SelectionType", TREE_SELECTIONTYPE, css::view::SelectionType, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Editable", TREE_EDITABLE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "DataModel", TREE_DATAMODEL, Reference< css::awt::tree::XTreeDataModel >,BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "RootDisplayed", TREE_ROOTDISPLAYED, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsHandles", TREE_SHOWSHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsRootHandles", TREE_SHOWSROOTHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "RowHeight", ROW_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "InvokesStopNodeEditing", TREE_INVOKESSTOPNODEEDITING, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "URL", URL, OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ),
DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "RowHeaderWidth", ROW_HEADER_WIDTH, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ColumnHeaderHeight", COLUMN_HEADER_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_1 ( "GridDataModel", GRID_DATAMODEL, Reference< css::awt::grid::XGridDataModel >, BOUND ),
DECL_PROP_1 ( "ColumnModel", GRID_COLUMNMODEL, Reference< css::awt::grid::XGridColumnModel >, BOUND ),
DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, css::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ),
DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "HeaderTextColor", GRID_HEADER_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_DEP_PROP_3 ( "MultiPageValue", MULTIPAGEVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "AllDialogChildren", USERFORMCONTAINEES, Reference< css::container::XNameContainer >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "ActiveSelectionBackgroundColor", ACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "InactiveSelectionBackgroundColor", INACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "ActiveSelectionTextColor", ACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "InactiveSelectionTextColor", INACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
};
pPropertyInfos = aImplPropertyInfos;
nElements = SAL_N_ELEMENTS( aImplPropertyInfos );
}
}
rElementCount = nElements;
return pPropertyInfos;
rElementCount = SAL_N_ELEMENTS(aImplPropertyInfos);
return aImplPropertyInfos;
}
@@ -26,12 +26,6 @@
namespace xmloff
{
namespace
{
static PPropertyHandler s_pVCLDateHandler;
static PPropertyHandler s_pVCLTimeHandler;
}
//= FormHandlerFactory
PPropertyHandler FormHandlerFactory::getFormPropertyHandler( const PropertyId i_propertyId )
{
@@ -43,26 +37,20 @@ namespace xmloff
case PID_DATE_MAX:
case PID_DEFAULT_DATE:
case PID_DATE:
if ( s_pVCLDateHandler.get() == nullptr )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( s_pVCLDateHandler == nullptr )
s_pVCLDateHandler = new VCLDateHandler();
static PPropertyHandler s_pVCLDateHandler = new VCLDateHandler();
pHandler = s_pVCLDateHandler;
}
pHandler = s_pVCLDateHandler;
break;
case PID_TIME_MIN:
case PID_TIME_MAX:
case PID_DEFAULT_TIME:
case PID_TIME:
if ( s_pVCLTimeHandler.get() == nullptr )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( s_pVCLTimeHandler == nullptr )
s_pVCLTimeHandler = new VCLTimeHandler();
static PPropertyHandler s_pVCLTimeHandler = new VCLTimeHandler();
pHandler = s_pVCLTimeHandler;
}
pHandler = s_pVCLTimeHandler;
break;
default:
@@ -114,7 +114,6 @@ Sequence< OUString > SAL_CALL XMLSignatureTemplateImpl::getSupportedServiceNames
//Helper for XServiceInfo
Sequence< OUString > XMLSignatureTemplateImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignatureTemplate" };
return seqServiceNames ;
}
@@ -515,7 +515,6 @@ Sequence< OUString > SAL_CALL XMLSignature_GpgImpl::getSupportedServiceNames() {
//Helper for XServiceInfo
Sequence< OUString > XMLSignature_GpgImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" };
return seqServiceNames ;
}