[Libreoffice-commits] core.git: include/framework include/sfx2 sfx2/inc sfx2/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Jul 21 09:39:51 UTC 2017


 include/framework/sfxhelperfunctions.hxx           |    2 +-
 include/sfx2/app.hxx                               |    2 +-
 include/sfx2/basedlgs.hxx                          |    4 ++--
 include/sfx2/bindings.hxx                          |    4 ++--
 include/sfx2/childwin.hxx                          |    4 ++--
 include/sfx2/dialoghelper.hxx                      |    2 +-
 include/sfx2/dinfdlg.hxx                           |    8 ++++----
 include/sfx2/dispatch.hxx                          |    6 +++---
 include/sfx2/docfile.hxx                           |    4 ++--
 include/sfx2/docinf.hxx                            |    2 +-
 include/sfx2/evntconf.hxx                          |    2 +-
 include/sfx2/fcontnr.hxx                           |    2 +-
 include/sfx2/filedlghelper.hxx                     |    2 +-
 include/sfx2/frame.hxx                             |    4 ++--
 include/sfx2/ipclient.hxx                          |    2 +-
 include/sfx2/linkmgr.hxx                           |    4 ++--
 include/sfx2/linksrc.hxx                           |    4 ++--
 include/sfx2/lokhelper.hxx                         |    4 ++--
 include/sfx2/notebookbar/NotebookbarTabControl.hxx |    2 +-
 include/sfx2/notebookbar/SfxNotebookBar.hxx        |    2 +-
 include/sfx2/objsh.hxx                             |    8 ++++----
 include/sfx2/progress.hxx                          |    2 +-
 include/sfx2/request.hxx                           |    4 ++--
 include/sfx2/sfxbasecontroller.hxx                 |    2 +-
 include/sfx2/shell.hxx                             |    2 +-
 include/sfx2/sidebar/Deck.hxx                      |    2 +-
 include/sfx2/sidebar/SidebarChildWindow.hxx        |    2 +-
 include/sfx2/stbitem.hxx                           |    2 +-
 include/sfx2/tbxctrl.hxx                           |    6 +++---
 include/sfx2/templatelocalview.hxx                 |    2 +-
 include/sfx2/thumbnailview.hxx                     |    2 +-
 include/sfx2/unoctitm.hxx                          |    4 ++--
 include/sfx2/viewfrm.hxx                           |   12 ++++++------
 include/sfx2/viewsh.hxx                            |    8 ++++----
 sfx2/inc/fwkhelper.hxx                             |    2 +-
 sfx2/source/appl/appdde.cxx                        |    2 +-
 sfx2/source/appl/appserv.cxx                       |    2 +-
 sfx2/source/appl/childwin.cxx                      |    4 ++--
 sfx2/source/appl/fwkhelper.cxx                     |    2 +-
 sfx2/source/appl/linkmgr2.cxx                      |    4 ++--
 sfx2/source/appl/linksrc.cxx                       |    4 ++--
 sfx2/source/appl/shutdowniconunx.cxx               |    2 +-
 sfx2/source/appl/workwin.cxx                       |    2 +-
 sfx2/source/bastyp/fltfnc.cxx                      |    2 +-
 sfx2/source/bastyp/progress.cxx                    |    2 +-
 sfx2/source/config/evntconf.cxx                    |    4 ++--
 sfx2/source/control/bindings.cxx                   |    4 ++--
 sfx2/source/control/dispatch.cxx                   |    6 +++---
 sfx2/source/control/request.cxx                    |    4 ++--
 sfx2/source/control/shell.cxx                      |    2 +-
 sfx2/source/control/templatelocalview.cxx          |    2 +-
 sfx2/source/control/thumbnailview.cxx              |    2 +-
 sfx2/source/control/unoctitm.cxx                   |    4 ++--
 sfx2/source/dialog/basedlgs.cxx                    |    4 ++--
 sfx2/source/dialog/dialoghelper.cxx                |    2 +-
 sfx2/source/dialog/dinfdlg.cxx                     |   11 +++++------
 sfx2/source/dialog/filedlghelper.cxx               |    2 +-
 sfx2/source/dialog/splitwin.cxx                    |    6 +++---
 sfx2/source/dialog/templdlg.cxx                    |    6 +++---
 sfx2/source/doc/DocumentMetadataAccess.cxx         |   16 ++++++++--------
 sfx2/source/doc/docfile.cxx                        |    4 ++--
 sfx2/source/doc/docinf.cxx                         |    2 +-
 sfx2/source/doc/docinsert.cxx                      |    2 +-
 sfx2/source/doc/doctempl.cxx                       |    4 ++--
 sfx2/source/doc/doctemplates.cxx                   |   20 ++++++++++----------
 sfx2/source/doc/graphhelp.cxx                      |    2 +-
 sfx2/source/doc/graphhelp.hxx                      |    2 +-
 sfx2/source/doc/new.cxx                            |    2 +-
 sfx2/source/doc/objmisc.cxx                        |    4 ++--
 sfx2/source/doc/objstor.cxx                        |    6 +++---
 sfx2/source/doc/sfxbasemodel.cxx                   |    6 +++---
 sfx2/source/inc/eventsupplier.hxx                  |    2 +-
 sfx2/source/inc/preview.hxx                        |    2 +-
 sfx2/source/inc/splitwin.hxx                       |    6 +++---
 sfx2/source/inc/templdgi.hxx                       |    4 ++--
 sfx2/source/inc/workwin.hxx                        |    2 +-
 sfx2/source/notebookbar/NotebookbarTabControl.cxx  |    2 +-
 sfx2/source/notebookbar/SfxNotebookBar.cxx         |    4 ++--
 sfx2/source/notify/eventsupplier.cxx               |    2 +-
 sfx2/source/sidebar/Deck.cxx                       |    2 +-
 sfx2/source/sidebar/SidebarChildWindow.cxx         |    2 +-
 sfx2/source/statbar/stbitem.cxx                    |    2 +-
 sfx2/source/toolbox/tbxitem.cxx                    |    6 +++---
 sfx2/source/view/frame.cxx                         |    2 +-
 sfx2/source/view/frame2.cxx                        |    2 +-
 sfx2/source/view/ipclient.cxx                      |    2 +-
 sfx2/source/view/lokhelper.cxx                     |    4 ++--
 sfx2/source/view/sfxbasecontroller.cxx             |    2 +-
 sfx2/source/view/viewfrm.cxx                       |   12 ++++++------
 sfx2/source/view/viewsh.cxx                        |    8 ++++----
 90 files changed, 174 insertions(+), 175 deletions(-)

