summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2021-03-08 16:07:59 +0100
committerLászló Németh <nemeth@numbertext.org>2021-03-19 16:55:03 +0100
commit48f6ce530f3546570eabdf398388185ab988636b (patch)
tree0f21d63d1ab37726853192f9ffd3904d7e0ae299 /oox
parent13ea8a2f245fd07056e9a86ed3860109950470ef (diff)
tdf#131905 PPTX table export: fix vertical alignment
Table cells lost their vertical alignment. Change-Id: Id5ca22550b5613566d7ea2a93e8a36fdca31860d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112171 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 13c52d22c56e..e889901c477c 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1780,6 +1780,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCellPropSet)
{
sal_Int32 nLeftMargin(0), nRightMargin(0);
+ TextVerticalAdjust eVerticalAlignment;
+ const char* sVerticalAlignment;
Any aLeftMargin = xCellPropSet->getPropertyValue("TextLeftDistance");
aLeftMargin >>= nLeftMargin;
@@ -1787,7 +1789,11 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell
Any aRightMargin = xCellPropSet->getPropertyValue("TextRightDistance");
aRightMargin >>= nRightMargin;
- mpFS->startElementNS(XML_a, XML_tcPr,
+ Any aVerticalAlignment = xCellPropSet->getPropertyValue("TextVerticalAdjust");
+ aVerticalAlignment >>= eVerticalAlignment;
+ sVerticalAlignment = GetTextVerticalAdjust(eVerticalAlignment);
+
+ mpFS->startElementNS(XML_a, XML_tcPr, XML_anchor, sVerticalAlignment,
XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)), nLeftMargin > 0),
XML_marR, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRightMargin)), nRightMargin > 0));