diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-09-27 16:59:48 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-10-14 15:27:51 +0200 |
commit | fb03b5419e03af611ce1d349ee912efed4b09d17 (patch) | |
tree | 8cf2e84bf6d34abe3eaebdf2e02736c8804de3b3 /oox/source | |
parent | ee4b1ce2e20b81427c060bea429467bb6b9bc63f (diff) |
fix/improve handling of mso-position-(horizontal|vertical)(-relative)
This is a squash of commits f6fa787 to e5bbc721 .
Change-Id: Ieb76ccb2fe8a425af3204de144021b7a731d0778
Reviewed-on: https://gerrit.libreoffice.org/11701
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox/source')
-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 988857b257c7..f1b237b79b77 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 d7783d806cb0..3adf5c824783 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -482,12 +482,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" ) { @@ -504,7 +530,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); } } |