New commits:
commit 7ed178077cc1348d72ae936a2762085e278d79d0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Jul 21 09:27:31 2017 +0200

    loplugin:constparams in sfx2
    
    Change-Id: Id982c8fb5654433e9db10e2da6a86a6c8d90b9b4
    Reviewed-on: https://gerrit.libreoffice.org/40261
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/framework/sfxhelperfunctions.hxx b/include/framework/sfxhelperfunctions.hxx
index 5c39b12ebd46..5e96768b87b8 100644
--- a/include/framework/sfxhelperfunctions.hxx
+++ b/include/framework/sfxhelperfunctions.hxx
@@ -41,7 +41,7 @@ typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)(
     const OUString& aCommandURL );
 
 typedef void ( *pfunc_getRefreshToolbars)(
-    css::uno::Reference< css::frame::XFrame >& rFrame );
+    css::uno::Reference< css::frame::XFrame > const & rFrame );
 
 typedef void ( *pfunc_createDockingWindow)(
     const css::uno::Reference< css::frame::XFrame >& rFrame,
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 28e41d416863..54735e437f6e 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -146,7 +146,7 @@ public:
 #if defined(_WIN32)
     void                        AddDdeTopic( SfxObjectShell* );
 #endif
-    void                        RemoveDdeTopic( SfxObjectShell* );
+    void                        RemoveDdeTopic( SfxObjectShell const * );
 
     // "static" methods
     /**
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index c92fedf434e8..227a53f5054b 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -101,7 +101,7 @@ protected:
 
 public:
     virtual void            FillInfo(SfxChildWinInfo&) const;
-    void                    Initialize (SfxChildWinInfo* pInfo);
+    void                    Initialize (SfxChildWinInfo const * pInfo);
     virtual bool            EventNotify( NotifyEvent& rNEvt ) override;
     SfxBindings&            GetBindings()
                             { return *pBindings; }
@@ -144,7 +144,7 @@ protected:
 
 public:
     virtual void            FillInfo(SfxChildWinInfo&) const;
-    void                    Initialize (SfxChildWinInfo* pInfo);
+    void                    Initialize (SfxChildWinInfo const * pInfo);
 
     DECL_LINK(TimerHdl, Timer *, void);
 
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index d34f2ff0931a..ed78d4acee6e 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -115,7 +115,7 @@ private:
                             SfxItemState eItemState );
     SAL_DLLPRIVATE SfxStateCache* GetStateCache( sal_uInt16 nId, std::size_t * pPos);
     DECL_DLLPRIVATE_LINK( NextJob, Timer *, void );
-    SAL_DLLPRIVATE bool NextJob_Impl(Timer * pTimer);
+    SAL_DLLPRIVATE bool NextJob_Impl(Timer const * pTimer);
 
 public:
                      SfxBindings();
@@ -174,7 +174,7 @@ public:
     SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const;
     SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
     SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl() const;
-    SAL_DLLPRIVATE void SetRecorder_Impl( css::uno::Reference< css::frame::XDispatchRecorder >& );
+    SAL_DLLPRIVATE void SetRecorder_Impl( css::uno::Reference< css::frame::XDispatchRecorder > const & );
     SAL_DLLPRIVATE void InvalidateSlotsInMap_Impl();
     SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId );
 };
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8b718c3cdaa0..cf908713bdf8 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -182,14 +182,14 @@ public:
     vcl::Window*        GetContextWindow() const
                         { return pContext ? pContext->GetWindow(): nullptr; }
 
-    vcl::Window*        GetContextWindow( SfxModule *pModule ) const;
+    vcl::Window*        GetContextWindow( SfxModule const *pModule ) const;
 
     virtual SfxChildWinInfo GetInfo() const;
     void                SaveStatus(const SfxChildWinInfo& rInfo);
 
     static void         RegisterChildWindow(SfxModule*, SfxChildWinFactory*);
 
-    static SfxChildWindow* CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo&);
+    static SfxChildWindow* CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &);
     void                SetHideNotDelete( bool bOn );
     bool                IsHideNotDelete() const;
     bool                IsVisible() const;
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx
index 5201113c6bc1..aa0b70b457ee 100644
--- a/include/sfx2/dialoghelper.hxx
+++ b/include/sfx2/dialoghelper.hxx
@@ -26,7 +26,7 @@ class VclBuilderContainer;
 
 //there has to be a "maingrid" container which contains all the widgets
 //except for the preview widget
-void SFX2_DLLPUBLIC setPreviewsToSamePlace(vcl::Window *pParent, VclBuilderContainer *pPage);
+void SFX2_DLLPUBLIC setPreviewsToSamePlace(vcl::Window const *pParent, VclBuilderContainer *pPage);
 
 Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const vcl::Window *pReference);
 
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 216fa6fc9aee..1de0c95b680f 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -437,7 +437,7 @@ public:
     bool                InitControls( HeaderBar* pHeaderBar, const ScrollBar* pScrollBar );
     sal_uInt16          GetVisibleLineCount() const;
     sal_Int32    GetLineHeight() const { return m_nLineHeight; }
-    void                AddLine( const OUString& sName, css::uno::Any& rAny );
+    void                AddLine( const OUString& sName, css::uno::Any const & rAny );
     bool                AreAllLinesValid() const;
     void                ClearAllLines();
     void                DoScroll( sal_Int32 nNewPos );
@@ -470,7 +470,7 @@ public:
     virtual ~CustomPropertiesControl() override;
     virtual void dispose() override;
 
-    void            AddLine( const OUString& sName, css::uno::Any& rAny, bool bInteractive );
+    void            AddLine( const OUString& sName, css::uno::Any const & rAny, bool bInteractive );
 
     bool     AreAllLinesValid() const { return m_pPropertiesWin->AreAllLinesValid(); }
     void     ClearAllLines() { m_pPropertiesWin->ClearAllLines(); }
@@ -569,7 +569,7 @@ public:
                   const bool bRequired, const bool bMultiValued,
                   const bool bOpenChoice,
                   css::uno::Any& aChoices,
-                  css::uno::Any& rAny );
+                  css::uno::Any const & rAny );
     void ClearAllLines();
     void DoScroll( sal_Int32 nNewPos );
 
@@ -598,7 +598,7 @@ public:
                   const bool bRequired, const bool bMultiValude,
                   const bool bOpenChoice,
                   css::uno::Any& aChoices,
-                  css::uno::Any& rAny );
+                  css::uno::Any const & rAny );
 
     void ClearAllLines();
     css::uno::Sequence< css::document::CmisProperty >
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index ca65eeecb198..43776a86b659 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -126,8 +126,8 @@ public:
 
     const SfxPoolItem*  Execute( sal_uInt16 nSlot,
                                  SfxCallMode nCall,
-                                 SfxItemSet* pArgs,
-                                 SfxItemSet* pInternalArgs,
+                                 SfxItemSet const * pArgs,
+                                 SfxItemSet const * pInternalArgs,
                                  sal_uInt16 nModi);
 
     const SfxPoolItem*  ExecuteList( sal_uInt16 nSlot,
@@ -183,7 +183,7 @@ public:
     SAL_DLLPRIVATE bool IsReadOnlyShell_Impl( sal_uInt16 nShell ) const;
     SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell );
     SAL_DLLPRIVATE void DoActivate_Impl( bool bMDI );
-    SAL_DLLPRIVATE void DoDeactivate_Impl( bool bMDI, SfxViewFrame* pNew );
+    SAL_DLLPRIVATE void DoDeactivate_Impl( bool bMDI, SfxViewFrame const * pNew );
     SAL_DLLPRIVATE void InvalidateBindings_Impl(bool);
 };
 
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 38d5f691a133..fc44f2d9ce86 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -216,7 +216,7 @@ public:
 
     SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
     SAL_DLLPRIVATE void AddVersion_Impl( css::util::RevisionTag& rVersion );
-    SAL_DLLPRIVATE bool TransferVersionList_Impl( SfxMedium& rMedium );
+    SAL_DLLPRIVATE bool TransferVersionList_Impl( SfxMedium const & rMedium );
     SAL_DLLPRIVATE void SaveVersionList_Impl();
     SAL_DLLPRIVATE void RemoveVersion_Impl( const OUString& rVersion );
 
@@ -227,7 +227,7 @@ public:
 
     SAL_DLLPRIVATE void GetLockingStream_Impl();
     SAL_DLLPRIVATE void GetMedium_Impl();
-    SAL_DLLPRIVATE bool TryDirectTransfer( const OUString& aURL, SfxItemSet& aTargetSet );
+    SAL_DLLPRIVATE bool TryDirectTransfer( const OUString& aURL, SfxItemSet const & aTargetSet );
     SAL_DLLPRIVATE void Transfer_Impl();
     SAL_DLLPRIVATE void CreateFileStream();
     SAL_DLLPRIVATE void SetUpdatePickList(bool);
diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx
index a1c03eb08371..e31c69756b75 100644
--- a/include/sfx2/docinf.hxx
+++ b/include/sfx2/docinf.hxx
@@ -64,7 +64,7 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet(
 
 
 css::uno::Sequence<sal_Int8> SFX2_DLLPUBLIC convertMetaFile(
-    GDIMetaFile* i_pThumb);
+    GDIMetaFile const * i_pThumb);
 
 } // namespace sfx2
 
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index ff9cc8a39eed..2a7078ff3661 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -99,7 +99,7 @@ public:
 class SFX2_DLLPUBLIC SfxEventConfiguration
 {
 public:
-    static void                         ConfigureEvent( const OUString& aName, const SvxMacro&, SfxObjectShell* pObjSh);
+    static void                         ConfigureEvent( const OUString& aName, const SvxMacro&, SfxObjectShell const * pObjSh);
     static SvxMacro*                    ConvertToMacro( const css::uno::Any& rElement, SfxObjectShell* pDoc, bool bBlowUp );
 };
 
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 414e88044f5e..9e5559923ffd 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -83,7 +83,7 @@ public:
     SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const std::shared_ptr<const SfxFilter>& pFilter );
     DECL_DLLPRIVATE_LINK( MaybeFileHdl_Impl, OUString*, bool );
 
-    ErrCode                  GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const;
+    ErrCode                  GuessFilterIgnoringContent( SfxMedium const & rMedium, std::shared_ptr<const SfxFilter>& ) const;
     ErrCode                  GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& , SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
     ErrCode                  GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>&, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
     ErrCode                  DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const;
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index c371244dc6a6..44e673a3778f 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -254,7 +254,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
                              const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >());
 
 
-ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString& aURL, SfxItemSet* pSet);
+ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString const & aURL, SfxItemSet* pSet);
 }
 
 #endif
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 0884b90523da..2bff62987274 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -111,7 +111,7 @@ public:
     static SfxFrame*    Create( const css::uno::Reference< css::frame::XFrame >& xFrame );
     static css::uno::Reference< css::frame::XFrame >
                         CreateBlankFrame();
-    static SfxFrame*    Create( SfxObjectShell& rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden );
+    static SfxFrame*    Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden );
 
     vcl::Window&        GetWindow() const { return *pWindow;}
     void                CancelTransfers();
@@ -131,7 +131,7 @@ public:
     sal_uInt32          GetFrameType() const;
     static void         GetDefaultTargetList( TargetList& );
     void                GetTargetList( TargetList& ) const;
-    void                UpdateDescriptor( SfxObjectShell *pDoc );
+    void                UpdateDescriptor( SfxObjectShell const *pDoc );
     void                Resize();
     const css::uno::Reference< css::frame::XFrame >&
                         GetFrameInterface() const;
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 0bc3d99ebc21..97aaf8db6f8d 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -78,7 +78,7 @@ public:
     const Fraction&     GetScaleWidth() const;
     const Fraction&     GetScaleHeight() const;
     void                Invalidate();
-    static SfxInPlaceClient* GetClient( SfxObjectShell* pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject );
+    static SfxInPlaceClient* GetClient( SfxObjectShell const * pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject );
     sal_Int64           GetAspect() const;
     sal_Int64           GetObjectMiscStatus() const;
     ErrCode             DoVerb( long nVerb );
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index ce8d3eefd11c..ed939d32e7fe 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -86,7 +86,7 @@ public:
     SfxObjectShell*    GetPersist() const              { return pPersist; }
     void        SetPersist( SfxObjectShell * p )   { pPersist = p; }
 
-    void        Remove( SvBaseLink *pLink );
+    void        Remove( SvBaseLink const *pLink );
     void        Remove( size_t nPos, size_t nCnt = 1 );
     bool        Insert( SvBaseLink* pLink );
 
@@ -124,7 +124,7 @@ public:
                                     OUString* pLink = nullptr,
                                     OUString* pFilter = nullptr );
 
-    static SvLinkSourceRef CreateObj( SvBaseLink* );
+    static SvLinkSourceRef CreateObj( SvBaseLink const * );
 
     void        UpdateAllLinks( bool bAskUpdate,
                                 bool bUpdateGrfLinks,
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 8c2770a4e1d4..bcc6e88b8ba7 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -88,10 +88,10 @@ public:
 
     void                AddDataAdvise( SvBaseLink *, const rtl::OUString & rMimeType,
                                         sal_uInt16 nAdviceMode );
-    void                RemoveAllDataAdvise( SvBaseLink * );
+    void                RemoveAllDataAdvise( SvBaseLink const * );
 
     void                AddConnectAdvise( SvBaseLink * );
-    void                RemoveConnectAdvise( SvBaseLink * );
+    void                RemoveConnectAdvise( SvBaseLink const * );
 
     struct StreamToLoadFrom{
         StreamToLoadFrom(
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 669d0f78d226..478897171ca3 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -39,9 +39,9 @@ public:
     /// Invoke the LOK callback of all views except pThisView, with a payload of rKey-rPayload.
     static void notifyOtherViews(SfxViewShell* pThisView, int nType, const OString& rKey, const OString& rPayload);
     /// Same as notifyOtherViews(), but works on a selected "other" view, not on all of them.
-    static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload);
+    static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell const * pOtherView, int nType, const OString& rKey, const OString& rPayload);
     /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
-    static void notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload);
+    static void notifyInvalidation(SfxViewShell const * pThisView, const OString& rPayload);
     /// A special value to signify 'infinity'.
     /// This value is chosen such that sal_Int32 will not overflow when manipulated.
     static const long MaxTwips = 1e9;
diff --git a/include/sfx2/notebookbar/NotebookbarTabControl.hxx b/include/sfx2/notebookbar/NotebookbarTabControl.hxx
index fa1b13cc10db..316641010013 100644
--- a/include/sfx2/notebookbar/NotebookbarTabControl.hxx
+++ b/include/sfx2/notebookbar/NotebookbarTabControl.hxx
@@ -31,7 +31,7 @@ public:
     virtual Size calculateRequisition() const override;
 
 private:
-    static void FillShortcutsToolBox(css::uno::Reference<css::uno::XComponentContext>& xContext,
+    static void FillShortcutsToolBox(css::uno::Reference<css::uno::XComponentContext> const & xContext,
                                           const css::uno::Reference<css::frame::XFrame>& xFrame,
                                           const OUString& aModuleName,
                                           ToolBox* pShortcuts
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 37a64ffef609..e3c397a5bd62 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -41,7 +41,7 @@ public:
     /// Method restores normal behaviour of the Notebookbar
     static void UnlockNotebookBar();
 
-    static void RemoveListeners(SystemWindow* pSysWindow);
+    static void RemoveListeners(SystemWindow const * pSysWindow);
 
     static void ShowMenubar(bool bShow);
     static void ToggleMenubar();
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 6b6f5758dfca..bc33bb1dd33d 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -420,7 +420,7 @@ public:
     const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const;
     bool                        SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo );
 
-    static ErrCode              HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc );
+    static ErrCode              HandleFilter( SfxMedium* pMedium, SfxObjectShell const * pDoc );
 
     virtual bool                PrepareClose(bool bUI = true);
     virtual HiddenInformation   GetHiddenInformationState( HiddenInformation nStates );
@@ -563,7 +563,7 @@ public:
 
     virtual css::uno::Sequence< OUString > GetEventNames();
 
-    vcl::Window*                GetDialogParent( SfxMedium* pMedium=nullptr );
+    vcl::Window*                GetDialogParent( SfxMedium const * pMedium=nullptr );
     static SfxObjectShell*      CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
     static SfxObjectShell*      CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
     static css::uno::Reference< css::lang::XComponent >
@@ -715,7 +715,7 @@ public:
     SAL_DLLPRIVATE void SetNamedVisibility_Impl();
     SAL_DLLPRIVATE bool DoSave_Impl( const SfxItemSet* pSet );
     SAL_DLLPRIVATE bool Save_Impl( const SfxItemSet* pSet );
-    SAL_DLLPRIVATE bool PreDoSaveAs_Impl(const OUString& rFileName, const OUString& rFiltName, SfxItemSet& rItemSet);
+    SAL_DLLPRIVATE bool PreDoSaveAs_Impl(const OUString& rFileName, const OUString& rFiltName, SfxItemSet const & rItemSet);
     SAL_DLLPRIVATE bool APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet);
     SAL_DLLPRIVATE bool CommonSaveAs_Impl(const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet& rItemSet);
     SAL_DLLPRIVATE bool GeneralInit_Impl(
@@ -727,7 +727,7 @@ public:
     // public-internals
     SAL_DLLPRIVATE IndexBitSet& GetNoSet_Impl();
     SAL_DLLPRIVATE void SetProgress_Impl( SfxProgress *pProgress );
-    SAL_DLLPRIVATE void PostActivateEvent_Impl( SfxViewFrame* );
+    SAL_DLLPRIVATE void PostActivateEvent_Impl( SfxViewFrame const * );
     SAL_DLLPRIVATE void SetActivateEvent_Impl(SfxEventHintId );
     SAL_DLLPRIVATE SfxObjectShell* GetParentShellByModel_Impl();
 
diff --git a/include/sfx2/progress.hxx b/include/sfx2/progress.hxx
index 9153dae3758c..ba945002a64d 100644
--- a/include/sfx2/progress.hxx
+++ b/include/sfx2/progress.hxx
@@ -60,7 +60,7 @@ public:
 
     void                    Stop();
 
-    static SfxProgress*     GetActiveProgress( SfxObjectShell *pDocSh = nullptr );
+    static SfxProgress*     GetActiveProgress( SfxObjectShell const *pDocSh = nullptr );
     static void             EnterLock();
     static void             LeaveLock();
 };
diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx
index b95ca969ed8f..86a9630b0f03 100644
--- a/include/sfx2/request.hxx
+++ b/include/sfx2/request.hxx
@@ -94,8 +94,8 @@ public:
     void                SetReturnValue(const SfxPoolItem &);
     const SfxPoolItem*  GetReturnValue() const;
 
-    static css::uno::Reference< css::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame* pFrame );
-    static bool         HasMacroRecorder( SfxViewFrame* pFrame );
+    static css::uno::Reference< css::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame const * pFrame );
+    static bool         HasMacroRecorder( SfxViewFrame const * pFrame );
     SfxCallMode         GetCallMode() const;
     void                AllowRecording( bool );
     bool                AllowsRecording() const;
diff --git a/include/sfx2/sfxbasecontroller.hxx b/include/sfx2/sfxbasecontroller.hxx
index 6f8f8fbf3323..d7741b76e8c0 100644
--- a/include/sfx2/sfxbasecontroller.hxx
+++ b/include/sfx2/sfxbasecontroller.hxx
@@ -179,7 +179,7 @@ public:
     // FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
     // either the _Impl name should vanish or there should be an "official" API
     SfxViewShell* GetViewShell_Impl() const;
-    SAL_DLLPRIVATE bool HandleEvent_Impl( NotifyEvent& rEvent );
+    SAL_DLLPRIVATE bool HandleEvent_Impl( NotifyEvent const & rEvent );
     SAL_DLLPRIVATE bool HasKeyListeners_Impl();
     SAL_DLLPRIVATE bool HasMouseClickListeners_Impl();
     SAL_DLLPRIVATE void SetCreationArguments_Impl( const css::uno::Sequence< css::beans::PropertyValue >& i_rCreationArgs );
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index e82a000a9f13..41d65d3e134b 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -501,7 +501,7 @@ public:
         Then the subclass gets the opportunity in every case to respond to the
         event by calling the virtual method <SfxShell::Deactivate(sal_Bool)>.
         */
-    SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame *pFrame, bool bMDI);
+    SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame const *pFrame, bool bMDI);
 };
 
 /**
diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx
index 044c7edfda8c..b1edcf942fcf 100644
--- a/include/sfx2/sidebar/Deck.hxx
+++ b/include/sfx2/sidebar/Deck.hxx
@@ -92,7 +92,7 @@ private:
     VclPtr<ScrollBar> mpVerticalScrollBar;
 
     DECL_LINK(HandleVerticalScrollBarChange, ScrollBar*, void);
-    bool ProcessWheelEvent(CommandEvent* pCommandEvent);
+    bool ProcessWheelEvent(CommandEvent const * pCommandEvent);
 
 };
 
diff --git a/include/sfx2/sidebar/SidebarChildWindow.hxx b/include/sfx2/sidebar/SidebarChildWindow.hxx
index b703ced082f5..1fcb25431d94 100644
--- a/include/sfx2/sidebar/SidebarChildWindow.hxx
+++ b/include/sfx2/sidebar/SidebarChildWindow.hxx
@@ -38,7 +38,7 @@ public:
 
     SFX_DECL_CHILDWINDOW_WITHID(SidebarChildWindow);
 
-    static sal_Int32 GetDefaultWidth(vcl::Window* pWindow);
+    static sal_Int32 GetDefaultWidth(vcl::Window const * pWindow);
 };
 
 
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index a98d66e8e949..e8c0f2a354b3 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -111,7 +111,7 @@ public:
     sal_uInt16      GetId() const { return nId; }
     StatusBar&      GetStatusBar() const { return *pBar; }
 
-    static SfxStatusBarControl* CreateControl( sal_uInt16 nSlotID, sal_uInt16 nId, StatusBar *pBar, SfxModule* );
+    static SfxStatusBarControl* CreateControl( sal_uInt16 nSlotID, sal_uInt16 nId, StatusBar *pBar, SfxModule const * );
     static void RegisterStatusBarControl(SfxModule*, const SfxStbCtrlFactory&);
 
 };
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index c23da95f24cc..39a7997ac916 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -183,13 +183,13 @@ public:
     unsigned short             GetSlotId() const;
 
     void                       Dispatch( const OUString& aCommand,
-                                         css::uno::Sequence< css::beans::PropertyValue >& aArgs );
+                                         css::uno::Sequence< css::beans::PropertyValue > const & aArgs );
     static void                Dispatch( const css::uno::Reference< css::frame::XDispatchProvider >& rDispatchProvider,
                                          const OUString& rCommand,
-                                         css::uno::Sequence< css::beans::PropertyValue >& aArgs );
+                                         css::uno::Sequence< css::beans::PropertyValue > const & aArgs );
 
     static SfxItemState        GetItemState( const SfxPoolItem* pState );
-    static SfxToolBoxControl*  CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule *pMod );
+    static SfxToolBoxControl*  CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule const *pMod );
     static void                RegisterToolBoxControl( SfxModule*, const SfxTbxCtrlFactory&);
 };
 
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 1e4267c4c635..975aa40f0b75 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -91,7 +91,7 @@ public:
 
     virtual void showAllTemplates ();
 
-    void showRegion (TemplateContainerItem *pItem);
+    void showRegion (TemplateContainerItem const *pItem);
 
     void showRegion (const OUString &rName);
 
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 421f2414398d..7eb123927225 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -262,7 +262,7 @@ protected:
 
     // Drawing item related functions, override them to make your own custom ones.
 
-    void DrawItem (ThumbnailViewItem *pItem);
+    void DrawItem (ThumbnailViewItem const *pItem);
 
     virtual void OnItemDblClicked (ThumbnailViewItem *pItem);
 
diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx
index a0656e787c56..a9768ade13fa 100644
--- a/include/sfx2/unoctitm.hxx
+++ b/include/sfx2/unoctitm.hxx
@@ -116,7 +116,7 @@ class SfxDispatchController_Impl : public SfxControllerItem
 
     static void         addParametersToArgs( const css::util::URL& aURL,
                                              css::uno::Sequence< css::beans::PropertyValue >& rArgs );
-    static MapUnit      GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlot );
+    static MapUnit      GetCoreMetric( SfxItemPool const & rPool, sal_uInt16 nSlot );
 
     void                sendStatusChanged(const OUString& rURL, const css::frame::FeatureStateEvent& rEvent);
 
@@ -130,7 +130,7 @@ public:
 
     static OUString getSlaveCommand( const css::util::URL& rURL );
 
-    void                StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer* pServ );
+    void                StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pServ );
     virtual void        StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
     void                setMasterSlaveCommand( bool bSet );
     /// @throws css::uno::RuntimeException
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index ba117f86b36e..a1f0c9384011 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -95,11 +95,11 @@ public:
 
     static void             SetViewFrame( SfxViewFrame* );
 
-    static SfxViewFrame*    LoadHiddenDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId );
-    static SfxViewFrame*    LoadDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId );
-    static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId );
-    static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem );
-    static SfxViewFrame*    DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest );
+    static SfxViewFrame*    LoadHiddenDocument( SfxObjectShell const & i_rDoc, SfxInterfaceId i_nViewId );
+    static SfxViewFrame*    LoadDocument( SfxObjectShell const & i_rDoc, SfxInterfaceId i_nViewId );
+    static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell const & i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId );
+    static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell const & i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem );
+    static SfxViewFrame*    DisplayNewDocument( SfxObjectShell const & i_rDoc, const SfxRequest& i_rCreateDocRequest );
 
     static SfxViewFrame*    Current();
     static SfxViewFrame*    GetFirst( const SfxObjectShell* pDoc = nullptr, bool bOnlyVisible = true );
@@ -108,7 +108,7 @@ public:
     static SfxViewFrame*    Get( const css::uno::Reference< css::frame::XController>& i_rController, const SfxObjectShell* i_pDoc );
 
             void            DoActivate(bool bMDI);
-            void            DoDeactivate(bool bMDI, SfxViewFrame *pOld);
+            void            DoDeactivate(bool bMDI, SfxViewFrame const *pOld);
 
     using SfxShell::GetDispatcher;
     SfxDispatcher*          GetDispatcher() { return m_pDispatcher; }
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index c11df0fc735f..89bb429aa41b 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -295,14 +295,14 @@ public:
     SAL_DLLPRIVATE bool GlobalKeyInput_Impl( const KeyEvent &rKeyEvent );
 
     SAL_DLLPRIVATE void NewIPClient_Impl( SfxInPlaceClient *pIPClient );
-    SAL_DLLPRIVATE void IPClientGone_Impl( SfxInPlaceClient *pIPClient );
-    SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
+    SAL_DLLPRIVATE void IPClientGone_Impl( SfxInPlaceClient const *pIPClient );
+    SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient const *pIP );
     SAL_DLLPRIVATE void DiscardClients_Impl();
 
     SAL_DLLPRIVATE void SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
     SAL_DLLPRIVATE bool IsShowView_Impl() const;
 
-    SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent& rEvent );
+    SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent const & rEvent );
     SAL_DLLPRIVATE bool HasKeyListeners_Impl();
     SAL_DLLPRIVATE bool HasMouseClickListeners_Impl();
 
@@ -312,7 +312,7 @@ public:
     SAL_DLLPRIVATE void ExecPrint_Impl(SfxRequest &);
     SAL_DLLPRIVATE void ExecMisc_Impl(SfxRequest &);
     SAL_DLLPRIVATE void GetState_Impl(SfxItemSet&);
-    SAL_DLLPRIVATE void CheckIPClient_Impl(SfxInPlaceClient*, const tools::Rectangle&);
+    SAL_DLLPRIVATE void CheckIPClient_Impl(SfxInPlaceClient const *, const tools::Rectangle&);
     SAL_DLLPRIVATE void PushSubShells_Impl( bool bPush=true );
     SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( false ); }
     SAL_DLLPRIVATE bool ExecKey_Impl(const KeyEvent& aKey);
diff --git a/sfx2/inc/fwkhelper.hxx b/sfx2/inc/fwkhelper.hxx
index ab1b7ff77097..7a65cdfbfbbd 100644
--- a/sfx2/inc/fwkhelper.hxx
+++ b/sfx2/inc/fwkhelper.hxx
@@ -28,7 +28,7 @@
 #include <rtl/ustring.hxx>
 
 SFX2_DLLPUBLIC void SAL_CALL RefreshToolbars(
-    css::uno::Reference< css::frame::XFrame >& rFrame
+    css::uno::Reference< css::frame::XFrame > const & rFrame
 );
 
 #endif
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 38dfd4fbc482..82734cfb759b 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -490,7 +490,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 }
 #endif
 
-void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
+void SfxApplication::RemoveDdeTopic( SfxObjectShell const * pSh )
 {
 #if defined(_WIN32)
     //OV: DDE is disconnected in server mode!
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 0d155e3b29f5..49152fd2f4c0 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1252,7 +1252,7 @@ namespace
         return OUString( "com.sun.star.script.BasicIDE");
     }
 
-    SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell* i_pBasicIDE )
+    SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell const * i_pBasicIDE )
     {
         SfxViewFrame* pView = SfxViewFrame::GetFirst( i_pBasicIDE );
         while ( pView )
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index ef555a0a9628..6a911dc168cb 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -201,7 +201,7 @@ SfxChildWindow::~SfxChildWindow()
 
 
 SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
-        vcl::Window *pParent, SfxBindings* pBindings, SfxChildWinInfo& rInfo)
+        vcl::Window *pParent, SfxBindings* pBindings, SfxChildWinInfo const & rInfo)
 {
     SfxChildWindow *pChild=nullptr;
     SfxChildWinFactory* pFact=nullptr;
@@ -618,7 +618,7 @@ void SfxChildWindow::Show( ShowFlags nFlags )
     pWindow->Show(true, nFlags);
 }
 
-vcl::Window* SfxChildWindow::GetContextWindow( SfxModule *pModule ) const
+vcl::Window* SfxChildWindow::GetContextWindow( SfxModule const *pModule ) const
 {
     return pModule == pImpl->pContextModule && pContext ? pContext->GetWindow(): nullptr;
 }
diff --git a/sfx2/source/appl/fwkhelper.cxx b/sfx2/source/appl/fwkhelper.cxx
index 43aa910d801c..e61a210bc702 100644
--- a/sfx2/source/appl/fwkhelper.cxx
+++ b/sfx2/source/appl/fwkhelper.cxx
@@ -29,7 +29,7 @@
 #include "workwin.hxx"
 #include <sfx2/frame.hxx>
 
-void SAL_CALL RefreshToolbars( css::uno::Reference< css::frame::XFrame >& xFrame )
+void SAL_CALL RefreshToolbars( css::uno::Reference< css::frame::XFrame > const & xFrame )
 {
     SolarMutexGuard aGuard;
     if ( xFrame.is() )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index f65cb81d5653..7492275c6000 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -100,7 +100,7 @@ void LinkManager::CloseCachedComps()
     maCachedComps.clear();
 }
 
-void LinkManager::Remove( SvBaseLink *pLink )
+void LinkManager::Remove( SvBaseLink const *pLink )
 {
     // No duplicate links inserted
     bool bFound = false;
@@ -329,7 +329,7 @@ void LinkManager::UpdateAllLinks(
     CloseCachedComps();
 }
 
-SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
+SvLinkSourceRef LinkManager::CreateObj( SvBaseLink const * pLink )
 {
     switch( pLink->GetObjType() )
     {
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 623026586750..2ecffc5b02c4 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -347,7 +347,7 @@ void SvLinkSource::AddDataAdvise( SvBaseLink * pLink, const OUString& rMimeType,
     pImpl->aArr.push_back( pNew );
 }
 
-void SvLinkSource::RemoveAllDataAdvise( SvBaseLink * pLink )
+void SvLinkSource::RemoveAllDataAdvise( SvBaseLink const * pLink )
 {
     SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
     for( SvLinkSource_Entry_Impl* p = aIter.Curr(); p; p = aIter.Next() )
@@ -364,7 +364,7 @@ void SvLinkSource::AddConnectAdvise( SvBaseLink * pLink )
     pImpl->aArr.push_back( pNew );
 }
 
-void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink )
+void SvLinkSource::RemoveConnectAdvise( SvBaseLink const * pLink )
 {
     SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
     for( SvLinkSource_Entry_Impl* p = aIter.Curr(); p; p = aIter.Next() )
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index a4f8fd35a4cd..5ecebc6f5b5f 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -102,7 +102,7 @@ static void oustring_delete (gpointer  data,
 }
 
 static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
-                      OUString *pOverrideLabel,
+                      OUString const *pOverrideLabel,
                       sal_uInt16 nResId, GCallback pFnCallback )
 {
     OUString *pURL = new OUString (OStringToOUString( pAsciiURL,
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index a1f0823a5b7e..7b8ebc4ee978 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1120,7 +1120,7 @@ Reference< css::task::XStatusIndicator > SfxWorkWindow::GetStatusIndicator()
 }
 
 
-bool SfxWorkWindow::IsPluginMode( SfxObjectShell* pObjShell )
+bool SfxWorkWindow::IsPluginMode( SfxObjectShell const * pObjShell )
 {
     if ( pObjShell && pObjShell->GetMedium() )
     {
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index e17c35a7a89e..94eaa99b3e27 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -352,7 +352,7 @@ std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetAnyFilter( SfxFilterFlags
 
 
 ErrCode  SfxFilterMatcher::GuessFilterIgnoringContent(
-    SfxMedium& rMedium,
+    SfxMedium const & rMedium,
     std::shared_ptr<const SfxFilter>& rpFilter ) const
 {
     uno::Reference<document::XTypeDetection> xDetection(
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 5561ccde0491..c6539ea99001 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -410,7 +410,7 @@ void SfxProgress::Reschedule()
 
 SfxProgress* SfxProgress::GetActiveProgress
 (
-    SfxObjectShell* pDocSh        /*  the <SfxObjectShell>, which should be
+    SfxObjectShell const * pDocSh /*  the <SfxObjectShell>, which should be
                                       queried after a current <SfxProgress>,
                                       or 0 if an current SfxProgress for the
                                       entire application should be obtained.
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 3b45707eb1ea..21369698b772 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -205,7 +205,7 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
 }
 
 
-void PropagateEvent_Impl( SfxObjectShell *pDoc, const OUString& aEventName, const SvxMacro* pMacro )
+void PropagateEvent_Impl( SfxObjectShell const *pDoc, const OUString& aEventName, const SvxMacro* pMacro )
 {
     uno::Reference < document::XEventsSupplier > xSupplier;
     if ( pDoc )
@@ -245,7 +245,7 @@ void PropagateEvent_Impl( SfxObjectShell *pDoc, const OUString& aEventName, cons
 }
 
 
-void SfxEventConfiguration::ConfigureEvent( const OUString& aName, const SvxMacro& rMacro, SfxObjectShell *pDoc )
+void SfxEventConfiguration::ConfigureEvent( const OUString& aName, const SvxMacro& rMacro, SfxObjectShell const *pDoc )
 {
     std::unique_ptr<SvxMacro> pMacro;
     if ( rMacro.HasMacro() )
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 6784846f62c5..0aa458014f8d 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1246,7 +1246,7 @@ IMPL_LINK( SfxBindings, NextJob, Timer *, pTimer, void )
     NextJob_Impl(pTimer);
 }
 
-bool SfxBindings::NextJob_Impl(Timer * pTimer)
+bool SfxBindings::NextJob_Impl(Timer const * pTimer)
 {
     const unsigned MAX_INPUT_DELAY = 200;
 
@@ -1724,7 +1724,7 @@ const css::uno::Reference< css::frame::XDispatchRecorder >& SfxBindings::GetReco
     return pImpl->xRecorder;
 }
 
-void SfxBindings::SetRecorder_Impl( css::uno::Reference< css::frame::XDispatchRecorder >& rRecorder )
+void SfxBindings::SetRecorder_Impl( css::uno::Reference< css::frame::XDispatchRecorder > const & rRecorder )
 {
     pImpl->xRecorder = rRecorder;
 }
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5e9f12f7fc35..1cafc6d351d0 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -313,7 +313,7 @@ bool SfxDispatcher::IsAppDispatcher() const
 }
 
 /// Decides if the request is FASTCALL or not, depending on arguments.
-bool lcl_IsConditionalFastCall(SfxRequest &rReq)
+bool lcl_IsConditionalFastCall(SfxRequest const &rReq)
 {
     sal_uInt16 nId = rReq.GetSlot();
     bool bRet = false;
@@ -761,7 +761,7 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI)
     are called with the handler <SfxShell::Deactivate(bool)>, starting with
     the lowest.
 */
