summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-07-10 13:03:58 +0200
committerLászló Németh <nemeth@numbertext.org>2018-07-10 17:57:30 +0200
commit970eaaf1bdade63fd651db591c683e36e662f8f5 (patch)
treee9cf3cb6e192d9c10db9adaf911df679c49530f8 /writerfilter
parentb9bc45705bc3204c968fd6c902a1d5003c008023 (diff)
tdf#118533 fix shape import: zero top margin only in first paragraph
commit 0307a62790b33ee0c02c2323a8f759e53e2035a4 fixed the top margin import of the paragraphs of document sections, and import of first paragraph of the text frames with beforeAutospacing, but nullified all other paragraph top margins in frames. Note: there is no visible margin difference in the unit test (extended by this commit) before and after the fix, because the first paragraph uses also afterAutospacing, resulting still 14pt paragraph space. But the tested beforeAutospacing value of the next paragraph checks the fix correctly. Change-Id: I0ab3b8bbff33c5488f4b4af1ea4dabf7105103f2 Reviewed-on: https://gerrit.libreoffice.org/57231 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index ce3508f4a90c..d3719e745b13 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -654,8 +654,9 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
default_spacing = 49;
else
{
- // tdf#104354 fist paragraph has got zero top margin
- if (m_pImpl->GetIsFirstParagraphInSection())
+ // tdf#104354, tdf#118533 first paragraph of sections and shapes got zero top margin
+ if ((m_pImpl->GetIsFirstParagraphInSection() && !m_pImpl->IsInShape()) ||
+ m_pImpl->GetIsFirstParagraphInShape())
default_spacing = 0;
else
default_spacing = 280;