Kaydet (Commit) bb77fd64 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#82006 RTF filter: import \sbauto and \saauto

Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd
üst 357011b5
{\rtf1
\pard\plain
\ql \sb100\sa100\sbauto1\saauto1 hello\par
}
......@@ -843,6 +843,14 @@ DECLARE_RTFEXPORT_TEST(testNumOverrideStart, "num-override-start.rtf")
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), comphelper::SequenceAsHashMap(xRules->getByIndex(0))["StartWith"].get<sal_Int16>());
CPPUNIT_ASSERT_EQUAL(sal_Int16(3), comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>());
}
DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf")
{
// These were 176 (100 twips), as \sbauto and \sbbefore were ignored.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaTopMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaBottomMargin"));
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -4880,6 +4880,14 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam
NS_ooxml::LN_trackchange, NS_ooxml::LN_token, pValue);
}
break;
case RTF_SBAUTO:
lcl_putNestedAttribute(m_aStates.top().aParagraphSprms,
NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_beforeAutospacing, pBoolValue, OVERWRITE_YES);
break;
case RTF_SAAUTO:
lcl_putNestedAttribute(m_aStates.top().aParagraphSprms,
NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_afterAutospacing, pBoolValue, OVERWRITE_YES);
break;
default:
{
SAL_INFO("writerfilter", "TODO handle toggle '" << lcl_RtfToString(nKeyword) << "'");
......
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