-void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew)
+void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame const * pNew)
 {
     SFX_STACK(SfxDispatcher::DoDeactivate);
 
@@ -940,7 +940,7 @@ const SfxSlot* SfxDispatcher::GetSlot( const OUString& rCommand )
 }
 
 const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode nCall,
-        SfxItemSet* pArgs, SfxItemSet* pInternalArgs, sal_uInt16 nModi)
+        SfxItemSet const * pArgs, SfxItemSet const * pInternalArgs, sal_uInt16 nModi)
 {
     if ( IsLocked() )
         return nullptr;
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index e65d1f466752..55c94afe17ea 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -660,7 +660,7 @@ bool SfxRequest::IsDone() const
 }
 
 
-css::uno::Reference< css::frame::XDispatchRecorder > SfxRequest::GetMacroRecorder( SfxViewFrame* pView )
+css::uno::Reference< css::frame::XDispatchRecorder > SfxRequest::GetMacroRecorder( SfxViewFrame const * pView )
 
 /*  [Description]
 
@@ -690,7 +690,7 @@ css::uno::Reference< css::frame::XDispatchRecorder > SfxRequest::GetMacroRecorde
     return xRecorder;
 }
 
-bool SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
+bool SfxRequest::HasMacroRecorder( SfxViewFrame const * pView )
 {
     return GetMacroRecorder( pView ).is();
 }
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 317fa2ff5834..e4bb2d647c35 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -313,7 +313,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, bool bMDI )
     Activate(bMDI);
 }
 
-void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, bool bMDI )
+void SfxShell::DoDeactivate_Impl( SfxViewFrame const *pFrame, bool bMDI )
 {
 #ifdef DBG_UTIL
     const SfxInterface *p_IF = GetInterface();
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index f1fb81586348..d78fceef2e25 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -198,7 +198,7 @@ void TemplateLocalView::showAllTemplates()
     maOpenRegionHdl.Call(nullptr);
 }
 
-void TemplateLocalView::showRegion(TemplateContainerItem *pItem)
+void TemplateLocalView::showRegion(TemplateContainerItem const *pItem)
 {
     mnCurRegionId = pItem->mnRegionId+1;
     maCurRegionName = pItem->maTitle;
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 8ecb03dad3e8..d6a02103a500 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -204,7 +204,7 @@ void ThumbnailView::ApplySettings(vcl::RenderContext& rRenderContext)
     mpItemAttrs->nMaxTextLength = 0;
 }
 
-void ThumbnailView::DrawItem(ThumbnailViewItem *pItem)
+void ThumbnailView::DrawItem(ThumbnailViewItem const *pItem)
 {
     if (pItem->isVisible())
     {
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index be7a8d9ce4e6..acb456e595aa 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -440,7 +440,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const css::util::URL& aURL
     }
 }
 
-MapUnit SfxDispatchController_Impl::GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlotId )
+MapUnit SfxDispatchController_Impl::GetCoreMetric( SfxItemPool const & rPool, sal_uInt16 nSlotId )
 {
     sal_uInt16 nWhich = rPool.GetWhich( nSlotId );
     return rPool.GetMetric( nWhich );
@@ -884,7 +884,7 @@ void SfxDispatchController_Impl::sendStatusChanged(const OUString& rURL, const c
     }
 }
 
-void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer* pSlotServ )
+void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pSlotServ )
 {
     if ( !pDispatch )
         return;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index c16cae72d8ff..30a14417d389 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -223,7 +223,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
     ModelessDialog::StateChanged( nStateChange );
 }
 
-void SfxModelessDialog::Initialize(SfxChildWinInfo *pInfo)
+void SfxModelessDialog::Initialize(SfxChildWinInfo const *pInfo)
 
 /*  [Description]
 
@@ -555,7 +555,7 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
 }
 
 
-void SfxFloatingWindow::Initialize(SfxChildWinInfo *pInfo)
+void SfxFloatingWindow::Initialize(SfxChildWinInfo const *pInfo)
 
 /*  [Description]
 
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx
index a5657d8b9e6a..aaea7e22c1a8 100644
--- a/sfx2/source/dialog/dialoghelper.cxx
+++ b/sfx2/source/dialog/dialoghelper.cxx
@@ -18,7 +18,7 @@
 //right, get both of their non-preview areas to request the same size
 //so that the preview appears in the same place in each one so
 //flipping between tabs isn't distracting as it jumps around
-void setPreviewsToSamePlace(vcl::Window *pParent, VclBuilderContainer *pPage)
+void setPreviewsToSamePlace(vcl::Window const *pParent, VclBuilderContainer *pPage)
 {
     vcl::Window *pOurGrid = pPage->get<vcl::Window>("maingrid");
     if (!pOurGrid)
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index fb2a4831f326..b72b6055f8ce 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -869,8 +869,7 @@ IMPL_STATIC_LINK_NOARG(SfxDocumentPage, ChangePassHdl, Button*, void)
         if (!pFilter)
             break;
 
-        OUString aDocName;
-        sfx2::RequestPassword(pFilter, aDocName, pMedSet);
+        sfx2::RequestPassword(pFilter, OUString(), pMedSet);
         pShell->SetModified();
     }
     while (false);
@@ -1807,7 +1806,7 @@ void CustomPropertiesWindow::updateLineWidth()
     }
 }
 
-void CustomPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
+void CustomPropertiesWindow::AddLine( const OUString& sName, Any const & rAny )
 {
     CustomPropertyLine* pNewLine = new CustomPropertyLine( this );
     pNewLine->m_aTypeBox->SetSelectHdl( LINK( this, CustomPropertiesWindow, TypeHdl ) );
@@ -2192,7 +2191,7 @@ IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl, void*, void)
         m_pVertScroll->DoScrollAction ( ScrollType::LineUp );
 }
 
-void CustomPropertiesControl::AddLine( const OUString& sName, Any& rAny, bool bInteractive )
+void CustomPropertiesControl::AddLine( const OUString& sName, Any const & rAny, bool bInteractive )
 {
     m_pPropertiesWin->AddLine( sName, rAny );
     long nLineCount = m_pPropertiesWin->GetVisibleLineCount();
@@ -2416,7 +2415,7 @@ void CmisPropertiesWindow::ClearAllLines()
 void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
                                     const OUString& sType, const bool bUpdatable,
                                     const bool bRequired, const bool bMultiValued,
-                                    const bool bOpenChoice, Any& /*aChoices*/, Any& rAny )
+                                    const bool bOpenChoice, Any& /*aChoices*/, Any const & rAny )
 {
     CmisPropertyLine* pNewLine = new CmisPropertyLine( m_pBox );
 
@@ -2668,7 +2667,7 @@ void CmisPropertiesControl::setScrollRange()
 void CmisPropertiesControl::AddLine( const OUString& sId, const OUString& sName,
                                      const OUString& sType, const bool bUpdatable,
                                      const bool bRequired, const bool bMultiValued,
-                                     const bool bOpenChoice, Any& aChoices, Any& rAny
+                                     const bool bOpenChoice, Any& aChoices, Any const & rAny
                                      )
 {
     m_pPropertiesWin.AddLine( sId, sName, sType, bUpdatable, bRequired, bMultiValued,
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index f4ebace14fbd..7e740ef87efb 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2620,7 +2620,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
     return nRet;
 }
 
-ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString& aURL, SfxItemSet* pSet)
+ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString const & aURL, SfxItemSet* pSet)
 {
     uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
     // TODO: need a save way to distinguish MS filters from other filters
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 0f449f1d9b8c..9dfd524349e8 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -517,7 +517,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
 }
 
 
