diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-09-28 21:31:08 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-09-29 18:56:21 +0200 |
commit | 6ceeb0df6987bb7f70423b473b31eec54526481d (patch) | |
tree | 470e00b6091c28686434a88c5db879029e445e0c /oox | |
parent | 1424a8174eb37d26a2ec41a981a74f34661c0044 (diff) |
proper reading of mso-position-(horizontal|vertical)(-relative)
Change-Id: I50f537c697f6e73c1fd150f3f03fc65b85ccbeaf
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/token/properties.txt | 1 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 27 |
2 files changed, 27 insertions, 1 deletions
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 90b841837c7f..f1ef48b3abaa 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -339,6 +339,7 @@ OutputPosition OverlapSequence PageScale PageStyle +PageToggle PageViewZoomValue PaintTransparent ParaAdjust diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 7c5bc5ce04e1..1c826a1ee971 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -473,12 +473,38 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel) { if ( rTypeModel.maPositionHorizontal == "center" ) rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::CENTER)); + else if ( rTypeModel.maPositionHorizontal == "left" ) + rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::LEFT)); + else if ( rTypeModel.maPositionHorizontal == "right" ) + rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::RIGHT)); + else if ( rTypeModel.maPositionHorizontal == "inside" ) + { + rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::LEFT)); + rPropSet.setAnyProperty(PROP_PageToggle, makeAny(sal_True)); + } + else if ( rTypeModel.maPositionHorizontal == "outside" ) + { + rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::RIGHT)); + rPropSet.setAnyProperty(PROP_PageToggle, makeAny(sal_True)); + } if ( rTypeModel.maPositionHorizontalRelative == "page" ) rPropSet.setAnyProperty(PROP_HoriOrientRelation, makeAny(text::RelOrientation::PAGE_FRAME)); + else if ( rTypeModel.maPositionVerticalRelative == "margin" ) + rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA); + else if ( rTypeModel.maPositionVerticalRelative == "text" ) + rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME); if ( rTypeModel.maPositionVertical == "center" ) rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::CENTER)); + else if ( rTypeModel.maPositionVertical == "top" ) + rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::TOP)); + else if ( rTypeModel.maPositionVertical == "bottom" ) + rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::BOTTOM)); + else if ( rTypeModel.maPositionVertical == "inside" ) + rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::LINE_TOP)); + else if ( rTypeModel.maPositionVertical == "outside" ) + rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::LINE_BOTTOM)); if ( rTypeModel.maPosition == "absolute" ) { @@ -495,7 +521,6 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel) } else { - // Vertical placement relative to margin, because parent style must not modify vertical position rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME); } } |