summaryrefslogtreecommitdiff
path: root/oox/source/vml
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-12-02 21:01:19 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-12-03 09:22:41 +0100
commitca7004569b39721c3e7247551a43d544fd3204fe (patch)
treea96e2b13c52007b3373a1b30ae124a7646c44f96 /oox/source/vml
parentc6553564a858a65a74c8727f08ae737c35b81a08 (diff)
tdf#128429 VML import: let mso-layout-flow-alt:bottom-to-top imply vertical
Normally layout flow is set to vertical to denote TBRL, and then optionally there is a layout flow alt to denote BTLR, but the bugdoc shows that the first may be missing. So map to BTLR even in case only the alt layout flow is found in the file. Change-Id: I06fce738fca9aedc0de90ccebda3a24e99425326 Reviewed-on: https://gerrit.libreoffice.org/84275 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox/source/vml')
-rw-r--r--oox/source/vml/vmlshape.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 604c2e867250..b928638954c4 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -728,13 +728,17 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceBottom )));
}
- if (getTextBox()->maLayoutFlow == "vertical")
+ sal_Int16 nWritingMode = text::WritingMode2::LR_TB;
+ if (getTextBox()->maLayoutFlow == "vertical" && maTypeModel.maLayoutFlowAlt.isEmpty())
+ {
+ nWritingMode = text::WritingMode2::TB_RL;
+ }
+ else if (maTypeModel.maLayoutFlowAlt == "bottom-to-top")
+ {
+ nWritingMode = text::WritingMode2::BT_LR;
+ }
+ if (nWritingMode != text::WritingMode2::LR_TB)
{
- sal_Int16 nWritingMode = text::WritingMode2::TB_RL;
- if (maTypeModel.maLayoutFlowAlt == "bottom-to-top")
- {
- nWritingMode = text::WritingMode2::BT_LR;
- }
PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::makeAny(nWritingMode));
}
}