-void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, bool bSave)
+void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow const *pDockWin, bool bSave)
 {
 //  The docking window is no longer stored in the internal data.
     sal_uInt16 nCount = maDockArr.size();
@@ -632,7 +632,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
 }
 
 
-void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
+void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl const * pDock,
                         const Size& rSize,
                         sal_uInt16 nLine, sal_uInt16 nPos, bool bNewLine)
 
@@ -757,7 +757,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
 }
 
 
-void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide )
+void SfxSplitWindow::RemoveWindow( SfxDockingWindow const * pDockWin, bool bHide )
 
 /*  [Description]
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 152bb1ab2843..3ff7eea52887 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1730,7 +1730,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
     }
 }
 
-static OUString getModuleIdentifier( const Reference< XModuleManager2 >& i_xModMgr, SfxObjectShell* i_pObjSh )
+static OUString getModuleIdentifier( const Reference< XModuleManager2 >& i_xModMgr, SfxObjectShell const * i_pObjSh )
 {
     OSL_ENSURE( i_xModMgr.is(), "getModuleIdentifier(): no XModuleManager" );
     OSL_ENSURE( i_pObjSh, "getModuleIdentifier(): no ObjectShell" );
@@ -1753,7 +1753,7 @@ static OUString getModuleIdentifier( const Reference< XModuleManager2 >& i_xModM
     return sIdentifier;
 }
 
-sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh )
+sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell const * i_pObjSh )
 {
     OSL_ENSURE( i_pObjSh, "SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter(): no ObjectShell" );
 
@@ -1768,7 +1768,7 @@ sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell*
     return nFilter;
 }
 
-void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter )
+void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell const * i_pObjSh, sal_Int32 i_nFilter )
 {
     OSL_ENSURE( i_pObjSh, "SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter(): no ObjectShell" );
     Sequence< PropertyValue > lProps(1);
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 00404ec9acb2..b07117339f40 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -268,7 +268,7 @@ splitXmlId(OUString const & i_XmlId,
 
 
 static uno::Reference<rdf::XURI>
-getURIForStream(struct DocumentMetadataAccess_Impl& i_rImpl,
+getURIForStream(struct DocumentMetadataAccess_Impl const & i_rImpl,
     OUString const& i_rPath)
 {
     const uno::Reference<rdf::XURI> xURI(
@@ -281,7 +281,7 @@ getURIForStream(struct DocumentMetadataAccess_Impl& i_rImpl,
 /** add statements declaring i_xResource to be a file of type i_xType with
     path i_rPath to manifest, with optional additional types i_pTypes */
 static void
-addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
+addFile(struct DocumentMetadataAccess_Impl const & i_rImpl,
     uno::Reference<rdf::XURI> const& i_xType,
     OUString const & i_rPath,
     const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes)
@@ -313,7 +313,7 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
 
 /** add content.xml or styles.xml to manifest */
 static bool
-addContentOrStylesFileImpl(struct DocumentMetadataAccess_Impl & i_rImpl,
+addContentOrStylesFileImpl(struct DocumentMetadataAccess_Impl const & i_rImpl,
     const OUString & i_rPath)
 {
     uno::Reference<rdf::XURI> xType;
@@ -330,7 +330,7 @@ addContentOrStylesFileImpl(struct DocumentMetadataAccess_Impl & i_rImpl,
 
 /** add metadata file to manifest */
 static void
-addMetadataFileImpl(struct DocumentMetadataAccess_Impl & i_rImpl,
+addMetadataFileImpl(struct DocumentMetadataAccess_Impl const & i_rImpl,
     const OUString & i_rPath,
     const uno::Sequence < uno::Reference< rdf::XURI > > & i_rTypes)
 {
@@ -341,7 +341,7 @@ addMetadataFileImpl(struct DocumentMetadataAccess_Impl & i_rImpl,
 
 /** remove a file from the manifest */
 static void
-removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
+removeFile(struct DocumentMetadataAccess_Impl const & i_rImpl,
     uno::Reference<rdf::XURI> const& i_xPart)
 {
     if (!i_xPart.is()) throw uno::RuntimeException();
@@ -361,7 +361,7 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
 }
 
 static ::std::vector< uno::Reference< rdf::XURI > >
-getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
+getAllParts(struct DocumentMetadataAccess_Impl const & i_rImpl)
 {
     ::std::vector< uno::Reference< rdf::XURI > > ret;
     try {
@@ -390,7 +390,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
 }
 
 static bool
-isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
+isPartOfType(struct DocumentMetadataAccess_Impl const & i_rImpl,
     uno::Reference<rdf::XURI> const & i_xPart,
     uno::Reference<rdf::XURI> const & i_xType)
 {
@@ -589,7 +589,7 @@ retry:
 
 /** actually write a metadata file to the storage */
 static void
-exportStream(struct DocumentMetadataAccess_Impl & i_rImpl,
+exportStream(struct DocumentMetadataAccess_Impl const & i_rImpl,
     uno::Reference< embed::XStorage > const & i_xStorage,
     uno::Reference<rdf::XURI> const & i_xGraphName,
     OUString const & i_rFileName,
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b371e2e67cab..964c3bac2b0a 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1783,7 +1783,7 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
 }
 
 
-bool SfxMedium::TryDirectTransfer( const OUString& aURL, SfxItemSet& aTargetSet )
+bool SfxMedium::TryDirectTransfer( const OUString& aURL, SfxItemSet const & aTargetSet )
 {
     if ( GetError() )
         return false;
@@ -3277,7 +3277,7 @@ void SfxMedium::RemoveVersion_Impl( const OUString& rName )
     }
 }
 
-bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
+bool SfxMedium::TransferVersionList_Impl( SfxMedium const & rMedium )
 {
     if ( rMedium.pImpl->aVersions.getLength() )
     {
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index f73407735c45..e387526d33ce 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -305,7 +305,7 @@ bool SaveOlePropertySet(
     return (nGlobError == ERRCODE_NONE) && (nDocError == ERRCODE_NONE);
 }
 
-uno::Sequence<sal_Int8> convertMetaFile(GDIMetaFile* i_pThumb)
+uno::Sequence<sal_Int8> convertMetaFile(GDIMetaFile const * i_pThumb)
 {
     if (i_pThumb) {
         BitmapEx aBitmap;
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 8209b4a1f4cb..1a155967a5d9 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -169,7 +169,7 @@ SfxMediumList* DocumentInserter::CreateMediumList()
     return pMediumList;
 }
 
-void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, std::vector<OUString>& _rpURLList )
+void impl_FillURLList( sfx2::FileDialogHelper const * _pFileDlg, std::vector<OUString>& _rpURLList )
 {
     DBG_ASSERT( _pFileDlg, "DocumentInserter::fillURLList(): invalid file dialog" );
 
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 5a29eff8f3cf..a1699820bc10 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -178,7 +178,7 @@ public:
                                   const size_t *pPos );
     void                DeleteEntry( size_t nIndex );
 
-    int                 Compare( RegionData_Impl* pCompareWith ) const;
+    int                 Compare( RegionData_Impl const * pCompareWith ) const;
 };
 
 typedef vector< RegionData_Impl* > RegionList_Impl;
@@ -1440,7 +1440,7 @@ void RegionData_Impl::DeleteEntry( size_t nIndex )
 }
 
 
-int RegionData_Impl::Compare( RegionData_Impl* pCompare ) const
+int RegionData_Impl::Compare( RegionData_Impl const * pCompare ) const
 {
     return maTitle.compareTo( pCompare->maTitle );
 }
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 699707d8ab2b..62232c9efbd1 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -259,14 +259,14 @@ class SfxDocTplService_Impl
                                               const OUString& rUITitle,
                                               const OUString& rOwnURL,
                                               bool bWriteableGroup );
-    void                        removeFromHierarchy( DocTemplates_EntryData_Impl *pData );
-    void                        addToHierarchy( GroupData_Impl *pGroup,
-                                                DocTemplates_EntryData_Impl *pData );
+    void                        removeFromHierarchy( DocTemplates_EntryData_Impl const *pData );
+    void                        addToHierarchy( GroupData_Impl const *pGroup,
+                                                DocTemplates_EntryData_Impl const *pData );
 
-    void                        removeFromHierarchy( GroupData_Impl *pGroup );
+    void                        removeFromHierarchy( GroupData_Impl const *pGroup );
     void                        addGroupToHierarchy( GroupData_Impl *pGroup );
 
-    void                        updateData( DocTemplates_EntryData_Impl *pData );
+    void                        updateData( DocTemplates_EntryData_Impl const *pData );
 
     //See: #i66157# and rhbz#1065807
     //return which template dir the rURL is a subpath of
@@ -2545,7 +2545,7 @@ void SfxDocTplService_Impl::createFromContent( GroupList_Impl& rList,
 }
 
 
-void SfxDocTplService_Impl::removeFromHierarchy( DocTemplates_EntryData_Impl *pData )
+void SfxDocTplService_Impl::removeFromHierarchy( DocTemplates_EntryData_Impl const *pData )
 {
     Content aTemplate;
 
@@ -2556,8 +2556,8 @@ void SfxDocTplService_Impl::removeFromHierarchy( DocTemplates_EntryData_Impl *pD
 }
 
 
-void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup,
-                                            DocTemplates_EntryData_Impl *pData )
+void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl const *pGroup,
+                                            DocTemplates_EntryData_Impl const *pData )
 {
     Content aGroup, aTemplate;
 
@@ -2583,7 +2583,7 @@ void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup,
 }
 
 
-void SfxDocTplService_Impl::updateData( DocTemplates_EntryData_Impl *pData )
+void SfxDocTplService_Impl::updateData( DocTemplates_EntryData_Impl const *pData )
 {
     Content aTemplate;
 
@@ -2628,7 +2628,7 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup )
 }
 
 
-void SfxDocTplService_Impl::removeFromHierarchy( GroupData_Impl *pGroup )
+void SfxDocTplService_Impl::removeFromHierarchy( GroupData_Impl const *pGroup )
 {
     Content aGroup;
 
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index b1f7a675faa0..a1129c4a3431 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -178,7 +178,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co
 
 
 // static
-bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const uno::Reference<io::XStream>& xStream)
+bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile const * pMetaFile, const uno::Reference<io::XStream>& xStream)
 {
     bool bResult = false;
 
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index 029b0f676c5c..490093e09be0 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
@@ -49,7 +49,7 @@ public:
     }
 
     static bool getThumbnailFormatFromGDI_Impl(
-            GDIMetaFile* pMetaFile,
+            GDIMetaFile const * pMetaFile,
             const css::uno::Reference< css::io::XStream >& xStream );
 
     static OUString getThumbnailReplacementIDByFactoryName_Impl(const OUString& aFactoryShortName);
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index a29fcbae3137..2ea3dc84dc2d 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -41,7 +41,7 @@
 #include <sfx2/printer.hxx>
 #include <vcl/waitobj.hxx>
 
-void SfxPreviewBase_Impl::SetObjectShell(SfxObjectShell* pObj)
+void SfxPreviewBase_Impl::SetObjectShell(SfxObjectShell const * pObj)
 {
     std::shared_ptr<GDIMetaFile> xFile = pObj
         ? pObj->GetPreviewMetaFile()
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4e910b57fcc5..cbf25033f292 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -874,7 +874,7 @@ void SfxObjectShell::SetProgress_Impl
 }
 
 
-void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
+void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame const * pFrame )
 {
     SfxApplication* pSfxApp = SfxGetpApp();
     if ( !pSfxApp->IsDowning() && !IsLoading() && pFrame && !pFrame->GetFrame().IsClosing_Impl() )
@@ -1577,7 +1577,7 @@ bool SfxObjectShell::AdjustMacroMode()
     return pImpl->aMacroMode.adjustMacroMode( xInteraction );
 }
 
-vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
+vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium const * pLoadingMedium )
 {
     VclPtr<vcl::Window> pWindow;
     SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6e5c03265503..a9ff7dc804f4 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -866,7 +866,7 @@ bool SfxObjectShell::DoLoadExternal( SfxMedium *pMed )
     return LoadExternal(*pMedium);
 }
 
-ErrCode SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc )
+ErrCode SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell const * pDoc )
 {
     ErrCode nError = ERRCODE_NONE;
     SfxItemSet* pSet = pMedium->GetItemSet();
@@ -1063,7 +1063,7 @@ bool SfxObjectShell::DoSave()
     return bOk;
 }
 
