From 898e6f94e595a53f6b6fcc22e8702a7357f76a32 Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Tue, 14 Aug 2012 17:41:59 +0530 Subject: n#759180: Push oox default spacing values. Conflicts: oox/source/drawingml/textparagraph.cxx Change-Id: Ibb5027b3b74fb1c264fbc6b1efae9e8cd1a3b00e --- oox/inc/oox/drawingml/textparagraphproperties.hxx | 2 +- oox/source/drawingml/textparagraphproperties.cxx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'oox') diff --git a/oox/inc/oox/drawingml/textparagraphproperties.hxx b/oox/inc/oox/drawingml/textparagraphproperties.hxx index 9e9fe88ef7c4..622203d0d1fc 100644 --- a/oox/inc/oox/drawingml/textparagraphproperties.hxx +++ b/oox/inc/oox/drawingml/textparagraphproperties.hxx @@ -106,7 +106,7 @@ public: void apply( const TextParagraphProperties& rSourceProps ); void pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase, const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, - PropertyMap& rioBulletList, const BulletList* pMasterBuList, sal_Bool bApplyBulletList, float fFontSize ) const; + PropertyMap& rioBulletList, const BulletList* pMasterBuList, sal_Bool bApplyBulletList, float fFontSize, bool bPushDefaultValues = false ) const; void pushToPropSet( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet) const; /** Returns the largest character size of this paragraph. If possible the diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 0ca8641dbb69..e3977af53ab6 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -391,7 +391,8 @@ void TextParagraphProperties::apply( const TextParagraphProperties& rSourceProps } void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase, - const Reference < XPropertySet >& xPropSet, PropertyMap& rioBulletMap, const BulletList* pMasterBuList, sal_Bool bApplyBulletMap, float fCharacterSize ) const + const Reference < XPropertySet >& xPropSet, PropertyMap& rioBulletMap, const BulletList* pMasterBuList, sal_Bool bApplyBulletMap, float fCharacterSize, + bool bPushDefaultValues ) const { PropertySet aPropSet( xPropSet ); aPropSet.setProperties( maTextParagraphPropertyMap ); @@ -406,9 +407,9 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p maBulletList.pushToPropMap( pFilterBase, rioBulletMap ); - if ( maParaTopMargin.bHasValue ) + if ( maParaTopMargin.bHasValue || bPushDefaultValues ) aPropSet.setProperty( PROP_ParaTopMargin, maParaTopMargin.toMargin( fCharacterSize != 0.0 ? fCharacterSize : getCharHeightPoints ( 18.0 ) ) ); - if ( maParaBottomMargin.bHasValue ) + if ( maParaBottomMargin.bHasValue || bPushDefaultValues ) aPropSet.setProperty( PROP_ParaBottomMargin, maParaBottomMargin.toMargin( fCharacterSize != 0.0 ? fCharacterSize : getCharHeightPoints ( 18.0 ) ) ); if ( nNumberingType == NumberingType::BITMAP ) { -- cgit