diff --git a/sw/qa/extras/rtfimport/data/tdf90315.rtf b/sw/qa/extras/rtfimport/data/tdf90315.rtf new file mode 100644 index 000000000000..df99754fe860 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf90315.rtf @@ -0,0 +1,4 @@ +{\rtf1\cols2 +foo\par +bar\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e74d69401687..86dddfc339fa 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2292,6 +2292,15 @@ DECLARE_RTFIMPORT_TEST(testTdf86814, "tdf86814.rtf") CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty(getRun(getParagraph(1), 1), "CharWeight")); } +DECLARE_RTFIMPORT_TEST(testTdf90315, "tdf90315.rtf") +{ + uno::Reference xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); + uno::Reference xTextSection(xTextSections->getByIndex(0), uno::UNO_QUERY); + // This was 0, but default should be 720 twips. + CPPUNIT_ASSERT_EQUAL(static_cast(1270), getProperty(xTextSection->getPropertyValue("TextColumns"), "AutomaticDistance")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx index 3a3575477f94..91dfc91fc663 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.cxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx @@ -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) {