-void Lock_Impl( SfxObjectShell* pDoc, bool bLock )
+void Lock_Impl( SfxObjectShell const * pDoc, bool bLock )
 {
     SfxViewFrame *pFrame= SfxViewFrame::GetFirst( pDoc );
     while ( pFrame )
@@ -2701,7 +2701,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
         return false;
 }
 
-bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, SfxItemSet& rItemSet)
+bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, SfxItemSet const & rItemSet)
 {
     // copy all items stored in the itemset of the current medium
     SfxAllItemSet* pMergedParams = new SfxAllItemSet( *pMedium->GetItemSet() );
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 5df92d9175d4..51b3cfbf2a32 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -581,7 +581,7 @@ Sequence< sal_Int8 > SAL_CALL SfxBaseModel::getImplementationId()
 //  XStarBasicAccess
 
 
-Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pObjectShell )
+Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell const * pObjectShell )
 {
     Reference< script::XStarBasicAccess > xRet;
 
@@ -1718,7 +1718,7 @@ void SAL_CALL SfxBaseModel::initNew()
 
 namespace {
 
-OUString getFilterProvider( SfxMedium& rMedium )
+OUString getFilterProvider( SfxMedium const & rMedium )
 {
     std::shared_ptr<const SfxFilter> pFilter = rMedium.GetFilter();
     if (!pFilter)
@@ -3372,7 +3372,7 @@ static void GetCommandFromSequence( OUString& rCommand, sal_Int32& nIndex, const
     }
 }
 
-static void ConvertSlotsToCommands( SfxObjectShell* pDoc, Reference< container::XIndexContainer >& rToolbarDefinition )
+static void ConvertSlotsToCommands( SfxObjectShell const * pDoc, Reference< container::XIndexContainer > const & rToolbarDefinition )
 {
     if ( pDoc )
     {
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index abc42ba77b30..7a5706de907b 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -85,7 +85,7 @@ public:
                                     const ::comphelper::NamedValueCollection& i_eventDescriptor,
                                     ::comphelper::NamedValueCollection& o_normalizedDescriptor,
                                     SfxObjectShell* i_document );
-    static void Execute( css::uno::Any& aEventData, const css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
+    static void Execute( css::uno::Any const & aEventData, const css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
 };
 
 #endif
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
index 86c8f6fc4bf8..f40b4974d33b 100644
--- a/sfx2/source/inc/preview.hxx
+++ b/sfx2/source/inc/preview.hxx
@@ -31,7 +31,7 @@ protected:
     std::shared_ptr<GDIMetaFile> xMetaFile;
 public:
     SfxPreviewBase_Impl(vcl::Window* pParent, WinBits nStyle);
-    void            SetObjectShell( SfxObjectShell* pObj );
+    void            SetObjectShell( SfxObjectShell const * pObj );
     virtual void    Resize() override;
     virtual Size    GetOptimalSize() const override;
 };
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index f83eb2d74d06..32e745f2f131 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -50,7 +50,7 @@ private:
     VclPtr<SfxEmptySplitWin_Impl>  pEmptyWin;
     VclPtr<SfxDockingWindow>       pActive;
 
-    void                InsertWindow_Impl( SfxDock_Impl* pDockWin,
+    void                InsertWindow_Impl( SfxDock_Impl const * pDockWin,
                             const Size& rSize,
                             sal_uInt16 nLine,
                             sal_uInt16 nPos,
@@ -77,7 +77,7 @@ public:
                         virtual ~SfxSplitWindow() override;
     virtual void        dispose() override;
 
-    void                ReleaseWindow_Impl(SfxDockingWindow *pWin, bool bSaveConfig=true);
+    void                ReleaseWindow_Impl(SfxDockingWindow const *pWin, bool bSaveConfig=true);
 
     void                InsertWindow( SfxDockingWindow* pDockWin,
                             const Size& rSize);
@@ -94,7 +94,7 @@ public:
                             sal_uInt16 nPos,
                             bool bNewLine );
 
-    void                RemoveWindow( SfxDockingWindow* pDockWin, bool bHide=true);
+    void                RemoveWindow( SfxDockingWindow const * pDockWin, bool bHide=true);
 
     void                Lock( bool bLock=true )
                         {
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 15e111d5d6db..6ede99258587 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -278,8 +278,8 @@ protected:
     void SetFamily(SfxStyleFamily nFamily);
     void ActionSelect( sal_uInt16 nId );
 
-    sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
-    void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
+    sal_Int32 LoadFactoryStyleFilter( SfxObjectShell const * i_pObjSh );
+    void SaveFactoryStyleFilter( SfxObjectShell const * i_pObjSh, sal_Int32 i_nFilter );
     SfxObjectShell* SaveSelection();
 
 public:
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index bb4e50db7025..6a80892900eb 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -224,7 +224,7 @@ class SfxWorkWindow final
     tools::Rectangle               GetTopRect_Impl();
     SvBorder                Arrange_Impl();
     void                    SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
-    static bool             IsPluginMode( SfxObjectShell* pObjShell );
+    static bool             IsPluginMode( SfxObjectShell const * pObjShell );
 
 public:
                             SfxWorkWindow( vcl::Window* pWin, SfxFrame* pFrm, SfxFrame* pMaster );
diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
index fbff4b02661f..bd6c147b87c5 100644
--- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx
+++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
@@ -178,7 +178,7 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange)
     NotebookbarTabControlBase::StateChanged( nStateChange );
 }
 
-void NotebookbarTabControl::FillShortcutsToolBox(Reference<XComponentContext>& xContext,
+void NotebookbarTabControl::FillShortcutsToolBox(Reference<XComponentContext> const & xContext,
                                           const Reference<XFrame>& xFrame,
                                           const OUString& aModuleName,
                                           ToolBox* pShortcuts
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 023dce7a4e22..450c3c19b915 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -123,7 +123,7 @@ static utl::OConfigurationTreeRoot lcl_getCurrentImplConfigRoot()
 }
 
 static const utl::OConfigurationNode lcl_getCurrentImplConfigNode(const Reference<css::frame::XFrame>& xFrame,
-                                                                  utl::OConfigurationTreeRoot& rNotebookbarNode )
+                                                                  utl::OConfigurationTreeRoot const & rNotebookbarNode )
 {
     if (!rNotebookbarNode.isValid())
         return utl::OConfigurationNode();
@@ -336,7 +336,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
     return false;
 }
 
-void SfxNotebookBar::RemoveListeners(SystemWindow* pSysWindow)
+void SfxNotebookBar::RemoveListeners(SystemWindow const * pSysWindow)
 {
     Reference<XContextChangeEventMultiplexer> xMultiplexer
                         = ContextChangeEventMultiplexer::get(
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 68f11cc6d407..87f77be978e6 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -169,7 +169,7 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasElements()
         return false;
 }
 
-void SfxEvents_Impl::Execute( uno::Any& aEventData, const document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
+void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
 {
     uno::Sequence < beans::PropertyValue > aProperties;
     if ( aEventData >>= aProperties )
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index b3937be0f376..90bbe1ed8b0b 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -165,7 +165,7 @@ bool Deck::EventNotify(NotifyEvent& rEvent)
     return Window::EventNotify(rEvent);
 }
 
-bool Deck::ProcessWheelEvent(CommandEvent* pCommandEvent)
+bool Deck::ProcessWheelEvent(CommandEvent const * pCommandEvent)
 {
     if ( ! mpVerticalScrollBar)
         return false;
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index c5be03bc17ec..1ffacbe29cde 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -63,7 +63,7 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n
     GetWindow()->Show();
 }
 
-sal_Int32 SidebarChildWindow::GetDefaultWidth (vcl::Window* pWindow)
+sal_Int32 SidebarChildWindow::GetDefaultWidth (vcl::Window const * pWindow)
 {
     if (pWindow != nullptr)
     {
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index aeee94b41201..d266f72c3ab0 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -546,7 +546,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
     sal_uInt16     nSlotID,
     sal_uInt16     nStbId,
     StatusBar* pBar,
-    SfxModule* pMod
+    SfxModule const * pMod
 )
 {
     SolarMutexGuard aGuard;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 0bfcf1bcdff3..cfcdedf59769 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -256,7 +256,7 @@ void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, const SfxTbxCtr
     SfxGetpApp()->RegisterToolBoxControl_Impl( pMod, rFact );
 }
 
-SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule* pMod  )
+SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule const * pMod  )
 {
     SolarMutexGuard aGuard;
 
@@ -371,7 +371,7 @@ SfxItemState SfxToolBoxControl::GetItemState(
 void SfxToolBoxControl::Dispatch(
     const Reference< XDispatchProvider >& rProvider,
     const OUString& rCommand,
-    Sequence< ::PropertyValue >& aArgs )
+    Sequence< ::PropertyValue > const & aArgs )
 {
     if ( rProvider.is() )
     {
@@ -386,7 +386,7 @@ void SfxToolBoxControl::Dispatch(
     }
 }
 
-void SfxToolBoxControl::Dispatch( const OUString& aCommand, css::uno::Sequence< css::beans::PropertyValue >& aArgs )
+void SfxToolBoxControl::Dispatch( const OUString& aCommand, css::uno::Sequence< css::beans::PropertyValue > const & aArgs )
 {
     Reference < XController > xController;
 
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 760cf75b6049..b93cce9e208f 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -364,7 +364,7 @@ void SfxFrame::GetViewData_Impl()
     }
 }
 
-void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
+void SfxFrame::UpdateDescriptor( SfxObjectShell const *pDoc )
 {
     // For PrepareForDoc_Impl frames, the descriptor of the updated
     // and new itemset to be initialized. All data fir restoring the view
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index e89086bc02f6..1d448e6987cc 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -217,7 +217,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
     return xFrame;
 }
 
-SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden )
+SfxFrame* SfxFrame::Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden )
 {
     SfxFrame* pFrame = nullptr;
     try
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index fe4ae015f496..a70bb145cd2a 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -797,7 +797,7 @@ bool SfxInPlaceClient::IsObjectInPlaceActive() const
 }
 
 
-SfxInPlaceClient* SfxInPlaceClient::GetClient( SfxObjectShell* pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject )
+SfxInPlaceClient* SfxInPlaceClient::GetClient( SfxObjectShell const * pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject )
 {
     for ( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(pDoc); pFrame; pFrame=SfxViewFrame::GetNext(*pFrame,pDoc) )
     {
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index f5762518d632..70c42b1dd422 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -120,7 +120,7 @@ bool SfxLokHelper::getViewIds(int* pArray, size_t nSize)
     return true;
 }
 
-void SfxLokHelper::notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload)
+void SfxLokHelper::notifyOtherView(SfxViewShell* pThisView, SfxViewShell const * pOtherView, int nType, const OString& rKey, const OString& rPayload)
 {
     OString aPayload = OString("{ \"viewId\": \"") + OString::number(SfxLokHelper::getView(pThisView)) +
                        "\", \"part\": \"" + OString::number(pThisView->getPart()) +
@@ -144,7 +144,7 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS
     }
 }
 
-void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload)
+void SfxLokHelper::notifyInvalidation(SfxViewShell const * pThisView, const OString& rPayload)
 {
     OStringBuffer aBuf;
     aBuf.append(rPayload);
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 71040a9e3d7c..997d24348347 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1174,7 +1174,7 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL SfxBaseController::getConfi
     return comphelper::containerToSequence( aCmdList );
 }
 
-bool SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
+bool SfxBaseController::HandleEvent_Impl( NotifyEvent const & rEvent )
 {
     return m_pData->m_aUserInputInterception.handleNotifyEvent( rEvent );
 }
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 7ec9a6190148..75d833880caa 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1052,7 +1052,7 @@ void SfxViewFrame::DoActivate( bool bUI )
     m_pDispatcher->DoActivate_Impl( bUI );
 }
 
