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:54:27 +0200
commit3f0c3e5fc0e19f1d322f6e22b97b48816738361b (patch)
tree4c029f441c9e6e72821ac39b210541d24e6d5c60 /writerfilter
parent95d42d5b44c026c62a5a037a6a39b012b5f38da1 (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. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx 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 92f6f10d9c6b..57e2aeda66ab 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1714,6 +1714,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, false ));
+ if( pos != paragraphContext->end())
+ xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), (*pos).second );
+ }
}
}
catch ( const uno::Exception& e )