Kaydet (Commit) 72b19aa2 authored tarafından Justin Luth's avatar Justin Luth

tdf#112208 rtfimport: fix missing paragraph first line indent

This is a followup to commit f528f949
adding ParaFirstLineIndent to that commit's Para(Left|Right)Margin.

I also added code for hanging indents, but it doesn't look like that
case will ever hit. Just added for completeness. My test unit
was created in Word as a hanging indent, but it invokes the
firstLine case...

Change-Id: I2b04866b9eb4b085503f3b7d3b6e97d4f9e3d19c
Reviewed-on: https://gerrit.libreoffice.org/41901Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Tested-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 10dc371d
......@@ -980,6 +980,12 @@ DECLARE_RTFEXPORT_TEST(testTdf106953, "tdf106953.rtf")
CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, ePropertyState);
}
DECLARE_RTFEXPORT_TEST(testTdf112208, "tdf112208_hangingIndent.rtf")
{
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-2000), getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
CPPUNIT_ASSERT_EQUAL(1, getPages());
}
DECLARE_RTFEXPORT_TEST(testParaBottomMargin, "para-bottom-margin.rtf")
{
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Standard"), uno::UNO_QUERY);
......
......@@ -168,6 +168,8 @@ static bool isSPRMDeduplicateBlacklist(Id nId)
// possibly from the numbering.
case NS_ooxml::LN_CT_Ind_left:
case NS_ooxml::LN_CT_Ind_right:
case NS_ooxml::LN_CT_Ind_firstLine:
case NS_ooxml::LN_CT_Ind_hanging:
// \htmautsp arrives after the style table, so only the non-style value is
// correct, keep these.
case NS_ooxml::LN_CT_Spacing_beforeAutospacing:
......
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