diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-06-03 11:26:39 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-06-03 11:26:39 +0000 |
commit | a8da772c4a21e7c9883823e3ae4dbee03c8c77fa (patch) | |
tree | d78ff4dbe4ab2916be487f8f921333877ae331a4 /svx/source/unodraw | |
parent | a55914808cc66c14c4fb139f229ee84c8284bb74 (diff) |
CWS-TOOLING: integrate CWS os128
2009-04-22 12:58:26 +0200 b_michaelsen r271093 : #i101084# using the frames enumeration for other SwXFrames-queries; also added a complex test to ensure the behavior to be the same
2009-04-20 14:53:03 +0200 mav r270987 : #i101219# adjust the testcases to test memory cache and temporary file cache
2009-04-20 14:52:09 +0200 mav r270986 : #i101219#,#i99077# use memory to cache data; no precopying on commit
2009-04-20 14:39:21 +0200 mav r270984 : #i101219# use memory to cache data
2009-04-20 14:39:08 +0200 mav r270983 : #i101219# use memory to cache data
2009-04-20 14:38:45 +0200 mav r270982 : #i101219# use memory to cache data
2009-04-17 07:37:52 +0200 os r270912 : CWS-TOOLING: rebase CWS os128 to trunk@270723 (milestone: DEV300:m46)
2009-04-15 14:54:18 +0200 b_michaelsen r270845 : #i101084# using frame enumerations for paragraph export for better performance
2009-04-15 14:52:54 +0200 b_michaelsen r270843 : #i101084# implemented XEnumerationAccess interface on framesets
2009-04-03 17:08:10 +0200 mav r270504 : #i100722# do not compress streams of known compressed types per default
2009-04-03 13:49:50 +0200 os r270484 : resync error fixed
2009-04-03 12:55:32 +0200 mav r270470 : #i100722# do not compress streams of known compressed types per default
2009-04-03 10:00:58 +0200 os r270463 : resync error fixed
2009-04-03 09:52:53 +0200 os r270462 : resync error fixed
2009-04-03 09:10:14 +0200 os r270449 : #i99568# string compare operator of hash_map changed
2009-04-03 09:03:49 +0200 os r270446 : #i100683# normalize file URLs
2009-04-02 11:09:27 +0200 os r270381 : #i100683# making URLs relative without file access
2009-04-02 09:04:42 +0200 os r270366 : CWS-TOOLING: rebase CWS os128 to trunk@270033 (milestone: DEV300:m45)
2009-03-31 08:08:37 +0200 os r270258 : #i100683# reducing calls to URIHelper::simpleNormalizeMakeRelative()
2009-03-19 17:06:22 +0100 os r269756 : #i99568# XTolerantMultiPropertySet activated
2009-03-16 11:46:14 +0100 os r269517 : wrong commit to #i97471# removed
2009-03-16 11:36:50 +0100 os r269514 : #i97471# SwDrawTextShell::Init(): mouse double click and key input in group objects at the same time: prevent crash
2009-03-13 11:08:54 +0100 os r269464 : #i99568# static SfxItemPropertySet
2009-03-13 11:03:22 +0100 os r269463 : #i99568# static SfxItemPropertySet
2009-03-11 12:59:27 +0100 os r269320 : #i99568# WhichId of properties handled from ScDocOptionsObj added
2009-03-06 09:09:58 +0100 os r268972 : #i99568# SfxItemPropertySet improvements
2009-03-05 20:54:43 +0100 os r268942 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 20:19:52 +0100 os r268941 : #i99568# SfxItemPropertySet improvements
2009-03-05 20:05:03 +0100 os r268940 : #i99568# SfxItemPropertySet improvements
2009-03-05 18:54:47 +0100 os r268936 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 17:51:38 +0100 os r268931 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 17:33:03 +0100 os r268930 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 15:53:00 +0100 os r268920 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 15:52:50 +0100 os r268919 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 15:50:41 +0100 os r268918 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 15:41:04 +0100 os r268916 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 15:40:40 +0100 os r268915 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 10:16:20 +0100 os r268881 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-05 10:15:55 +0100 os r268880 : #i99568# Sfx/SvxItemPropertySet improvements
2009-03-03 08:40:09 +0100 os r268704 : ScTableSheetObj::GetItemPropertyMap fixed
2009-03-03 07:50:00 +0100 os r268703 : SfxItemProperty set as pointer
2009-03-03 07:49:46 +0100 os r268702 : SfxItemProperty set as pointer
2009-03-02 08:15:37 +0100 os r268631 : minor fix
2009-03-02 07:58:38 +0100 os r268630 : minor fix
2009-02-27 13:03:25 +0100 os r268584 : exports
2009-02-27 11:17:04 +0100 os r268567 : debug code removed
2009-02-27 11:04:07 +0100 os r268565 : duplicate return removed
2009-02-27 10:17:37 +0100 os r268558 : syntax fixed
2009-02-27 09:56:14 +0100 os r268554 : #i99568# type mix fixed
2009-02-27 09:40:56 +0100 os r268553 : #i99568# exports changes reverted
2009-02-25 12:50:54 +0100 os r268433 : #i99568# SfxItemPropertySet rework
2009-02-25 12:13:39 +0100 os r268432 : #i99568# SfxItemPropertySet rework
2009-02-25 12:12:47 +0100 os r268431 : #i99568# SfxItemPropertySet rework
2009-02-25 12:10:27 +0100 os r268430 : #i99568# SfxItemPropertySet rework
2009-02-25 12:09:36 +0100 os r268429 : #i99568# SfxItemPropertySet rework
2009-02-25 12:07:39 +0100 os r268428 : #i99568# SfxItemPropertySet rework
2009-02-25 11:59:35 +0100 os r268427 : #i99568# SfxItemPropertySet rework
2009-02-25 11:52:52 +0100 os r268425 : #i99568# SfxItemPropertySet rework
2009-02-25 11:49:17 +0100 os r268424 : #i99568# SfxItemPropertySet rework
2009-02-25 11:45:17 +0100 os r268423 : #i99568# SfxItemPropertySet rework
2009-02-11 11:39:04 +0100 os r267587 : #i57008# use registration of index marks at SwUnoCallback
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/shapeimpl.hxx | 16 | ||||
-rw-r--r-- | svx/source/unodraw/tableshape.cxx | 18 | ||||
-rw-r--r-- | svx/source/unodraw/unoipset.cxx | 266 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 147 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 48 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap3.cxx | 60 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 66 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 192 |
9 files changed, 278 insertions, 541 deletions
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index 74450da94b..593cbaf6d4 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -53,8 +53,8 @@ class SvxPluginShape : public SvxOle2Shape { protected: // overide these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); public: SvxPluginShape( SdrObject* pObj ) throw(); @@ -74,8 +74,8 @@ class SvxAppletShape : public SvxOle2Shape { protected: // overide these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); public: SvxAppletShape( SdrObject* pObj ) throw(); @@ -95,8 +95,8 @@ class SvxFrameShape : public SvxOle2Shape { protected: // overide these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); public: SvxFrameShape( SdrObject* pObj ) throw(); @@ -115,8 +115,8 @@ class SvxTableShape : public SvxShape { protected: // overide these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void lock(); virtual void unlock(); diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx index 3efde7e2a2..f8b5bceec9 100644 --- a/svx/source/unodraw/tableshape.cxx +++ b/svx/source/unodraw/tableshape.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; SvxTableShape::SvxTableShape( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE), aSvxMapProvider.GetPropertySet(SVXMAP_TABLE) ) { SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TableShape" ) ) ); } @@ -62,7 +62,11 @@ SvxTableShape::~SvxTableShape() throw() //---------------------------------------------------------------------- -bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxTableShape::setPropertyValueImpl( + const ::rtl::OUString& rName, + const SfxItemPropertySimpleEntry* pProperty, + const ::com::sun::star::uno::Any& rValue ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -106,14 +110,18 @@ bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c } default: { - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } } } extern Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ); -bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxTableShape::getPropertyValueImpl( + const ::rtl::OUString& rName, + const SfxItemPropertySimpleEntry* pProperty, + ::com::sun::star::uno::Any& rValue ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -168,7 +176,7 @@ bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, : } default: { - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } } } diff --git a/svx/source/unodraw/unoipset.cxx b/svx/source/unodraw/unoipset.cxx index 352d65dd8e..25a72b0f8b 100644 --- a/svx/source/unodraw/unoipset.cxx +++ b/svx/source/unodraw/unoipset.cxx @@ -54,176 +54,11 @@ using namespace ::rtl; //---------------------------------------------------------------------- -struct SfxItemPropertyMapHash +struct SfxItemPropertyMapEntryHash { - size_t operator()(const SfxItemPropertyMap* pMap) const { return (size_t)pMap; } + size_t operator()(const SfxItemPropertyMapEntry* pMap) const { return (size_t)pMap; } }; -class SvxInfoSetCache; - -class SvxCachedItemPropertySetInfo : public SfxItemPropertySetInfo -{ -private: - SvxInfoSetCache* mpCache; - -public: - SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache ); - virtual void SAL_CALL release() throw (); -}; - -/** this class caches the created XPropertySetInfo objects for each different - SfxItemPropertyMap pointer. This class can't be used with dynamicly created - SfxItemPropertyMaps! -*/ - -class SvxInfoSetCache -{ -private: - typedef std::hash_map< const SfxItemPropertyMap*, uno::Reference< beans::XPropertySetInfo >, SfxItemPropertyMapHash > InfoMap; - typedef std::hash_map< const SfxItemPropertyMap*, const SfxItemPropertyMap*, SfxItemPropertyMapHash > PropertyMap; - - InfoMap maInfoMap; - PropertyMap maPropertyMap; - - static ::osl::Mutex maMutex; - static SvxInfoSetCache* mpGlobalCache; - - SvxInfoSetCache() {}; - ~SvxInfoSetCache() {}; -public: - static uno::Reference< beans::XPropertySetInfo > getCachedPropertySetInfo( const SfxItemPropertyMap* pMap ); - static const SfxItemPropertyMap* getSortedPropertyMap( const SfxItemPropertyMap* pMap ); - - void dispose( SvxCachedItemPropertySetInfo* pInfo ); -}; - -SvxCachedItemPropertySetInfo::SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache ) -: SfxItemPropertySetInfo( pMap ), mpCache( pCache ) -{ -} - -void SAL_CALL SvxCachedItemPropertySetInfo::release() throw () -{ - SvxInfoSetCache* pCache = mpCache; - if( pCache && m_refCount == 2 ) - { - mpCache = NULL; - pCache->dispose( this ); - } - SfxItemPropertySetInfo::release(); -} - -::osl::Mutex SvxInfoSetCache::maMutex; -SvxInfoSetCache* SvxInfoSetCache::mpGlobalCache = NULL; - -uno::Reference< beans::XPropertySetInfo > SvxInfoSetCache::getCachedPropertySetInfo( const SfxItemPropertyMap* pMap ) -{ - ::osl::MutexGuard aGuard(maMutex); - - if( NULL == mpGlobalCache ) - mpGlobalCache = new SvxInfoSetCache(); - - InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pMap)); - if (aIt != mpGlobalCache->maInfoMap.end()) - return aIt->second.get(); - - uno::Reference< beans::XPropertySetInfo > xInfo( new SvxCachedItemPropertySetInfo( pMap, mpGlobalCache ) ); - mpGlobalCache->maInfoMap.insert(InfoMap::value_type(pMap,xInfo)); - - /* if this assertion is triggered this class is possible used with dynamicly created - SfxItemPropertyMap pointers. This will cause a cache overflow as the current - implementation is designed for a limited number of different SfxItemPropertyMap - pointers */ - DBG_ASSERT( mpGlobalCache->maInfoMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" ); - - return xInfo; -} - -/** removes a cached property set info from the cache. This is called by the property set - info when its refcount goes to 1, meaning the cache holds the last reference to the - info -*/ -void SvxInfoSetCache::dispose( SvxCachedItemPropertySetInfo* pInfo ) -{ - if( pInfo ) - { - ::osl::MutexGuard aGuard(maMutex); - - InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pInfo->getMap())); - if (aIt != mpGlobalCache->maInfoMap.end()) - { - mpGlobalCache->maInfoMap.erase( aIt ); - } - } -} - -inline bool greater_size_pmap( const SfxItemPropertyMap* pFirst, - const SfxItemPropertyMap* pSecond ) -{ - return strcmp( pFirst->pName, pSecond->pName ) < 0; -} - - -const SfxItemPropertyMap* SvxInfoSetCache::getSortedPropertyMap( const SfxItemPropertyMap* pMap ) -{ - ::osl::MutexGuard aGuard(maMutex); - - if( NULL == mpGlobalCache ) - mpGlobalCache = new SvxInfoSetCache(); - - const SfxItemPropertyMap* pSortedMap = NULL; - PropertyMap::iterator aIt( mpGlobalCache->maPropertyMap.find(pMap) ); - if (aIt != mpGlobalCache->maPropertyMap.end()) - pSortedMap = aIt->second; - - if( NULL == pSortedMap ) - { - // count the entries in the map - std::vector< const SfxItemPropertyMap * >::size_type nCount = 0; - const SfxItemPropertyMap* pTempMap = pMap; - while( pTempMap->pName ) - { - pTempMap++; - nCount++; - } - - // fill a stl vector with the entry pointers - std::vector< const SfxItemPropertyMap * > aMap( nCount ); - std::vector< const SfxItemPropertyMap * >::iterator aIter( aMap.begin() ); - - pTempMap = pMap; - while( pTempMap->pName ) - *aIter++ = pTempMap++; - - // sort the vector - std::sort( aMap.begin(), aMap.end(), greater_size_pmap ); - - // create a new map - pSortedMap = new SfxItemPropertyMap[nCount+1]; - pTempMap = pSortedMap; - - // copy the sorted entries to a new map - aIter = aMap.begin(); - while( aIter != aMap.end() ) - { - memcpy( (void*)pTempMap, *aIter++, sizeof( SfxItemPropertyMap ) ); - pTempMap++; - } - - ((SfxItemPropertyMap*)pTempMap)->pName = NULL; - - mpGlobalCache->maPropertyMap[pMap] = pSortedMap; - - /* if this assertion is triggered this class is possible used with dynamicly created - SfxItemPropertyMap pointers. This will cause a cache overflow as the current - implementation is designed for a limited number of different SfxItemPropertyMap - pointers */ - DBG_ASSERT( mpGlobalCache->maPropertyMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" ); - } - - return pSortedMap; -} - //---------------------------------------------------------------------- struct SvxIDPropertyCombine @@ -234,10 +69,10 @@ struct SvxIDPropertyCombine DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * ) -SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMap* pMap, sal_Bool bConvertTwips ) -: _pMap(SvxInfoSetCache::getSortedPropertyMap(pMap)), mbConvertTwips(bConvertTwips) +SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, sal_Bool bConvertTwips ) +: m_aPropertyMap( pMap ), + _pMap(pMap), mbConvertTwips(bConvertTwips) { - mpLastMap = NULL; pCombiList = NULL; } @@ -285,55 +120,46 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID) } //---------------------------------------------------------------------- -void SvxItemPropertySet::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet, - SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet ) +void SvxItemPropertySet::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet, + SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet ) const { if(rPropSet.AreThereOwnUsrAnys()) { const SfxItemPropertyMap* pSrc = rPropSet.getPropertyMap(); - const SfxItemPropertyMap* pDst = _pMap; - while(pSrc->pName) + PropertyEntryVector_t aSrcPropVector = pSrc->getPropertyEntries(); + PropertyEntryVector_t::const_iterator aSrcIt = aSrcPropVector.begin(); + while(aSrcIt != aSrcPropVector.end()) { - if(pSrc->nWID) + if(aSrcIt->nWID) { - uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(pSrc->nWID); + uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(aSrcIt->nWID); if(pUsrAny) { // Aequivalenten Eintrag in pDst suchen - const SfxItemPropertyMap* pTmp = pDst; - int nDiff = strcmp( pSrc->pName, pTmp->pName ); - while(nDiff > 0) - { - pTmp++; - nDiff = strcmp( pSrc->pName, pTmp->pName ); - } - - if(nDiff == 0) + const SfxItemPropertySimpleEntry* pEntry = m_aPropertyMap.getByName( aSrcIt->sName ); + if(pEntry) { - // Eintrag gefunden - pDst = pTmp; - - if(pDst->nWID >= OWN_ATTR_VALUE_START && pDst->nWID <= OWN_ATTR_VALUE_END) + // entry found + if(pEntry->nWID >= OWN_ATTR_VALUE_START && pEntry->nWID <= OWN_ATTR_VALUE_END) { // Special ID im PropertySet, kann nur direkt am // Objekt gesetzt werden+ - OUString aName( OUString::createFromAscii( pDst->pName ) ); - xSet->setPropertyValue( aName, *pUsrAny); + xSet->setPropertyValue( aSrcIt->sName, *pUsrAny); } else { - if(rSet.GetPool()->IsWhich(pDst->nWID)) - rSet.Put(rSet.GetPool()->GetDefaultItem(pDst->nWID)); + if(rSet.GetPool()->IsWhich(pEntry->nWID)) + rSet.Put(rSet.GetPool()->GetDefaultItem(pEntry->nWID)); // setzen - setPropertyValue(pDst, *pUsrAny, rSet); + setPropertyValue(pEntry, *pUsrAny, rSet); } } } } - // Naechster Eintrag - pSrc++; + // next entry + ++aSrcIt; } } } @@ -363,7 +189,7 @@ sal_Bool SvxUnoCheckForConversion( const SfxItemSet&, sal_Int32 nWID, const uno: } //---------------------------------------------------------------------- -uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const +uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const { uno::Any aVal; if(!pMap || !pMap->nWID) @@ -419,7 +245,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, c } //---------------------------------------------------------------------- -void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const +void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const { if(!pMap || !pMap->nWID) return; @@ -475,7 +301,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const } //---------------------------------------------------------------------- -uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap ) const +uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const { // Schon ein Wert eingetragen? Dann schnell fertig uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID); @@ -535,7 +361,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap ) //---------------------------------------------------------------------- -void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal ) const +void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal ) const { uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID); if(!pUsrAny) @@ -546,46 +372,18 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const //---------------------------------------------------------------------- -const SfxItemPropertyMap* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const +const SfxItemPropertySimpleEntry* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const { - const SfxItemPropertyMap* pMap = mpLastMap ? mpLastMap : _pMap; - while ( pMap->pName ) - { - if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) ) - { - const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1; - if( NULL == mpLastMap->pName ) - const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL; - - return pMap; - } - ++pMap; - } - - if( mpLastMap == NULL ) - return 0; - - pMap = _pMap; - while ( pMap->pName && (_pMap != mpLastMap) ) - { - if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) ) - { - const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1; - if( NULL == mpLastMap->pName ) - const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL; - return pMap; - } - ++pMap; - } - - return 0; -} + return m_aPropertyMap.getByName( rName ); + } //---------------------------------------------------------------------- uno::Reference< beans::XPropertySetInfo > SvxItemPropertySet::getPropertySetInfo() const { - return SvxInfoSetCache::getCachedPropertySetInfo( _pMap ); + if( !m_xInfo.is() ) + m_xInfo = new SfxItemPropertySetInfo( &m_aPropertyMap ); + return m_xInfo; } //---------------------------------------------------------------------- diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 0171d424ba..5bfeb3a3bf 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -79,8 +79,6 @@ using namespace ::com::sun::star::drawing; DECLARE_LIST( SvxDrawPageList, SvxDrawPage * ) -extern SfxItemPropertyMap* ImplGetSvxOle2PropertyMap(); -extern SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap(); /********************************************************************** * class SvxDrawPage * @@ -828,7 +826,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 } if( pRet == NULL ) { - pRet = new SvxOle2Shape( pObj, ImplGetSvxOle2PropertyMap() ); + pRet = new SvxOle2Shape( pObj, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) ); } } break; @@ -842,7 +840,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPLIN ); break; case OBJ_PAGE: - pRet = new SvxShape( pObj, ImplGetSvxPageShapePropertyMap() ); + pRet = new SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_PAGE), aSvxMapProvider.GetPropertySet(SVXMAP_PAGE) ); break; case OBJ_MEASURE: pRet = new SvxShapeDimensioning( pObj ); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 1cf5bda741..0ab785b391 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -64,9 +64,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; using ::com::sun::star::drawing::TextVerticalAdjust; -SfxItemPropertyMap* ImplGetSvxShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxShapePropertyMap() { - static SfxItemPropertyMap aShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aShapePropertyMap_Impl[] = { EDGERADIUS_PROPERTIES FILL_PROPERTIES @@ -89,9 +89,9 @@ SfxItemPropertyMap* ImplGetSvxShapePropertyMap() return aShapePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxTextShapePropertyMap() { - static SfxItemPropertyMap aTextShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl[] = { EDGERADIUS_PROPERTIES FILL_PROPERTIES @@ -114,9 +114,9 @@ SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap() return aTextShapePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxConnectorPropertyMap() { - static SfxItemPropertyMap aConnectorPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl[] = { SPECIAL_CONNECTOR_PROPERTIES EDGERADIUS_PROPERTIES @@ -139,9 +139,9 @@ SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap() return aConnectorPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxDimensioningPropertyMap() { - static SfxItemPropertyMap aDimensioningPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl[] = { SPECIAL_DIMENSIONING_PROPERTIES EDGERADIUS_PROPERTIES @@ -164,9 +164,9 @@ SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap() return aDimensioningPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxCirclePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxCirclePropertyMap() { - static SfxItemPropertyMap aCirclePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aCirclePropertyMap_Impl[] = { SPECIAL_CIRCLE_PROPERTIES EDGERADIUS_PROPERTIES @@ -190,9 +190,9 @@ SfxItemPropertyMap* ImplGetSvxCirclePropertyMap() return aCirclePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonPropertyMap() { - static SfxItemPropertyMap aPolyPolygonPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl[] = { { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 }, SPECIAL_POLYGON_PROPERTIES @@ -217,9 +217,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap() return aPolyPolygonPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonBezierPropertyMap() { - static SfxItemPropertyMap aPolyPolygonBezierPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl[] = { { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 }, SPECIAL_POLYGON_PROPERTIES @@ -244,9 +244,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap() return aPolyPolygonBezierPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap() { - static SfxItemPropertyMap aGraphicObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl[] = { SPECIAL_GRAPHOBJ_PROPERTIES @@ -273,9 +273,9 @@ SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap() return aGraphicObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DSceneObjectPropertyMap() { - static SfxItemPropertyMap a3DSceneObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl[] = { SPECIAL_3DSCENEOBJECT_PROPERTIES FILL_PROPERTIES @@ -292,9 +292,9 @@ SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap() return a3DSceneObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DCubeObjectPropertyMap() { - static SfxItemPropertyMap a3DCubeObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl[] = { SPECIAL_3DCUBEOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES @@ -314,9 +314,9 @@ SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap() return a3DCubeObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DSphereObjectPropertyMap() { - static SfxItemPropertyMap a3DSphereObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl[] = { SPECIAL_3DSPHEREOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES @@ -335,9 +335,9 @@ SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap() return a3DSphereObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DLatheObjectPropertyMap() { - static SfxItemPropertyMap a3DLatheObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl[] = { SPECIAL_3DLATHEOBJECT_PROPERTIES @@ -362,9 +362,9 @@ SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap() return a3DLatheObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DExtrudeObjectPropertyMap() { - static SfxItemPropertyMap a3DExtrudeObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl[] = { SPECIAL_3DEXTRUDEOBJECT_PROPERTIES @@ -389,9 +389,9 @@ SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap() return a3DExtrudeObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvx3DPolygonObjectPropertyMap() { - static SfxItemPropertyMap a3DPolygonObjectPropertyMap_Impl[] = + static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl[] = { SPECIAL_3DPOLYGONOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES @@ -411,9 +411,9 @@ SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap() return a3DPolygonObjectPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxAllPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxAllPropertyMap() { - static SfxItemPropertyMap aAllPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aAllPropertyMap_Impl[] = { SHADOW_PROPERTIES LINE_PROPERTIES @@ -455,9 +455,9 @@ SfxItemPropertyMap* ImplGetSvxAllPropertyMap() return aAllPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxGroupPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxGroupPropertyMap() { - static SfxItemPropertyMap aGroupPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aGroupPropertyMap_Impl[] = { SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES @@ -469,9 +469,9 @@ SfxItemPropertyMap* ImplGetSvxGroupPropertyMap() return aGroupPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxOle2PropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap() { - static SfxItemPropertyMap aOle2PropertyMap_Impl[] = + static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] = { { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, @@ -504,9 +504,9 @@ SfxItemPropertyMap* ImplGetSvxOle2PropertyMap() return aOle2PropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxPluginPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxPluginPropertyMap() { - static SfxItemPropertyMap aPluginPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] = { { MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, { MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, @@ -535,10 +535,10 @@ SfxItemPropertyMap* ImplGetSvxPluginPropertyMap() return aPluginPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxFramePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxFramePropertyMap() { //TODO/LATER: new properties for ScrollingMode and DefaultBorder - static SfxItemPropertyMap aFramePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aFramePropertyMap_Impl[] = { { MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, { MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, @@ -570,9 +570,9 @@ SfxItemPropertyMap* ImplGetSvxFramePropertyMap() return aFramePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxAppletPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxAppletPropertyMap() { - static SfxItemPropertyMap aAppletPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] = { { MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0}, { MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0}, @@ -604,9 +604,9 @@ SfxItemPropertyMap* ImplGetSvxAppletPropertyMap() return aAppletPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap() { - static SfxItemPropertyMap aControlPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aControlPropertyMap_Impl[] = { // the following properties are mapped to the XControl Model of this shape { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, @@ -655,9 +655,9 @@ SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap() return aControlPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxPageShapePropertyMap() { - static SfxItemPropertyMap aPageShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl[] = { { MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ @@ -679,9 +679,9 @@ SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap() return aPageShapePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxCaptionPropertyMap() { - static SfxItemPropertyMap aCaptionPropertyMap_Impl[] = + static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl[] = { { MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const com::sun::star::awt::Point*)0), 0, 0 }, { MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0}, @@ -714,9 +714,9 @@ SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap() return aCaptionPropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxCustomShapePropertyMap() { - static SfxItemPropertyMap aCustomShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl[] = { { MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, { MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, @@ -739,9 +739,9 @@ SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap() return aCustomShapePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap() { - static SfxItemPropertyMap aMediaShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl[] = { { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0}, @@ -768,9 +768,9 @@ SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap() return aMediaShapePropertyMap_Impl; } -SfxItemPropertyMap* ImplGetSvxTableShapePropertyMap() +SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap() { - static SfxItemPropertyMap aTableShapePropertyMap_Impl[] = + static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl[] = { { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0}, @@ -931,8 +931,8 @@ int #endif Svx_CompareMap(const void* pSmaller, const void* pBigger ) { - int nDiff = strcmp( ((const SfxItemPropertyMap*)pSmaller)->pName, - ((const SfxItemPropertyMap*)pBigger)->pName ); + int nDiff = strcmp( ((const SfxItemPropertyMapEntry*)pSmaller)->pName, + ((const SfxItemPropertyMapEntry*)pBigger)->pName ); return nDiff; } @@ -940,22 +940,32 @@ Svx_CompareMap(const void* pSmaller, const void* pBigger ) SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider() { - for(UINT16 i=0;i<SVXMAP_END;aMapArr[i++]=NULL) ; + for(UINT16 i=0;i<SVXMAP_END; i++) + { + aSetArr[i] = 0; + aMapArr[i] = 0; + } +} + +SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider() +{ + for(UINT16 i=0;i<SVXMAP_END; i++) + delete aSetArr[i]; } // --------------------------------------------------------------------- -void SvxUnoPropertyMapProvider::Sort(USHORT nId) +/*void SvxUnoPropertyMapProvider::Sort(USHORT nId) { - SfxItemPropertyMap* pTemp = aMapArr[nId]; + SfxItemPropertyMapEntry* pTemp = aMapArr[nId]; UINT16 i = 0; while(pTemp[i].pName) { i++; } - qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMap), Svx_CompareMap); -} + qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMapEntry), Svx_CompareMap); +}*/ // --------------------------------------------------------------------- -SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId) +const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId) { DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" ); if(!aMapArr[nPropertyId]) { @@ -985,14 +995,21 @@ SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId) case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break; case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break; case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break; + case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break; default: DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" ); } - Sort(nPropertyId); +// Sort(nPropertyId); } return aMapArr[nPropertyId]; } +const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(UINT16 nPropertyId) +{ + if( !aSetArr[nPropertyId] ) + aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ) ); + return aSetArr[nPropertyId]; +} // ##################################################################### @@ -1219,20 +1236,20 @@ bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResI return TRUE; } -sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName ) +/*sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName ) { sal_Int16 nWhich = 0; - const SfxItemPropertyMap* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE ); + const SfxItemPropertyMapEntry* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE ); if( pMap ) { - const SfxItemPropertyMap* pFound = SfxItemPropertyMap::GetByName( pMap, rPropName ); + const SfxItemPropertyMapEntry* pFound = SfxItemPropertyMapEntry::getByName( pMap, rPropName ); if( pFound ) nWhich = pFound->nWID; } return nWhich; -} +} */ bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, String& rString ) throw() { diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 1b812fd25e..828c36bdc4 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -100,7 +100,7 @@ sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetSt ***********************************************************************/ SvxShapeGroup::SvxShapeGroup( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw() : - SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP) ), + SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP), aSvxMapProvider.GetPropertySet(SVXMAP_GROUP) ), mxPage( pDrawPage ) { } @@ -383,7 +383,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeGroup::getSupportedServiceNames() ***********************************************************************/ SvxShapeConnector::SvxShapeConnector( SdrObject* pObj ) throw() : - SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR) ) + SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR), aSvxMapProvider.GetPropertySet(SVXMAP_CONNECTOR) ) { } @@ -550,7 +550,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeConnector::getSupportedServiceNames() DBG_NAME(SvxShapeControl) SvxShapeControl::SvxShapeControl( SdrObject* pObj ) throw() : - SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL) ) + SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL), aSvxMapProvider.GetPropertySet(SVXMAP_CONTROL) ) { DBG_CTOR(SvxShapeControl,NULL); setShapeKind( OBJ_UNO ); @@ -1013,7 +1013,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aP //---------------------------------------------------------------------- SvxShapeDimensioning::SvxShapeDimensioning( SdrObject* pObj ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING), aSvxMapProvider.GetPropertySet(SVXMAP_DIMENSIONING) ) { } @@ -1034,7 +1034,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeDimensioning::getSupportedServiceName //---------------------------------------------------------------------- SvxShapeCircle::SvxShapeCircle( SdrObject* pObj ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE), aSvxMapProvider.GetPropertySet(SVXMAP_CIRCLE) ) { } @@ -1059,7 +1059,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCircle::getSupportedServiceNames() th //---------------------------------------------------------------------- SvxShapePolyPolygon::SvxShapePolyPolygon( SdrObject* pObj , drawing::PolygonKind eNew ) throw( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException) -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGON) ) , mePolygonKind( eNew ) { } @@ -1103,7 +1103,7 @@ basegfx::B2DPolyPolygon SAL_CALL ImplSvxPointSequenceSequenceToB2DPolyPolygon( c //---------------------------------------------------------------------- -bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapePolyPolygon::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1163,7 +1163,7 @@ bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pPrope break; } default: - return SvxShapeText::setPropertyValueImpl( pProperty, rValue ); + return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue ); } throw lang::IllegalArgumentException(); @@ -1213,7 +1213,7 @@ void SAL_CALL B2DPolyPolygonToSvxPointSequenceSequence( const basegfx::B2DPolyPo //---------------------------------------------------------------------- -bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapePolyPolygon::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1277,7 +1277,7 @@ bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pPrope break; } default: - return SvxShapeText::getPropertyValueImpl( pProperty, rValue ); + return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -1326,7 +1326,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygon::getSupportedServiceNames #include <com/sun/star/drawing/FlagSequence.hpp> //---------------------------------------------------------------------- SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pObj , drawing::PolygonKind eNew ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGONBEZIER) ) , mePolygonKind( eNew ) { } @@ -1464,7 +1464,7 @@ basegfx::B2DPolyPolygon SvxConvertPolyPolygonBezierToB2DPolyPolygon(const drawin //---------------------------------------------------------------------- -bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1496,7 +1496,7 @@ bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap* break; } default: - return SvxShapeText::setPropertyValueImpl( pProperty, rValue ); + return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); @@ -1542,7 +1542,7 @@ void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon& //---------------------------------------------------------------------- -bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1574,7 +1574,7 @@ bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap* break; } default: - return SvxShapeText::getPropertyValueImpl( pProperty, rValue ); + return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue ); } return true; } @@ -1634,7 +1634,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic //---------------------------------------------------------------------- SvxGraphicObject::SvxGraphicObject( SdrObject* pObj ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_GRAPHICOBJECT) ) { } @@ -1645,7 +1645,7 @@ SvxGraphicObject::~SvxGraphicObject() throw() //---------------------------------------------------------------------- -bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxGraphicObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { bool bOk = false; switch( pProperty->nWID ) @@ -1786,7 +1786,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShapeText::setPropertyValueImpl( pProperty, rValue ); + return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue ); } if( !bOk ) @@ -1800,7 +1800,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty //---------------------------------------------------------------------- -bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1862,7 +1862,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShapeText::getPropertyValueImpl(pProperty,rValue); + return SvxShapeText::getPropertyValueImpl(rName, pProperty,rValue); } return true; @@ -1871,7 +1871,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty /////////////////////////////////////////////////////////////////////// SvxShapeCaption::SvxShapeCaption( SdrObject* pObj ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION), aSvxMapProvider.GetPropertySet(SVXMAP_CAPTION) ) { } @@ -1884,7 +1884,7 @@ SvxShapeCaption::~SvxShapeCaption() throw() ***********************************************************************/ SvxCustomShape::SvxCustomShape( SdrObject* pObj ) throw() : - SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ) ) + SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ), aSvxMapProvider.GetPropertySet(SVXMAP_CUSTOMSHAPE) ) { } @@ -2125,7 +2125,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c } } -bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxCustomShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -2137,7 +2137,7 @@ bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, return true; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } } //---------------------------------------------------------------------- diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index cefb0054b4..f2b588657a 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -81,7 +81,7 @@ using namespace ::com::sun::star::container; //---------------------------------------------------------------------- Svx3DSceneObject::Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSCENEOBJECT) ) , mxPage( pDrawPage ) { } @@ -334,7 +334,7 @@ struct ImpRememberTransAndRect Rectangle maRect; }; -bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DSceneObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -438,7 +438,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShape::setPropertyValueImpl(pProperty, rValue); + return SvxShape::setPropertyValueImpl(rName, pProperty, rValue); } throw IllegalArgumentException(); @@ -446,7 +446,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty //---------------------------------------------------------------------- -bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DSceneObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -483,7 +483,7 @@ bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -504,7 +504,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames() //---------------------------------------------------------------------- Svx3DCubeObject::Svx3DCubeObject( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT), aSvxMapProvider.GetPropertySet(SVXMAP_3DCUBEOBJEKT) ) { } @@ -514,7 +514,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw() } //---------------------------------------------------------------------- -bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DCubeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { OGuard aGuard( Application::GetSolarMutex() ); @@ -563,7 +563,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); @@ -571,7 +571,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, //---------------------------------------------------------------------- -bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DCubeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -613,7 +613,7 @@ bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -635,7 +635,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames() //---------------------------------------------------------------------- Svx3DSphereObject::Svx3DSphereObject( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSPHEREOBJECT) ) { } @@ -646,7 +646,7 @@ Svx3DSphereObject::~Svx3DSphereObject() throw() //---------------------------------------------------------------------- -bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DSphereObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -684,7 +684,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); @@ -692,7 +692,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert //---------------------------------------------------------------------- -bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DSphereObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -729,7 +729,7 @@ bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pPropert break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -751,7 +751,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames() //---------------------------------------------------------------------- Svx3DLatheObject::Svx3DLatheObject( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DLATHEOBJECT) ) { } @@ -840,7 +840,7 @@ static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon& //---------------------------------------------------------------------- -bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DLatheObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -878,14 +878,14 @@ bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); } //---------------------------------------------------------------------- -bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DLatheObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -925,7 +925,7 @@ bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -946,7 +946,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames() ***********************************************************************/ Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DEXTRUDEOBJECT) ) { } @@ -957,7 +957,7 @@ Svx3DExtrudeObject::~Svx3DExtrudeObject() throw() //---------------------------------------------------------------------- -bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DExtrudeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -984,7 +984,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); @@ -992,7 +992,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper //---------------------------------------------------------------------- -bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DExtrudeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1034,7 +1034,7 @@ bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -1056,7 +1056,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames( //---------------------------------------------------------------------- Svx3DPolygonObject::Svx3DPolygonObject( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DPOLYGONOBJECT) ) { } @@ -1066,7 +1066,7 @@ Svx3DPolygonObject::~Svx3DPolygonObject() throw() } //---------------------------------------------------------------------- -bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1127,14 +1127,14 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); } //---------------------------------------------------------------------- -bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DPolygonObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -1173,7 +1173,7 @@ bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 2ae0ed2973..189e0cb040 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -87,12 +87,12 @@ using namespace ::com::sun::star::beans; /////////////////////////////////////////////////////////////////////// SvxOle2Shape::SvxOle2Shape( SdrObject* pObject ) throw() -: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2) ) +: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) ) { } -SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw () -: SvxShape( pObject, pPropertySet ) +SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw () +: SvxShape( pObject, pPropertyMap, pPropertySet ) { } @@ -106,7 +106,7 @@ SvxOle2Shape::~SvxOle2Shape() throw() } //XPropertySet -bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -255,13 +255,13 @@ bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co break; } default: - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); } -bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -450,7 +450,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :: break; } default: - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } return true; @@ -630,7 +630,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(rtl::OUString& rHexCLSID) /////////////////////////////////////////////////////////////////////// SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw() -: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET) ) +: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET), aSvxMapProvider.GetPropertySet(SVXMAP_APPLET) ) { SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) ); } @@ -659,7 +659,7 @@ void SAL_CALL SvxAppletShape::setPropertyValues( const ::com::sun::star::uno::Se resetModifiedState(); } -bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxAppletShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) ) { @@ -669,18 +669,18 @@ bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, if( xSet.is() ) { // allow exceptions to pass through - xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue ); + xSet->setPropertyValue( rName, rValue ); } } return true; } else { - return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue ); } } -bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxAppletShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) ) { @@ -689,21 +689,21 @@ bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY ); if( xSet.is() ) { - rValue = xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) ); + rValue = xSet->getPropertyValue( rName ); } } return true; } else { - return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue ); } } /////////////////////////////////////////////////////////////////////// SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw() -: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN) ) +: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN), aSvxMapProvider.GetPropertySet(SVXMAP_PLUGIN) ) { SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) ); } @@ -732,7 +732,7 @@ void SAL_CALL SvxPluginShape::setPropertyValues( const ::com::sun::star::uno::Se resetModifiedState(); } -bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxPluginShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) ) { @@ -742,18 +742,18 @@ bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, if( xSet.is() ) { // allow exceptions to pass through - xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue ); + xSet->setPropertyValue( rName, rValue ); } } return true; } else { - return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue ); } } -bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxPluginShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) ) { @@ -762,21 +762,21 @@ bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY ); if( xSet.is() ) { - rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) ); + rValue <<= xSet->getPropertyValue( rName ); } } return true; } else { - return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue ); } } /////////////////////////////////////////////////////////////////////// SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw() -: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME) ) +: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME), aSvxMapProvider.GetPropertySet(SVXMAP_FRAME) ) { SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) ); } @@ -805,7 +805,7 @@ void SAL_CALL SvxFrameShape::setPropertyValues( const ::com::sun::star::uno::Seq resetModifiedState(); } -bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxFrameShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) ) { @@ -815,18 +815,18 @@ bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c if( xSet.is() ) { // allow exceptions to pass through - xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue ); + xSet->setPropertyValue( rName, rValue ); } } return true; } else { - return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue ); } } -bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxFrameShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) ) { @@ -835,14 +835,14 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, : uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY ); if( xSet.is() ) { - rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) ); + rValue <<= xSet->getPropertyValue( rName ); } } return true; } else { - return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue ); + return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue ); } } @@ -851,7 +851,7 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, : ***********************************************************************/ SvxMediaShape::SvxMediaShape( SdrObject* pObj ) throw() -: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA) ) +: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA), aSvxMapProvider.GetPropertySet(SVXMAP_MEDIA) ) { SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ) ); } @@ -863,7 +863,7 @@ SvxMediaShape::~SvxMediaShape() throw() //---------------------------------------------------------------------- -bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxMediaShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( (pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM) ) { @@ -944,7 +944,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c } else { - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } throw IllegalArgumentException(); @@ -952,7 +952,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c //---------------------------------------------------------------------- -bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( ( pProperty->nWID >= OWN_ATTR_MEDIA_URL ) && ( pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM ) ) { @@ -988,6 +988,6 @@ bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, : } else { - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index edf2f81559..ee748d8514 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -121,10 +121,10 @@ using namespace ::com::sun::star::container; if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \ aAny <<= uno::Reference< xint >(this) -const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap() +const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap() { // Propertymap fuer einen Outliner Text - static const SfxItemPropertyMap aSvxUnoOutlinerTextCursorPropertyMap[] = + static const SfxItemPropertyMapEntry aSvxUnoOutlinerTextCursorPropertyMap[] = { SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, @@ -137,24 +137,15 @@ const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap() return aSvxUnoOutlinerTextCursorPropertyMap; } - -const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap() +const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet() { - // Propertymap fuer einen Outliner Text - static const SfxItemPropertyMap aSvxTextPortionPropertyMap[] = - { - SVX_UNOEDIT_CHAR_PROPERTIES, - SVX_UNOEDIT_FONT_PROPERTIES, - SVX_UNOEDIT_OUTLINER_PROPERTIES, - SVX_UNOEDIT_PARA_PROPERTIES, - {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, - {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, - {0,0,0,0,0,0} - }; - - return aSvxTextPortionPropertyMap; + static SfxItemPropertySet aTextCursorSfxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() ); + return &aTextCursorSfxPropertySet; +} +const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() +{ + static SvxItemPropertySet aTextCursorSvxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() ); + return &aTextCursorSvxPropertySet; } class GDIMetaFile; @@ -189,7 +180,8 @@ SvxShape::SvxShape( SdrObject* pObject ) throw() : maSize(100,100) , mpImpl(NULL) , mbIsMultiPropertyCall(false) -, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE)) +, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE)) +, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE)) , maDisposeListeners( maMutex ) , mbDisposing( false ) , mpObj(pObject) @@ -201,11 +193,12 @@ SvxShape::SvxShape( SdrObject* pObject ) throw() } //---------------------------------------------------------------------- -SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertyMap ) throw() +SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw() : maSize(100,100) , mpImpl(NULL) , mbIsMultiPropertyCall(false) -, maPropSet(pPropertyMap) +, mpPropSet(pPropertySet) +, maPropMapEntries(pEntries) , maDisposeListeners( maMutex ) , mbDisposing( false ) , mpObj(pObject) @@ -221,7 +214,8 @@ SvxShape::SvxShape() throw() : maSize(100,100) , mpImpl(NULL) , mbIsMultiPropertyCall(false) -, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE)) +, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE)) +, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE)) , maDisposeListeners( maMutex ) , mbDisposing( false ) , mpObj(NULL) @@ -467,7 +461,7 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) throw() Init(); - ObtainSettingsFromPropertySet( maPropSet ); + ObtainSettingsFromPropertySet( *mpPropSet ); // save user call SdrObjUserCall* pUser = mpObj->GetUserCall(); @@ -551,37 +545,6 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() } //---------------------------------------------------------------------- -// --> OD 2009-01-16 #i59051# -void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() -{ - DBG_TESTSOLARMUTEX(); - if(mpModel) - { - SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) - { - switch(eMapUnit) - { - case SFX_MAPUNIT_TWIP : - { - basegfx::B2DHomMatrix aTransform; - const double fMMToTWIPS(72.0 / 127.0); - - aTransform.scale(fMMToTWIPS, fMMToTWIPS); - rPolyPolygon.transform(aTransform); - break; - } - default: - { - DBG_ERROR("Missing unit translation to PoolMetric!"); - } - } - } - } -} -// <-- - -//---------------------------------------------------------------------- void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() { DBG_TESTSOLARMUTEX(); @@ -609,45 +572,14 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() } //---------------------------------------------------------------------- -// --> OD 2009-01-16 #i59051# -void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() -{ - DBG_TESTSOLARMUTEX(); - SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM; - if(mpModel) - { - eMapUnit = mpModel->GetItemPool().GetMetric(0); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) - { - switch(eMapUnit) - { - case SFX_MAPUNIT_TWIP : - { - basegfx::B2DHomMatrix aTransform; - const double fTWIPSToMM(127.0 / 72.0); - - aTransform.scale(fTWIPSToMM, fTWIPSToMM); - rPolyPolygon.transform(aTransform); - break; - } - default: - { - DBG_ERROR("Missing unit translation to 100th mm!"); - } - } - } - } -} -// <-- -//---------------------------------------------------------------------- -void SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw() +void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) throw() { DBG_TESTSOLARMUTEX(); if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel) { SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0); Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY ); - maPropSet.ObtainSettingsFromPropertySet(rPropSet, aSet, xShape); + mpPropSet->ObtainSettingsFromPropertySet(rPropSet, aSet, xShape); mpObj->SetMergedItemSetAndBroadcast(aSet); @@ -1426,7 +1358,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL Reference< beans::XPropertySetInfo > SAL_CALL SvxShape::_getPropertySetInfo() throw(uno::RuntimeException) { - return maPropSet.getPropertySetInfo(); + return mpPropSet->getPropertySetInfo(); } //---------------------------------------------------------------------- @@ -1656,7 +1588,8 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN //---------------------------------------------------------------------- // static -uno::Any SAL_CALL SvxShape::GetFillAttributeByName( +/* os: unused function + uno::Any SAL_CALL SvxShape::GetFillAttributeByName( const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel ) { uno::Any aResult; @@ -1837,7 +1770,7 @@ uno::Any SAL_CALL SvxShape::GetFillAttributeByName( } return aResult; -} +} */ //---------------------------------------------------------------------- @@ -1859,7 +1792,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const { OGuard aGuard( Application::GetSolarMutex() ); - const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(rPropertyName); + const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); if( mpObj.is() && mpModel ) { @@ -1871,7 +1804,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const mpModel->SetChanged(); - if(!setPropertyValueImpl( pMap, rVal ) ) + if(!setPropertyValueImpl( rPropertyName, pMap, rVal ) ) { DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" ); DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" ); @@ -1925,7 +1858,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET ) { - maPropSet.setPropertyValue( pMap, rVal, *pSet ); + mpPropSet->setPropertyValue( pMap, rVal, *pSet ); } } @@ -1963,7 +1896,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const // that support additional properties that we don't // know here we silently store *all* properties, even // if they may be not supported after creation - maPropSet.setPropertyValue( pMap, rVal ); + mpPropSet->setPropertyValue( pMap, rVal ); } } @@ -1985,7 +1918,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) { OGuard aGuard( Application::GetSolarMutex() ); - const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName); + const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); uno::Any aAny; if( mpObj.is() && mpModel ) @@ -1993,7 +1926,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) if(pMap == NULL ) throw beans::UnknownPropertyException(); - if( !getPropertyValueImpl( pMap, aAny ) ) + if( !getPropertyValueImpl( PropertyName, pMap, aAny ) ) { DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" ); DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" ); @@ -2031,7 +1964,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) if(pMap && pMap->nWID) // FixMe: see setPropertyValue - aAny = maPropSet.getPropertyValue( pMap ); + aAny = mpPropSet->getPropertyValue( pMap ); } return aAny; @@ -2170,7 +2103,7 @@ void SAL_CALL SvxShape::firePropertiesChangeEvent( const ::com::sun::star::uno:: //---------------------------------------------------------------------- -uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const +uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const { DBG_TESTSOLARMUTEX(); uno::Any aAny; @@ -2226,7 +2159,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pM default: { // Hole Wert aus ItemSet - aAny = maPropSet.getPropertyValue( pMap, aSet ); + aAny = mpPropSet->getPropertyValue( pMap, aSet ); if( *pMap->pType != aAny.getValueType() ) { @@ -2270,7 +2203,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope { OGuard aGuard( Application::GetSolarMutex() ); - const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName); + const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( !mpObj.is() || pMap == NULL ) throw beans::UnknownPropertyException(); @@ -2338,7 +2271,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope //---------------------------------------------------------------------- -bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -2482,15 +2415,10 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const if( rValue >>= aUnoPoint ) { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); - // --> OD 2009-01-16 #i59051# - // perform metric change before applying anchor position, - // because the anchor position is in pool metric. - ForceMetricToItemPoolMetric( aPoint ); - // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); -// ForceMetricToItemPoolMetric( aPoint ); + ForceMetricToItemPoolMetric( aPoint ); pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint ); return true; } @@ -2514,9 +2442,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const if ( rValue >>= aPolyPoly ) { basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) ); - // --> OD 2009-01-16 #i59051# - ForceMetricToItemPoolMetric( aNewPolyPolygon ); - // <-- if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); @@ -2541,9 +2466,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const if(pMeasureObj && ( rValue >>= aUnoPoint ) ) { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); - // --> OD 2009-01-12 #i59051# - ForceMetricToItemPoolMetric( aPoint ); - // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); @@ -2760,7 +2682,7 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const //---------------------------------------------------------------------- -bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { switch( pProperty->nWID ) { @@ -2788,7 +2710,7 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com: basegfx::B2DPolyPolygon aNewPolyPolygon; basegfx::B2DHomMatrix aNewHomogenMatrix; mpObj->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon); - + aVclPoint.X() -= basegfx::fround(aNewHomogenMatrix.get(0, 2)); aVclPoint.Y() -= basegfx::fround(aNewHomogenMatrix.get(1, 2)); @@ -2964,9 +2886,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com: aMatrix.translate( -aPoint.X(), -aPoint.Y() ); aPolyPoly.transform( aMatrix ); } - // --> OD 2009-01-16 #i59051# - ForceMetricTo100th_mm( aPolyPoly ); - // <-- drawing::PolyPolygonBezierCoords aRetval; SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval); rValue <<= aRetval; @@ -2987,9 +2906,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com: if( mpModel->IsWriter() ) aPoint -= mpObj->GetAnchorPos(); - // --> OD 2009-01-12 #i59051# - ForceMetricTo100th_mm( aPoint ); - // <-- awt::Point aUnoPoint( aPoint.X(), aPoint.Y() ); rValue <<= aUnoPoint; @@ -3161,7 +3077,7 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com: //---------------------------------------------------------------------- -bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) +bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE ) { @@ -3192,7 +3108,7 @@ bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com: //---------------------------------------------------------------------- -bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) +bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE ) { @@ -3257,7 +3173,7 @@ void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName ) { OGuard aGuard( Application::GetSolarMutex() ); - const SfxItemPropertyMap* pProperty = maPropSet.getPropertyMapEntry(PropertyName); + const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); if( !mpObj.is() || mpModel == NULL || pProperty == NULL ) throw beans::UnknownPropertyException(); @@ -3290,7 +3206,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) { OGuard aGuard( Application::GetSolarMutex() ); - const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName); + const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); if( !mpObj.is() || pMap == NULL || mpModel == NULL ) throw beans::UnknownPropertyException(); @@ -4243,21 +4159,21 @@ void SvxShape::updateShapeKind() * class SvxShapeText * ***********************************************************************/ SvxShapeText::SvxShapeText() throw () -: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() ) +: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) { } //---------------------------------------------------------------------- SvxShapeText::SvxShapeText( SdrObject* pObject ) throw () -: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() ) +: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) { if( pObject && pObject->GetModel() ) SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) ); } //---------------------------------------------------------------------- -SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw () -: SvxShape( pObject, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() ) +SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw () +: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) { if( pObject && pObject->GetModel() ) SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) ); @@ -4433,7 +4349,7 @@ void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::Runt } // overide these for special property handling in subcasses. Return true if property is handled -bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapeText::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { // HACK-fix #99090# // since SdrTextObj::SetVerticalWriting exchanges @@ -4453,10 +4369,10 @@ bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co } return true; } - return SvxShape::setPropertyValueImpl( pProperty, rValue ); + return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } -bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxShapeText::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if( pProperty->nWID == SDRATTR_TEXTDIRECTION ) { @@ -4468,15 +4384,15 @@ bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :: return true; } - return SvxShape::getPropertyValueImpl( pProperty, rValue ); + return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } -bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) +bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { return SvxShape::getPropertyStateImpl( pProperty, rState ); } -bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) +bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { return SvxShape::setPropertyToDefaultImpl( pProperty ); } @@ -4486,7 +4402,7 @@ bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ***********************************************************************/ DBG_NAME(SvxShapeRect) SvxShapeRect::SvxShapeRect( SdrObject* pObj ) throw() -: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE) ) +: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE), aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE) ) { DBG_CTOR(SvxShapeRect,NULL); |