summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-09-27 16:59:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-01 07:49:09 +0000
commitbccb5eff14b2aebd18fd933c2790d78a2fa940e9 (patch)
treec45b8bd02292aa2df622a1ae484bf3c2fca6af9a /oox
parentdea3d98936aad30a7d6804c76e502c9fc9603985 (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')
-rw-r--r--oox/source/token/properties.txt1
-rw-r--r--oox/source/vml/vmlshape.cxx27
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);
}
}