diff options
author | Regényi Balázs <regenyi.balazs+gerrit@gmail.com> | 2020-06-22 10:28:15 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-02 12:32:33 +0200 |
commit | a85c2504c002dff069c129ab244cb2ba5820943d (patch) | |
tree | 1a391f6ed056c95b9d7b5f18988ab8650723ffc5 /writerfilter | |
parent | bedc5bf125bdc0377b7dc845192b274e90945e13 (diff) |
tdf#123324 DOCX import: fix shape height relative to top page margin
using UNO API RelativeHeightRelation and the associated
lo-ext attribute for OpenDocument export.
See commit 43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4
(offapi: document the 4 new properties which are no longer read-only).
Co-authored-by: Szabolcs Tóth
Change-Id: Ibaba4b3762de5a70506dacd85a818b8972b18144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96869
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 8286503ca114..6c8523ab9bff 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -996,6 +996,13 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) xPropertySet->setPropertyValue("RelativeHeightRelation", uno::makeAny(text::RelOrientation::PAGE_FRAME)); } break; + case NS_ooxml::LN_ST_SizeRelFromV_topMargin: + if (m_xShape.is()) + { + uno::Reference<beans::XPropertySet> xPropertySet(m_xShape, uno::UNO_QUERY); + xPropertySet->setPropertyValue("RelativeHeightRelation", uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA)); + } + break; case NS_ooxml::LN_ST_SizeRelFromV_bottomMargin: if (m_xShape.is()) { |