summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx3
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx21
2 files changed, 14 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 08fafb1f25b3..6844e3ead9fc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -117,6 +117,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92470_footnoteRestart, "tdf92470_footnoteRestart
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
CPPUNIT_ASSERT( pDoc );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote doesn't restart every Page", FTNNUM_PAGE, pDoc->GetFootnoteInfo().eNum );
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
}
DECLARE_OOXMLEXPORT_TEST(testCharacterBorder, "charborder.odt")
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 9f263ab22630..8b84e318bc67 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1037,17 +1037,12 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(bool bFirstPage, DomainMapper
if (rDM_Impl.m_oBackgroundColor)
Insert(PROP_BACK_COLOR, uno::makeAny(*rDM_Impl.m_oBackgroundColor));
- if (rDM_Impl.m_bHasFtn)
+ // Check for missing footnote separator only in case there is at least
+ // one footnote.
+ if (rDM_Impl.m_bHasFtn && !rDM_Impl.m_bHasFtnSep)
{
- // Check for missing footnote separator only in case there is at least
- // one footnote.
- if (!rDM_Impl.m_bHasFtnSep)
- {
- // Set footnote line width to zero, document has no footnote separator.
- Insert(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, uno::makeAny(sal_Int32(0)));
- rDM_Impl.m_bHasFtn = false;
- }
- rDM_Impl.m_bHasFtnSep = false;
+ // Set footnote line width to zero, document has no footnote separator.
+ Insert(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, uno::makeAny(sal_Int32(0)));
}
/*** if headers/footers are available then the top/bottom margins of the
@@ -1463,6 +1458,12 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
}
rDM_Impl.SetIsLastSectionGroup(false);
rDM_Impl.SetIsFirstParagraphInSection(true);
+
+ if ( !rDM_Impl.IsInFootOrEndnote() )
+ {
+ rDM_Impl.m_bHasFtn = false;
+ rDM_Impl.m_bHasFtnSep = false;
+ }
}
// Clear the flag that says we should take the header/footer content from