summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
commite8cad7c6d2daf5b2b4ec672dbf740737fba426fd (patch)
treea94374930a560bd30e01a00664dd113a745587b3 /sd
parent6c8a6d114da643b699e0e1395d319b3ad4e65503 (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 'sd')
-rw-r--r--sd/inc/stlsheet.hxx2
-rw-r--r--sd/source/core/stlsheet.cxx128
-rw-r--r--sd/source/ui/inc/unomodel.hxx2
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx19
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx20
-rw-r--r--sd/source/ui/unoidl/unolayer.hxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx22
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx211
-rw-r--r--sd/source/ui/unoidl/unoobj.hxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx187
-rw-r--r--sd/source/ui/unoidl/unopage.hxx6
-rw-r--r--sd/source/ui/unoidl/unopback.cxx115
-rw-r--r--sd/source/ui/unoidl/unopback.hxx6
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx12
14 files changed, 428 insertions, 308 deletions
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index f85a5c4c0d77..f683492c2110 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -131,7 +131,7 @@ public:
void notifyModifyListener();
protected:
- const SfxItemPropertyMap* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
+ const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
virtual void Load (SvStream& rIn, USHORT nVersion);
virtual void Store(SvStream& rOut);
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index f4fcf9e87181..7a273b94b866 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -84,9 +84,9 @@ using namespace ::com::sun::star::drawing;
#define WID_STYLE_DISPNAME 7998
#define WID_STYLE_FAMILY 7999
-static SvxItemPropertySet& GetStylePropertyMap()
+static SvxItemPropertySet& GetStylePropertySet()
{
- static const SfxItemPropertyMap aFullPropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aFullPropertyMap_Impl[] =
{
{ RTL_CONSTASCII_STRINGPARAM("Family"), WID_STYLE_FAMILY, &::getCppuType((const OUString*)0), PropertyAttribute::READONLY, 0},
{ RTL_CONSTASCII_STRINGPARAM("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &XNameContainer::static_type(), 0, 0},
@@ -1091,7 +1091,10 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw
Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() throw(RuntimeException)
{
throwIfDisposed();
- return GetStylePropertyMap().getPropertySetInfo();
+ static Reference< XPropertySetInfo > xInfo;
+ if( !xInfo.is() )
+ xInfo = GetStylePropertySet().getPropertySetInfo();
+ return xInfo;
}
// --------------------------------------------------------------------
@@ -1101,20 +1104,20 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
OGuard aGuard( Application::GetSolarMutex() );
throwIfDisposed();
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( aPropertyName );
- if( pMap == NULL )
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
+ if( pEntry == NULL )
{
throw UnknownPropertyException();
}
else
{
- if( pMap->nWID == SDRATTR_TEXTDIRECTION )
+ if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
return; // not yet implemented for styles
- if( pMap->nWID == WID_STYLE_FAMILY )
+ if( pEntry->nWID == WID_STYLE_FAMILY )
throw PropertyVetoException();
- if( (pMap->nWID == EE_PARA_NUMBULLET) && (GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) )
+ if( (pEntry->nWID == EE_PARA_NUMBULLET) && (GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) )
{
String aStr;
const sal_uInt32 nTempHelpId = GetHelpId( aStr );
@@ -1125,7 +1128,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
SfxItemSet &rStyleSet = GetItemSet();
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
BitmapMode eMode;
if( aValue >>= eMode )
@@ -1137,12 +1140,12 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
throw IllegalArgumentException();
}
- SfxItemSet aSet( GetPool().GetPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( GetPool().GetPool(), pEntry->nWID, pEntry->nWID);
aSet.Put( rStyleSet );
if( !aSet.Count() )
{
- if( EE_PARA_NUMBULLET == pMap->nWID )
+ if( EE_PARA_NUMBULLET == pEntry->nWID )
{
Font aBulletFont;
SdStyleSheetPool::PutNumBulletItem( this, aBulletFont );
@@ -1150,24 +1153,24 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
}
else
{
- aSet.Put( GetPool().GetPool().GetDefaultItem( pMap->nWID ) );
+ aSet.Put( GetPool().GetPool().GetDefaultItem( pEntry->nWID ) );
}
}
- if( pMap->nMemberId == MID_NAME &&
- ( pMap->nWID == XATTR_FILLBITMAP || pMap->nWID == XATTR_FILLGRADIENT ||
- pMap->nWID == XATTR_FILLHATCH || pMap->nWID == XATTR_FILLFLOATTRANSPARENCE ||
- pMap->nWID == XATTR_LINESTART || pMap->nWID == XATTR_LINEEND || pMap->nWID == XATTR_LINEDASH) )
+ if( pEntry->nMemberId == MID_NAME &&
+ ( pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT ||
+ pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ||
+ pEntry->nWID == XATTR_LINESTART || pEntry->nWID == XATTR_LINEEND || pEntry->nWID == XATTR_LINEDASH) )
{
OUString aTempName;
if(!(aValue >>= aTempName ))
throw IllegalArgumentException();
- SvxShape::SetFillAttribute( pMap->nWID, aTempName, aSet );
+ SvxShape::SetFillAttribute( pEntry->nWID, aTempName, aSet );
}
- else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pMap, aValue, aSet ))
+ else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pEntry, aValue, aSet ))
{
- GetStylePropertyMap().setPropertyValue( pMap, aValue, aSet );
+ GetStylePropertySet().setPropertyValue( pEntry, aValue, aSet );
}
rStyleSet.Put( aSet );
@@ -1183,8 +1186,8 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
throwIfDisposed();
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( PropertyName );
- if( pMap == NULL )
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
+ if( pEntry == NULL )
{
throw UnknownPropertyException();
}
@@ -1192,7 +1195,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
{
Any aAny;
- if( pMap->nWID == WID_STYLE_FAMILY )
+ if( pEntry->nWID == WID_STYLE_FAMILY )
{
if( nFamily == SD_STYLE_FAMILY_MASTERPAGE )
{
@@ -1204,15 +1207,15 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
aAny <<= GetFamilyString(nFamily);
}
}
- else if( pMap->nWID == WID_STYLE_DISPNAME )
+ else if( pEntry->nWID == WID_STYLE_DISPNAME )
{
aAny <<= maDisplayName;
}
- else if( pMap->nWID == SDRATTR_TEXTDIRECTION )
+ else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
{
aAny <<= sal_False;
}
- else if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
SfxItemSet &rStyleSet = GetItemSet();
@@ -1231,28 +1234,28 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
}
else
{
- SfxItemSet aSet( GetPool().GetPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( GetPool().GetPool(), pEntry->nWID, pEntry->nWID);
const SfxPoolItem* pItem;
SfxItemSet& rStyleSet = GetItemSet();
- if( rStyleSet.GetItemState( pMap->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
+ if( rStyleSet.GetItemState( pEntry->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
aSet.Put( *pItem );
if( !aSet.Count() )
- aSet.Put( GetPool().GetPool().GetDefaultItem( pMap->nWID ) );
+ aSet.Put( GetPool().GetPool().GetDefaultItem( pEntry->nWID ) );
- if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pMap, aAny ))
+ if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pEntry, aAny ))
return aAny;
// Hole Wert aus ItemSet
- aAny = GetStylePropertyMap().getPropertyValue( pMap, aSet );
+ aAny = GetStylePropertySet().getPropertyValue( pEntry, aSet );
}
- if( *pMap->pType != aAny.getValueType() )
+ if( *pEntry->pType != aAny.getValueType() )
{
// since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
- if( ( *pMap->pType == ::getCppuType((const sal_Int16*)0)) && aAny.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ if( ( *pEntry->pType == ::getCppuType((const sal_Int16*)0)) && aAny.getValueType() == ::getCppuType((const sal_Int32*)0) )
{
sal_Int32 nValue = 0;
aAny >>= nValue;
@@ -1285,20 +1288,20 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
throwIfDisposed();
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( PropertyName );
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
- if( pMap == NULL )
+ if( pEntry == NULL )
throw UnknownPropertyException();
- if( pMap->nWID == WID_STYLE_FAMILY )
+ if( pEntry->nWID == WID_STYLE_FAMILY )
{
return PropertyState_DIRECT_VALUE;
}
- else if( pMap->nWID == SDRATTR_TEXTDIRECTION )
+ else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
{
return PropertyState_DEFAULT_VALUE;
}
- else if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
const SfxItemSet& rSet = GetItemSet();
@@ -1318,7 +1321,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
PropertyState eState;
- switch( rStyleSet.GetItemState( pMap->nWID, sal_False ) )
+ switch( rStyleSet.GetItemState( pEntry->nWID, sal_False ) )
{
case SFX_ITEM_READONLY:
case SFX_ITEM_SET:
@@ -1337,7 +1340,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
// if a item is set, this doesn't mean we want it :)
if( ( PropertyState_DIRECT_VALUE == eState ) )
{
- switch( pMap->nWID )
+ switch( pEntry->nWID )
{
case XATTR_FILLBITMAP:
case XATTR_FILLGRADIENT:
@@ -1347,7 +1350,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
case XATTR_LINESTART:
case XATTR_LINEDASH:
{
- NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((USHORT)pMap->nWID);
+ NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((USHORT)pEntry->nWID);
if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1386,20 +1389,20 @@ void SAL_CALL SdStyleSheet::setPropertyToDefault( const OUString& PropertyName )
throwIfDisposed();
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( PropertyName );
- if( pMap == NULL )
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
+ if( pEntry == NULL )
throw UnknownPropertyException();
SfxItemSet &rStyleSet = GetItemSet();
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
rStyleSet.ClearItem( XATTR_FILLBMP_STRETCH );
rStyleSet.ClearItem( XATTR_FILLBMP_TILE );
}
else
{
- rStyleSet.ClearItem( pMap->nWID );
+ rStyleSet.ClearItem( pEntry->nWID );
}
Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
@@ -1412,44 +1415,37 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName ) t
throwIfDisposed();
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( aPropertyName );
- if( pMap == NULL )
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
+ if( pEntry == NULL )
throw UnknownPropertyException();
-
- if( pMap->nWID == WID_STYLE_FAMILY )
+ Any aRet;
+ if( pEntry->nWID == WID_STYLE_FAMILY )
{
- return Any( GetFamilyString(nFamily) );
+ aRet <<= GetFamilyString(nFamily);
}
- else if( pMap->nWID == SDRATTR_TEXTDIRECTION )
+ else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
{
- return Any( sal_False );
+ aRet <<= sal_False;
}
- else if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
- return Any( BitmapMode_REPEAT );
+ aRet <<= BitmapMode_REPEAT;
}
else
{
SfxItemPool& rMyPool = GetPool().GetPool();
- SfxItemSet aSet( rMyPool, pMap->nWID, pMap->nWID);
- aSet.Put( rMyPool.GetDefaultItem( pMap->nWID ) );
- return( GetStylePropertyMap().getPropertyValue( pMap, aSet ) );
+ SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID);
+ aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
+ aRet = GetStylePropertySet().getPropertyValue( pEntry, aSet );
}
+ return aRet;
}
// --------------------------------------------------------------------
/** this is used because our property map is not sorted yet */
-const SfxItemPropertyMap* SdStyleSheet::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
+const SfxItemPropertySimpleEntry* SdStyleSheet::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
{
- const SfxItemPropertyMap*pMap = GetStylePropertyMap().getPropertyMap();
- while( pMap->pName )
- {
- if( rPropertyName.compareToAscii( pMap->pName ) == 0 )
- return pMap;
- ++pMap;
- }
-
- return NULL;
+ return GetStylePropertySet().getPropertyMapEntry(rPropertyName);
}
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index abc4803c499b..a2727fdb37d2 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -122,7 +122,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxMarkerTable;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDrawingPool;
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence;
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 717de7b5a531..6d5e3e31ad80 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -117,10 +117,10 @@ namespace {
//////////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------------
-const SfxItemPropertyMap* ImplGetPresentationPropertyMap()
+const SfxItemPropertyMapEntry* ImplGetPresentationPropertyMap()
{
// NOTE: First member must be sorted
- static const SfxItemPropertyMap aPresentationPropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aPresentationPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("AllowAnimations"), ATTR_PRESENT_ANIMATION_ALLOWED, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("CustomShow"), ATTR_PRESENT_CUSTOMSHOW, &::getCppuType((const OUString*)0), 0, 0 },
@@ -143,7 +143,7 @@ const SfxItemPropertyMap* ImplGetPresentationPropertyMap()
return aPresentationPropertyMap_Impl;
}
-SfxItemPropertyMap map_impl[] = { { 0,0,0,0,0,0 } };
+//SfxItemPropertyMap map_impl[] = { { 0,0,0,0,0,0 } };
// --------------------------------------------------------------------
// class SlideShow
@@ -297,7 +297,8 @@ Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(Runt
Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo() throw(RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
- return maPropSet.getPropertySetInfo();
+ static Reference< XPropertySetInfo > xInfo = maPropSet.getPropertySetInfo();
+ return xInfo;
}
// --------------------------------------------------------------------
@@ -309,15 +310,15 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
sd::PresentationSettings& rPresSettings = mpDoc->getPresentationSettings();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = maPropSet.getPropertyMapEntry(aPropertyName);
- if( pMap && ((pMap->nFlags & PropertyAttribute::READONLY) != 0) )
+ if( pEntry && ((pEntry->nFlags & PropertyAttribute::READONLY) != 0) )
throw PropertyVetoException();
bool bValuesChanged = false;
bool bIllegalArgument = true;
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case ATTR_PRESENT_ALL:
{
@@ -582,9 +583,9 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
const sd::PresentationSettings& rPresSettings = mpDoc->getPresentationSettings();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = maPropSet.getPropertyMapEntry(PropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case ATTR_PRESENT_ALL:
return Any( (sal_Bool) ( !rPresSettings.mbCustomShow && rPresSettings.mbAll ) );
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 7072b18fdc58..96dd05a01267 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -82,9 +82,9 @@ using namespace ::com::sun::star;
#define WID_LAYER_TITLE 5
#define WID_LAYER_DESC 6
-const SfxItemPropertyMap* ImplGetSdLayerPropertyMap()
+const SvxItemPropertySet* ImplGetSdLayerPropertySet()
{
- static const SfxItemPropertyMap aSdLayerPropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aSdLayerPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_LAYER_LOCKED), WID_LAYER_LOCKED, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UNO_NAME_LAYER_PRINTABLE), WID_LAYER_PRINTABLE,&::getBooleanCppuType(), 0, 0 },
@@ -94,8 +94,8 @@ const SfxItemPropertyMap* ImplGetSdLayerPropertyMap()
{ MAP_CHAR_LEN("Description"), WID_LAYER_DESC, &::getCppuType((const OUString*)0), 0, 0 },
{ 0,0,0,0,0,0}
};
-
- return aSdLayerPropertyMap_Impl;
+ static SvxItemPropertySet aSDLayerPropertySet_Impl( aSdLayerPropertyMap_Impl );
+ return &aSDLayerPropertySet_Impl;
}
String SdLayer::convertToInternalName( const OUString& rName )
@@ -160,7 +160,7 @@ SdLayer::SdLayer( SdLayerManager* pLayerManager_, SdrLayer* pSdrLayer_ ) throw()
: pLayerManager(pLayerManager_)
, mxLayerManager(pLayerManager_)
, pLayer(pSdrLayer_)
-, aPropSet(ImplGetSdLayerPropertyMap())
+, pPropSet(ImplGetSdLayerPropertySet())
{
}
@@ -198,7 +198,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL SdLayer::getPropertySetInfo(
throw(uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
- return aPropSet.getPropertySetInfo();
+ return pPropSet->getPropertySetInfo();
}
void SAL_CALL SdLayer::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
@@ -209,9 +209,9 @@ void SAL_CALL SdLayer::setPropertyValue( const OUString& aPropertyName, const un
if(pLayer == NULL || pLayerManager == NULL)
throw lang::DisposedException();
- const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMapEntry(aPropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_LAYER_LOCKED:
{
@@ -286,11 +286,11 @@ uno::Any SAL_CALL SdLayer::getPropertyValue( const OUString& PropertyName )
if(pLayer == NULL || pLayerManager == NULL)
throw lang::DisposedException();
- const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMapEntry(PropertyName);
uno::Any aValue;
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_LAYER_LOCKED:
sd::bool2any( get( LOCKED ), aValue );
diff --git a/sd/source/ui/unoidl/unolayer.hxx b/sd/source/ui/unoidl/unolayer.hxx
index e724a4ac6826..edf4a08d8413 100644
--- a/sd/source/ui/unoidl/unolayer.hxx
+++ b/sd/source/ui/unoidl/unolayer.hxx
@@ -106,7 +106,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayerManager > mxLayerManager;
SdrLayer* pLayer;
- SvxItemPropertySet aPropSet;
+ const SvxItemPropertySet* pPropSet;
sal_Bool get( LayerAttribute what ) throw();
void set( LayerAttribute what, sal_Bool flag ) throw();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index fadfb3ebbcdd..7855039b6c46 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -187,10 +187,10 @@ const sal_Int32 WID_MODEL_BUILDID = 10;
const sal_Int32 WID_MODEL_HASVALIDSIGNATURES = 11;
const sal_Int32 WID_MODEL_DIALOGLIBS = 12;
-const SfxItemPropertyMap* ImplGetDrawModelPropertyMap()
+const SvxItemPropertySet* ImplGetDrawModelPropertySet()
{
// Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
- const static SfxItemPropertyMap aDrawModelPropertyMap_Impl[] =
+ const static SfxItemPropertyMapEntry aDrawModelPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("BuildId"), WID_MODEL_BUILDID, &::getCppuType(static_cast< const rtl::OUString * >(0)), 0, 0},
{ MAP_CHAR_LEN(sUNO_Prop_CharLocale), WID_MODEL_LANGUAGE, &::getCppuType((const lang::Locale*)0), 0, 0},
@@ -206,8 +206,8 @@ const SfxItemPropertyMap* ImplGetDrawModelPropertyMap()
{ MAP_CHAR_LEN(sUNO_Prop_HasValidSignatures), WID_MODEL_HASVALIDSIGNATURES, &::getCppuType(static_cast< const sal_Bool * >(0)), beans::PropertyAttribute::READONLY, 0 },
{ 0,0,0,0,0,0 }
};
-
- return aDrawModelPropertyMap_Impl;
+ static SvxItemPropertySet aDrawModelPropertySet_Impl( aDrawModelPropertyMap_Impl );
+ return &aDrawModelPropertySet_Impl;
}
// this ctor is used from the DocShell
@@ -218,7 +218,7 @@ SdXImpressDocument::SdXImpressDocument (::sd::DrawDocShell* pShell, bool bClipBo
mbDisposed(false),
mbImpressDoc( pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ),
mbClipBoard( bClipBoard ),
- maPropSet( ImplGetDrawModelPropertyMap() )
+ mpPropSet( ImplGetDrawModelPropertySet() )
{
if( mpDoc )
{
@@ -237,7 +237,7 @@ SdXImpressDocument::SdXImpressDocument( SdDrawDocument* pDoc, bool bClipBoard )
mbDisposed(false),
mbImpressDoc( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ),
mbClipBoard( bClipBoard ),
- maPropSet( ImplGetDrawModelPropertyMap() )
+ mpPropSet( ImplGetDrawModelPropertySet() )
{
if( mpDoc )
{
@@ -1270,7 +1270,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL SdXImpressDocument::getProper
throw(uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
@@ -1281,9 +1281,9 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
if( NULL == mpDoc )
throw lang::DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_MODEL_LANGUAGE:
{
@@ -1356,9 +1356,9 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
if( NULL == mpDoc )
throw lang::DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_MODEL_LANGUAGE:
{
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 8dbaa9a486ad..21b12f9913a6 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -148,57 +148,143 @@ static SdTypesCache gImplTypesCache;
#define WID_THAT_NEED_ANIMINFO 19
-const SfxItemPropertyMap* ImplGetShapePropertyMap( sal_Bool bImpress, sal_Bool bGraphicObj )
-{
- // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
- static const SfxItemPropertyMap aImpress_SdXShapePropertyMap_Impl[] =
- {
- { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_NAME_OBJ_ANIMATIONPATH), WID_ANIMPATH, &ITYPE(drawing::XShape), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMCOLOR), WID_DIMCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMHIDE), WID_DIMHIDE, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMPREV), WID_DIMPREV, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_EFFECT), WID_EFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_ISEMPTYPRESOBJ),WID_ISEMPTYPRESOBJ, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_ISPRESOBJ), WID_ISPRESOBJ, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_MASTERDEPENDENT),WID_MASTERDEPEND, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_PLAYFULL), WID_PLAYFULL, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_PRESORDER), WID_PRESORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE( style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDFILE), WID_SOUNDFILE, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDON), WID_SOUNDON, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_SPEED), WID_SPEED, &::getCppuType((const presentation::AnimationSpeed*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_TEXTEFFECT), WID_TEXTEFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_BLUESCREEN), WID_BLUESCREEN, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_VERB), WID_VERB, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN("IsAnimation"), WID_ISANIMATION, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
+
+
+ #define IMPRESS_MAP_ENTRIES \
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_ANIMATIONPATH), WID_ANIMPATH, &ITYPE(drawing::XShape), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMCOLOR), WID_DIMCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMHIDE), WID_DIMHIDE, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMPREV), WID_DIMPREV, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_EFFECT), WID_EFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_ISEMPTYPRESOBJ),WID_ISEMPTYPRESOBJ, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_ISPRESOBJ), WID_ISPRESOBJ, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_MASTERDEPENDENT),WID_MASTERDEPEND, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_PLAYFULL), WID_PLAYFULL, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_PRESORDER), WID_PRESORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE( style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDFILE), WID_SOUNDFILE, &::getCppuType((const OUString*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDON), WID_SOUNDON, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_SPEED), WID_SPEED, &::getCppuType((const presentation::AnimationSpeed*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_TEXTEFFECT), WID_TEXTEFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_BLUESCREEN), WID_BLUESCREEN, &::getCppuType((const sal_Int32*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_VERB), WID_VERB, &::getCppuType((const sal_Int32*)0), 0, 0},\
+ { MAP_CHAR_LEN("IsAnimation"), WID_ISANIMATION, &::getBooleanCppuType(), 0, 0},\
+ { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\
{ 0,0,0,0,0,0}
- };
- static const SfxItemPropertyMap aDraw_SdXShapePropertyMap_Impl[] =
+
+ const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertyGraphicMap_Impl()
{
- { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &ITYPE(container::XIndexContainer), 0, 0 },
- { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0),0, 0},
- { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE(style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
+
+ static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 },
+ IMPRESS_MAP_ENTRIES
+ };
+ return aImpress_SdXShapePropertyGraphicMap_Impl;
+ }
+
+ const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertySimpleMap_Impl()
+ {
+
+ static const SfxItemPropertyMapEntry aImpress_SdXShapePropertySimpleMap_Impl[] =
+ {
+ IMPRESS_MAP_ENTRIES
+ };
+ return aImpress_SdXShapePropertySimpleMap_Impl;
+ }
+
+ #define DRAW_MAP_ENTRIES\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0),0, 0},\
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE(style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},\
+ { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\
{ 0,0,0,0,0,0}
- };
- if( bImpress )
- return &aImpress_SdXShapePropertyMap_Impl[ bGraphicObj ? 0 : 1 ];
- else
- return &aDraw_SdXShapePropertyMap_Impl[ bGraphicObj ? 0 : 1 ];
-}
+ const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertySimpleMap_Impl()
+ {
+ static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyMap_Impl[] =
+ {
+ DRAW_MAP_ENTRIES
+ };
+ return aDraw_SdXShapePropertyMap_Impl;
+ }
+ const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertyGraphicMap_Impl()
+ {
+ static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 },
+ DRAW_MAP_ENTRIES
+ };
+ return aDraw_SdXShapePropertyGraphicMap_Impl;
+ }
+ const SfxItemPropertyMapEntry* lcl_ImplGetShapePropertyMap( sal_Bool bImpress, sal_Bool bGraphicObj )
+ {
+ const SfxItemPropertyMapEntry* pRet = 0;
+ if( bImpress )
+ {
+ if( bGraphicObj )
+ pRet = lcl_GetImpress_SdXShapePropertyGraphicMap_Impl();
+ else
+ pRet = lcl_GetImpress_SdXShapePropertySimpleMap_Impl();
+ }
+ else
+ {
+ if( bGraphicObj )
+ pRet = lcl_GetDraw_SdXShapePropertyGraphicMap_Impl();
+ else
+ pRet = lcl_GetDraw_SdXShapePropertySimpleMap_Impl();
+ }
+ return pRet;
-SfxItemPropertyMap aEmpty_SdXShapePropertyMap_Impl[] =
-{
- { 0,0,0,0,0,0}
-};
+ }
+ const SvxItemPropertySet* lcl_ImplGetShapePropertySet( sal_Bool bImpress, sal_Bool bGraphicObj )
+ {
+ const SvxItemPropertySet* pRet = 0;
+ if( bImpress )
+ {
+ if( bGraphicObj )
+ {
+ static SvxItemPropertySet aImpress_SdXShapePropertyGraphicSet_Impl( lcl_GetImpress_SdXShapePropertyGraphicMap_Impl());
+ pRet = &aImpress_SdXShapePropertyGraphicSet_Impl;
+ }
+ else
+ {
+ static SvxItemPropertySet aImpress_SdXShapePropertySet_Impl(lcl_GetImpress_SdXShapePropertySimpleMap_Impl());
+ pRet = &aImpress_SdXShapePropertySet_Impl;
+ }
+ }
+ else
+ {
+ if( bGraphicObj )
+ {
+ static SvxItemPropertySet aDraw_SdXShapePropertyGraphicSet_Impl(lcl_GetDraw_SdXShapePropertyGraphicMap_Impl());
+ pRet = &aDraw_SdXShapePropertyGraphicSet_Impl;
+ }
+ else
+ {
+ static SvxItemPropertySet aDraw_SdXShapePropertySet_Impl( lcl_GetDraw_SdXShapePropertySimpleMap_Impl());
+ pRet = &aDraw_SdXShapePropertySet_Impl;
+ }
+ }
+ return pRet;
+ }
+ const SfxItemPropertyMapEntry* lcl_GetEmpty_SdXShapePropertyMap_Impl()
+ {
+ static SfxItemPropertyMapEntry aEmpty_SdXShapePropertyMap_Impl[] =
+ {
+ { 0,0,0,0,0,0}
+ };
+ return aEmpty_SdXShapePropertyMap_Impl;
+ }
+ static const SvxItemPropertySet* lcl_GetEmpty_SdXShapePropertySet_Impl()
+ {
+ static SvxItemPropertySet aEmptyPropSet( lcl_GetEmpty_SdXShapePropertyMap_Impl() );
+ return &aEmptyPropSet;
+ }
const SvEventDescription* ImplGetSupportedMacroItems()
{
static const SvEventDescription aMacroDescriptionsImpl[] =
@@ -228,8 +314,8 @@ typedef SORT* PSORT;
extern "C" int __LOADONCALLAPI SortFunc( const void* p1, const void* p2 );
SdXShape::SdXShape() throw()
-: maPropSet(aEmpty_SdXShapePropertyMap_Impl),
- mpMap(aEmpty_SdXShapePropertyMap_Impl),
+: mpPropSet(lcl_GetEmpty_SdXShapePropertySet_Impl()),
+ mpMap(lcl_GetEmpty_SdXShapePropertyMap_Impl()),
mpModel(NULL),
mpImplementationId(NULL)
{
@@ -237,16 +323,17 @@ SdXShape::SdXShape() throw()
SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw()
: mpShape( pShape ),
- maPropSet( pModel?
- ImplGetShapePropertyMap(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
- : aEmpty_SdXShapePropertyMap_Impl ),
+ mpPropSet( pModel?
+ lcl_ImplGetShapePropertySet(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
+ : lcl_GetEmpty_SdXShapePropertySet_Impl() ),
mpMap( pModel?
- ImplGetShapePropertyMap(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
- : aEmpty_SdXShapePropertyMap_Impl ),
+ lcl_ImplGetShapePropertyMap(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
+ : lcl_GetEmpty_SdXShapePropertyMap_Impl() ),
mpModel(pModel),
mpImplementationId( NULL )
{
+
pShape->setMaster( this );
}
@@ -332,7 +419,7 @@ beans::PropertyState SAL_CALL SdXShape::getPropertyState( const OUString& Proper
{
OGuard aGuard( Application::GetSolarMutex() );
- if( maPropSet.getPropertyMapEntry(PropertyName) )
+ if( mpPropSet->getPropertyMapEntry(PropertyName) )
{
return beans::PropertyState_DIRECT_VALUE;
}
@@ -350,7 +437,7 @@ void SAL_CALL SdXShape::setPropertyToDefault( const OUString& PropertyName ) thr
{
OGuard aGuard( Application::GetSolarMutex() );
- if( maPropSet.getPropertyMapEntry(PropertyName) )
+ if( mpPropSet->getPropertyMapEntry(PropertyName) )
{
return;
}
@@ -364,7 +451,7 @@ uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- if( maPropSet.getPropertyMapEntry(aPropertyName) )
+ if( mpPropSet->getPropertyMapEntry(aPropertyName) )
{
return getPropertyValue( aPropertyName );
}
@@ -389,7 +476,7 @@ uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName )
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SdXShape::getPropertySetInfo()
throw(::com::sun::star::uno::RuntimeException)
{
- sal_uIntPtr nObjId = (sal_uIntPtr)mpShape->getPropertyMap();
+ sal_uIntPtr nObjId = (sal_uIntPtr)mpShape->getPropertyMapEntries();
SfxExtItemPropertySetInfo* pInfo = NULL;
SdExtPropertySetInfoCache* pCache = (mpModel && mpModel->IsImpressDocument()) ?
@@ -419,16 +506,16 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
- if( pMap )
+ if( pEntry )
{
SdrObject* pObj = mpShape->GetSdrObject();
if( pObj )
{
- SdAnimationInfo* pInfo = GetAnimationInfo((pMap->nWID <= WID_THAT_NEED_ANIMINFO)?sal_True:sal_False);
+ SdAnimationInfo* pInfo = GetAnimationInfo((pEntry->nWID <= WID_THAT_NEED_ANIMINFO)?sal_True:sal_False);
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_NAVORDER:
{
@@ -683,13 +770,13 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
uno::Any aRet;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
- if( pMap && mpShape->GetSdrObject() )
+ if( pEntry && mpShape->GetSdrObject() )
{
SdAnimationInfo* pInfo = GetAnimationInfo(sal_False);
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_NAVORDER:
{
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index f8f5784d293f..417e13bbdb60 100644
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -55,8 +55,8 @@ class SdXShape : public SvxShapeMaster,
private:
SvxShape* mpShape;
- SvxItemPropertySet maPropSet;
- const SfxItemPropertyMap* mpMap;
+ const SvxItemPropertySet* mpPropSet;
+ const SfxItemPropertyMapEntry* mpMap;
SdXImpressDocument* mpModel;
void SetStyleSheet( const ::com::sun::star::uno::Any& rAny ) throw( ::com::sun::star::lang::IllegalArgumentException );
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 1a1fa5f14bfc..6c3df06ddff3 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -133,9 +133,9 @@ enum WID_PAGE
static sal_Char __FAR_DATA sEmptyPageName[sizeof("page")] = "page";
/** this function stores the property maps for draw pages in impress and draw */
-const SfxItemPropertyMap* ImplGetDrawPagePropertyMap( sal_Bool bImpress, PageKind ePageKind )
+const SvxItemPropertySet* ImplGetDrawPagePropertySet( sal_Bool bImpress, PageKind ePageKind )
{
- static const SfxItemPropertyMap aDrawPagePropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aDrawPagePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, &ITYPE( beans::XPropertySet ), beans::PropertyAttribute::MAYBEVOID,0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0},
@@ -179,78 +179,117 @@ const SfxItemPropertyMap* ImplGetDrawPagePropertyMap( sal_Bool bImpress, PageKin
{0,0,0,0,0,0}
};
- static const SfxItemPropertyMap aDrawPageNotesHandoutPropertyMap_Impl[] =
+#define DRAW_PAGE_NOTES_PROPERTIES \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_LEFT), WID_PAGE_LEFT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT), WID_PAGE_RIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), WID_PAGE_LDBITMAP, &ITYPE( awt::XBitmap), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), WID_PAGE_LDNAME, &::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},\
+ { MAP_CHAR_LEN("IsHeaderVisible"), WID_PAGE_HEADERVISIBLE, &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("HeaderText"), WID_PAGE_HEADERTEXT, &::getCppuType((const OUString*)0), 0, 0}, \
+ { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN("IsFooterVisible"), WID_PAGE_FOOTERVISIBLE, &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("FooterText"), WID_PAGE_FOOTERTEXT, &::getCppuType((const OUString*)0), 0, 0}, \
+ { MAP_CHAR_LEN("IsPageNumberVisible"), WID_PAGE_PAGENUMBERVISIBLE, &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("IsDateTimeVisible"), WID_PAGE_DATETIMEVISIBLE, &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("IsDateTimeFixed"), WID_PAGE_DATETIMEFIXED, &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("DateTimeText"), WID_PAGE_DATETIMETEXT, &::getCppuType((const OUString*)0), 0, 0}, \
+ { MAP_CHAR_LEN("DateTimeFormat"), WID_PAGE_DATETIMEFORMAT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0, 0}, \
+ {0,0,0,0,0,0}
+
+ static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyMap_Impl[] =
{
// this must be the first two entries so they can be excluded for PK_STANDARD
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, &ITYPE( beans::XPropertySet ), beans::PropertyAttribute::MAYBEVOID,0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_LEFT), WID_PAGE_LEFT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT), WID_PAGE_RIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), WID_PAGE_LDBITMAP, &ITYPE( awt::XBitmap), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), WID_PAGE_LDNAME, &::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- { MAP_CHAR_LEN("IsHeaderVisible"), WID_PAGE_HEADERVISIBLE, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("HeaderText"), WID_PAGE_HEADERTEXT, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN("IsFooterVisible"), WID_PAGE_FOOTERVISIBLE, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("FooterText"), WID_PAGE_FOOTERTEXT, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN("IsPageNumberVisible"), WID_PAGE_PAGENUMBERVISIBLE, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("IsDateTimeVisible"), WID_PAGE_DATETIMEVISIBLE, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("IsDateTimeFixed"), WID_PAGE_DATETIMEFIXED, &::getBooleanCppuType(), 0, 0},
- { MAP_CHAR_LEN("DateTimeText"), WID_PAGE_DATETIMETEXT, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN("DateTimeFormat"), WID_PAGE_DATETIMEFORMAT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0, 0},
+ DRAW_PAGE_NOTES_PROPERTIES
+ };
+ static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyNoBackMap_Impl[] =
+ {
+ DRAW_PAGE_NOTES_PROPERTIES
+ };
+#define GRAPHIC_PAGE_PROPERTIES \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_LEFT), WID_PAGE_LEFT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT), WID_PAGE_RIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), WID_PAGE_LDBITMAP, &ITYPE(awt::XBitmap), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), WID_PAGE_LDNAME, &::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_PREVIEW), WID_PAGE_PREVIEW, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_PREVIEWBITMAP), WID_PAGE_PREVIEWBITMAP, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},\
+ { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, \
+ { MAP_CHAR_LEN(sUNO_Prop_BookmarkURL), WID_PAGE_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0}, \
+ { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0}, \
+ { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0, 0}, \
{0,0,0,0,0,0}
- };
- static const SfxItemPropertyMap aGraphicPagePropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aGraphicPagePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, &ITYPE( beans::XPropertySet), beans::PropertyAttribute::MAYBEVOID,0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_LEFT), WID_PAGE_LEFT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT), WID_PAGE_RIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), WID_PAGE_LDBITMAP, &ITYPE(awt::XBitmap), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), WID_PAGE_LDNAME, &::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_PREVIEW), WID_PAGE_PREVIEW, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_PREVIEWBITMAP), WID_PAGE_PREVIEWBITMAP, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- { MAP_CHAR_LEN(sUNO_Prop_BookmarkURL), WID_PAGE_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},
- { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0, 0},
- {0,0,0,0,0,0}
+ GRAPHIC_PAGE_PROPERTIES
+ };
+ static const SfxItemPropertyMapEntry aGraphicPagePropertyNoBackMap_Impl[] =
+ {
+ GRAPHIC_PAGE_PROPERTIES
};
+ //
+ bool bWithoutBackground = ePageKind != PK_STANDARD && ePageKind != PK_HANDOUT;
+ const SvxItemPropertySet* pRet = 0;
if( bImpress )
{
if( ePageKind == PK_STANDARD )
{
- return aDrawPagePropertyMap_Impl;
+ //PK_STANDARD always has a background property
+ static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl );
+ pRet = &aDrawPagePropertySet_Impl;
}
else
{
- return aDrawPageNotesHandoutPropertyMap_Impl;
+ if(bWithoutBackground)
+ {
+ static SvxItemPropertySet aDrawPageNotesHandoutPropertyNoBackSet_Impl( aDrawPageNotesHandoutPropertyNoBackMap_Impl );
+ pRet = &aDrawPageNotesHandoutPropertyNoBackSet_Impl;
+ }
+ else
+ {
+ static SvxItemPropertySet aDrawPageNotesHandoutPropertySet_Impl( aDrawPageNotesHandoutPropertyMap_Impl );
+ pRet = &aDrawPageNotesHandoutPropertySet_Impl;
+ }
}
}
else
- return aGraphicPagePropertyMap_Impl;
+ {
+ if(bWithoutBackground)
+ {
+ static SvxItemPropertySet aGraphicPagePropertyNoBackSet_Impl( aGraphicPagePropertyNoBackMap_Impl );
+ pRet = &aGraphicPagePropertyNoBackSet_Impl;
+ }
+ else
+ {
+ static SvxItemPropertySet aGraphicPagePropertySet_Impl( aGraphicPagePropertyMap_Impl );
+ pRet = &aGraphicPagePropertySet_Impl;
+ }
+ }
+ return pRet;
}
/** this function stores the property map for master pages in impress and draw */
-const SfxItemPropertyMap* ImplGetMasterPagePropertyMap( PageKind ePageKind )
+const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
{
- static const SfxItemPropertyMap aMasterPagePropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aMasterPagePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, &ITYPE(beans::XPropertySet), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0},
@@ -269,7 +308,7 @@ const SfxItemPropertyMap* ImplGetMasterPagePropertyMap( PageKind ePageKind )
{0,0,0,0,0,0}
};
- static const SfxItemPropertyMap aHandoutMasterPagePropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aHandoutMasterPagePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_PAGE_BOTTOM), WID_PAGE_BOTTOM, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_LEFT), WID_PAGE_LEFT, &::getCppuType((const sal_Int32*)0), 0, 0},
@@ -293,14 +332,18 @@ const SfxItemPropertyMap* ImplGetMasterPagePropertyMap( PageKind ePageKind )
{0,0,0,0,0,0}
};
+ const SvxItemPropertySet* pRet = 0;
if( ePageKind == PK_HANDOUT )
{
- return aHandoutMasterPagePropertyMap_Impl;
+ static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl );
+ pRet = &aHandoutMasterPagePropertySet_Impl;
}
else
{
- return aMasterPagePropertyMap_Impl;
+ static SvxItemPropertySet aMasterPagePropertySet_Impl( aMasterPagePropertyMap_Impl );
+ pRet = &aMasterPagePropertySet_Impl;
}
+ return pRet;
}
UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage );
@@ -308,12 +351,12 @@ UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage );
/***********************************************************************
* *
***********************************************************************/
-SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPage, const SfxItemPropertyMap* pMap ) throw()
+SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPage, const SvxItemPropertySet* _pSet ) throw()
: SvxFmDrawPage( (SdrPage*) pInPage ),
SdUnoSearchReplaceShape(this),
mpModel ( _pModel ),
mpSdrModel(0),
- maPropSet ( (pInPage&& (pInPage->GetPageKind() != PK_STANDARD) && (pInPage->GetPageKind() != PK_HANDOUT) )?&pMap[1]:pMap ),
+ mpPropSet ( _pSet ),
mbHasBackgroundObject(sal_False),
mbIsImpressDocument(false)
{
@@ -489,7 +532,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL SdGenericDrawPage::getPropertySetI
{
OGuard aGuard( Application::GetSolarMutex() );
throwIfDisposed();
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
@@ -499,9 +542,9 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
throwIfDisposed();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_NAVORDER:
setNavigationOrder( aValue );
@@ -518,7 +561,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
if(!(aValue >>= nValue))
throw lang::IllegalArgumentException();
- switch( pMap->nWID )
+ switch( pEntry->nWID )
{
case WID_PAGE_LEFT:
SetLftBorder(nValue);
@@ -729,7 +772,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
{
sd::HeaderFooterSettings aHeaderFooterSettings( GetPage()->getHeaderFooterSettings() );
- switch( pMap->nWID )
+ switch( pEntry->nWID )
{
case WID_PAGE_HEADERVISIBLE:
{
@@ -895,9 +938,9 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
uno::Any aAny;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_NAVORDER:
aAny = getNavigationOrder();
@@ -1926,7 +1969,7 @@ Sequence< OUString > SAL_CALL SdPageLinkTargets::getSupportedServiceNames()
//========================================================================
SdDrawPage::SdDrawPage( SdXImpressDocument* pModel, SdPage* pPage ) throw()
-: SdGenericDrawPage( pModel, pPage, ImplGetDrawPagePropertyMap( pModel->IsImpressDocument(), pPage->GetPageKind() ) )
+: SdGenericDrawPage( pModel, pPage, ImplGetDrawPagePropertySet( pModel->IsImpressDocument(), pPage->GetPageKind() ) )
{
}
@@ -2585,7 +2628,7 @@ Any SdGenericDrawPage::getNavigationOrder()
//========================================================================
SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage ) throw()
-: SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertyMap( pPage ? pPage->GetPageKind() : PK_STANDARD ) )
+: SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( pPage ? pPage->GetPageKind() : PK_STANDARD ) )
{
mbHasBackgroundObject = pPage && GetPage()->GetPageKind() == PK_STANDARD;
}
@@ -2794,19 +2837,19 @@ void SdMasterPage::setBackground( const Any& rValue )
Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_QUERY_THROW );
Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY );
- const SfxItemPropertyMap* pMap = ImplGetPageBackgroundPropertyMap();
- while( pMap->pName )
+ PropertyEntryVector_t aBackgroundProperties = ImplGetPageBackgroundPropertySet()->getPropertyMap()->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aIt = aBackgroundProperties.begin();
+ while( aIt != aBackgroundProperties.end() )
{
- const OUString aPropName( OUString::createFromAscii(pMap->pName) );
- if( xSetInfo->hasPropertyByName( aPropName ) )
+ if( xSetInfo->hasPropertyByName( aIt->sName ) )
{
- if( !xSetStates.is() || xSetStates->getPropertyState( aPropName ) == beans::PropertyState_DIRECT_VALUE )
- xStyleSet->setPropertyValue( aPropName, xInputSet->getPropertyValue( aPropName ) );
+ if( !xSetStates.is() || xSetStates->getPropertyState( aIt->sName ) == beans::PropertyState_DIRECT_VALUE )
+ xStyleSet->setPropertyValue( aIt->sName, xInputSet->getPropertyValue( aIt->sName ) );
else
- xSetStates->setPropertyToDefault( aPropName );
+ xSetStates->setPropertyToDefault( aIt->sName );
}
- ++pMap;
+ ++aIt;
}
}
}
diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx
index c8ef914f2071..161bba627bc1 100644
--- a/sd/source/ui/unoidl/unopage.hxx
+++ b/sd/source/ui/unoidl/unopage.hxx
@@ -52,7 +52,7 @@
class SdPage;
class SvxShape;
class SdrObject;
-struct SfxItemPropertyMap;
+struct SfxItemPropertySimpleEntry;
#ifdef SVX_LIGHT
#define SvxFmDrawPage SvxDrawPage
@@ -78,7 +78,7 @@ private:
protected:
friend class SdXImpressDocument;
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
virtual void setBackground( const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::lang::IllegalArgumentException);
virtual void getBackground( ::com::sun::star::uno::Any& rValue ) throw();
@@ -105,7 +105,7 @@ protected:
void throwIfDisposed() const throw (::com::sun::star::uno::RuntimeException );
public:
- SdGenericDrawPage( SdXImpressDocument* pModel, SdPage* pInPage, const SfxItemPropertyMap* pMap ) throw();
+ SdGenericDrawPage( SdXImpressDocument* pModel, SdPage* pInPage, const SvxItemPropertySet* pSet ) throw();
virtual ~SdGenericDrawPage() throw();
// intern
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index ab7b725d8b23..8c1c8ac5e7e1 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -53,21 +53,22 @@ using namespace ::rtl;
using namespace ::vos;
using namespace ::com::sun::star;
-const SfxItemPropertyMap* ImplGetPageBackgroundPropertyMap()
+const SvxItemPropertySet* ImplGetPageBackgroundPropertySet()
{
- static const SfxItemPropertyMap aPageBackgroundPropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aPageBackgroundPropertyMap_Impl[] =
{
FILL_PROPERTIES
{0,0,0,0,0,0}
};
- return aPageBackgroundPropertyMap_Impl;
+ static SvxItemPropertySet aPageBackgroundPropertySet_Impl( aPageBackgroundPropertyMap_Impl );
+ return &aPageBackgroundPropertySet_Impl;
}
UNO3_GETIMPLEMENTATION_IMPL( SdUnoPageBackground );
SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc /* = NULL */, SdrObject* pObj /* = NULL */ ) throw()
-: maPropSet( ImplGetPageBackgroundPropertyMap() ), mpSet( NULL ), mpDoc( pDoc )
+: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc )
{
if( pDoc )
{
@@ -80,7 +81,7 @@ SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc /* = NULL */, Sdr
}
SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw()
-: maPropSet( ImplGetPageBackgroundPropertyMap() ), mpSet( NULL ), mpDoc( pDoc )
+: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc )
{
if( pDoc )
{
@@ -130,34 +131,34 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
mpSet = new SfxItemSet( *rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST );
- if( maPropSet.AreThereOwnUsrAnys() )
+ if( mpPropSet->AreThereOwnUsrAnys() )
{
uno::Any* pAny;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
- while( pMap->pName )
+ PropertyEntryVector_t aProperties = mpPropSet->getPropertyMap()->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aIt = aProperties.begin();
+ while( aIt != aProperties.end() )
{
- pAny = maPropSet.GetUsrAnyForID( pMap->nWID );
+ pAny = mpPropSet->GetUsrAnyForID( aIt->nWID );
if( pAny )
{
- OUString aPropertyName( OUString::createFromAscii(pMap->pName));
- if ( pMap->nWID == XATTR_FILLBITMAP )
+ if ( aIt->nWID == XATTR_FILLBITMAP )
{
if ( ( ( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0) ) ||
( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >*)0) ) ) &&
- ( pMap->nMemberId == MID_BITMAP ) )
+ ( aIt->nMemberId == MID_BITMAP ) )
{
- setPropertyValue( aPropertyName, *pAny );
+ setPropertyValue( aIt->sName, *pAny );
}
else if ( ( pAny->getValueType() == ::getCppuType((const ::rtl::OUString*)0) ) &&
- ( ( pMap->nMemberId == MID_NAME ) || ( pMap->nMemberId == MID_GRAFURL ) ) )
+ ( ( aIt->nMemberId == MID_NAME ) || ( aIt->nMemberId == MID_GRAFURL ) ) )
{
- setPropertyValue( aPropertyName, *pAny );
+ setPropertyValue( aIt->sName, *pAny );
}
}
else
- setPropertyValue( aPropertyName, *pAny );
+ setPropertyValue( aIt->sName, *pAny );
}
- pMap++;
+ ++aIt;
}
}
}
@@ -194,7 +195,7 @@ uno::Sequence< OUString > SAL_CALL SdUnoPageBackground::getSupportedServiceNames
uno::Reference< beans::XPropertySetInfo > SAL_CALL SdUnoPageBackground::getPropertySetInfo()
throw(uno::RuntimeException)
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
@@ -202,9 +203,9 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = getPropertyMapEntry( aPropertyName );
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
- if( pMap == NULL )
+ if( pEntry == NULL )
{
throw beans::UnknownPropertyException();
}
@@ -212,7 +213,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
{
if( mpSet )
{
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
drawing::BitmapMode eMode;
if( aValue >>= eMode )
@@ -225,31 +226,31 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
}
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
aSet.Put( *mpSet );
if( !aSet.Count() )
- aSet.Put( rPool.GetDefaultItem( pMap->nWID ) );
+ aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
- if( pMap->nMemberId == MID_NAME && ( pMap->nWID == XATTR_FILLBITMAP || pMap->nWID == XATTR_FILLGRADIENT || pMap->nWID == XATTR_FILLHATCH || pMap->nWID == XATTR_FILLFLOATTRANSPARENCE ) )
+ if( pEntry->nMemberId == MID_NAME && ( pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT || pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ) )
{
OUString aName;
if(!(aValue >>= aName ))
throw lang::IllegalArgumentException();
- SvxShape::SetFillAttribute( pMap->nWID, aName, aSet );
+ SvxShape::SetFillAttribute( pEntry->nWID, aName, aSet );
}
else
{
- maPropSet.setPropertyValue( pMap, aValue, aSet );
+ mpPropSet->setPropertyValue( pEntry, aValue, aSet );
}
mpSet->Put( aSet );
}
else
{
- if(pMap && pMap->nWID)
- maPropSet.setPropertyValue( pMap, aValue );
+ if(pEntry && pEntry->nWID)
+ mpPropSet->setPropertyValue( pEntry, aValue );
}
}
}
@@ -260,9 +261,9 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
OGuard aGuard( Application::GetSolarMutex() );
uno::Any aAny;
- const SfxItemPropertyMap* pMap = getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pMap == NULL )
+ if( pEntry == NULL )
{
throw beans::UnknownPropertyException();
}
@@ -270,7 +271,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
{
if( mpSet )
{
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
XFillBmpStretchItem* pStretchItem = (XFillBmpStretchItem*)mpSet->GetItem(XATTR_FILLBMP_STRETCH);
XFillBmpTileItem* pTileItem = (XFillBmpTileItem*)mpSet->GetItem(XATTR_FILLBMP_TILE);
@@ -288,20 +289,20 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
aSet.Put( *mpSet );
if( !aSet.Count() )
- aSet.Put( rPool.GetDefaultItem( pMap->nWID ) );
+ aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
// Hole Wert aus ItemSet
- aAny = maPropSet.getPropertyValue( pMap, aSet );
+ aAny = mpPropSet->getPropertyValue( pEntry, aSet );
}
}
else
{
- if(pMap && pMap->nWID)
- aAny = maPropSet.getPropertyValue( pMap );
+ if(pEntry && pEntry->nWID)
+ aAny = mpPropSet->getPropertyValue( pEntry );
}
}
return aAny;
@@ -318,14 +319,14 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pMap == NULL )
+ if( pEntry == NULL )
throw beans::UnknownPropertyException();
if( mpSet )
{
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
if( mpSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET ||
mpSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET )
@@ -338,7 +339,7 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr
}
}
- switch( mpSet->GetItemState( pMap->nWID, sal_False ) )
+ switch( mpSet->GetItemState( pEntry->nWID, sal_False ) )
{
case SFX_ITEM_READONLY:
case SFX_ITEM_SET:
@@ -353,7 +354,7 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr
}
else
{
- if( NULL == maPropSet.GetUsrAnyForID(pMap->nWID) )
+ if( NULL == mpPropSet->GetUsrAnyForID(pEntry->nWID) )
return beans::PropertyState_DEFAULT_VALUE;
else
return beans::PropertyState_DIRECT_VALUE;
@@ -382,21 +383,21 @@ void SAL_CALL SdUnoPageBackground::setPropertyToDefault( const OUString& Propert
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pMap == NULL )
+ if( pEntry == NULL )
throw beans::UnknownPropertyException();
if( mpSet )
{
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
mpSet->ClearItem( XATTR_FILLBMP_STRETCH );
mpSet->ClearItem( XATTR_FILLBMP_TILE );
}
else
{
- mpSet->ClearItem( pMap->nWID );
+ mpSet->ClearItem( pEntry->nWID );
}
}
}
@@ -406,40 +407,32 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = getPropertyMapEntry(aPropertyName);
- if( pMap == NULL || mpSet == NULL )
+ const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(aPropertyName);
+ if( pEntry == NULL || mpSet == NULL )
throw beans::UnknownPropertyException();
uno::Any aAny;
if( mpSet )
{
- if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
{
aAny <<= drawing::BitmapMode_REPEAT;
}
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pMap->nWID, pMap->nWID);
- aSet.Put( rPool.GetDefaultItem( pMap->nWID ) );
+ SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
+ aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
- aAny = maPropSet.getPropertyValue( pMap, aSet );
+ aAny = mpPropSet->getPropertyValue( pEntry, aSet );
}
}
return aAny;
}
/** this is used because our property map is not sorted yet */
-const SfxItemPropertyMap* SdUnoPageBackground::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
+const SfxItemPropertySimpleEntry* SdUnoPageBackground::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
{
- const SfxItemPropertyMap *pMap = maPropSet.getPropertyMap();
- while( pMap->pName )
- {
- if( rPropertyName.compareToAscii( pMap->pName ) == 0 )
- return pMap;
- ++pMap;
- }
-
- return NULL;
+ return mpPropSet->getPropertyMap()->getByName(rPropertyName);
}
diff --git a/sd/source/ui/unoidl/unopback.hxx b/sd/source/ui/unoidl/unopback.hxx
index bd06ee40021d..61e8f88b4b7e 100644
--- a/sd/source/ui/unoidl/unopback.hxx
+++ b/sd/source/ui/unoidl/unopback.hxx
@@ -42,7 +42,7 @@
#include <cppuhelper/implbase4.hxx>
-const SfxItemPropertyMap* ImplGetPageBackgroundPropertyMap();
+const SvxItemPropertySet* ImplGetPageBackgroundPropertySet();
class SdrObject;
class SdDrawDocument;
@@ -56,11 +56,11 @@ class SdUnoPageBackground : public ::cppu::WeakImplHelper4<
public SfxListener
{
protected:
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
SfxItemSet* mpSet;
SdrModel* mpDoc;
- const SfxItemPropertyMap* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
+ const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
public:
SdUnoPageBackground( SdDrawDocument* pDoc = NULL, SdrObject* pObj = NULL ) throw();
SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw();
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 269debd1a4a1..30be3b1f9682 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -55,9 +55,9 @@ using namespace ::com::sun::star;
#define WID_SEARCH_CASE 1
#define WID_SEARCH_WORDS 2
-const SfxItemPropertyMap* ImplGetSearchPropertyMap()
+const SfxItemPropertyMapEntry* ImplGetSearchPropertyMap()
{
- static const SfxItemPropertyMap aSearchPropertyMap_Impl[] =
+ static const SfxItemPropertyMapEntry aSearchPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_SEARCH_BACKWARDS), WID_SEARCH_BACKWARDS, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UNO_NAME_SEARCH_CASE), WID_SEARCH_CASE, &::getBooleanCppuType(), 0, 0 },
@@ -785,11 +785,11 @@ void SAL_CALL SdUnoSearchReplaceDescriptor::setPropertyValue( const ::rtl::OUStr
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
sal_Bool bOk = sal_False;
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_SEARCH_BACKWARDS:
bOk = (aValue >>= mbBackwards);
@@ -815,9 +815,9 @@ uno::Any SAL_CALL SdUnoSearchReplaceDescriptor::getPropertyValue( const ::rtl::O
uno::Any aAny;
- const SfxItemPropertyMap* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
- switch( pMap ? pMap->nWID : -1 )
+ switch( pEntry ? pEntry->nWID : -1 )
{
case WID_SEARCH_BACKWARDS:
aAny <<= (sal_Bool)mbBackwards;