summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-08-14 17:41:59 +0530
committerLuboš Luňák <l.lunak@suse.cz>2012-10-12 19:06:50 +0200
commit898e6f94e595a53f6b6fcc22e8702a7357f76a32 (patch)
treeebef31c4f0fdb59a905649715379a1bd599641ad /oox
parent73e73ca997fa921d76752b36e62bb5795b77d676 (diff)
n#759180: Push oox default spacing values.
Conflicts: oox/source/drawingml/textparagraph.cxx Change-Id: Ibb5027b3b74fb1c264fbc6b1efae9e8cd1a3b00e
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/textparagraphproperties.hxx2
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx7
2 files changed, 5 insertions, 4 deletions
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 )
{