sw/inc/swabstdlg.hxx               |    2 +-
 sw/source/ui/dialog/swdlgfact.cxx  |    4 ++--
 sw/source/ui/dialog/swdlgfact.hxx  |    2 +-
 sw/source/ui/frmdlg/frmdlg.cxx     |    6 +++---
 sw/source/uibase/inc/frmdlg.hxx    |    2 +-
 sw/source/uibase/shells/frmsh.cxx  |    2 +-
 sw/source/uibase/shells/grfsh.cxx  |    2 +-
 sw/source/uibase/shells/textsh.cxx |    2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 6ef32deaff0d5cc271098aebf89b82be72420d9b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Feb 17 12:32:19 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Feb 17 14:23:08 2023 +0000

    use a reference here to flag its always dereferenced
    
    Change-Id: Ic157ec89e6e47560612924a9f70e6669235a9a45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147212
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 534d422cb781..da48badefdd8 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -489,7 +489,7 @@ public:
 
     virtual VclPtr<VclAbstractDialog>          
CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       CreateFrameTabDialog(const 
OUString &rDialogType,
-                                                SfxViewFrame *pFrame, 
weld::Window *pParent,
+                                                SfxViewFrame& rFrame, 
weld::Window *pParent,
                                                 const SfxItemSet& rCoreSet,
                                                 bool bNewFrame = true,
                                                 const OString& sDefPage = 
OString()) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index ae224d00f78c..9bcae1e2ef33 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1110,12 +1110,12 @@ VclPtr<VclAbstractDialog> 
SwAbstractDialogFactory_Impl::CreateTableMergeDialog(w
 }
 
 VclPtr<SfxAbstractTabDialog> 
SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType,
-                                                SfxViewFrame *pFrame, 
weld::Window *pParent,
+                                                SfxViewFrame& rFrame, 
weld::Window *pParent,
                                                 const SfxItemSet& rCoreSet,
                                                 bool        bNewFrame,
                                                 const OString&  sDefPage )
 {
-    return 
VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFrameDlg>(pFrame, 
pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, 
nullptr));
+    return 
VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFrameDlg>(rFrame, 
pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, 
nullptr));
 }
 
 VclPtr<SfxAbstractApplyTabDialog> 
SwAbstractDialogFactory_Impl::CreateTemplateDialog(
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 55aac3c8c858..7ee78f4a5c05 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -783,7 +783,7 @@ public:
 
     virtual VclPtr<VclAbstractDialog>          
CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) override;
     virtual VclPtr<SfxAbstractTabDialog>       CreateFrameTabDialog( const 
OUString &rDialogType,
-                                                SfxViewFrame *pFrame, 
weld::Window *pParent,
+                                                SfxViewFrame& rFrame, 
weld::Window *pParent,
                                                 const SfxItemSet& rCoreSet,
                                                 bool bNewFrame  = true,
                                                 const OString& sDefPage = 
OString()) override;
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 2a958bcf3853..b7124046d617 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -41,8 +41,8 @@
 #include <comphelper/lok.hxx>
 
 // the dialog's carrier
-SwFrameDlg::SwFrameDlg(SfxViewFrame const * pViewFrame,
-                       weld::Window*        pParent,
+SwFrameDlg::SwFrameDlg(const SfxViewFrame& rViewFrame,
+                       weld::Window*       pParent,
                        const SfxItemSet&   rCoreSet,
                        bool                bNewFrame,
                        const OUString&     sResType,
@@ -56,7 +56,7 @@ SwFrameDlg::SwFrameDlg(SfxViewFrame const * pViewFrame,
     , m_bNew(bNewFrame)
     , m_rSet(rCoreSet)
     , m_sDlgType(sResType)
-    , 
m_pWrtShell(static_cast<SwView*>(pViewFrame->GetViewShell())->GetWrtShellPtr())
+    , 
m_pWrtShell(static_cast<SwView*>(rViewFrame.GetViewShell())->GetWrtShellPtr())
 {
     sal_uInt16 nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
     bool bHTMLMode = (nHtmlMode & HTMLMODE_ON) != 0;
diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx
index 87f03d8cc97a..438279a2a2da 100644
--- a/sw/source/uibase/inc/frmdlg.hxx
+++ b/sw/source/uibase/inc/frmdlg.hxx
@@ -37,7 +37,7 @@ class SwFrameDlg final : public SfxTabDialogController
     virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
 
 public:
-    SwFrameDlg(SfxViewFrame const *pFrame, weld::Window* pParent,
+    SwFrameDlg(const SfxViewFrame& rFrame, weld::Window* pParent,
                const SfxItemSet& rCoreSet,
                bool bNewFrame,
                const OUString& sResType,
diff --git a/sw/source/uibase/shells/frmsh.cxx 
b/sw/source/uibase/shells/frmsh.cxx
index 5e01470aecdb..ec2ea5b63e7f 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -522,7 +522,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
                                                         nSel & 
SelectionType::Graphic ? OUString("PictureDialog") :
                                                         nSel & 
SelectionType::Ole ? OUString("ObjectDialog"):
                                                                                
         OUString("FrameDialog"),
-                                                        
&GetView().GetViewFrame(),
+                                                        
GetView().GetViewFrame(),
                                                         
GetView().GetFrameWeld(),
                                                         aSet,
                                                         false,
diff --git a/sw/source/uibase/shells/grfsh.cxx 
b/sw/source/uibase/shells/grfsh.cxx
index 456cb336d236..2e0791116eb0 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -406,7 +406,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
 
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
             ScopedVclPtr<SfxAbstractTabDialog> 
pDlg(pFact->CreateFrameTabDialog("PictureDialog",
-                                                    &GetView().GetViewFrame(),
+                                                    GetView().GetViewFrame(),
                                                     GetView().GetFrameWeld(),
                                                     aSet, false));
             if (nSlot == FN_DRAW_WRAP_DLG)
diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index 14bd1c78194e..f93bfe4e40b5 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -525,7 +525,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
             SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< 
sal_uInt16 >(eMetric)));
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
             ScopedVclPtr<SfxAbstractTabDialog> 
pDlg(pFact->CreateFrameTabDialog("FrameDialog",
-                                                  &GetView().GetViewFrame(),
+                                                  GetView().GetViewFrame(),
                                                   GetView().GetFrameWeld(),
                                                   aSet));
             if(pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet())

Reply via email to