diff options
author | Justin Luth <justin.luth@collabora.com> | 2024-01-12 16:17:03 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-01-15 08:51:39 +0100 |
commit | 8132f0eb48d1b1601b690c43bcd4991c86dd1217 (patch) | |
tree | 446d712f5ec165b8f8f202861e428e7adbf1d6b2 /writerfilter/source/dmapper | |
parent | 54ad2fd256224804181050f60c0668aa24cc82f7 (diff) |
tdf#139915 tdf#159157 writerfilter: fix image position with TEXT_LINE
This is an IMAGE followup to vmiklos' shape/textbox fix in
LO 7.2 commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02
Images follow a different code path, but needed the same treatment.
Change-Id: I974944c7fbb4e0fa6aa52ac239c6a16ec7f927e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161986
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161988
Diffstat (limited to 'writerfilter/source/dmapper')
-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 63330c477cbd..eebd1b822897 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1850,6 +1850,13 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer m_pImpl->m_nLeftPosition = 0; } + if (m_pImpl->m_nVertRelation == text::RelOrientation::TEXT_LINE) + { + // Word's "line" is "below the bottom of the line", our TEXT_LINE is + // "towards top, from the bottom of the line", so invert the vertical position. + m_pImpl->m_nTopPosition *= -1; + } + m_pImpl->applyPosition(xGraphicObjectProperties); m_pImpl->applyRelativePosition(xGraphicObjectProperties); if( !m_pImpl->m_bOpaque ) |