summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-04 21:37:14 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-07-05 10:12:03 +0200
commitc10ff1b46e0ccd9d02aae32f46aa7f4c8ef11cb7 (patch)
tree0e7eaecfbef328d1c34a3051f9b379c408108929 /oox
parentf5d96d82761c249924c8f753ccb301d2cc2c0247 (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. (cherry picked from commit bffe6a496fb1c69499770d96fefd7a3609712676) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: Ibe9a85d7f880846edfd1f4594c03b0617d83a965
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlshape.cxx29
1 files changed, 5 insertions, 24 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index a6df38fe3c98..d72809a6a895 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -726,33 +726,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