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

RTF import: handle column break at the very start of the document

Change-Id: Ib7d166bf1b1e5d5216d822b2b0396aa4dc535c6f
üst 36b1c27b
...@@ -1759,6 +1759,12 @@ DECLARE_RTFIMPORT_TEST(testFontOverride, "font-override.rtf") ...@@ -1759,6 +1759,12 @@ DECLARE_RTFIMPORT_TEST(testFontOverride, "font-override.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName")); CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
} }
DECLARE_RTFIMPORT_TEST(testColumnBreak, "column-break.rtf")
{
// Column break at the very start of the document was ignored.
CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -2243,6 +2243,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) ...@@ -2243,6 +2243,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
if (pNum.get() && pNum->getInt() > 1) if (pNum.get() && pNum->getInt() > 1)
bColumns = true; bColumns = true;
} }
checkFirstRun();
if (bColumns) if (bColumns)
{ {
sal_uInt8 sBreak[] = { 0xe }; sal_uInt8 sBreak[] = { 0xe };
......
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