diff options
author | Tor Lillqvist <tml@collabora.com> | 2022-01-24 16:48:04 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2022-01-25 09:22:18 +0100 |
commit | 9aa90da7e03b4b0806b27451665b7c41b8836bc0 (patch) | |
tree | 2abca057cb47d19781cbf84cc4adfe53999c1f16 /writerfilter/source/dmapper | |
parent | b0b300e6d2f6e16dbf9ad5e99b1091c79acf3516 (diff) |
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 <tml@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.hxx | 2 |
3 files changed, 8 insertions, 0 deletions
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; |