Index: main/sd/source/core/stlsheet.cxx =================================================================== --- main/sd/source/core/stlsheet.cxx (revision 1383866) +++ main/sd/source/core/stlsheet.cxx (working copy) @@ -37,6 +37,7 @@ #include "eetext.hxx" #include #include +#include #include #include #include @@ -73,11 +74,12 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::drawing; +using ::com::sun::star::table::BorderLine; #define WID_STYLE_DISPNAME 7998 #define WID_STYLE_FAMILY 7999 -static SvxItemPropertySet& GetStylePropertySet() +static SvxItemPropertySet& GetStylePropertySet(const SfxStyleFamily& nFamily) { static const SfxItemPropertyMapEntry aFullPropertyMap_Impl[] = { @@ -97,8 +99,36 @@ {0,0,0,0,0,0} }; - static SvxItemPropertySet aPropSet( aFullPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); - return aPropSet; + static const SfxItemPropertyMapEntry aFullPropertyMapEx_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}, + { RTL_CONSTASCII_STRINGPARAM("DisplayName"), WID_STYLE_DISPNAME, &::getCppuType((const OUString*)0), PropertyAttribute::READONLY, 0}, + + SVX_UNOEDIT_NUMBERING_PROPERTIE, + SHADOW_PROPERTIES + LINE_PROPERTIES + LINE_PROPERTIES_START_END + FILL_PROPERTIES + EDGERADIUS_PROPERTIES + TEXT_PROPERTIES_DEFAULTS + CONNECTOR_PROPERTIES + SPECIAL_DIMENSIONING_PROPERTIES + { MAP_CHAR_LEN("TopBorder"), SDRATTR_TABLE_BORDER, &::getCppuType((const BorderLine*)0), 0, TOP_BORDER }, \ + { MAP_CHAR_LEN("BottomBorder"), SDRATTR_TABLE_BORDER, &::getCppuType((const BorderLine*)0), 0, BOTTOM_BORDER }, \ + { MAP_CHAR_LEN("LeftBorder"), SDRATTR_TABLE_BORDER, &::getCppuType((const BorderLine*)0), 0, LEFT_BORDER }, \ + { MAP_CHAR_LEN("RightBorder"), SDRATTR_TABLE_BORDER, &::getCppuType((const BorderLine*)0), 0, RIGHT_BORDER }, \ + {0,0,0,0,0,0} + }; + + static SvxItemPropertySet aPropSet( aFullPropertyMap_Impl , SdrObject::GetGlobalDrawObjectItemPool()); + static SvxItemPropertySet aPropSetEx( aFullPropertyMapEx_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); + + if(nFamily == SD_STYLE_FAMILY_CELL) + return aPropSetEx; + else + return aPropSet; + } class ModifyListenerForewarder : public SfxListener @@ -1079,10 +1109,8 @@ Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() throw(RuntimeException) { throwIfDisposed(); - static Reference< XPropertySetInfo > xInfo; - if( !xInfo.is() ) - xInfo = GetStylePropertySet().getPropertySetInfo(); - return xInfo; + + return GetStylePropertySet(nFamily).getPropertySetInfo(); } // -------------------------------------------------------------------- @@ -1158,7 +1186,7 @@ } else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pEntry, aValue, aSet )) { - SvxItemPropertySet_setPropertyValue( GetStylePropertySet(), pEntry, aValue, aSet ); + SvxItemPropertySet_setPropertyValue( GetStylePropertySet(nFamily), pEntry, aValue, aSet ); } rStyleSet.Put( aSet ); @@ -1237,7 +1265,7 @@ return aAny; // Hole Wert aus ItemSet - aAny = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(),pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(nFamily),pEntry, aSet ); } if( *pEntry->pType != aAny.getValueType() ) @@ -1424,7 +1452,7 @@ SfxItemPool& rMyPool = GetPool().GetPool(); SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID); aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) ); - aRet = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(), pEntry, aSet ); + aRet = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(nFamily), pEntry, aSet ); } return aRet; } @@ -1434,6 +1462,6 @@ /** this is used because our property map is not sorted yet */ const SfxItemPropertySimpleEntry* SdStyleSheet::getPropertyMapEntry( const OUString& rPropertyName ) const throw() { - return GetStylePropertySet().getPropertyMapEntry(rPropertyName); + return GetStylePropertySet(nFamily).getPropertyMapEntry(rPropertyName); }