fdo#82106 RTF import: fix missing tab after special footnote

Change-Id: I5ea45dbed652231acdcc3632ced728ed8bcb621a
This commit is contained in:
Miklos Vajna 2014-08-10 20:25:52 +02:00
parent 8e9487cf97
commit 8ae087b8fc
3 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{\rtf1
hello{\footnote footnote content}\par
before\tab after\par
}

View file

@ -1887,6 +1887,12 @@ DECLARE_RTFIMPORT_TEST(testFdo80742, "fdo80742.rtf")
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(xPropertySet, "OutlineLevel")); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(xPropertySet, "OutlineLevel"));
} }
DECLARE_RTFIMPORT_TEST(testFdo82106, "fdo82106.rtf")
{
// Tab was missing after footnote not containing a tab.
getParagraph(2, "before\tafter");
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1691,6 +1691,9 @@ void DomainMapper_Impl::PushAnnotation()
void DomainMapper_Impl::PopFootOrEndnote() void DomainMapper_Impl::PopFootOrEndnote()
{ {
// In case the foot or endnote did not contain a tab.
m_bIgnoreNextTab = false;
if (!m_aTextAppendStack.empty()) if (!m_aTextAppendStack.empty())
m_aTextAppendStack.pop(); m_aTextAppendStack.pop();