diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-08-06 14:11:38 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-08-06 17:56:32 +0200 |
commit | 090c61eb93db4302d4565d5f11f7673190835fdb (patch) | |
tree | 8c43d52341007773018078fb2ca8e42a076c6a16 /oox | |
parent | 9bda92c8e1473ba9324c4699be8d5a44781ed7d9 (diff) |
oox: VML export: for rotated text shape, produce bottom-to-top
This is for shapes that fail the lcl_isTextBox() check in
VMLExport::StartShape(), they can be rotated too but with a different
property than the "TextPreRotateAngle" that is used in
VMLExport::EndShape().
Change-Id: I530aae8b7138f47bae8434e205632f5f4adbb231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100249
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/vmlexport.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index c0e2f65db2c0..22dcc871ab83 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1369,8 +1369,23 @@ sal_Int32 VMLExport::StartShape() if( pParaObj ) { + uno::Reference<beans::XPropertySet> xPropertySet(const_cast<SdrObject*>(m_pSdrObject)->getUnoShape(), uno::UNO_QUERY); + sax_fastparser::FastAttributeList* pTextboxAttrList = FastSerializerHelper::createAttrList(); + sax_fastparser::XFastAttributeListRef xTextboxAttrList(pTextboxAttrList); + if (xPropertySet->getPropertySetInfo()->hasPropertyByName("RotateAngle")) + { + sal_Int32 nTextRotateAngle = sal_Int32(); + if (xPropertySet->getPropertyValue("RotateAngle") >>= nTextRotateAngle) + { + if (nTextRotateAngle == 9000) + { + pTextboxAttrList->add(XML_style, "mso-layout-flow-alt:bottom-to-top"); + } + } + } + // this is reached only in case some text is attached to the shape - m_pSerializer->startElementNS(XML_v, XML_textbox); + m_pSerializer->startElementNS(XML_v, XML_textbox, xTextboxAttrList); m_pTextExport->WriteOutliner(*pParaObj); m_pSerializer->endElementNS(XML_v, XML_textbox); if( bOwnParaObj ) |