related to tdf#97417: fix unit test's early para numbering
The unit test's first blank page already started the paragraph numbering. Setting it so that a contentless, single paragraph section will not display numbering. In fact, no dummy paragraph should have numbering, but that would get complicated. This is in preparation for tdf#104710. Change-Id: I98c9926cb3cd1e3fe3cd43bf46cab22bfbec7eba Reviewed-on: https://gerrit.libreoffice.org/32235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
parent
5ec1b04b9b
commit
c829e01e97
@ -2015,8 +2015,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92157, "tdf92157.docx")
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx")
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xProps(getParagraph(1), uno::UNO_QUERY_THROW);
|
||||
// CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
|
||||
// !xProps->getPropertyValue("NumberingRules").hasValue());
|
||||
CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
|
||||
!xProps->getPropertyValue("NumberingRules").hasValue());
|
||||
// paragraph with numbering and section break was removed by writerfilter
|
||||
// but its numbering was copied to all following paragraphs
|
||||
CPPUNIT_ASSERT_MESSAGE("2nd page: first paragraph missing numbering",
|
||||
|
@ -3281,7 +3281,9 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
|
||||
&& !( pContext && pContext->isSet(PROP_BREAK_TYPE) )
|
||||
&& !m_pImpl->GetIsDummyParaAddedForTableInSection()
|
||||
&& !m_pImpl->GetIsPreviousParagraphFramed();
|
||||
PropertyMapPtr xContext = bRemove ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
|
||||
|
||||
const bool bNoNumbering = bRemove || (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && bSingleParagraph);
|
||||
PropertyMapPtr xContext = bNoNumbering ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
|
||||
if (xContext)
|
||||
{
|
||||
// tdf#97417 delete numbering of the paragraph
|
||||
|
Loading…
x
Reference in New Issue
Block a user