diff options
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index b66546ba0aba..d0984aba53c0 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -611,11 +611,20 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X); aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y); aPropSet.setProperty(PROP_Opaque, sal_False); + // I'm not sure if AT_PAGE is always correct here (not sure what the parent that + // the spec talks about can be), but with Writer SwXDrawPage::add() + // always in practice uses this because of pDoc->GetCurrentLayout() being NULL at this point. + aPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PAGE); } - else if( maTypeModel.maPosition == "static" || maTypeModel.maPosition.isEmpty()) - { // static position (the default) means anchored inline - aPropSet.setProperty(PROP_AnchorType, makeAny(text::TextContentAnchorType_AS_CHARACTER)); + else if( maTypeModel.maPosition == "relative" ) + { // I'm not very sure this is correct either. + aPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PARAGRAPH); } + else // static (is the default) means anchored inline + { + aPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AS_CHARACTER); + } + if ( maTypeModel.maPositionVerticalRelative == "page" ) { aPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_FRAME); |