summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-10-26 15:31:30 +0100
committerLászló Németh <nemeth@numbertext.org>2020-10-26 18:17:45 +0100
commit41e230e81b50235b5b86f883ef424a8ba5b42288 (patch)
treea1c1ca2d278448fcf67b9d79eef7433bffafd03b /writerfilter/source
parent7988adf2bd250a32885d67306c73e07caa910778 (diff)
tdf#137593 DOCX import: fix para top margin in cells with shapes
and text boxes. Auto top margin value of the first table cell paragraph is zero. Paragraphs of shapes and text boxes anchored to this cell paragraph don't matter here, so keep m_bFirstParagraphInCell=true in shapes and text box paragraphs to avoid extra top margin of the anchoring point. Regression from commit 5c6bce38a01b21403a603acd3148cf3bbb4c685f (tdf#104354 DOCX import: fix paragraph auto spacing in tables). Change-Id: I22c4ae230bc0192f06d3d155217887c471c67b67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104816 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fe1ab5c99b91..d37a6c68fb05 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2076,7 +2076,8 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
m_bParaHadField = false;
// don't overwrite m_bFirstParagraphInCell in table separator nodes
- if (m_nTableDepth > 0 && m_nTableDepth == m_nTableCellDepth)
+ // and in text boxes anchored to the first paragraph of table cells
+ if (m_nTableDepth > 0 && m_nTableDepth == m_nTableCellDepth && !IsInShape())
m_bFirstParagraphInCell = false;
m_bParaAutoBefore = false;