Kaydet (Commit) 5fb4b785 authored tarafından Muthu Subramanian's avatar Muthu Subramanian

n719734: Overridding properties from master/layout.

When there are conflicting properties in masterslide->layout->slide
most recent (i.e. e.g. slide has higher priority than layout)
should be used.
üst a21c7f83
......@@ -86,6 +86,9 @@ public:
inline void assignUsed( const PropertyMap& rPropMap )
{ insert( rPropMap.begin(), rPropMap.end() ); }
/** Inserts all properties contained in the passed property map */
void assignAll( const PropertyMap& rPropMap );
/** Returns a sequence of property values, filled with all contained properties. */
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
makePropertyValueSequence() const;
......
......@@ -376,7 +376,7 @@ TextParagraphProperties::~TextParagraphProperties()
void TextParagraphProperties::apply( const TextParagraphProperties& rSourceProps )
{
maTextParagraphPropertyMap.insert( rSourceProps.maTextParagraphPropertyMap.begin(), rSourceProps.maTextParagraphPropertyMap.end() );
maTextParagraphPropertyMap.assignAll( rSourceProps.maTextParagraphPropertyMap );
maBulletList.apply( rSourceProps.maBulletList );
maTextCharacterProperties.assignUsed( rSourceProps.maTextCharacterProperties );
if ( rSourceProps.maParaTopMargin.bHasValue )
......
......@@ -234,6 +234,12 @@ const Any* PropertyMap::getProperty( sal_Int32 nPropId ) const
return (aIt == end()) ? 0 : &aIt->second;
}
void PropertyMap::assignAll( const PropertyMap& rPropMap )
{
for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); it++ )
(*this)[it->first] = it->second;
}
Sequence< PropertyValue > PropertyMap::makePropertyValueSequence() const
{
Sequence< PropertyValue > aSeq( static_cast< sal_Int32 >( size() ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment