diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3d59296ec27b..0eced865d70f 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unoshape.cxx,v $ * - * $Revision: 1.169 $ + * $Revision: 1.170 $ * - * last change: $Author: rt $ $Date: 2008-03-12 10:13:05 $ + * last change: $Author: vg $ $Date: 2008-03-19 07:45:11 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -942,6 +942,43 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() } return aTypeSequence; } + case OBJ_CUSTOMSHAPE: + { + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence; + + 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++ = ::getCppuType((const uno::Reference< drawing::XShape >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); +// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); + *pTypes++ = beans::XMultiPropertyStates::static_type(); + *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< lang::XServiceInfo >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< lang::XTypeProvider >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< lang::XUnoTunnel >*)0); + *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0); + // from SvxUnoTextBase::getTypes() + *pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0); + *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0); + *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0); + *pTypes++ = ::getCppuType(( const uno::Reference< drawing::XEnhancedCustomShapeDefaulter >*)0); + } + } + return aTypeSequence; + } // shapes with text case OBJ_RECT: case OBJ_CIRC: @@ -959,7 +996,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() case OBJ_TEXT: case OBJ_CAPTION: case OBJ_TABLE: - case OBJ_CUSTOMSHAPE: default: { static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence; |