sw/inc/fmtpdsc.hxx                  |    2 +-
 sw/source/filter/ww8/docxexport.cxx |    2 +-
 sw/source/filter/ww8/rtfexport.cxx  |    4 +++-
 sw/source/filter/ww8/ww8atr.cxx     |    2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit f60a6fa11d8ef5227abec6d59b359ea16bc1f795
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Jul 17 14:48:01 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jul 18 07:53:21 2024 +0200

    make SwFormatPageDesc single-arg constructor explicit
    
    because I spent a couple of hours on a compile failure trying to figure
    out what was calling what, because of the implicit construction that
    happens here
    
    Change-Id: I974ec06325c518d47f40c497786b9d6d8a1f1924
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170628
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index c9617624a682..812053187b0e 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -41,7 +41,7 @@ class SW_DLLPUBLIC SwFormatPageDesc final : public 
SfxPoolItem, public SwClient
     virtual void SwClientNotify( const SwModify&, const SfxHint& rHint ) 
override;
 
 public:
-    SwFormatPageDesc( const SwPageDesc *pDesc = nullptr );
+    explicit SwFormatPageDesc( const SwPageDesc *pDesc = nullptr );
     SwFormatPageDesc( const SwFormatPageDesc &rCpy );
     SwFormatPageDesc &operator=( const SwFormatPageDesc &rCpy );
     virtual ~SwFormatPageDesc() override;
diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index 911b2cddc50f..79168a35b03b 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -660,7 +660,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
     }
     else if ( pNewPgDesc )
     {
-        m_pSections->AppendSection( pNewPgDesc, rNd, pFormat, nLnNm );
+        m_pSections->AppendSection( SwFormatPageDesc(pNewPgDesc), rNd, 
pFormat, nLnNm );
     }
 
 }
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index eeb560e540ea..21ab804348d5 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1087,7 +1087,9 @@ void RtfExport::PrepareNewPageDesc(const SfxItemSet* 
pSet, const SwNode& rNd,
     if (pNewPgDescFormat)
         m_pSections->AppendSection(*pNewPgDescFormat, rNd, pFormat, nLnNm);
     else if (pNewPgDesc)
-        m_pSections->AppendSection(pNewPgDesc, rNd, pFormat, nLnNm);
+    {
+        m_pSections->AppendSection(SwFormatPageDesc(pNewPgDesc), rNd, pFormat, 
nLnNm);
+    }
 
     // Don't insert a page break, when we're changing page style just because 
the next page has to be a different one.
     if (!m_pAttrOutput->GetPrevPageDesc()
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 639f43a47a95..3b03cfdf7f13 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -754,7 +754,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
     }
     else if ( pNewPgDesc )
     {
-        m_pSepx->AppendSep( Fc2Cp( nFcPos ), pNewPgDesc, rNd, pFormat, nLnNm );
+        m_pSepx->AppendSep( Fc2Cp( nFcPos ), SwFormatPageDesc(pNewPgDesc), 
rNd, pFormat, nLnNm );
     }
 }
 

Reply via email to