sw/inc/hhcwrp.hxx                          |    4 +--
 sw/inc/swabstdlg.hxx                       |    2 -
 sw/qa/extras/uiwriter/uiwriter.cxx         |    8 +++---
 sw/qa/extras/uiwriter/uiwriter4.cxx        |    2 -
 sw/source/ui/chrdlg/chardlg.cxx            |    4 +--
 sw/source/ui/dbui/addresslistdialog.cxx    |    4 +--
 sw/source/ui/dbui/dbinsdlg.cxx             |   32 ++++++++++++------------
 sw/source/ui/dbui/mailmergewizard.cxx      |    4 +--
 sw/source/ui/dbui/mmdocselectpage.cxx      |    8 +++---
 sw/source/ui/dbui/mmlayoutpage.cxx         |   14 +++++-----
 sw/source/ui/dbui/mmlayoutpage.hxx         |    2 -
 sw/source/ui/dialog/swdlgfact.cxx          |    4 +--
 sw/source/uibase/docvw/edtwin.cxx          |    4 +--
 sw/source/uibase/inc/chrdlg.hxx            |    2 -
 sw/source/uibase/inc/conarc.hxx            |    2 -
 sw/source/uibase/inc/concustomshape.hxx    |    2 -
 sw/source/uibase/inc/conform.hxx           |    2 -
 sw/source/uibase/inc/conpoly.hxx           |    2 -
 sw/source/uibase/inc/conrect.hxx           |    2 -
 sw/source/uibase/inc/dbinsdlg.hxx          |    2 -
 sw/source/uibase/inc/drawbase.hxx          |    4 +--
 sw/source/uibase/inc/dselect.hxx           |    2 -
 sw/source/uibase/inc/hyp.hxx               |    4 +--
 sw/source/uibase/inc/mailmergewizard.hxx   |    4 +--
 sw/source/uibase/lingu/hhcwrp.cxx          |   30 +++++++++++-----------
 sw/source/uibase/lingu/hyp.cxx             |   18 ++++++-------
 sw/source/uibase/lingu/sdrhhcwrap.cxx      |   26 +++++++++----------
 sw/source/uibase/lingu/sdrhhcwrap.hxx      |    4 +--
 sw/source/uibase/ribbar/conarc.cxx         |    4 +--
 sw/source/uibase/ribbar/concustomshape.cxx |    6 ++--
 sw/source/uibase/ribbar/conform.cxx        |    4 +--
 sw/source/uibase/ribbar/conpoly.cxx        |    4 +--
 sw/source/uibase/ribbar/conrect.cxx        |   18 ++++++-------
 sw/source/uibase/ribbar/drawbase.cxx       |   38 ++++++++++++++---------------
 sw/source/uibase/ribbar/dselect.cxx        |    4 +--
 sw/source/uibase/uiview/viewdraw.cxx       |   12 ++++-----
 sw/source/uibase/uiview/viewling.cxx       |    4 +--
 37 files changed, 146 insertions(+), 146 deletions(-)

