tdf#90315 RTF import: fix \colsx default value
See SectPageInformation::mnColsx on the libreoffice-3-6 branch + the spec agrees, too. Change-Id: I6f70a125f8d962621f319e3e75e2865e5f126859
This commit is contained in:
4
sw/qa/extras/rtfimport/data/tdf90315.rtf
Normal file
4
sw/qa/extras/rtfimport/data/tdf90315.rtf
Normal file
@@ -0,0 +1,4 @@
|
||||
{\rtf1\cols2
|
||||
foo\par
|
||||
bar\par
|
||||
}
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user