summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-06-29 22:34:21 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-12 09:43:33 +0200
commit57626bd356f7e01bf5a88a204638ba1687ed545f (patch)
tree180c30f0e9606ba10485bb015a54f8475e81348d /writerfilter
parenta29b9286896e4e236041a86bf2bbad1bc6d95ca9 (diff)
tdf#118533 RTF/DOCX import: fix beforeAutospacing for first paragraph
of a text frame (first bug of tdf#104354), a table cell or a document by setting zero top margin here. This bug could result non visible paragraph content in narrow frames, as in the test document of the commit. See also commit f737c9386a605cb7d8c9dbc210c557f98f6cdc19 for a similar fix for first paragraph of a shape. Fix top margins of the first paragraphs of the affected tdf#82006 and tdf#107480, adding also new paragraphs to their RTF tests cases to keep the original tests, too. Reviewed-on: https://gerrit.libreoffice.org/56737 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 0307a62790b33ee0c02c2323a8f759e53e2035a4) Change-Id: Iea3c735eeb262233b82090fb9491991ed2df2b4e
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 8aabcd02bce2..beb43a5c07f9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -668,7 +668,13 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
if (m_pImpl->GetSettingsTable()->GetView() == NS_ooxml::LN_Value_doc_ST_View_web)
default_spacing = 49;
else
- default_spacing = 280;
+ {
+ // tdf#104354 fist paragraph has got zero top margin
+ if (m_pImpl->GetIsFirstParagraphInSection())
+ default_spacing = 0;
+ else
+ default_spacing = 280;
+ }
}
if (nIntValue) // If auto spacing is set, then only store set value in InteropGrabBag
{