sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |    2 ++
 sw/source/filter/ww8/wrtw8sty.cxx         |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7605edd81c32b55dd75fe5f718497678d0e10af5
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Mon Aug 18 17:24:00 2025 -0400
Commit:     Justin Luth <justin.l...@collabora.com>
CommitDate: Tue Aug 19 13:39:04 2025 +0200

    tdf#164748 doc/x export: fix missing right/left only page break
    
    This patch improves on tdf#99120's round-tripping patch.
    
    LO 25.8's import patch for tdf#164748
    exposed this wrong export for even/odd section breaks.
    
    Previously it was masked because it was not
    IsPlausableSingleWordSection in MSWordExportBase::SectionProperties.
    
    make CppunitTest_sw_ooxmlexport5 \
        CPPUNIT_TEST_NAME=testHyperlinkContainingPlaceholderField
    
    Change-Id: I08be55c6581062eb0fa7f87c787923ca0a2e5f88
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189887
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index be904cd07f47..ea465cd70f43 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -339,6 +339,8 @@ CPPUNIT_TEST_FIXTURE(Test, 
testHyperlinkContainingPlaceholderField)
 
     // tdf#148380 output unknown field's contents("") instead of field 
name("Sender" aka e-mail)
     CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), 
getParagraph(1)->getString().indexOf("Sender"));
+
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("two blank pages: all 'only right' page 
styles", 5, getPages());
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTablePreferredWidth)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 775acb7c7ef0..aa25d5945962 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1795,7 +1795,7 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
         // the change of pages is, but here it's too late for that!
         if ( pPd->GetFollow() && pPd != pPd->GetFollow() &&
              pPd->GetFollow()->GetFollow() == pPd->GetFollow() &&
-             pPd->IsHeaderShared() && pPd->IsFooterShared() &&
+             UseOnPage::All == (UseOnPage::All & pPd->ReadUseOn()) &&
              ( !rSepInfo.pPDNd || pPd->IsFollowNextPageOfNode( *rSepInfo.pPDNd 
) ) )
         {
             const SwPageDesc *pFollow = pPd->GetFollow();

Reply via email to