writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 + writerfilter/source/dmapper/GraphicImport.cxx | 5 +++++ writerfilter/source/dmapper/GraphicImport.hxx | 2 ++ 3 files changed, 8 insertions(+)
New commits: commit 4cf82386aba021585a011979d4f3e23b2d49b55c Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Jan 24 16:48:04 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jan 26 10:57:40 2022 +0100 Take layoutInCell into consideration when placing graphic in table Set our IsFollowingTextFlow property accordingly. Thanks to Miklos for doing most of the work. Change-Id: I67d214d6ed41c19dcb2f3ad2db9be94ca77c5842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128880 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128912 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 33ab5c6853fa..cf5b22ccadd9 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -6859,6 +6859,7 @@ void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties { uno::Reference<beans::XPropertySet> xEmbeddedProps(m_xEmbedded, uno::UNO_QUERY); xEmbeddedProps->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + xEmbeddedProps->setPropertyValue("IsFollowingTextFlow", uno::makeAny(m_pGraphicImport->GetLayoutInCell())); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); xEmbeddedProps->setPropertyValue("HoriOrient", xShapeProps->getPropertyValue("HoriOrient")); xEmbeddedProps->setPropertyValue("HoriOrientPosition", xShapeProps->getPropertyValue("HoriOrientPosition")); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 5f4e2a1d60c0..3d9c1c08448c 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -456,6 +456,11 @@ com::sun::star::awt::Point GraphicImport::GetGraphicObjectPosition() const return (com::sun::star::awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition)); } +bool GraphicImport::GetLayoutInCell() const +{ + return m_pImpl->bLayoutInCell; +} + void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) { switch (nVal) diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 9ea3984db23b..c69d5db086e3 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -100,6 +100,8 @@ public: com::sun::star::awt::Point GetGraphicObjectPosition() const; + bool GetLayoutInCell() const; + private: // Properties virtual void lcl_attribute(Id Name, Value & val) override;