summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>2012-09-05 10:17:27 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-09-07 13:45:03 +0000
commit711958d8afcf7704b19e8f656aeac3cd7569e0f5 (patch)
tree4a290cc9b4a0450470c6cc6c616f869439919b78
parent419d074df87d24d4612a9e5ef5f70cb9dcefef93 (diff)
Fix docx 'absolute' frame position import
Frames with absolute position style must be vertically placed relative to 'Margin', otherwise parent paragraph style may modify their Y coord. Change-Id: Ifae8f73ad9c6aa98b67283663cfc37dd847ff095 Reviewed-on: https://gerrit.libreoffice.org/561 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r--oox/source/vml/vmlshape.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index a32030b0fe23..759947ac0fd3 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -384,8 +384,12 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel)
rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PAGE);
}
else
+ {
// Map to as-character by default, that fixes vertical position of some textframes.
rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER);
+ }
+ // Vertical placement relative to margin, because parent style must not modify vertical position
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME);
}
else if( rTypeModel.maPosition == "relative" )
{ // I'm not very sure this is correct either.