sw/inc/pam.hxx                          |    6 +++---
 sw/source/uibase/dbui/dbmgr.cxx         |    2 +-
 sw/source/uibase/docvw/PageBreakWin.cxx |    2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx       |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 1b44b9d0c796a31b54c4160fa86f1d9225d60738
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Aug 7 13:31:29 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Aug 8 08:52:35 2022 +0200

    make more of the SwPaM constructors explicit
    
    which flushes out some more places where we were implicitly
    construcing temporaries
    
    Change-Id: I2eee5f99071cd8c155de1be369ba89ec1d732bae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137921
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 97fbbcc4f616..f25b9c052551 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -203,9 +203,9 @@ public:
     SwPaM(  const SwNode& rMk, SwNodeOffset nMkOffset, sal_Int32 nMkContent,
             const SwNode& rPt, SwNodeOffset nPtOffset, sal_Int32 nPtContent, 
SwPaM* pRing = nullptr );
     SwPaM( const SwNode& rNd, SwNodeOffset nNdOffset, sal_Int32 nContent = 0, 
SwPaM* pRing = nullptr );
-    SwPaM( const SwNode& rNd, sal_Int32 nContent = 0, SwPaM* pRing = nullptr );
-    SwPaM( const SwNodeIndex& rNd, sal_Int32 nContent = 0, SwPaM* pRing = 
nullptr );
-    SwPaM( SwNodes& rNds, SwNodeOffset nMkOffset = SwNodeOffset(0), SwPaM* 
pRing = nullptr );
+    explicit SwPaM( const SwNode& rNd, sal_Int32 nContent = 0, SwPaM* pRing = 
nullptr );
+    explicit SwPaM( const SwNodeIndex& rNd, sal_Int32 nContent = 0, SwPaM* 
pRing = nullptr );
+    explicit SwPaM( SwNodes& rNds, SwNodeOffset nMkOffset = SwNodeOffset(0), 
SwPaM* pRing = nullptr );
     virtual ~SwPaM() override;
 
     /// this takes a second parameter, which indicates the Ring that
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 52a689ac8bc8..6e8881d2d186 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1449,7 +1449,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                         SwDocMergeInfo aMergeInfo;
                         // Name of the mark is actually irrelevant, UNO 
bookmarks have internals names.
                         aMergeInfo.startPageInTarget = 
pTargetDoc->getIDocumentMarkAccess()->makeMark(
-                            appendedDocStart, "", 
IDocumentMarkAccess::MarkType::UNO_BOOKMARK,
+                            SwPaM(appendedDocStart), "", 
IDocumentMarkAccess::MarkType::UNO_BOOKMARK,
                             ::sw::mark::InsertMode::New);
                         aMergeInfo.nDBRow = nStartRow;
                         
rMergeDescriptor.pMailMergeConfigItem->AddMergedDocument( aMergeInfo );
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx 
b/sw/source/uibase/docvw/PageBreakWin.cxx
index 7356ea31f727..7c3b50e5b28b 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -311,7 +311,7 @@ void SwBreakDashedLine::execute(std::string_view rIdent)
             rSh.Push( );
             rSh.ClearMark();
 
-            rSh.SetSelection( rNd );
+            rSh.SetSelection( SwPaM(rNd) );
 
             SfxStringItem 
aItem(m_pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), 
"textflow");
             m_pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 94094303adf3..aef0dc502e9a 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1270,7 +1270,7 @@ static bool 
lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis)
                 pDoc->GetIDocumentUndoRedo().ClearRedo();
                 
pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsert>(SwNodeIndex(*pNd)));
                 
pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoFormatColl>
-                                                        (*pNd, 
pNd->GetTextColl(), true, true));
+                                                        (SwPaM(*pNd), 
pNd->GetTextColl(), true, true));
             }
 
             pThis->SetModified();

Reply via email to