diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-07-30 10:37:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-07-30 11:37:00 +0200 |
commit | 6c82a9fa1da15d5f83f524f6897028906dda337e (patch) | |
tree | fc1d2efbdbf2c8cd9f1092d8e553eafd9d8ae01c /writerfilter/source/dmapper/DomainMapperTableHandler.cxx | |
parent | 89a887015044bf1208ab3820a357945c336a0c91 (diff) |
DOCX import: fix overlapping floating tables when anchored inside a table
The WW8 import does the same in SwWW8ImplReader::StartTable(), now we're
on par with that.
Change-Id: I2ce0d96d255d8f405203f36a358559687b36e9e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99762
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index ac667ddefd88..f202bda076e5 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -40,6 +40,7 @@ #include <sal/log.hxx> #include <tools/diagnose_ex.h> #include <comphelper/sequence.hxx> +#include <comphelper/propertyvalue.hxx> #ifdef DBG_UTIL #include "PropertyMapHelper.hxx" @@ -1400,6 +1401,13 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab // A non-zero left margin would move the table out of the frame, move the frame itself instead. xTableProperties->setPropertyValue("LeftMargin", uno::makeAny(sal_Int32(0))); + if (nestedTableLevel >= 2) + { + // Floating tables inside a table always stay inside the cell. + aFrameProperties.push_back( + comphelper::makePropertyValue("IsFollowingTextFlow", true)); + } + // In case the document ends with a table, we're called after // SectionPropertyMap::CloseSectionGroup(), so we'll have no idea // about the text area width, nor can fix this by delaying the text |