View | Details | Raw Unified | Return to issue 120885
Collapse All | Expand All

(-)main/sd/source/core/stlsheet.cxx (-11 / +39 lines)
Lines 37-42 Link Here
37
#include "eetext.hxx"
37
#include "eetext.hxx"
38
#include <editeng/eeitem.hxx>
38
#include <editeng/eeitem.hxx>
39
#include <editeng/fhgtitem.hxx>
39
#include <editeng/fhgtitem.hxx>
40
#include <editeng/boxitem.hxx>
40
#include <svx/svdoattr.hxx>
41
#include <svx/svdoattr.hxx>
41
#include <editeng/ulspitem.hxx>
42
#include <editeng/ulspitem.hxx>
42
#include <svl/smplhint.hxx>
43
#include <svl/smplhint.hxx>
Lines 73-83 Link Here
73
using namespace ::com::sun::star::beans;
74
using namespace ::com::sun::star::beans;
74
using namespace ::com::sun::star::container;
75
using namespace ::com::sun::star::container;
75
using namespace ::com::sun::star::drawing;
76
using namespace ::com::sun::star::drawing;
77
using ::com::sun::star::table::BorderLine;
76
78
77
#define WID_STYLE_DISPNAME	7998
79
#define WID_STYLE_DISPNAME	7998
78
#define WID_STYLE_FAMILY	7999
80
#define WID_STYLE_FAMILY	7999
79
81
80
static SvxItemPropertySet& GetStylePropertySet()
82
static SvxItemPropertySet& GetStylePropertySet(const SfxStyleFamily& nFamily)
81
{
83
{
82
	static const SfxItemPropertyMapEntry aFullPropertyMap_Impl[] =
84
	static const SfxItemPropertyMapEntry aFullPropertyMap_Impl[] =
83
	{
85
	{
Lines 97-104 Link Here
97
		{0,0,0,0,0,0}
99
		{0,0,0,0,0,0}
98
	};
100
	};
99
101
100
	static SvxItemPropertySet aPropSet( aFullPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
102
	static const SfxItemPropertyMapEntry aFullPropertyMapEx_Impl[] =
101
	return aPropSet;
103
	{
104
		{ RTL_CONSTASCII_STRINGPARAM("Family"), 				WID_STYLE_FAMILY,		&::getCppuType((const OUString*)0), PropertyAttribute::READONLY,	0},
105
		{ RTL_CONSTASCII_STRINGPARAM("UserDefinedAttributes"),	SDRATTR_XMLATTRIBUTES,	&XNameContainer::static_type(), 0,	   0},
106
		{ RTL_CONSTASCII_STRINGPARAM("DisplayName"),			WID_STYLE_DISPNAME, 	&::getCppuType((const OUString*)0), PropertyAttribute::READONLY,	0},
107
108
		SVX_UNOEDIT_NUMBERING_PROPERTIE,
109
		SHADOW_PROPERTIES
110
		LINE_PROPERTIES
111
		LINE_PROPERTIES_START_END
112
		FILL_PROPERTIES
113
		EDGERADIUS_PROPERTIES
114
		TEXT_PROPERTIES_DEFAULTS
115
		CONNECTOR_PROPERTIES
116
		SPECIAL_DIMENSIONING_PROPERTIES
117
		{ MAP_CHAR_LEN("TopBorder"),					SDRATTR_TABLE_BORDER,			&::getCppuType((const BorderLine*)0), 0, TOP_BORDER }, \
118
		{ MAP_CHAR_LEN("BottomBorder"), 				SDRATTR_TABLE_BORDER,			&::getCppuType((const BorderLine*)0), 0, BOTTOM_BORDER }, \
119
		{ MAP_CHAR_LEN("LeftBorder"),					SDRATTR_TABLE_BORDER,			&::getCppuType((const BorderLine*)0), 0, LEFT_BORDER }, \
120
		{ MAP_CHAR_LEN("RightBorder"),					SDRATTR_TABLE_BORDER,			&::getCppuType((const BorderLine*)0), 0, RIGHT_BORDER }, \
121
		{0,0,0,0,0,0}
122
	};
123
124
	static SvxItemPropertySet aPropSet( aFullPropertyMap_Impl , SdrObject::GetGlobalDrawObjectItemPool());
125
	static SvxItemPropertySet aPropSetEx( aFullPropertyMapEx_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
126
127
	if(nFamily == SD_STYLE_FAMILY_CELL)
128
		return aPropSetEx;
129
	else
130
		return aPropSet;
131
102
}
132
}
103
133
104
class ModifyListenerForewarder : public SfxListener
134
class ModifyListenerForewarder : public SfxListener
Lines 1079-1088 Link Here
1079
Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() throw(RuntimeException)
1109
Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo() throw(RuntimeException)
1080
{
1110
{
1081
	throwIfDisposed();
1111
	throwIfDisposed();
1082
    static Reference< XPropertySetInfo > xInfo;
1112
1083
    if( !xInfo.is() )
1113
	return GetStylePropertySet(nFamily).getPropertySetInfo();
1084
        xInfo = GetStylePropertySet().getPropertySetInfo();
1085
	return xInfo;
1086
}
1114
}
1087
1115
1088
// --------------------------------------------------------------------
1116
// --------------------------------------------------------------------
Lines 1158-1164 Link Here
1158
		}
1186
		}
1159
		else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pEntry, aValue, aSet ))
1187
		else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pEntry, aValue, aSet ))
1160
		{
1188
		{
1161
			SvxItemPropertySet_setPropertyValue( GetStylePropertySet(), pEntry, aValue, aSet );
1189
			SvxItemPropertySet_setPropertyValue( GetStylePropertySet(nFamily), pEntry, aValue, aSet );
1162
		}
1190
		}
1163
1191
1164
		rStyleSet.Put( aSet );
1192
		rStyleSet.Put( aSet );
Lines 1237-1243 Link Here
1237
				return aAny;
1265
				return aAny;
1238
1266
1239
			// Hole Wert aus ItemSet
1267
			// Hole Wert aus ItemSet
1240
			aAny = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(),pEntry, aSet );	
1268
			aAny = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(nFamily),pEntry, aSet );	
1241
		}
1269
		}
1242
1270
1243
		if( *pEntry->pType != aAny.getValueType() )
1271
		if( *pEntry->pType != aAny.getValueType() )
Lines 1424-1430 Link Here
1424
		SfxItemPool& rMyPool = GetPool().GetPool();
1452
		SfxItemPool& rMyPool = GetPool().GetPool();
1425
		SfxItemSet aSet( rMyPool,	pEntry->nWID, pEntry->nWID);
1453
		SfxItemSet aSet( rMyPool,	pEntry->nWID, pEntry->nWID);
1426
		aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
1454
		aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
1427
        aRet = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(), pEntry, aSet );
1455
        aRet = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(nFamily), pEntry, aSet );
1428
	}
1456
	}
1429
    return aRet;
1457
    return aRet;
1430
}
1458
}
Lines 1434-1439 Link Here
1434
/** this is used because our property map is not sorted yet */
1462
/** this is used because our property map is not sorted yet */
1435
const SfxItemPropertySimpleEntry* SdStyleSheet::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
1463
const SfxItemPropertySimpleEntry* SdStyleSheet::getPropertyMapEntry( const OUString& rPropertyName ) const throw()
1436
{
1464
{
1437
	return GetStylePropertySet().getPropertyMapEntry(rPropertyName);
1465
	return GetStylePropertySet(nFamily).getPropertyMapEntry(rPropertyName);
1438
}
1466
}
1439
1467

Return to issue 120885