summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/inc/oox/drawingml/textparagraphproperties.hxx2
-rw-r--r--oox/source/drawingml/textparagraph.cxx2
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx7
3 files changed, 6 insertions, 5 deletions
diff --git a/oox/inc/oox/drawingml/textparagraphproperties.hxx b/oox/inc/oox/drawingml/textparagraphproperties.hxx
index c9f6ea7af4ae..3dacd86831ad 100644
--- a/oox/inc/oox/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/oox/drawingml/textparagraphproperties.hxx
@@ -97,7 +97,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/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 24804c822f22..163b79ca7aff 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -103,7 +103,7 @@ void TextParagraph::insertAt(
float fCharacterSize = nCharHeight > 0 ? GetFontHeight( nCharHeight ) : 18;
if ( pTextParagraphStyle.get() )
{
- pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize );
+ pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize, true );
fCharacterSize = pTextParagraphStyle->getCharHeightPoints( fCharacterSize );
// bullets have same color as following texts by default
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index e9afae2e88d6..3cd0bbaad37a 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -381,7 +381,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 );
@@ -396,9 +397,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 )
{