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

tdf#90315 RTF import: fix \colsx default value

See SectPageInformation::mnColsx on the libreoffice-3-6 branch + the
spec agrees, too.

Change-Id: I6f70a125f8d962621f319e3e75e2865e5f126859
(cherry picked from commit e18adb73)
üst 92a9c03e
......@@ -2292,6 +2292,15 @@ DECLARE_RTFIMPORT_TEST(testTdf86814, "tdf86814.rtf")
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(1), 1), "CharWeight"));
}
DECLARE_RTFIMPORT_TEST(testTdf90315, "tdf90315.rtf")
{
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextSection(xTextSections->getByIndex(0), uno::UNO_QUERY);
// This was 0, but default should be 720 twips.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(xTextSection->getPropertyValue("TextColumns"), "AutomaticDistance"));
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -31,7 +31,7 @@ using namespace ::com::sun::star;
SectionColumnHandler::SectionColumnHandler()
: LoggedProperties("SectionColumnHandler")
, bEqualWidth(false)
, nSpace(0)
, nSpace(1270) // 720 twips
, nNum(0)
, bSep(false)
{
......
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