diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-07-04 21:37:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-07-05 09:04:03 +0200 |
commit | bffe6a496fb1c69499770d96fefd7a3609712676 (patch) | |
tree | 32d4e6b4d7fdc4a514c18ff960413b3b500ee674 /oox | |
parent | 623ad884051ad4ea17ba7baa77076c49000e49fa (diff) |
sw btlr writing mode: handle import from VML
Instead of the character-level rotation added in commit
8738ded7bb1bb6262fe1038e310b5110407f4cfa (fdo#69636 VML import: handle
mso-layout-flow-alt shape prop for sw frames, 2013-09-26) which does not
work for multiple paragraphs.
Change-Id: Ibe9a85d7f880846edfd1f4594c03b0617d83a965
Reviewed-on: https://gerrit.libreoffice.org/75104
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index a7529493e401..eca5399bf72c 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -728,33 +728,14 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceBottom ))); } - if (getTextBox()->maLayoutFlow == "vertical" && maTypeModel.maLayoutFlowAlt.isEmpty()) + if (getTextBox()->maLayoutFlow == "vertical") { - PropertySet(xShape).setAnyProperty(PROP_WritingMode, - uno::makeAny(text::WritingMode2::TB_RL)); - } - - if (!maTypeModel.maLayoutFlowAlt.isEmpty()) - { - // Can't handle this property here, as the frame is not attached yet: pass it to writerfilter. - uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); - uno::Sequence<beans::PropertyValue> aGrabBag; - xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; - beans::PropertyValue aPair; - aPair.Name = "mso-layout-flow-alt"; - aPair.Value <<= maTypeModel.maLayoutFlowAlt; - if (aGrabBag.hasElements()) - { - sal_Int32 nLength = aGrabBag.getLength(); - aGrabBag.realloc(nLength + 1); - aGrabBag[nLength] = aPair; - } - else + sal_Int16 nWritingMode = text::WritingMode2::TB_RL; + if (maTypeModel.maLayoutFlowAlt == "bottom-to-top") { - aGrabBag.realloc(1); - aGrabBag[0] = aPair; + nWritingMode = text::WritingMode2::BT_LR; } - xPropertySet->setPropertyValue("FrameInteropGrabBag", uno::makeAny(aGrabBag)); + PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::makeAny(nWritingMode)); } } else |