-void SfxViewFrame::DoDeactivate(bool bUI, SfxViewFrame* pNewFrame )
+void SfxViewFrame::DoDeactivate(bool bUI, SfxViewFrame const * pNewFrame )
 {
     m_pDispatcher->DoDeactivate_Impl( bUI, pNewFrame );
 }
@@ -1755,27 +1755,27 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
     return pViewShell;
 }
 
-SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell const & i_rDoc, SfxInterfaceId i_nViewId )
 {
     return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
 }
 
-SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell const & i_rDoc, SfxInterfaceId i_nViewId )
 {
     return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false );
 }
 
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell const & i_rDoc, const Reference< XFrame >& i_rTargetFrame )
 {
     return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, SFX_INTERFACE_NONE, false );
 }
 
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell const & i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId )
 {
     return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : nullptr, i_nViewId, false );
 }
 
-SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest )
+SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell const & i_rDoc, const SfxRequest& i_rCreateDocRequest )
 {
     const SfxUnoFrameItem* pFrameItem = i_rCreateDocRequest.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
     const SfxBoolItem* pHiddenItem = i_rCreateDocRequest.GetArg<SfxBoolItem>(SID_HIDDEN);
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 67b326205ed9..bfb0552d2d7d 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -372,7 +372,7 @@ void SfxViewShell::NewIPClient_Impl( SfxInPlaceClient *pIPClient )
     pImpl->GetIPClientList_Impl()->push_back(pIPClient);
 }
 
-void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient *pIPClient )
+void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient const *pIPClient )
 {
     SfxInPlaceClientList* pClientList = pImpl->GetIPClientList_Impl();
 
@@ -1549,7 +1549,7 @@ void SfxViewShell::ShowCursor( bool /*bOn*/ )
 }
 
 
-void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
+void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient const *pIP )
 {
 
     SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
@@ -1597,7 +1597,7 @@ void SfxViewShell::VisAreaChanged()
 
 
 void SfxViewShell::CheckIPClient_Impl(
-        SfxInPlaceClient *const pIPClient, const tools::Rectangle& rVisArea)
+        SfxInPlaceClient const *const pIPClient, const tools::Rectangle& rVisArea)
 {
     if ( GetObjectShell()->IsInClose() )
         return;
@@ -1906,7 +1906,7 @@ bool SfxViewShell::TryContextMenuInterception( Menu& rMenu, const OUString& rMen
     return true;
 }
 
-bool SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
+bool SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent const & rEvent )
 {
     if (pImpl->m_pController.is())
         return pImpl->m_pController->HandleEvent_Impl( rEvent );


More information about the Libreoffice-commits mailing list