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 0453a2ff5d51181dd3036b10a4a2d2eeef7981be
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Mon Jan 24 16:48:04 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jan 27 17:09:49 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>
    (cherry picked from commit 9aa90da7e03b4b0806b27451665b7c41b8836bc0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128966
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 19868ae74d78..fd4a720bb656 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -7390,6 +7390,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 7ca4e09ed30d..3ff83de5b713 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;

Reply via email to