diff options
author | Szabolcs Toth <szabolcs450@gmail.com> | 2020-06-05 12:06:22 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-24 11:36:15 +0200 |
commit | 330ed8120e9881656716d70d87b9f49f861f0bfa (patch) | |
tree | d9bee5677edc857d7d119197a85c22b9410ed876 /writerfilter | |
parent | 584eba1fec6a47f4aae69afbdec7fc761bb68d29 (diff) |
tdf#133670 DOCX import: fix shape width relative to right margin
using UNO API RelativeWidthRelation 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: Balázs Regényi
Change-Id: Ic5d25701d46cdace6502ec55dbc0e5f0ebd7742b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95582
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 700fb6ca34a8..7a273ed7b984 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -955,6 +955,14 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) xPropertySet->setPropertyValue("RelativeWidthRelation", uno::makeAny(text::RelOrientation::PAGE_LEFT)); } break; + case NS_ooxml::LN_ST_SizeRelFromH_rightMargin: + if (m_xShape.is()) + { + // Same as the left margin above. + uno::Reference<beans::XPropertySet> xPropertySet(m_xShape, uno::UNO_QUERY); + xPropertySet->setPropertyValue("RelativeWidthRelation", uno::makeAny(text::RelOrientation::PAGE_RIGHT)); + } + break; case NS_ooxml::LN_ST_SizeRelFromH_page: if (m_xShape.is()) { |