Kaydet (Commit) 008d1187 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#81893: writerfilter: RTF import: \qc before \page was lost

The paragraph properties need to be applied to the paragraph following
the \page too, which did not happen in this case.

Also the minimized test doc shows that checkNeedPap() must be preceded
by checkFirstRun(), since there is no run preceding the \page.

(regression from 94765a1b)

Change-Id: Id286c4fbdeee688fa4f6b24063b634bac637eab6
üst df041e46
......@@ -343,6 +343,10 @@ DECLARE_RTFIMPORT_TEST(testFdo81892, "fdo81892.rtf")
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xTable, "HoriOrient"));
// fdo#81893: paragraph with \page was not centered
uno::Reference<text::XTextRange> xPara(getParagraph(2, "Performance"));
CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, "ParaAdjust")));
}
DECLARE_RTFIMPORT_TEST(testFdo45394, "fdo45394.rtf")
......
......@@ -2291,11 +2291,15 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
}
else
{
checkFirstRun();
checkNeedPap();
sal_uInt8 sBreak[] = { 0xc };
Mapper().text(sBreak, 1);
if (!m_bNeedPap)
{
parBreak();
m_bNeedPap = true;
}
m_bNeedCr = true;
}
}
......
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