summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-07-17 14:48:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-18 07:53:21 +0200
commitf60a6fa11d8ef5227abec6d59b359ea16bc1f795 (patch)
treeccd0baa358f8fef1ced00d1a9aa1f71207265d52 /sw
parent43f0022fcaed2d9d1b1b3707173acd562c7f0ebe (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/fmtpdsc.hxx2
-rw-r--r--sw/source/filter/ww8/docxexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
4 files changed, 6 insertions, 4 deletions
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 );
}
}