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

writerfilter: import RTF_NOCOLBAL

Change-Id: If2efab82c0adc2f3dc52733c335693565c350bfa
üst 7f854bb8
{\rtf1
\nocolbal\sectd\cols2\pard\plain
This is in the left column.\par
This is the second line, in the same column.\par
\sect\sectd\sbknone\pard\plain
After section break.\par
}
......@@ -1784,6 +1784,14 @@ DECLARE_RTFIMPORT_TEST(testFdo80905, "fdo80905.rtf")
CPPUNIT_ASSERT_EQUAL(true, static_cast<bool>(xFields->hasMoreElements()));
}
DECLARE_RTFIMPORT_TEST(testUnbalancedColumnsCompat, "unbalanced-columns-compat.rtf")
{
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
// This was false, we ignored the relevant compat setting to make this non-last section unbalanced.
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -3311,6 +3311,9 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_BRDRSH:
lcl_putBorderProperty(m_aStates, NS_ooxml::LN_CT_Border_shadow, RTFValue::Pointer_t(new RTFValue(1)));
break;
case RTF_NOCOLBAL:
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Compat_noColumnBalance, RTFValue::Pointer_t(new RTFValue(1)));
break;
default:
{
SAL_INFO("writerfilter", "TODO handle flag '" << 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