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 9aa90da7e03b4b0806b27451665b7c41b8836bc0 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Jan 24 16:48:04 2022 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Jan 25 09:22:18 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> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 57ffccbac8f6..f0902918e0ff 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -7457,6 +7457,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 bb3b2077e4aa..4fe5712b591f 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -474,6 +474,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 57c3dbef906a..93be2df3f601 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;