summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-14 15:10:34 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-14 15:13:59 +0200
commit186fc4c434384e07c18ff2dd2bd0e00a49bf17a7 (patch)
tree2ce358277a3fe91155bde030f7b7a0472b12c860 /writerfilter
parent554765b1eeade83b8b2ce537787ae4becde4d9b0 (diff)
w:spacing in a paragraph should also apply to as-char objects (bnc#780044)
Otherwise global w:spacing will be used even if overriden locally. Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 56c476580591..6f2a31efed04 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1758,6 +1758,15 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
{
xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
}
+ else
+ {
+ // Fix spacing for as-character objects. If the paragraph has CT_Spacing_after set,
+ // it needs to be set on the object too, as that's what object placement code uses.
+ PropertyMapPtr paragraphContext = GetTopContextOfType( CONTEXT_PARAGRAPH );
+ PropertyMap::const_iterator pos = paragraphContext->find( PropertyDefinition( PROP_PARA_BOTTOM_MARGIN ));
+ if( pos != paragraphContext->end())
+ xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), (*pos).second );
+ }
}
}
catch ( const uno::Exception& e )