New commits:
commit 59953740b20ceb2bbc682625739f9bb6278ca7cb
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue May 13 16:24:38 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue May 13 21:21:18 2025 +0200

    sw: pass SwView by ref in some places
    
    Change-Id: Idd450d33e74e9b2de05cb4f88483c2ccf32a8cc7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185260
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 205d82cc4c24..cb25a0257cd8 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -30,7 +30,7 @@ class SwPaM;
 
 class SW_DLLPUBLIC SwHHCWrapper final : public editeng::HangulHanjaConversion
 {
-    SwView *    m_pView;
+    SwView&    m_rView;
     SwWrtShell &m_rWrtShell;
 
     std::unique_ptr<SwConversionArgs> m_pConvArgs;    /**< object for 
arguments (and results) needed
@@ -84,7 +84,7 @@ class SW_DLLPUBLIC SwHHCWrapper final : public 
editeng::HangulHanjaConversion
 
 public:
     SwHHCWrapper(
-        SwView* pView,
+        SwView& rView,
         const css::uno::Reference< css::uno::XComponentContext >& rxContext,
         LanguageType nSourceLanguage, LanguageType nTargetLanguage,
         const vcl::Font *pTargetFont,
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 2ae70bae381e..8097cc3df77d 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -503,7 +503,7 @@ public:
     virtual std::shared_ptr<AbstractSwBreakDlg> CreateSwBreakDlg(weld::Window 
*pParent, SwWrtShell &rSh) = 0;
     virtual std::shared_ptr<AbstractSwTranslateLangSelectDlg> 
CreateSwTranslateLangSelectDlg(weld::Window *pParent, SwWrtShell &rSh) = 0;
     virtual VclPtr<AbstractChangeDbDialog> CreateSwChangeDBDlg(SwView& rVw) = 
0;
-    virtual VclPtr<SfxAbstractTabDialog>  CreateSwCharDlg(weld::Window* 
pParent, SwView& pVw, const SfxItemSet& rCoreSet,
+    virtual VclPtr<SfxAbstractTabDialog>  CreateSwCharDlg(weld::Window* 
pParent, SwView& rView, const SfxItemSet& rCoreSet,
         SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) = 0;
     virtual VclPtr<AbstractSwConvertTableDlg> CreateSwConvertTableDlg(SwView& 
rView, bool bToTable) = 0;
     virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog(weld::Window 
*pParent, SwView &rV) = 0;
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d6e09ff3c44f..2c8153e621fd 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1352,7 +1352,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, 
testChineseConversionBlank)
     SwPaM aPaM(aIdx);
 
     // When
-    SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+    SwHHCWrapper aWrap( *pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
                         i18n::TextConversionOption::CHARACTER_BY_CHARACTER, 
false,
                         true, false, false );
     aWrap.Convert();
@@ -1377,7 +1377,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, 
testChineseConversionNonChineseText)
     pDoc->getIDocumentContentOperations().InsertString(aPaM, 
NON_CHINESE_CONTENT);
 
     // When
-    SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+    SwHHCWrapper aWrap( *pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
                         i18n::TextConversionOption::CHARACTER_BY_CHARACTER, 
false,
                         true, false, false );
     aWrap.Convert();
@@ -1402,7 +1402,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, 
testChineseConversionTraditionalToSimplifie
     pDoc->getIDocumentContentOperations().InsertString(aPaM, 
OUString(CHINESE_TRADITIONAL_CONTENT));
 
     // When
-    SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+    SwHHCWrapper aWrap( *pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, 
LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
                         i18n::TextConversionOption::CHARACTER_BY_CHARACTER, 
false,
                         true, false, false );
     aWrap.Convert();
@@ -1427,7 +1427,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, 
testChineseConversionSimplifiedToTraditiona
     pDoc->getIDocumentContentOperations().InsertString(aPaM, 
OUString(CHINESE_SIMPLIFIED_CONTENT));
 
     // When
-    SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_SIMPLIFIED, 
LANGUAGE_CHINESE_TRADITIONAL, nullptr,
+    SwHHCWrapper aWrap( *pView, xContext, LANGUAGE_CHINESE_SIMPLIFIED, 
LANGUAGE_CHINESE_TRADITIONAL, nullptr,
                         i18n::TextConversionOption::CHARACTER_BY_CHARACTER, 
false,
                         true, false, false );
     aWrap.Convert();
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 
b/sw/qa/extras/uiwriter/uiwriter4.cxx
index 61fa43e0c01d..54dd007624f3 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -1951,7 +1951,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf105417)
     // Automatic hyphenation means not opening a dialog, but going ahead
     // non-interactively.
     xLinguProperties->setIsHyphAuto(true);
-    SwHyphWrapper aWrap(pView, xHyphenator, /*bStart=*/false, /*bOther=*/true,
+    SwHyphWrapper aWrap(*pView, xHyphenator, /*bStart=*/false, /*bOther=*/true,
                         /*bSelection=*/false);
     // This never returned, it kept trying to hyphenate the last word
     // (greenbacks) again and again.
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 864ebf48ae67..f5deab08353f 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -38,11 +38,11 @@ using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::uno;
 using namespace ::sfx2;
 
-SwCharDlg::SwCharDlg(weld::Window* pParent, SwView& rVw, const SfxItemSet& 
rCoreSet,
+SwCharDlg::SwCharDlg(weld::Window* pParent, SwView& rView, const SfxItemSet& 
rCoreSet,
     SwCharDlgMode nDialogMode, const OUString* pStr)
     : SfxTabDialogController(pParent, 
u"modules/swriter/ui/characterproperties.ui"_ustr,
                              u"CharacterPropertiesDialog"_ustr, &rCoreSet, 
pStr != nullptr)
-    , m_rView(rVw)
+    , m_rView(rView)
     , m_nDialogMode(nDialogMode)
 {
     if (pStr)
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index ab86aa33f0bc..8322ee961ee9 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -281,9 +281,9 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl, 
weld::Button&, void)
 
 IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, weld::Button&, void)
 {
-    SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
+    SwView& rView = m_pAddressPage->GetWizard()->GetSwView();
 
-    const OUString sNewSource = 
SwDBManager::LoadAndRegisterDataSource(m_xDialog.get(), pView ? 
pView->GetDocShell() : nullptr);
+    const OUString sNewSource = 
SwDBManager::LoadAndRegisterDataSource(m_xDialog.get(), rView.GetDocShell());
     if(!sNewSource.isEmpty())
     {
         m_xListLB->append(m_xIter.get());
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 0f569b440433..f7391b1b05cd 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -178,7 +178,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& 
rView,
     , ConfigItem(u"Office.Writer/InsertData/DataSet"_ustr, 
ConfigItemMode::NONE)
     , m_aDBData(std::move(aData))
     , m_sNoTmpl(SwResId(SW_STR_NONE))
-    , m_pView(&rView)
+    , m_rView(rView)
     , m_xRbAsTable(m_xBuilder->weld_radio_button(u"astable"_ustr))
     , m_xRbAsField(m_xBuilder->weld_radio_button(u"asfields"_ustr))
     , m_xRbAsText(m_xBuilder->weld_radio_button(u"astext"_ustr))
@@ -212,7 +212,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& 
rView,
 
     if (xColSupp.is())
     {
-        SwWrtShell& rSh = m_pView->GetWrtShell();
+        SwWrtShell& rSh = m_rView.GetWrtShell();
         SvNumberFormatter* pNumFormatr = rSh.GetNumberFormatter();
         rtl::Reference<SvNumberFormatsSupplierObj> pNumFormat = new 
SvNumberFormatsSupplierObj( pNumFormatr );
         Reference< util::XNumberFormats > xDocNumberFormats = 
pNumFormat->getNumberFormats();
@@ -309,7 +309,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& 
rView,
 
     // fill paragraph templates-ListBox
     {
-        SfxStyleSheetBasePool* pPool = 
m_pView->GetDocShell()->GetStyleSheetPool();
+        SfxStyleSheetBasePool* pPool = 
m_rView.GetDocShell()->GetStyleSheetPool();
         m_xLbDbParaColl->append_text( m_sNoTmpl );
 
         const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para);
@@ -322,7 +322,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& 
rView,
     }
 
     // when the cursor is inside of a table, table must NEVER be selectable
-    if( m_pView->GetWrtShell().GetTableFormat() )
+    if( m_rView.GetWrtShell().GetTableFormat() )
     {
         m_xRbAsField->set_active(true);
         m_xRbAsTable->set_sensitive(false);
@@ -614,7 +614,7 @@ IMPL_LINK(SwInsertDBColAutoPilot, DblClickHdl, 
weld::TreeView&, rBox, bool)
 
 IMPL_LINK_NOARG(SwInsertDBColAutoPilot, TableFormatHdl, weld::Button&, void)
 {
-    SwWrtShell& rSh = m_pView->GetWrtShell();
+    SwWrtShell& rSh = m_rView.GetWrtShell();
     bool bNewSet = false;
     if( !m_pTableSet )
     {
@@ -689,7 +689,7 @@ IMPL_LINK_NOARG(SwInsertDBColAutoPilot, TableFormatHdl, 
weld::Button&, void)
         m_pTableSet->Put( SwPtrItem( FN_TABLE_REP, m_pRep.get() ));
 
         m_pTableSet->Put( SfxUInt16Item( SID_HTML_MODE,
-                    ::GetHtmlMode( m_pView->GetDocShell() )));
+                    ::GetHtmlMode( m_rView.GetDocShell() )));
     }
 
     sal_Int32 nCols = m_xLbTableCol->n_children();
@@ -739,7 +739,7 @@ IMPL_LINK_NOARG(SwInsertDBColAutoPilot, AutoFormatHdl, 
weld::Button&, void)
 {
     SwAbstractDialogFactory& rFact = swui::GetFactory();
 
-    VclPtr<AbstractSwAutoFormatDlg> 
pDlg(rFact.CreateSwAutoFormatDlg(m_xDialog.get(), m_pView->GetWrtShellPtr(), 
false, m_xTAutoFormat.get()));
+    VclPtr<AbstractSwAutoFormatDlg> 
pDlg(rFact.CreateSwAutoFormatDlg(m_xDialog.get(), m_rView.GetWrtShellPtr(), 
false, m_xTAutoFormat.get()));
     pDlg->StartExecuteAsync(
         [this, pDlg] (sal_Int32 nResult)->void
         {
@@ -898,7 +898,7 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const 
OUString& rText,
 
                 if( bInsField )
                 {
-                    SwWrtShell& rSh = m_pView->GetWrtShell();
+                    SwWrtShell& rSh = m_rView.GetWrtShell();
                     SwDBFieldType aFieldType( rSh.GetDoc(), aSrch.sColumn,
                                             m_aDBData );
                     pNew = new DB_Column( rFndCol, *new SwDBField(
@@ -930,14 +930,14 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence<Any>& rSelection,
     auto xResultSet = xResultSet_in;
 
     const Any* pSelection = rSelection.hasElements() ? 
rSelection.getConstArray() : nullptr;
-    SwWrtShell& rSh = m_pView->GetWrtShell();
+    SwWrtShell& rSh = m_rView.GetWrtShell();
 
     //with the drag and drop interface no result set is initially available
     bool bDisposeResultSet = false;
     // we don't have a cursor, so we have to create our own RowSet
     if ( !xResultSet.is() )
     {
-        xResultSet = 
SwDBManager::createCursor(m_aDBData.sDataSource,m_aDBData.sCommand,m_aDBData.nCommandType,xConnection,m_pView);
+        xResultSet = 
SwDBManager::createCursor(m_aDBData.sDataSource,m_aDBData.sCommand,m_aDBData.nCommandType,xConnection,
 &m_rView);
         bDisposeResultSet = xResultSet.is();
     }
 
@@ -1005,7 +1005,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence<Any>& rSelection,
 
         const SwModuleOptions* pModOpt = SwModule::get()->GetModuleConfig();
 
-        bool bHTML = 0 != (::GetHtmlMode( m_pView->GetDocShell() ) & 
HTMLMODE_ON);
+        bool bHTML = 0 != (::GetHtmlMode( m_rView.GetDocShell() ) & 
HTMLMODE_ON);
         rSh.InsertTable(
             pModOpt->GetInsTableFlags(bHTML),
             nRows, nCols, (pSelection ? m_xTAutoFormat.get(): nullptr) );
@@ -1139,7 +1139,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence<Any>& rSelection,
                 break;
 
             if( 10 == i )
-                oWait.emplace( *m_pView->GetDocShell(), true );
+                oWait.emplace( *m_rView.GetDocShell(), true );
         }
 
         rSh.MoveTable( GotoCurrTable, fnTableStart );
@@ -1363,7 +1363,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence<Any>& rSelection,
                     rSh.SwEditShell::SplitNode();
 
                 if( 10 == i )
-                    oWait.emplace( *m_pView->GetDocShell(), true );
+                    oWait.emplace( *m_rView.GetDocShell(), true );
             }
 
             if( !bSetCursor && pMark != nullptr)
@@ -1394,7 +1394,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence<Any>& rSelection,
 
 void SwInsertDBColAutoPilot::SetTabSet()
 {
-    SwWrtShell& rSh = m_pView->GetWrtShell();
+    SwWrtShell& rSh = m_rView.GetWrtShell();
     const SfxPoolItem* pItem;
 
     if (m_xTAutoFormat)
@@ -1540,7 +1540,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
 
     LanguageType ePrevLang(0xffff);
 
-    SvNumberFormatter& rNFormatr = 
*m_pView->GetWrtShell().GetNumberFormatter();
+    SvNumberFormatter& rNFormatr = *m_rView.GetWrtShell().GetNumberFormatter();
     for(size_t nCol = 0; nCol < m_aDBColumns.size(); nCol++)
     {
         SwInsDBColumn* pColumn = m_aDBColumns[nCol].get();
@@ -1593,7 +1593,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
 void SwInsertDBColAutoPilot::Load()
 {
     const Sequence<OUString> aNames = GetNodeNames(OUString());
-    SvNumberFormatter& rNFormatr = 
*m_pView->GetWrtShell().GetNumberFormatter();
+    SvNumberFormatter& rNFormatr = *m_rView.GetWrtShell().GetNumberFormatter();
     for(OUString const & nodeName : aNames)
     {
         //search for entries with the appropriate data source and table
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx 
b/sw/source/ui/dbui/mailmergewizard.cxx
index c0c9db53e913..ceb012667f30 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -38,7 +38,7 @@ using vcl::RoadmapWizardTypes::PathId;
 
 SwMailMergeWizard::SwMailMergeWizard(SwView& rView, 
std::shared_ptr<SwMailMergeConfigItem> xItem)
     : RoadmapWizardMachine(rView.GetFrameWeld())
-    , m_pSwView(&rView)
+    , m_rSwView(rView)
     , m_bDocumentLoad(false)
     , m_xConfigItem(std::move(xItem))
     , m_sStarting(SwResId(ST_STARTING))
@@ -148,7 +148,7 @@ void SwMailMergeWizard::enterState( WizardState _nState )
         {
             bEnablePrev = false; // the first page
 
-            OUString sDataSourceName = GetSwView()->GetDataSourceName();
+            OUString sDataSourceName = GetSwView().GetDataSourceName();
             if(!sDataSourceName.isEmpty() &&
                !SwView::IsDataSourceAvailable(sDataSourceName))
             {
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx 
b/sw/source/ui/dbui/mmdocselectpage.cxx
index d877eb538b1a..d6376fb15169 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -89,7 +89,7 @@ IMPL_LINK_NOARG(SwMailMergeDocSelectPage, DocSelectHdl, 
weld::Toggleable&, void)
 {
     m_xRecentDocLB->set_sensitive(m_xRecentDocRB->get_active());
     m_pWizard->UpdateRoadmap();
-    OUString sDataSourceName = m_pWizard->GetSwView()->GetDataSourceName();
+    OUString sDataSourceName = m_pWizard->GetSwView().GetDataSourceName();
 
     if(m_xCurrentDocRB->get_active() &&
        !sDataSourceName.isEmpty() &&
@@ -134,7 +134,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, 
weld::Button&, rButton, void)
         aDlgHelper.SetContext(sfx2::FileDialogHelper::WriterMailMerge);
         Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
 
-        SfxObjectFactory &rFact = 
m_pWizard->GetSwView()->GetDocShell()->GetFactory();
+        SfxObjectFactory &rFact = 
m_pWizard->GetSwView().GetDocShell()->GetFactory();
         SfxFilterMatcher aMatcher( rFact.GetFactoryName() );
         SfxFilterMatcherIter aIter( aMatcher );
         std::shared_ptr<const SfxFilter> pFlt = aIter.First();
@@ -166,7 +166,7 @@ IMPL_LINK_NOARG(SwMailMergeDocSelectPage, 
ExchangeDatabaseHdl, weld::Button&, vo
 {
 
     SwAbstractDialogFactory& rFact = ::swui::GetFactory();
-    VclPtr<AbstractChangeDbDialog> 
pDlg(rFact.CreateSwChangeDBDlg(*m_pWizard->GetSwView()));
+    VclPtr<AbstractChangeDbDialog> 
pDlg(rFact.CreateSwChangeDBDlg(m_pWizard->GetSwView()));
     pDlg->StartExecuteAsync(
         [this, pDlg] (sal_Int32 nResult)->void
         {
@@ -174,7 +174,7 @@ IMPL_LINK_NOARG(SwMailMergeDocSelectPage, 
ExchangeDatabaseHdl, weld::Button&, vo
                 pDlg->UpdateFields();
             pDlg->disposeOnce();
 
-            OUString sDataSourceName = 
m_pWizard->GetSwView()->GetDataSourceName();
+            OUString sDataSourceName = 
m_pWizard->GetSwView().GetDataSourceName();
 
             if(m_xCurrentDocRB->get_active() &&
                !sDataSourceName.isEmpty() &&
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx 
b/sw/source/ui/dbui/mmlayoutpage.cxx
index 4948cdfe5c59..3d383188cb69 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -98,7 +98,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(weld::Container* 
pPage, SwMailMerge
         aTempFile.EnableKillingFile();
         m_sExampleURL = aTempFile.GetURL();
     }
-    SwView* pView = m_pWizard->GetSwView();
+    SwView& rView = m_pWizard->GetSwView();
     // Don't save embedded data set! It would steal it from current document.
     uno::Sequence< beans::PropertyValue > aValues =
     {
@@ -106,7 +106,7 @@ 
SwMailMergeLayoutPage::SwMailMergeLayoutPage(weld::Container* pPage, SwMailMerge
         comphelper::makePropertyValue(u"NoEmbDataSet"_ustr, true)
     };
 
-    uno::Reference< frame::XStorable > xStore( 
pView->GetDocShell()->GetModel(), uno::UNO_QUERY);
+    uno::Reference< frame::XStorable > xStore( 
rView.GetDocShell()->GetModel(), uno::UNO_QUERY);
     xStore->storeToURL( m_sExampleURL, aValues   );
 
     Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMailMergeLayoutPage, 
PreviewLoadedHdl_Impl));
@@ -219,20 +219,20 @@ bool 
SwMailMergeLayoutPage::commitPage(::vcl::WizardTypes::CommitPageReason eRea
     return true;
 }
 
-SwFrameFormat*  SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView const * 
pView,
+SwFrameFormat*  SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView& rView,
         SwMailMergeConfigItem& rConfigItem,
         const Point& rAddressPosition,
         bool bAlignToBody)
 {
     SwFrameFormat* pAddressBlockFormat = nullptr;
-    pView->GetWrtShell().StartUndo(SwUndoId::INSERT);
+    rView.GetWrtShell().StartUndo(SwUndoId::INSERT);
     if(rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted())
     {
         //insert the frame
         Point aAddressPosition(DEFAULT_LEFT_DISTANCE, DEFAULT_TOP_DISTANCE);
         if(rAddressPosition.X() > 0 && rAddressPosition.Y() > 0)
             aAddressPosition = rAddressPosition;
-        pAddressBlockFormat = InsertAddressFrame( pView->GetWrtShell(),
+        pAddressBlockFormat = InsertAddressFrame( rView.GetWrtShell(),
                                         rConfigItem,
                                         aAddressPosition, bAlignToBody, false);
         rConfigItem.SetAddressInserted();
@@ -240,10 +240,10 @@ SwFrameFormat*  
SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView const * p
     //now the greeting
     if(rConfigItem.IsGreetingLine(false) && !rConfigItem.IsGreetingInserted())
     {
-        InsertGreeting( pView->GetWrtShell(), rConfigItem, false);
+        InsertGreeting( rView.GetWrtShell(), rConfigItem, false);
         rConfigItem.SetGreetingInserted();
     }
-    pView->GetWrtShell().EndUndo(SwUndoId::INSERT);
+    rView.GetWrtShell().EndUndo(SwUndoId::INSERT);
     return pAddressBlockFormat;
 }
 
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx 
b/sw/source/ui/dbui/mmlayoutpage.hxx
index abec12bb2c52..f891b287485d 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -76,7 +76,7 @@ public:
     SwMailMergeLayoutPage(weld::Container* pPage, SwMailMergeWizard* pWizard);
     virtual ~SwMailMergeLayoutPage() override;
 
-    static SwFrameFormat*        InsertAddressAndGreeting(SwView const * pView,
+    static SwFrameFormat*        InsertAddressAndGreeting(SwView& rView,
                                             SwMailMergeConfigItem& rConfigItem,
                                             const Point& rAddressPos,
                                             bool bAlignToBody);
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 772cb26bdd0f..e5ee386d07ec 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -383,10 +383,10 @@ template <class Dialog>
 using AbstractTabController_Impl = 
AbstractTabController_Impl_BASE<SfxAbstractTabDialog, Dialog>;
 }
 
-VclPtr<SfxAbstractTabDialog>  
SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& 
pVw,
+VclPtr<SfxAbstractTabDialog>  
SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& 
rView,
     const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* 
pFormatStr)
 {
-    return VclPtr<AbstractTabController_Impl<SwCharDlg>>::Create(pParent, pVw, 
rCoreSet, nDialogMode, pFormatStr);
+    return VclPtr<AbstractTabController_Impl<SwCharDlg>>::Create(pParent, 
rView, rCoreSet, nDialogMode, pFormatStr);
 }
 
 namespace
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index efd153131ff4..cba9dc154aa5 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -777,9 +777,9 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, 
bool bObjSelect )
     SetSdrDrawMode( eSdrObjectKind );
 
     if (bObjSelect)
-        m_rView.SetDrawFuncPtr(std::make_unique<DrawSelection>( 
&m_rView.GetWrtShell(), this, &m_rView ));
+        m_rView.SetDrawFuncPtr(std::make_unique<DrawSelection>( 
&m_rView.GetWrtShell(), this, m_rView ));
     else
-        m_rView.SetDrawFuncPtr(std::make_unique<SwDrawBase>( 
&m_rView.GetWrtShell(), this, &m_rView ));
+        m_rView.SetDrawFuncPtr(std::make_unique<SwDrawBase>( 
&m_rView.GetWrtShell(), this, m_rView ));
 
     m_rView.SetSelDrawSlot();
     SetSdrDrawMode( eSdrObjectKind );
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 532b62d6445f..085249a2b9f2 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -32,7 +32,7 @@ class SwCharDlg final : public SfxTabDialogController
     SwCharDlgMode m_nDialogMode;
 
 public:
-    SwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
+    SwCharDlg(weld::Window* pParent, SwView& rView, const SfxItemSet& rCoreSet,
               SwCharDlgMode nDialogMode, const OUString* pFormatStr);
 
     virtual ~SwCharDlg() override;
diff --git a/sw/source/uibase/inc/conarc.hxx b/sw/source/uibase/inc/conarc.hxx
index eb65042f314d..353d018811f1 100644
--- a/sw/source/uibase/inc/conarc.hxx
+++ b/sw/source/uibase/inc/conarc.hxx
@@ -28,7 +28,7 @@ class ConstArc final : public SwDrawBase
     sal_uInt16 m_nButtonUpCount;
 
 public:
-    ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+    ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView& rView);
 
                                        // Mouse- & Key-Events
     virtual bool    MouseButtonUp(const MouseEvent& rMEvt) override;
diff --git a/sw/source/uibase/inc/concustomshape.hxx 
b/sw/source/uibase/inc/concustomshape.hxx
index cc2358ceeefc..8d2b7007d5b0 100644
--- a/sw/source/uibase/inc/concustomshape.hxx
+++ b/sw/source/uibase/inc/concustomshape.hxx
@@ -36,7 +36,7 @@ class ConstCustomShape final : public SwDrawBase
 
  public:
 
-    ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, 
SfxRequest const & rReq );
+    ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView& rView, 
SfxRequest const & rReq );
 
                                        // Mouse- & Key-Events
     virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
diff --git a/sw/source/uibase/inc/conform.hxx b/sw/source/uibase/inc/conform.hxx
index e0585f262248..bdcd88d37ab6 100644
--- a/sw/source/uibase/inc/conform.hxx
+++ b/sw/source/uibase/inc/conform.hxx
@@ -27,7 +27,7 @@ private:
     SdrObjKind m_eObjKind;
 
 public:
-    ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, 
SdrObjKind eObjKind);
+    ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView& rView, 
SdrObjKind eObjKind);
 
                                        // Mouse- & Key-Events
     virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
diff --git a/sw/source/uibase/inc/conpoly.hxx b/sw/source/uibase/inc/conpoly.hxx
index 377eb685b69e..38caed9a00d8 100644
--- a/sw/source/uibase/inc/conpoly.hxx
+++ b/sw/source/uibase/inc/conpoly.hxx
@@ -25,7 +25,7 @@
 class ConstPolygon final : public SwDrawBase
 {
 public:
-    ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+    ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView& rView);
 
     // Mouse- & Key-Events
     virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
diff --git a/sw/source/uibase/inc/conrect.hxx b/sw/source/uibase/inc/conrect.hxx
index bc290f8e84ea..17803cc8c2ab 100644
--- a/sw/source/uibase/inc/conrect.hxx
+++ b/sw/source/uibase/inc/conrect.hxx
@@ -31,7 +31,7 @@ class ConstRectangle final : public SwDrawBase
     bool mbVertical;
 
  public:
-    ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+    ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView& rView);
 
                                        // Mouse- & Key-Events
     virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx 
b/sw/source/uibase/inc/dbinsdlg.hxx
index 5694057990eb..e2804c964e89 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -84,7 +84,7 @@ class SwInsertDBColAutoPilot final : public 
SfxDialogController, public utl::Con
 
     OUString        m_sNoTmpl;
 
-    SwView*         m_pView;
+    SwView&         m_rView;
     std::unique_ptr<SwTableAutoFormat> m_xTAutoFormat;
 
     std::unique_ptr<SfxItemSet>  m_pTableSet;
diff --git a/sw/source/uibase/inc/drawbase.hxx 
b/sw/source/uibase/inc/drawbase.hxx
index ccc045ced313..eaea9df78a3d 100644
--- a/sw/source/uibase/inc/drawbase.hxx
+++ b/sw/source/uibase/inc/drawbase.hxx
@@ -32,7 +32,7 @@ class MouseEvent;
 class SwDrawBase
 {
 protected:
-    SwView*         m_pView;
+    SwView&         m_rView;
     SwWrtShell*     m_pSh;
     VclPtr<SwEditWin> m_pWin;
     Point           m_aStartPos;                 // position of BeginCreate
@@ -42,7 +42,7 @@ protected:
 
     Point           GetDefaultCenterPos() const;
 public:
-    SwDrawBase(SwWrtShell *pSh, SwEditWin* pWin, SwView* pView);
+    SwDrawBase(SwWrtShell *pSh, SwEditWin* pWin, SwView& rView);
     virtual ~SwDrawBase();
 
     void         SetDrawPointer();
diff --git a/sw/source/uibase/inc/dselect.hxx b/sw/source/uibase/inc/dselect.hxx
index 4f53feb31006..bb9f6e9c3d4a 100644
--- a/sw/source/uibase/inc/dselect.hxx
+++ b/sw/source/uibase/inc/dselect.hxx
@@ -25,7 +25,7 @@
 class DrawSelection final : public SwDrawBase
 {
 public:
-    DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+    DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView& rView);
 
     virtual void Activate(const sal_uInt16 nSlotId) override; // activate 
function
 };
diff --git a/sw/source/uibase/inc/hyp.hxx b/sw/source/uibase/inc/hyp.hxx
index bbe8208f9fb8..b770a0b5f379 100644
--- a/sw/source/uibase/inc/hyp.hxx
+++ b/sw/source/uibase/inc/hyp.hxx
@@ -28,7 +28,7 @@ class SwView;
 
 class SW_DLLPUBLIC SwHyphWrapper final : public SvxSpellWrapper {
 private:
-    SwView* m_pView;
+    SwView& m_rView;
     sal_uInt16      m_nPageCount;     // page count for progress view
     sal_uInt16      m_nPageStart;     // 1st checked page
     bool            m_bInSelection : 1; // separating selected text
@@ -42,7 +42,7 @@ private:
     virtual void InsertHyphen( const sal_Int32 nPos ) override; // insert 
hyphen
 
 public:
-    SwHyphWrapper( SwView* pVw,
+    SwHyphWrapper( SwView& rView,
                    css::uno::Reference< css::linguistic2::XHyphenator > const 
&rxHyph,
                    bool bStart, bool bOther, bool bSelect );
     virtual ~SwHyphWrapper() override;
diff --git a/sw/source/uibase/inc/mailmergewizard.hxx 
b/sw/source/uibase/inc/mailmergewizard.hxx
index f011718f64ef..1a6484583d67 100644
--- a/sw/source/uibase/inc/mailmergewizard.hxx
+++ b/sw/source/uibase/inc/mailmergewizard.hxx
@@ -35,7 +35,7 @@ using vcl::WizardTypes::WizardState;
 
 class SwMailMergeWizard final : public ::vcl::RoadmapWizardMachine
 {
-    SwView*                 m_pSwView;
+    SwView&                 m_rSwView;
     OUString                m_sDocumentURL;
     bool                    m_bDocumentLoad;
 
@@ -61,7 +61,7 @@ public:
     SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> 
xConfigItem);
     virtual ~SwMailMergeWizard() override;
 
-    SwView*                     GetSwView() {return m_pSwView;}
+    SwView&                     GetSwView() {return m_rSwView;}
     SwMailMergeConfigItem&      GetConfigItem() { return *m_xConfigItem;}
 
     void                    SetReloadDocument(const OUString& rURL) 
{m_sDocumentURL = rURL;}
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx 
b/sw/source/uibase/lingu/hhcwrp.cxx
index 9cfb85ba725b..c2a909b0231d 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -77,7 +77,7 @@ public:
 }
 
 SwHHCWrapper::SwHHCWrapper(
-        SwView* pSwView,
+        SwView& rSwView,
         const uno::Reference< uno::XComponentContext >& rxContext,
         LanguageType nSourceLanguage,
         LanguageType nTargetLanguage,
@@ -85,14 +85,14 @@ SwHHCWrapper::SwHHCWrapper(
         sal_Int32 nConvOptions,
         bool bIsInteractive,
         bool bStart, bool bOther, bool bSelection )
-    : editeng::HangulHanjaConversion(pSwView->GetEditWin().GetFrameWeld(), 
rxContext,
+    : editeng::HangulHanjaConversion(rSwView.GetEditWin().GetFrameWeld(), 
rxContext,
                                 LanguageTag::convertToLocale( nSourceLanguage 
),
                                 LanguageTag::convertToLocale( nTargetLanguage 
),
                                 pTargetFont,
                                 nConvOptions,
                                 bIsInteractive )
-    , m_pView( pSwView )
-    , m_rWrtShell( pSwView->GetWrtShell() )
+    , m_rView( rSwView )
+    , m_rWrtShell( rSwView.GetWrtShell() )
     , m_nLastPos( 0 )
     , m_nUnitOffset( 0 )
     , m_nPageCount( 0 )
@@ -115,22 +115,22 @@ SwHHCWrapper::~SwHHCWrapper() COVERITY_NOEXCEPT_FALSE
     // check for existence of a draw view which means that there are
     // (or previously were) draw objects present in the document.
     // I.e. we like to check those too.
-    if ( m_bIsDrawObj /*&& bLastRet*/ && m_pView->GetWrtShell().HasDrawView() )
+    if ( m_bIsDrawObj /*&& bLastRet*/ && m_rView.GetWrtShell().HasDrawView() )
     {
-        vcl::Cursor *pSave = m_pView->GetWindow()->GetCursor();
+        vcl::Cursor *pSave = m_rView.GetWindow()->GetCursor();
         {
             SwKeepConversionDirectionStateContext aContext;
 
-            SdrHHCWrapper aSdrConvWrap( m_pView, GetSourceLanguage(),
+            SdrHHCWrapper aSdrConvWrap( m_rView, GetSourceLanguage(),
                     GetTargetLanguage(), GetTargetFont(),
                     GetConversionOptions(), IsInteractive() );
             aSdrConvWrap.StartTextConversion();
         }
-        m_pView->GetWindow()->SetCursor( pSave );
+        m_rView.GetWindow()->SetCursor( pSave );
     }
 
     if( m_nPageCount )
-        ::EndProgress( m_pView->GetDocShell() );
+        ::EndProgress( m_rView.GetDocShell() );
 
     // finally for chinese translation we need to change the documents
     // default language and font to the new ones to be used.
@@ -138,7 +138,7 @@ SwHHCWrapper::~SwHHCWrapper() COVERITY_NOEXCEPT_FALSE
     if (!IsChinese( nTargetLang ))
         return;
 
-    SwDoc *pDoc = m_pView->GetDocShell()->GetDoc();
+    SwDoc *pDoc = m_rView.GetDocShell()->GetDoc();
 
     //!! Note: This also effects the default language of text boxes 
(EditEngine/EditView) !!
     pDoc->SetDefault( SvxLanguageItem( nTargetLang, RES_CHRATR_CJK_LANGUAGE ) 
);
@@ -502,7 +502,7 @@ void SwHHCWrapper::Convert()
 {
     OSL_ENSURE( m_pConvArgs == nullptr, "NULL pointer expected" );
     {
-        SwPaM *pCursor = m_pView->GetWrtShell().GetCursor();
+        SwPaM *pCursor = m_rView.GetWrtShell().GetCursor();
         auto [pSttPos, pEndPos] = pCursor->StartEnd(); // SwPosition*
 
         if (pSttPos->GetNode().IsTextNode() &&
@@ -513,7 +513,7 @@ void SwHHCWrapper::Convert()
         else    // we are not in the text (maybe a graphic or OLE object is 
selected) let's start from the top
         {
             // get PaM that points to the start of the document
-            SwNode& rNode = 
m_pView->GetDocShell()->GetDoc()->GetNodes().GetEndOfContent();
+            SwNode& rNode = 
m_rView.GetDocShell()->GetDoc()->GetNodes().GetEndOfContent();
             SwPaM aPam(rNode);
             aPam.Move( fnMoveBackward, GoInDoc ); // move to start of document
 
@@ -658,12 +658,12 @@ void SwHHCWrapper::FindConvText_impl()
 void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ 
*pConversionArgs, SvxSpellArea eArea )
 {
     m_bIsDrawObj = SvxSpellArea::Other == eArea;
-    m_pView->SpellStart( eArea, m_bStartDone, m_bEndDone, /* [out] */ 
pConversionArgs );
+    m_rView.SpellStart( eArea, m_bStartDone, m_bEndDone, /* [out] */ 
pConversionArgs );
 }
 
 void SwHHCWrapper::ConvEnd_impl( SwConversionArgs const *pConversionArgs )
 {
-    m_pView->SpellEnd( pConversionArgs );
+    m_rView.SpellEnd( pConversionArgs );
 }
 
 bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs )
@@ -671,7 +671,7 @@ bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs 
*pConversionArgs )
     bool bProgress = !m_bIsDrawObj && !m_bIsSelection;
     pConversionArgs->aConvText.clear();
     pConversionArgs->nConvTextLang = LANGUAGE_NONE;
-    m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? 
&m_nPageStart : nullptr, pConversionArgs );
+    m_rView.GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? 
&m_nPageStart : nullptr, pConversionArgs );
     return !pConversionArgs->aConvText.isEmpty();
 }
 
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index caf235bf793d..8b3a52d6dbfd 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -31,16 +31,16 @@
 
 #include <memory>
 
-#define PSH         (&m_pView->GetWrtShell())
+#define PSH         (&m_rView.GetWrtShell())
 
 using namespace ::com::sun::star;
 
 // interactive separation
-SwHyphWrapper::SwHyphWrapper( SwView* pVw,
+SwHyphWrapper::SwHyphWrapper( SwView& rView,
             uno::Reference< linguistic2::XHyphenator > const &rxHyph,
             bool bStart, bool bOther, bool bSelect ) :
-    SvxSpellWrapper( pVw->GetEditWin().GetFrameWeld(), rxHyph, bStart, bOther 
),
-    m_pView( pVw ),
+    SvxSpellWrapper( rView.GetEditWin().GetFrameWeld(), rxHyph, bStart, bOther 
),
+    m_rView( rView ),
     m_nPageCount( 0 ),
     m_nPageStart( 0 ),
     m_bInSelection( bSelect ),
@@ -54,11 +54,11 @@ void SwHyphWrapper::SpellStart( SvxSpellArea eSpell )
 {
     if( SvxSpellArea::Other == eSpell && m_nPageCount )
     {
-        ::EndProgress( m_pView->GetDocShell() );
+        ::EndProgress( m_rView.GetDocShell() );
         m_nPageCount = 0;
         m_nPageStart = 0;
     }
-    m_pView->HyphStart( eSpell );
+    m_rView.HyphStart( eSpell );
 }
 
 void SwHyphWrapper::SpellContinue()
@@ -68,7 +68,7 @@ void SwHyphWrapper::SpellContinue()
     if( m_bAutomatic )
     {
         PSH->StartAllAction();
-        oWait.emplace( *m_pView->GetDocShell(), true );
+        oWait.emplace( *m_rView.GetDocShell(), true );
     }
 
     uno::Reference< uno::XInterface >  xHyphWord = m_bInSelection ?
@@ -111,10 +111,10 @@ void SwHyphWrapper::InsertHyphen( const sal_Int32 nPos )
 SwHyphWrapper::~SwHyphWrapper()
 {
     if( m_nPageCount )
-        ::EndProgress( m_pView->GetDocShell() );
+        ::EndProgress( m_rView.GetDocShell() );
     if( m_bInfoBox && !Application::IsHeadlessModeEnabled() )
     {
-        std::unique_ptr<weld::MessageDialog> 
xInfoBox(Application::CreateMessageDialog(m_pView->GetEditWin().GetFrameWeld(),
+        std::unique_ptr<weld::MessageDialog> 
xInfoBox(Application::CreateMessageDialog(m_rView.GetEditWin().GetFrameWeld(),
                                                       VclMessageType::Info, 
VclButtonsType::Ok,
                                                       SwResId(STR_HYP_OK)));
         xInfoBox->run();
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx 
b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 1e39a6d0f3f4..a8a705065606 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -35,15 +35,15 @@
 
 using namespace ::com::sun::star;
 
-SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
+SdrHHCWrapper::SdrHHCWrapper( SwView& rView,
        LanguageType nSourceLanguage, LanguageType nTargetLanguage,
        const vcl::Font* pTargetFnt,
        sal_Int32 nConvOptions,
        bool bInteractive ) :
-    
SdrOutliner(pVw->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->
+    
SdrOutliner(rView.GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->
                              GetDrawOutliner().GetEmptyItemSet().GetPool(),
                 OutlinerMode::TextObject ),
-    m_pView( pVw ),
+    m_rView( rView ),
     m_pTextObj( nullptr ),
     m_nOptions( nConvOptions ),
     m_nDocIndex( 0 ),
@@ -52,7 +52,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
     m_pTargetFont( pTargetFnt ),
     m_bIsInteractive( bInteractive )
 {
-    SetRefDevice( 
m_pView->GetDocShell()->GetDoc()->getIDocumentDeviceAccess().getPrinter( false 
) );
+    SetRefDevice( 
m_rView.GetDocShell()->GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) 
);
 
     MapMode aMapMode (MapUnit::MapTwip);
     SetRefMapMode(aMapMode);
@@ -60,8 +60,8 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
     Size aSize( 1, 1 );
     SetPaperSize( aSize );
 
-    m_pOutlView.reset( new OutlinerView( this, &(m_pView->GetEditWin()) ) );
-    
m_pOutlView->GetOutliner()->SetRefDevice(m_pView->GetWrtShell().getIDocumentDeviceAccess().getPrinter(
 false ));
+    m_pOutlView.reset( new OutlinerView( this, &(m_rView.GetEditWin()) ) );
+    
m_pOutlView->GetOutliner()->SetRefDevice(m_rView.GetWrtShell().getIDocumentDeviceAccess().getPrinter(
 false ));
 
     // Hack: all SdrTextObj attributes should be transferred to EditEngine
     m_pOutlView->SetBackgroundColor( COL_WHITE );
@@ -78,7 +78,7 @@ SdrHHCWrapper::~SdrHHCWrapper()
 {
     if (m_pTextObj)
     {
-        SdrView *pSdrView = m_pView->GetWrtShell().GetDrawView();
+        SdrView *pSdrView = m_rView.GetWrtShell().GetDrawView();
         OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" );
         pSdrView->SdrEndTextEdit( true );
         SetUpdateLayout(false);
@@ -90,7 +90,7 @@ SdrHHCWrapper::~SdrHHCWrapper()
 
 void SdrHHCWrapper::StartTextConversion()
 {
-    m_pOutlView->StartTextConversion(m_pView->GetFrameWeld(), m_nSourceLang, 
m_nTargetLang, m_pTargetFont, m_nOptions, m_bIsInteractive, true);
+    m_pOutlView->StartTextConversion(m_rView.GetFrameWeld(), m_nSourceLang, 
m_nTargetLang, m_pTargetFont, m_nOptions, m_bIsInteractive, true);
 }
 
 bool SdrHHCWrapper::ConvertNextDocument()
@@ -99,7 +99,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
 
     if ( m_pTextObj )
     {
-        SdrView *pSdrView = m_pView->GetWrtShell().GetDrawView();
+        SdrView *pSdrView = m_rView.GetWrtShell().GetDrawView();
         OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" );
         pSdrView->SdrEndTextEdit( true );
         SetUpdateLayout(false);
@@ -112,7 +112,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
     const auto n = m_nDocIndex;
 
     std::list<SdrTextObj*> aTextObjs;
-    SwDrawContact::GetTextObjectsFromFormat(aTextObjs, 
*m_pView->GetDocShell()->GetDoc());
+    SwDrawContact::GetTextObjectsFromFormat(aTextObjs, 
*m_rView.GetDocShell()->GetDoc());
     for (auto const& textObj : aTextObjs)
     {
         m_pTextObj = textObj;
@@ -134,7 +134,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
                 SetUpdateLayout(true);
                 if (HasConvertibleTextPortion( m_nSourceLang ))
                 {
-                    SdrView *pSdrView = m_pView->GetWrtShell().GetDrawView();
+                    SdrView *pSdrView = m_rView.GetWrtShell().GetDrawView();
                     assert(pSdrView && "SdrHHCWrapper without DrawView?");
                     SdrPageView* pPV = pSdrView->GetSdrPageView();
                     m_nDocIndex = n;
@@ -142,9 +142,9 @@ bool SdrHHCWrapper::ConvertNextDocument()
                     m_pOutlView->SetOutputArea( tools::Rectangle( Point(), 
Size(1,1)));
                     SetPaperSize( m_pTextObj->GetLogicRect().GetSize() );
                     SetUpdateLayout(true);
-                    
m_pView->GetWrtShell().MakeVisible(SwRect(m_pTextObj->GetLogicRect()));
+                    
m_rView.GetWrtShell().MakeVisible(SwRect(m_pTextObj->GetLogicRect()));
 
-                    pSdrView->SdrBeginTextEdit(m_pTextObj, pPV, 
&m_pView->GetEditWin(), false, this, m_pOutlView.get(), true, true);
+                    pSdrView->SdrBeginTextEdit(m_pTextObj, pPV, 
&m_rView.GetEditWin(), false, this, m_pOutlView.get(), true, true);
                 }
                 else
                     SetUpdateLayout(false);
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.hxx 
b/sw/source/uibase/lingu/sdrhhcwrap.hxx
index 4965bb520ebf..5a70c116f60c 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.hxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.hxx
@@ -28,7 +28,7 @@ class SdrHHCWrapper : public SdrOutliner
 {
     // modified version of SdrSpeller
 
-    SwView*             m_pView;
+    SwView&             m_rView;
     SdrTextObj*         m_pTextObj;
     std::unique_ptr<OutlinerView> m_pOutlView;
     sal_Int32           m_nOptions;
@@ -39,7 +39,7 @@ class SdrHHCWrapper : public SdrOutliner
     bool                m_bIsInteractive;
 
 public:
-    SdrHHCWrapper( SwView* pVw,
+    SdrHHCWrapper( SwView& rView,
                    LanguageType nSourceLanguage, LanguageType nTargetLanguage,
                    const vcl::Font* pTargetFnt,
                    sal_Int32 nConvOptions, bool bInteractive );
diff --git a/sw/source/uibase/ribbar/conarc.cxx 
b/sw/source/uibase/ribbar/conarc.cxx
index 4e55dc59ce1f..d213aec1c0d6 100644
--- a/sw/source/uibase/ribbar/conarc.cxx
+++ b/sw/source/uibase/ribbar/conarc.cxx
@@ -26,8 +26,8 @@
 #include <drawbase.hxx>
 #include <conarc.hxx>
 
-ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView)
-    : SwDrawBase(pWrtShell, pEditWin, pSwView)
+ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView& rSwView)
+    : SwDrawBase(pWrtShell, pEditWin, rSwView)
     , m_nButtonUpCount(0)
 {
 }
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx 
b/sw/source/uibase/ribbar/concustomshape.cxx
index ab6fa71ca13f..6003be79a955 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -38,8 +38,8 @@
 
 using namespace com::sun::star;
 
-ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* 
pEditWin, SwView* pSwView, SfxRequest const & rReq )
-    : SwDrawBase( pWrtShell, pEditWin, pSwView )
+ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* 
pEditWin, SwView& rSwView, SfxRequest const & rReq )
+    : SwDrawBase( pWrtShell, pEditWin, rSwView )
 {
     m_aCustomShape = ConstCustomShape::GetShapeTypeFromRequest( rReq );
 }
@@ -77,7 +77,7 @@ bool ConstCustomShape::MouseButtonDown(const MouseEvent& 
rMEvt)
                 if ( static_cast<SdrObjCustomShape*>(pObj)->UseNoFillStyle() )
                     bForceNoFillStyle = true;
 
-                SfxItemSet aAttr( m_pView->GetPool() );
+                SfxItemSet aAttr( m_rView.GetPool() );
                 if ( bForceNoFillStyle )
                     aAttr.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
                 pObj->SetMergedItemSet(aAttr);
diff --git a/sw/source/uibase/ribbar/conform.cxx 
b/sw/source/uibase/ribbar/conform.cxx
index 25cb8570d391..d88710e535ee 100644
--- a/sw/source/uibase/ribbar/conform.cxx
+++ b/sw/source/uibase/ribbar/conform.cxx
@@ -27,8 +27,8 @@
 #include <drawbase.hxx>
 #include <conform.hxx>
 
-ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, 
SwView* pSwView, SdrObjKind eObjKind)
-    : SwDrawBase(pWrtShell, pEditWin, pSwView)
+ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, 
SwView& rSwView, SdrObjKind eObjKind)
+    : SwDrawBase(pWrtShell, pEditWin, rSwView)
     , m_eObjKind(eObjKind)
 {
     m_bInsForm = true;
diff --git a/sw/source/uibase/ribbar/conpoly.cxx 
b/sw/source/uibase/ribbar/conpoly.cxx
index c4a245fda8af..491b4e38c2b1 100644
--- a/sw/source/uibase/ribbar/conpoly.cxx
+++ b/sw/source/uibase/ribbar/conpoly.cxx
@@ -26,8 +26,8 @@
 #include <drawbase.hxx>
 #include <conpoly.hxx>
 
-ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* 
pSwView) :
-                SwDrawBase(pWrtShell, pEditWin, pSwView)
+ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView& 
rSwView) :
+                SwDrawBase(pWrtShell, pEditWin, rSwView)
 {
 }
 
diff --git a/sw/source/uibase/ribbar/conrect.cxx 
b/sw/source/uibase/ribbar/conrect.cxx
index 8d9d468a92f2..18493a4c7b1e 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -36,8 +36,8 @@
 #include <conrect.hxx>
 
 ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
-                                SwView* pSwView )
-    : SwDrawBase( pWrtShell, pEditWin, pSwView )
+                                SwView& rSwView )
+    : SwDrawBase( pWrtShell, pEditWin, rSwView )
     , m_bMarquee(false)
     , m_bCapVertical(false)
     , mbVertical(false)
@@ -52,16 +52,16 @@ bool ConstRectangle::MouseButtonDown(const MouseEvent& 
rMEvt)
     {
         if (m_pWin->GetSdrDrawMode() == SdrObjKind::Caption)
         {
-            m_pView->NoRotate();
-            if (m_pView->IsDrawSelMode())
+            m_rView.NoRotate();
+            if (m_rView.IsDrawSelMode())
             {
-                m_pView->FlipDrawSelMode();
-                
m_pSh->GetDrawView()->SetFrameDragSingles(m_pView->IsDrawSelMode());
+                m_rView.FlipDrawSelMode();
+                
m_pSh->GetDrawView()->SetFrameDragSingles(m_rView.IsDrawSelMode());
             }
         }
         else
         {
-            SdrObject* pObj = m_pView->GetDrawView()->GetCreateObj();
+            SdrObject* pObj = m_rView.GetDrawView()->GetCreateObj();
             if (pObj)
             {
                 SfxItemSet 
aAttr(pObj->getSdrModelFromSdrObject().GetItemPool());
@@ -127,9 +127,9 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
             if( pObj )
             {
                 SdrPageView* pPV = pSdrView->GetSdrPageView();
-                m_pView->BeginTextEdit( pObj, pPV, m_pWin, true );
+                m_rView.BeginTextEdit( pObj, pPV, m_pWin, true );
             }
-            m_pView->LeaveDrawCreate();  // Switch to selection mode
+            m_rView.LeaveDrawCreate();  // Switch to selection mode
             
m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
             break;
 
diff --git a/sw/source/uibase/ribbar/drawbase.cxx 
b/sw/source/uibase/ribbar/drawbase.cxx
index 3a2f9b1a4261..572c3b833f0e 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -41,8 +41,8 @@
 
 using namespace ::com::sun::star;
 
-SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* 
pSwView) :
-    m_pView(pSwView),
+SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView& 
rSwView) :
+    m_rView(rSwView),
     m_pSh(pSwWrtShell),
     m_pWin(pWindow),
     m_nSlotId(USHRT_MAX),
@@ -55,7 +55,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* 
pWindow, SwView* pSwV
 
 SwDrawBase::~SwDrawBase()
 {
-    if (m_pView->GetWrtShellPtr()) // In the view-dtor could the wrtsh already 
been deleted...
+    if (m_rView.GetWrtShellPtr()) // In the view-dtor could the wrtsh already 
been deleted...
         m_pSh->GetDrawView()->SetEditMode();
 }
 
@@ -257,7 +257,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
         if(rMEvt.IsRight())
         {
             m_pSh->BreakCreate();
-            m_pView->LeaveDrawCreate();
+            m_rView.LeaveDrawCreate();
         }
         else
         {
@@ -291,7 +291,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
                 bAutoCap = true;
                 if(m_pWin->GetFrameColCount() > 1)
                 {
-                    SfxItemSetFixed<RES_COL,RES_COL> aSet(m_pView->GetPool());
+                    SfxItemSetFixed<RES_COL,RES_COL> aSet(m_rView.GetPool());
                     SwFormatCol aCol(aSet.Get(RES_COL));
                     aCol.Init(m_pWin->GetFrameColCount(), 
aCol.GetGutterWidth(), aCol.GetWishWidth());
                     aSet.Put(aCol);
@@ -334,14 +334,14 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
 
                     if (!m_pSh->GetSelectedObjCount())
                     {
-                        m_pView->LeaveDrawCreate();    // Switch to selection 
mode
+                        m_rView.LeaveDrawCreate();    // Switch to selection 
mode
 
                         
m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
 
                         if (m_pSh->IsSelFrameMode())
                             m_pSh->LeaveSelFrameMode();
                     }
-                    m_pView->NoRotate();
+                    m_rView.NoRotate();
 
                     bCheckShell = true; // if necessary turn on BezierShell
                 }
@@ -352,11 +352,11 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
                             m_pSh->IsSelFrameMode() ) ? SW_ADD_SELECT : 0 );
                     else
                     {
-                        m_pView->LeaveDrawCreate();
+                        m_rView.LeaveDrawCreate();
                         if (m_pSh->IsSelFrameMode())
                             m_pSh->LeaveSelFrameMode();
                     }
-                    m_pView->NoRotate();
+                    m_rView.NoRotate();
 
                     bReturn = true;
                 }
@@ -392,14 +392,14 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
 
                     if (!m_pSh->GetSelectedObjCount())
                     {
-                        m_pView->LeaveDrawCreate();    // Switch to selection 
mode
+                        m_rView.LeaveDrawCreate();    // Switch to selection 
mode
 
                         
m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
 
                         if (m_pSh->IsSelFrameMode())
                             m_pSh->LeaveSelFrameMode();
                     }
-                    m_pView->NoRotate();
+                    m_rView.NoRotate();
 
                     bCheckShell = true; // if necessary turn on BezierShell
                 }
@@ -409,22 +409,22 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
 
             if (!m_pSh->GetSelectedObjCount() && !m_pWin->IsDrawAction())
             {
-                m_pView->LeaveDrawCreate();
+                m_rView.LeaveDrawCreate();
                 if (m_pSh->IsSelFrameMode())
                     m_pSh->LeaveSelFrameMode();
 
-                m_pView->NoRotate();
+                m_rView.NoRotate();
                 bReturn = true;
             }
         }
     }
 
     if (bCheckShell)
-        m_pView->AttrChangedNotify(nullptr); // if necessary turn on 
BezierShell
+        m_rView.AttrChangedNotify(nullptr); // if necessary turn on BezierShell
 
     //!!!!!!!!!! Attention suicide !!!!!!!!!!! Everything should be renewed 
once
     if ( bAutoCap )
-        m_pView->AutoCaption(FRAME_CAP);   //Can currently only be FRAME, 
otherwise convert
+        m_rView.AutoCaption(FRAME_CAP);   //Can currently only be FRAME, 
otherwise convert
                                            // to enums
     return bReturn;
 }
@@ -500,18 +500,18 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
         m_pSh->SelectObj(aPnt);
         if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->GetSelectedObjCount())
         {
-            m_pView->LeaveDrawCreate();    // Switch to selection mode
+            m_rView.LeaveDrawCreate();    // Switch to selection mode
 
             
m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
         }
     }
     else
     {
-        m_pView->LeaveDrawCreate();
+        m_rView.LeaveDrawCreate();
         if (m_pSh->IsSelFrameMode())
             m_pSh->LeaveSelFrameMode();
     }
-    m_pView->NoRotate();
+    m_rView.NoRotate();
 }
 
 void SwDrawBase::CreateDefaultObject()
@@ -533,7 +533,7 @@ void SwDrawBase::CreateDefaultObjectAtPosWithSize(Point 
aPos, Size aSize)
     aPos.AdjustX(-sal_Int32(aSize.getWidth() / 2));
     aPos.AdjustY(-sal_Int32(aSize.getHeight() / 2));
 
-    SdrView* sdrView =  m_pView->GetDrawView();
+    SdrView* sdrView =  m_rView.GetDrawView();
     SdrPageView *pPV = sdrView->GetSdrPageView();
 
     if(sdrView->IsSnapEnabled())
diff --git a/sw/source/uibase/ribbar/dselect.cxx 
b/sw/source/uibase/ribbar/dselect.cxx
index abbebc0445e5..72a5e6d23c86 100644
--- a/sw/source/uibase/ribbar/dselect.cxx
+++ b/sw/source/uibase/ribbar/dselect.cxx
@@ -26,8 +26,8 @@
 #include <drawbase.hxx>
 #include <dselect.hxx>
 
-DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, 
SwView* pSwView)
-    : SwDrawBase(pWrtShell, pEditWin, pSwView)
+DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, 
SwView& rSwView)
+    : SwDrawBase(pWrtShell, pEditWin, rSwView)
 {
     m_bCreateObj = false;
 }
diff --git a/sw/source/uibase/uiview/viewdraw.cxx 
b/sw/source/uibase/uiview/viewdraw.cxx
index a00333cc4ca6..376e63b2f710 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -237,7 +237,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
     {
         case SID_OBJECT_SELECT:
         case SID_DRAW_SELECT:
-            pFuncPtr.reset( new DrawSelection(m_pWrtShell.get(), m_pEditWin, 
this) );
+            pFuncPtr.reset( new DrawSelection(m_pWrtShell.get(), m_pEditWin, 
*this) );
             m_nDrawSfxId = m_nFormSfxId = SID_OBJECT_SELECT;
             m_sDrawCustom.clear();
             break;
@@ -259,7 +259,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
         case SID_DRAW_TEXT_MARQUEE:
         case SID_DRAW_CAPTION:
         case SID_DRAW_CAPTION_VERTICAL:
-            pFuncPtr.reset( new ConstRectangle(m_pWrtShell.get(), m_pEditWin, 
this) );
+            pFuncPtr.reset( new ConstRectangle(m_pWrtShell.get(), m_pEditWin, 
*this) );
             bCreateDirectly = comphelper::LibreOfficeKit::isActive();
             m_nDrawSfxId = nSlotId;
             m_sDrawCustom.clear();
@@ -273,7 +273,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
         case SID_DRAW_BEZIER_FILL:
         case SID_DRAW_FREELINE_NOFILL:
         case SID_DRAW_FREELINE:
-            pFuncPtr.reset( new ConstPolygon(m_pWrtShell.get(), m_pEditWin, 
this) );
+            pFuncPtr.reset( new ConstPolygon(m_pWrtShell.get(), m_pEditWin, 
*this) );
             m_nDrawSfxId = nSlotId;
             m_sDrawCustom.clear();
             break;
@@ -281,14 +281,14 @@ void SwView::ExecDraw(const SfxRequest& rReq)
         case SID_DRAW_ARC:
         case SID_DRAW_PIE:
         case SID_DRAW_CIRCLECUT:
-            pFuncPtr.reset( new ConstArc(m_pWrtShell.get(), m_pEditWin, this) 
);
+            pFuncPtr.reset( new ConstArc(m_pWrtShell.get(), m_pEditWin, *this) 
);
             m_nDrawSfxId = nSlotId;
             m_sDrawCustom.clear();
             break;
 
         case SID_FM_CREATE_CONTROL:
         {
-            pFuncPtr.reset(new ConstFormControl(m_pWrtShell.get(), m_pEditWin, 
this, eNewFormObjKind));
+            pFuncPtr.reset(new ConstFormControl(m_pWrtShell.get(), m_pEditWin, 
*this, eNewFormObjKind));
             m_nFormSfxId = nSlotId;
             m_eFormObjKind = eNewFormObjKind;
         }
@@ -302,7 +302,7 @@ void SwView::ExecDraw(const SfxRequest& rReq)
         case SID_DRAWTBX_CS_STAR :
         case SID_DRAW_CS_ID :
         {
-            pFuncPtr.reset( new ConstCustomShape(m_pWrtShell.get(), 
m_pEditWin, this, rReq ) );
+            pFuncPtr.reset( new ConstCustomShape(m_pWrtShell.get(), 
m_pEditWin, *this, rReq ) );
 
             bCreateDirectly = comphelper::LibreOfficeKit::isActive();
 
diff --git a/sw/source/uibase/uiview/viewling.cxx 
b/sw/source/uibase/uiview/viewling.cxx
index ed62ec6fc742..0c7bb1c09c9a 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -246,7 +246,7 @@ void SwView::StartTextConversion(
     {
         const uno::Reference< uno::XComponentContext >& xContext(
                     comphelper::getProcessComponentContext() );
-        SwHHCWrapper aWrap( this, xContext, nSourceLang, nTargetLang, 
pTargetFont,
+        SwHHCWrapper aWrap( *this, xContext, nSourceLang, nTargetLang, 
pTargetFont,
                             nOptions, bIsInteractive,
                             bStart, bOther, bSelection );
         aWrap.Convert();
@@ -458,7 +458,7 @@ void SwView::HyphenateDocument()
 
         if( !bStop )
         {
-            SwHyphWrapper aWrap( this, xHyph, bStart, bOther, bSelection );
+            SwHyphWrapper aWrap( *this, xHyph, bStart, bOther, bSelection );
             aWrap.SpellDocument();
             m_pWrtShell->EndUndo(SwUndoId::INSATTR);
         }

Reply via email to