sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx                      |    7 +++++++
 writerfilter/source/dmapper/PropertyMap.cxx                    |    2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 1df6cc318b2559408cf08d7bd43c0298048f9ff7
Author:     Justin Luth <[email protected]>
AuthorDate: Wed Oct 14 14:49:55 2020 +0300
Commit:     Justin Luth <[email protected]>
CommitDate: Wed Oct 14 20:20:39 2020 +0200

    related tdf#108944 writerfilter: fix another missing ftn separator
    
    A comment can also cause a missing footnote separator.
    Found by doing a code read.
    
    Change-Id: I42296f2e9406ad144c6e45873fac0f2cb8d11839
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104282
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt 
b/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt
new file mode 100644
index 000000000000..17e0c6029f5a
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index ec359b119b58..c56c0739d30b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -95,6 +95,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92470_footnoteRestart, 
"tdf92470_footnoteRestart
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), 
getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf108944_footnoteSeparator2, 
"tdf108944_footnoteSeparator2.odt")
+{
+    uno::Reference<beans::XPropertySet> 
xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+    //This was zero. The comment was causing the bHasFtnSep flag to be reset 
to false, so the separator was missing.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), 
getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testCharacterBorder, "charborder.odt")
 {
     CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 60dbe6c4cc4f..21a8593178a1 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1896,7 +1896,7 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
     rDM_Impl.SetIsLastSectionGroup( false );
     rDM_Impl.SetIsFirstParagraphInSection( true );
 
-    if ( !rDM_Impl.IsInFootOrEndnote() )
+    if ( !rDM_Impl.IsInFootOrEndnote() && !rDM_Impl.IsInComments() )
     {
         rDM_Impl.m_bHasFtn = false;
         rDM_Impl.m_bHasFtnSep = false;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to