Kaydet (Commit) 58e266ae authored tarafından László Németh's avatar László Németh

tdf#118949 don't set zero auto top margin in every first paragraph

of sections, only in table cells.

Partially revert of the commit 0307a627.

Change-Id: I1daf1bc49ce1acf42a55857c1b6b92c7cbcb8e00
Reviewed-on: https://gerrit.libreoffice.org/58431
Tested-by: Jenkins
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst 45f4d02d
......@@ -1225,7 +1225,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
// bottom margin is not auto spacing
uno::Reference<text::XTextRange> xCell3(xTable->getCellByName("A3"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), "ParaTopMargin"));
// FIXME next top margin will be 0 after fixing this, too
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), "ParaTopMargin"));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(847), getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), "ParaBottomMargin"));
// auto spacing, if the paragraph contains footnotes
......
......@@ -982,8 +982,8 @@ DECLARE_RTFEXPORT_TEST(testNumOverrideStart, "num-override-start.rtf")
DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf")
{
// These were 176 (100 twips), as \sbauto and \sbbefore were ignored.
// Exception: first paragraph gets zero top margin, see also tdf#104354.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(0)),
// FIXME Exception: first paragraph gets zero top margin, see tdf#118533.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
......@@ -1425,8 +1425,8 @@ DECLARE_RTFEXPORT_TEST(testTdf112507, "tdf112507.rtf")
DECLARE_RTFEXPORT_TEST(testTdf107480, "tdf107480.rtf")
{
// These were 176 (100 twips), as \htmautsp was parsed too late.
// Exception: first paragraph gets zero top margin, see also tdf#104354.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(0)),
// FIXME Exception: first paragraph gets zero top margin, see tdf#118533.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
......
......@@ -655,8 +655,8 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
default_spacing = 49;
else
{
// tdf#104354, tdf#118533 first paragraph of sections and shapes got zero top margin
if ((m_pImpl->GetIsFirstParagraphInSection() && !m_pImpl->IsInShape()) ||
// tdf#104354 first paragraphs of table cells and shapes get zero top margin
if ((m_pImpl->GetIsFirstParagraphInSection() && !m_pImpl->IsInShape() && m_pImpl->m_nTableDepth > 0) ||
m_pImpl->GetIsFirstParagraphInShape())
default_spacing = 0;
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment