[Libreoffice-commits] core.git: sc/inc sc/source

Noel Grandin noel.grandin at collabora.co.uk
Sat Aug 26 07:16:46 UTC 2017


 sc/inc/PivotTableDataSource.hxx                |    2 +-
 sc/inc/miscuno.hxx                             |    4 ++--
 sc/inc/shapeuno.hxx                            |    2 +-
 sc/source/ui/inc/auditsh.hxx                   |    2 +-
 sc/source/ui/inc/cellsh.hxx                    |    2 +-
 sc/source/ui/inc/drawutil.hxx                  |    4 ++--
 sc/source/ui/inc/drawview.hxx                  |    2 +-
 sc/source/ui/inc/editsh.hxx                    |    4 ++--
 sc/source/ui/inc/formatsh.hxx                  |    4 ++--
 sc/source/ui/inc/gridwin.hxx                   |    4 ++--
 sc/source/ui/inc/output.hxx                    |    8 ++++----
 sc/source/ui/inc/pivotsh.hxx                   |    2 +-
 sc/source/ui/inc/reffact.hxx                   |    2 +-
 sc/source/ui/inc/tabsplit.hxx                  |    2 +-
 sc/source/ui/inc/tabview.hxx                   |    8 ++++----
 sc/source/ui/inc/tabvwsh.hxx                   |   16 ++++++++--------
 sc/source/ui/unoobj/ChartTools.cxx             |    4 ++--
 sc/source/ui/unoobj/PivotTableDataProvider.cxx |    2 +-
 sc/source/ui/unoobj/PivotTableDataSource.cxx   |    2 +-
 sc/source/ui/unoobj/miscuno.cxx                |    2 +-
 sc/source/ui/unoobj/shapeuno.cxx               |   10 +++++-----
 sc/source/ui/unoobj/styleuno.cxx               |    2 +-
 sc/source/ui/unoobj/viewuno.cxx                |    2 +-
 sc/source/ui/view/auditsh.cxx                  |    2 +-
 sc/source/ui/view/cellsh1.cxx                  |    2 +-
 sc/source/ui/view/cliputil.cxx                 |    2 +-
 sc/source/ui/view/drawutil.cxx                 |    4 ++--
 sc/source/ui/view/drawvie4.cxx                 |    2 +-
 sc/source/ui/view/drawview.cxx                 |    2 +-
 sc/source/ui/view/editsh.cxx                   |    4 ++--
 sc/source/ui/view/formatsh.cxx                 |    4 ++--
 sc/source/ui/view/gridwin.cxx                  |    8 ++++----
 sc/source/ui/view/gridwin4.cxx                 |    4 ++--
 sc/source/ui/view/gridwin5.cxx                 |    2 +-
 sc/source/ui/view/imapwrap.cxx                 |    4 ++--
 sc/source/ui/view/imapwrap.hxx                 |    4 ++--
 sc/source/ui/view/notemark.cxx                 |    2 +-
 sc/source/ui/view/output.cxx                   |    8 ++++----
 sc/source/ui/view/output2.cxx                  |   12 ++++++------
 sc/source/ui/view/pivotsh.cxx                  |    2 +-
 sc/source/ui/view/preview.cxx                  |    4 ++--
 sc/source/ui/view/printfun.cxx                 |    6 +++---
 sc/source/ui/view/reffact.cxx                  |    6 +++---
 sc/source/ui/view/tabcont.cxx                  |    2 +-
 sc/source/ui/view/tabsplit.cxx                 |    2 +-
 sc/source/ui/view/tabview.cxx                  |    4 ++--
 sc/source/ui/view/tabview2.cxx                 |    8 ++++----
 sc/source/ui/view/tabview3.cxx                 |    2 +-
 sc/source/ui/view/tabview4.cxx                 |    2 +-
 sc/source/ui/view/tabview5.cxx                 |    2 +-
 sc/source/ui/view/tabvwsh.cxx                  |    2 +-
 sc/source/ui/view/tabvwsh3.cxx                 |    2 +-
 sc/source/ui/view/tabvwsh4.cxx                 |    2 +-
 sc/source/ui/view/tabvwsh5.cxx                 |    2 +-
 sc/source/ui/view/tabvwsh9.cxx                 |    4 ++--
 sc/source/ui/view/tabvwsha.cxx                 |    2 +-
 sc/source/ui/view/tabvwshb.cxx                 |    2 +-
 sc/source/ui/view/tabvwshc.cxx                 |    2 +-
 sc/source/ui/view/tabvwshh.cxx                 |    4 ++--
 sc/source/ui/view/viewfun3.cxx                 |    2 +-
 60 files changed, 111 insertions(+), 111 deletions(-)

New commits:
commit 8ced5266f277734f9b7a48db6408056892d38ac4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Aug 25 18:52:30 2017 +0200

    loplugin:constparam in sc part7
    
    Change-Id: Ica5421ddc343ce18a08f993778f42183b571ed0e
    Reviewed-on: https://gerrit.libreoffice.org/41578
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/inc/PivotTableDataSource.hxx b/sc/inc/PivotTableDataSource.hxx
index cd4281ceffe1..e6eda8be6c75 100644
--- a/sc/inc/PivotTableDataSource.hxx
+++ b/sc/inc/PivotTableDataSource.hxx
@@ -30,7 +30,7 @@ typedef cppu::WeakImplHelper<css::chart2::data::XDataSource,
 class PivotTableDataSource : public PivotTableDataSource_Base, public SfxListener
 {
 public:
-    explicit PivotTableDataSource(std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence);
+    explicit PivotTableDataSource(const std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence);
     virtual ~PivotTableDataSource() override;
     virtual void Notify(SfxBroadcaster& rBroadcaster, const SfxHint& rHint) override;
 
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index dd50fbac5cb6..bf5de0d2dee1 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -149,12 +149,12 @@ public:
     static sal_Int32        GetEnumFromAny( const css::uno::Any& aAny );
 
     static void             SetOptionalPropertyValue(
-        css::uno::Reference< css::beans::XPropertySet >& rPropSet,
+        const css::uno::Reference< css::beans::XPropertySet >& rPropSet,
         const sal_Char* pPropName, const css::uno::Any& rVal );
 
     template<typename ValueType>
     static void             SetOptionalPropertyValue(
-        css::uno::Reference< css::beans::XPropertySet >& rPropSet,
+        const css::uno::Reference< css::beans::XPropertySet >& rPropSet,
         const sal_Char* pPropName, const ValueType& rVal )
     {
         css::uno::Any any;
diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx
index df3eef981a84..270399377b65 100644
--- a/sc/inc/shapeuno.hxx
+++ b/sc/inc/shapeuno.hxx
@@ -64,7 +64,7 @@ class ScShapeObj    :public ScShapeObj_Base
                     ,public ScShapeObj_ChildBase
 {
 private:
-    friend ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate );
+    friend ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool bCreate );
     css::uno::Reference< css::uno::XAggregation >              mxShapeAgg;
     // cached pointers to avoid repeated queryAggregation calls:
     css::beans::XPropertySet*                                  pShapePropertySet;
diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx
index 2ef15d707f32..8181122995f4 100644
--- a/sc/source/ui/inc/auditsh.hxx
+++ b/sc/source/ui/inc/auditsh.hxx
@@ -44,7 +44,7 @@ public:
     ScAuditingShell(ScViewData* pData);
     virtual ~ScAuditingShell() override;
 
-    void Execute(SfxRequest& rReq);
+    void Execute(const SfxRequest& rReq);
     void GetState(SfxItemSet& rSet);
 };
 
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 50cd54eecccd..98f679589c80 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -88,7 +88,7 @@ public:
 
     void        ExecuteEdit( SfxRequest& rReq );
     void        ExecuteTrans( SfxRequest& rReq );
-    void                ExecuteRotateTrans( SfxRequest& rReq );
+    void        ExecuteRotateTrans( const SfxRequest& rReq );
 
     void        GetBlockState( SfxItemSet& rSet );
     void        GetCellState( SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/drawutil.hxx b/sc/source/ui/inc/drawutil.hxx
index 6a011ae290e2..02679e86c962 100644
--- a/sc/source/ui/inc/drawutil.hxx
+++ b/sc/source/ui/inc/drawutil.hxx
@@ -29,9 +29,9 @@ class ScDocument;
 class ScDrawUtil
 {
 public:
-    static void CalcScale( ScDocument* pDoc, SCTAB nTab,
+    static void CalcScale( const ScDocument* pDoc, SCTAB nTab,
                         SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
-                        OutputDevice* pDev, const Fraction& rZoomX, const Fraction& rZoomY,
+                        const OutputDevice* pDev, const Fraction& rZoomX, const Fraction& rZoomY,
                         double nPPTX, double nPPTY,
                         Fraction& rScaleX, Fraction& rScaleY );
 };
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index b747207d5e2b..1a87d768d0e3 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -138,7 +138,7 @@ public:
     css::uno::Reference< css::datatransfer::XTransferable > CopyToTransferable();
 
     SdrObject*  GetObjectByName(const OUString& rName);
-    bool        GetObjectIsMarked(  SdrObject * pObject );
+    bool        GetObjectIsMarked( const SdrObject * pObject );
     void        SelectCurrentViewObject( const OUString& rName );
 
     // #i123922# helper which checks if a Graphic may be applied to an existing
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index eaeed421ca27..1b4cfb7c356a 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -63,14 +63,14 @@ public:
     EditView* GetEditView() {return pEditView;}
 
     void    Execute(SfxRequest& rReq);
-    void    ExecuteTrans(SfxRequest& rReq);
+    void    ExecuteTrans(const SfxRequest& rReq);
     void    GetState(SfxItemSet &rSet);
     void    GetClipState(SfxItemSet& rSet);
 
     void    ExecuteAttr(SfxRequest& rReq);
     void    GetAttrState(SfxItemSet &rSet);
 
-    void    ExecuteUndo(SfxRequest& rReq);
+    void    ExecuteUndo(const SfxRequest& rReq);
     void    GetUndoState(SfxItemSet &rSet);
 
     OUString GetSelectionText( bool bWholeWord );
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
index 9f1af7d4de74..77d07f0ea65e 100644
--- a/sc/source/ui/inc/formatsh.hxx
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -63,10 +63,10 @@ public:
     void        ExecuteStyle( SfxRequest& rReq );
     void        GetStyleState( SfxItemSet& rSet );
 
-    void        ExecuteTextDirection( SfxRequest& rReq );
+    void        ExecuteTextDirection( const SfxRequest& rReq );
     void        GetTextDirectionState( SfxItemSet& rSet );
 
-    void        ExecFormatPaintbrush( SfxRequest& rReq );
+    void        ExecFormatPaintbrush( const SfxRequest& rReq );
     void        StateFormatPaintbrush( SfxItemSet& rSet );
 
 private:
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index d25e4a2cc725..90307b453147 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -251,7 +251,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
     bool            DrawHasMarkedObj();
     void            DrawEndAction();
     void            DrawMarkDropObj( SdrObject* pObj );
-    bool            IsMyModel(SdrEditView* pSdrView);
+    bool            IsMyModel(const SdrEditView* pSdrView);
 
     void            DrawRedraw( ScOutputData& rOutputData, SdrLayerID nLayer );
     void            DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev );
@@ -434,7 +434,7 @@ public:
                                   int nOutputHeight,
                                   long nTileWidth,
                                   long nTileHeight);
-    void updateLibreOfficeKitCellCursor(SfxViewShell* pOtherShell) const;
+    void updateLibreOfficeKitCellCursor(const SfxViewShell* pOtherShell) const;
 
     ScViewData* getViewData();
     virtual FactoryFunction GetUITestFactory() const override;
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index acc7ec251264..3215f1dbf1e9 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -108,7 +108,7 @@ private:
 
         explicit DrawEditParam(const ScPatternAttr* pPattern, const SfxItemSet* pCondSet, bool bCellIsValue);
 
-        bool readCellContent(ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields);
+        bool readCellContent(const ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields);
         void setPatternToEngine(bool bUseStyleColor);
         void calcMargins(long& rTop, long& rLeft, long& rBottom, long& rRight, double nPPTX, double nPPTY) const;
         void calcPaperSize(Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const;
@@ -131,12 +131,12 @@ private:
          *                    finished, this parameter will store the new
          *                    position.
          */
-        void calcStartPosForVertical(Point& rLogicStart, long nCellWidth, long nEngineWidth, long nTopM, OutputDevice* pRefDevice);
+        void calcStartPosForVertical(Point& rLogicStart, long nCellWidth, long nEngineWidth, long nTopM, const OutputDevice* pRefDevice);
 
         void setAlignmentToEngine();
         bool adjustHorAlignment(ScFieldEditEngine* pEngine);
         void adjustForRTL();
-        void adjustForHyperlinkInPDF(Point aURLStart, OutputDevice* pDev);
+        void adjustForHyperlinkInPDF(Point aURLStart, const OutputDevice* pDev);
     };
 
     VclPtr<OutputDevice> mpDev;        // Device
@@ -227,7 +227,7 @@ private:
                                     bool& rLeftClip, bool& rRightClip );
 
     void SetSyntaxColor( vcl::Font* pFont, const ScRefCellValue& rCell );
-    void SetEditSyntaxColor( EditEngine& rEngine, ScRefCellValue& rCell );
+    void SetEditSyntaxColor( EditEngine& rEngine, const ScRefCellValue& rCell );
 
     double          GetStretch();
 
diff --git a/sc/source/ui/inc/pivotsh.hxx b/sc/source/ui/inc/pivotsh.hxx
index 2a9e1a51b0b5..bd625b8e4e76 100644
--- a/sc/source/ui/inc/pivotsh.hxx
+++ b/sc/source/ui/inc/pivotsh.hxx
@@ -41,7 +41,7 @@ public:
     ScPivotShell(ScTabViewShell* pView);
     virtual ~ScPivotShell() override;
 
-    void Execute(SfxRequest& rReq);
+    void Execute(const SfxRequest& rReq);
     void GetState(SfxItemSet& rSet);
 
 private:
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 39e61e2b9343..769438ca4f08 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -183,7 +183,7 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
     bool    m_bFreeWindowLock:1;
     VclPtr<vcl::Window> m_pSavedWndParent;
 public:
-    ScValidityRefChildWin( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
+    ScValidityRefChildWin( vcl::Window*, sal_uInt16, const SfxBindings*, SfxChildWinInfo* );
     SFX_DECL_CHILDWINDOW_WITHID(ScValidityRefChildWin);
     virtual ~ScValidityRefChildWin() override;
     bool    LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; }
diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index 206adb70b1d6..193027f9896b 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -35,7 +35,7 @@ protected:
 
 public:
                     ScTabSplitter( vcl::Window* pParent, WinBits nWinStyle,
-                                    ScViewData* pData );
+                                    const ScViewData* pData );
                     virtual ~ScTabSplitter() override;
 
     void            SetFixed(bool bSet);
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index a605535369ec..88fcb7e3b4bc 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -226,7 +226,7 @@ private:
     void            UpdateVarZoom();
 
     static void     SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, bool bLayoutRTL );
-    static long     GetScrollBarPos( ScrollBar& rScroll );
+    static long     GetScrollBarPos( const ScrollBar& rScroll );
 
     void            GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
                                            SCCOL& rAreaX, SCROW& rAreaY, ScFollowMode& rMode);
@@ -244,7 +244,7 @@ private:
      *
      **/
 
-    void            PaintRangeFinderEntry (ScRangeFindData* pData, SCTAB nTab);
+    void            PaintRangeFinderEntry (const ScRangeFindData* pData, SCTAB nTab);
 
 protected:
     void            UpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr,
@@ -366,7 +366,7 @@ public:
     ScGridWindow*   GetActiveWin();
     vcl::Window*         GetWindowByPos( ScSplitPos ePos ) { return pGridWin[ePos]; }
 
-    ScSplitPos      FindWindow( vcl::Window* pWindow ) const;
+    ScSplitPos      FindWindow( const vcl::Window* pWindow ) const;
 
     void            SetActivePointer( const Pointer& rPointer );
 
@@ -451,7 +451,7 @@ public:
 
     bool            ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
 
-    void            ScrollToObject( SdrObject* pDrawObj );
+    void            ScrollToObject( const SdrObject* pDrawObj );
     void            MakeVisible( const tools::Rectangle& rHMMRect );
 
                                     // Drawing
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 2a7e6690004a..7fd417808646 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -254,9 +254,9 @@ public:
     void            ExecDrawIns(SfxRequest& rReq);
     void            GetDrawState(SfxItemSet &rSet);
     void            GetDrawInsState(SfxItemSet &rSet);
-    void            ExecGallery(SfxRequest& rReq);
+    void            ExecGallery(const SfxRequest& rReq);
 
-    void            ExecChildWin(SfxRequest& rReq);
+    void            ExecChildWin(const SfxRequest& rReq);
 
     void            ExecImageMap( SfxRequest& rReq );
     void            GetImageMapState( SfxItemSet& rSet );
@@ -268,10 +268,10 @@ public:
     void            ExecuteUndo(SfxRequest& rReq);
     void            GetUndoState(SfxItemSet &rSet);
 
-    void            ExecuteObject(SfxRequest& rReq);
+    void            ExecuteObject(const SfxRequest& rReq);
     void            GetObjectState(SfxItemSet &rSet);
 
-    void            ExecDrawOpt(SfxRequest& rReq);
+    void            ExecDrawOpt(const SfxRequest& rReq);
     void            GetDrawOptState(SfxItemSet &rSet);
 
     void            UpdateDrawShell();
@@ -321,14 +321,14 @@ public:
     virtual bool            HasPrintOptionsPage() const override;
     virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) override;
 
-    void            ConnectObject( SdrOle2Obj* pObj );
+    void            ConnectObject( const SdrOle2Obj* pObj );
     void            ActivateObject( SdrOle2Obj* pObj, long nVerb );
 
     void            DeactivateOle();
 
     static ScTabViewShell* GetActiveViewShell();
     VclPtr<SfxModelessDialog> CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW,
-                                               SfxChildWinInfo* pInfo,
+                                               const SfxChildWinInfo* pInfo,
                                                vcl::Window* pParent, sal_uInt16 nSlotId );
 
     void            UpdateOleZoom();
@@ -348,7 +348,7 @@ public:
 
     void    ForceMove()     { Move(); }
 
-    static SvxNumberInfoItem* MakeNumberInfoItem( ScDocument* pDoc, ScViewData* pViewData );
+    static SvxNumberInfoItem* MakeNumberInfoItem( ScDocument* pDoc, const ScViewData* pViewData );
 
     static void UpdateNumberFormatter( const SvxNumberInfoItem&  rInfoItem );
 
@@ -372,7 +372,7 @@ public:
     using ScTabView::ShowCursor;
 
     bool IsActive() const { return bIsActive; }
-    OUString GetFormula(ScAddress& rAddress);
+    OUString GetFormula(const ScAddress& rAddress);
     bool    UseSubTotal(ScRangeList* pRangeList);
     const   OUString DoAutoSum(bool& rRangeFinder, bool& rSubTotal);
 
diff --git a/sc/source/ui/unoobj/ChartTools.cxx b/sc/source/ui/unoobj/ChartTools.cxx
index 920c27541040..2bb896c1a148 100644
--- a/sc/source/ui/unoobj/ChartTools.cxx
+++ b/sc/source/ui/unoobj/ChartTools.cxx
@@ -32,7 +32,7 @@ namespace tools {
 namespace {
 
 uno::Reference<chart2::data::XPivotTableDataProvider>
-getPivotTableDataProvider(SdrOle2Obj* pOleObject)
+getPivotTableDataProvider(const SdrOle2Obj* pOleObject)
 {
     uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider;
 
@@ -49,7 +49,7 @@ getPivotTableDataProvider(SdrOle2Obj* pOleObject)
     return xPivotTableDataProvider;
 }
 
-OUString getAssociatedPivotTableName(SdrOle2Obj* pOleObject)
+OUString getAssociatedPivotTableName(const SdrOle2Obj* pOleObject)
 {
     OUString aPivotTableName;
     uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider;
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index 90450c17c51d..971a46a8938c 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -66,7 +66,7 @@ const SfxItemPropertyMapEntry* lcl_GetDataProviderPropertyMap()
     return aDataProviderPropertyMap_Impl;
 }
 
-uno::Reference<frame::XModel> lcl_GetXModel(ScDocument * pDoc)
+uno::Reference<frame::XModel> lcl_GetXModel(const ScDocument * pDoc)
 {
     uno::Reference<frame::XModel> xModel;
     SfxObjectShell* pObjSh(pDoc ? pDoc->GetDocumentShell() : nullptr);
diff --git a/sc/source/ui/unoobj/PivotTableDataSource.cxx b/sc/source/ui/unoobj/PivotTableDataSource.cxx
index 28f4d7a44085..395d5f577ac1 100644
--- a/sc/source/ui/unoobj/PivotTableDataSource.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataSource.cxx
@@ -23,7 +23,7 @@ namespace sc
 
 SC_SIMPLE_SERVICE_INFO(PivotTableDataSource, "PivotTableDataSource", "com.sun.star.chart2.data.DataSource")
 
-PivotTableDataSource::PivotTableDataSource(std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence)
+PivotTableDataSource::PivotTableDataSource(const std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence)
     : m_xLabeledSequence(xLabeledSequence)
 {
 }
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx
index e66afe621623..991402e7a14e 100644
--- a/sc/source/ui/unoobj/miscuno.cxx
+++ b/sc/source/ui/unoobj/miscuno.cxx
@@ -177,7 +177,7 @@ sal_Int32 ScUnoHelpFunctions::GetEnumFromAny( const uno::Any& aAny )
 }
 
 void ScUnoHelpFunctions::SetOptionalPropertyValue(
-    Reference<beans::XPropertySet>& rPropSet, const sal_Char* pPropName, const Any& rVal )
+    const Reference<beans::XPropertySet>& rPropSet, const sal_Char* pPropName, const Any& rVal )
 {
     try
     {
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 457d659c006c..c8656949b904 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -74,7 +74,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
     return aMacroDescriptionsImpl;
 }
 // #i66550 HLINK_FOR_SHAPES
-ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate = false )
+ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool bCreate = false )
 {
         if( pShape )
             if( SdrObject* pObj = pShape->GetSdrObject() )
@@ -244,7 +244,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo(
     return mxPropSetInfo;
 }
 
-static bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
+static bool lcl_GetPageNum( const SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
 {
     sal_uInt16 nCount = rModel.GetPageCount();
     for (sal_uInt16 i=0; i<nCount; i++)
@@ -257,7 +257,7 @@ static bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
     return false;
 }
 
-static bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
+static bool lcl_GetCaptionPoint( const uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
 {
     bool bReturn = false;
     OUString sType(xShape->getShapeType());
@@ -274,7 +274,7 @@ static bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt:
     return bReturn;
 }
 
-static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScDocument* pDoc, SCTAB nTab,
+static ScRange lcl_GetAnchorCell( const uno::Reference< drawing::XShape >& xShape, const ScDocument* pDoc, SCTAB nTab,
                           awt::Point& rUnoPoint, awt::Size& rUnoSize, awt::Point& rCaptionPoint )
 {
     ScRange aReturn;
@@ -308,7 +308,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD
     return aReturn;
 }
 
-static awt::Point lcl_GetRelativePos( uno::Reference< drawing::XShape >& xShape, ScDocument* pDoc, SCTAB nTab, ScRange& rRange,
+static awt::Point lcl_GetRelativePos( const uno::Reference< drawing::XShape >& xShape, const ScDocument* pDoc, SCTAB nTab, ScRange& rRange,
                               awt::Size& rUnoSize, awt::Point& rCaptionPoint)
 {
     awt::Point aUnoPoint;
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index e0df47d8e92c..96b90f69ac24 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -388,7 +388,7 @@ SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, "ScStyleFamilyObj", "com.sun.star.styl
 
 #define SC_PAPERBIN_DEFAULTNAME     "[From printer settings]"
 
-static bool lcl_AnyTabProtected( ScDocument& rDoc )
+static bool lcl_AnyTabProtected( const ScDocument& rDoc )
 {
     SCTAB nTabCount = rDoc.GetTableCount();
     for (SCTAB i=0; i<nTabCount; i++)
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 5a9329e51c16..d0708935c440 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -633,7 +633,7 @@ static bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges )
     return false;
 }
 
-static void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj )
+static void lcl_ShowObject( ScTabViewShell& rViewSh, const ScDrawView& rDrawView, const SdrObject* pSelObj )
 {
     bool bFound = false;
     SCTAB nObjectTab = 0;
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 833d736e256d..951a325cd86e 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -62,7 +62,7 @@ ScAuditingShell::~ScAuditingShell()
 {
 }
 
-void ScAuditingShell::Execute( SfxRequest& rReq )
+void ScAuditingShell::Execute( const SfxRequest& rReq )
 {
     SfxBindings& rBindings = pViewData->GetBindings();
     sal_uInt16 nSlot = rReq.GetSlot();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 275c0b060bbe..17f66d918f7a 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2762,7 +2762,7 @@ void ScCellShell::ExecuteTrans( SfxRequest& rReq )
     }
 }
 
-void ScCellShell::ExecuteRotateTrans( SfxRequest& rReq )
+void ScCellShell::ExecuteRotateTrans( const SfxRequest& rReq )
 {
     if( rReq.GetSlot() == SID_TRANSLITERATE_ROTATE_CASE )
         GetViewData()->GetView()->TransliterateText( m_aRotateCase.getNextMode() );
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index c79d1738c742..78abb60ce20d 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -28,7 +28,7 @@ namespace
 {
 
 /// Paste only if SfxClassificationHelper recommends so.
-bool lcl_checkClassification(ScDocument* pSourceDoc, ScDocument* pDestinationDoc)
+bool lcl_checkClassification(ScDocument* pSourceDoc, const ScDocument* pDestinationDoc)
 {
     if (!pSourceDoc || !pDestinationDoc)
         return true;
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index c25292e7c3ef..fa89cbf37f84 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -24,9 +24,9 @@
 #include "global.hxx"
 #include "viewdata.hxx"
 
-void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
+void ScDrawUtil::CalcScale( const ScDocument* pDoc, SCTAB nTab,
                             SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
-                            OutputDevice* pDev,
+                            const OutputDevice* pDev,
                             const Fraction& rZoomX, const Fraction& rZoomY,
                             double nPPTX, double nPPTY,
                             Fraction& rScaleX, Fraction& rScaleY )
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 355b3a8f404d..2bc77ae35207 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -199,7 +199,7 @@ void getRangeFromOle2Object(const SdrOle2Obj& rObj, std::vector<OUString>& rRang
 }
 
 // Get all cell ranges that are referenced by the selected chart objects.
-void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, bool& rOneOle, std::vector<ScRange>* pRanges = nullptr, ScDocument* pDoc = nullptr )
+void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, bool& rOneOle, std::vector<ScRange>* pRanges = nullptr, const ScDocument* pDoc = nullptr )
 {
     bool bCalcSourceRanges = pRanges && pDoc;
     std::vector<OUString> aRangeReps;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index b7d24af70e47..4664aabacc54 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -787,7 +787,7 @@ bool ScDrawView::SelectObject( const OUString& rName )
 }
 
 //If  object  is marked , return true , else return false .
-bool ScDrawView::GetObjectIsMarked(  SdrObject* pObject  )
+bool ScDrawView::GetObjectIsMarked(  const SdrObject* pObject  )
 {
     bool bisMarked = false;
     if (pObject )
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 95ef51a6021c..25184309773b 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -1203,7 +1203,7 @@ OUString ScEditShell::GetSelectionText( bool bWholeWord )
     return aStrSelection;
 }
 
-void ScEditShell::ExecuteUndo(SfxRequest& rReq)
+void ScEditShell::ExecuteUndo(const SfxRequest& rReq)
 {
     //  Undo must be handled here because it's called for both EditViews
 
@@ -1283,7 +1283,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
     }
 }
 
-void ScEditShell::ExecuteTrans( SfxRequest& rReq )
+void ScEditShell::ExecuteTrans( const SfxRequest& rReq )
 {
     TransliterationFlags nType = ScViewUtil::GetTransliterationType( rReq.GetSlot() );
     if ( nType != TransliterationFlags::NONE )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index b62ac3b34496..8b77a4bfa87e 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2640,7 +2640,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
     }
 }
 
-void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq )
+void ScFormatShell::ExecuteTextDirection( const SfxRequest& rReq )
 {
     ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
     pTabViewShell->HideListBox();               // Autofilter-DropDown-Listbox
@@ -2753,7 +2753,7 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet )
     }
 }
 
-void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq )
+void ScFormatShell::ExecFormatPaintbrush( const SfxRequest& rReq )
 {
     ScViewFunc* pView = pViewData->GetView();
     if ( pView->HasPaintBrush() )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a09477ba2b61..329ba7a85d7d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -350,7 +350,7 @@ static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
     return (aCell.meType == CELLTYPE_FORMULA && aCell.mpFormula->GetMatrixOrigin(aPos) && aPos == rRange.aStart);
 }
 
-static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, ScViewData* pViewData )
+static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, const ScViewData* pViewData )
 {
     if (!pView || !pViewData)
         return;
@@ -3284,7 +3284,7 @@ bool ScGridWindow::DropScroll( const Point& rMousePos )
     return false;
 }
 
-static bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
+static bool lcl_TestScenarioRedliningDrop( const ScDocument* pDoc, const ScRange& aDragRange)
 {
     //  Test, if a scenario is affected by a drop when turing on RedLining,
     bool bReturn = false;
@@ -5564,7 +5564,7 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo
     return aRect.toString();
 }
 
-void ScGridWindow::updateLibreOfficeKitCellCursor(SfxViewShell* pOtherShell) const
+void ScGridWindow::updateLibreOfficeKitCellCursor(const SfxViewShell* pOtherShell) const
 {
     OString aCursor = getCellCursor(pViewData->GetZoomX(), pViewData->GetZoomY());
     ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -5697,7 +5697,7 @@ void ScGridWindow::UpdateCopySourceOverlay()
  *
  * @param pLogicRects - if not 0, then don't invoke the callback, just collect the rectangles in the pointed vector.
  */
-static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vector<tools::Rectangle>& rRectangles, std::vector<tools::Rectangle>* pLogicRects = nullptr)
+static void updateLibreOfficeKitSelection(const ScViewData* pViewData, const std::vector<tools::Rectangle>& rRectangles, std::vector<tools::Rectangle>* pLogicRects = nullptr)
 {
     if (!comphelper::LibreOfficeKit::isActive())
         return;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index eb5f702c85bf..97ff7c9cef00 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -253,7 +253,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S
     }
 }
 
-static void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData,
+static void lcl_DrawHighlight( ScOutputData& rOutputData, const ScViewData* pViewData,
                         const std::vector<ScHighlightEntry>& rHighlightRanges )
 {
     SCTAB nTab = pViewData->GetTabNo();
@@ -1055,7 +1055,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
 
 namespace {
     // Find the row/col just -before- the nPosition in pixels and its offset
-    inline void mapConservativeToRowCol(ScDocument *pDoc,
+    inline void mapConservativeToRowCol(const ScDocument *pDoc,
                                         sal_Int32  *nIndex,
                                         sal_Int32  *nOffset,
                                         sal_Int32  *nOrigin,
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index b1ed9e83f4f4..363cd5e8679d 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -438,7 +438,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
         Window::RequestHelp( rHEvt );
 }
 
-bool ScGridWindow::IsMyModel(SdrEditView* pSdrView)
+bool ScGridWindow::IsMyModel(const SdrEditView* pSdrView)
 {
     return pSdrView &&
             pSdrView->GetModel() == pViewData->GetDocument()->GetDrawLayer();
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index 9a1ffa400291..d2aff3a1380c 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -33,7 +33,7 @@ void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap,
     SvxIMapDlgChildWindow::UpdateIMapDlg( rGraphic, pImageMap, pTargetList, pEditingObj );
 }
 
-const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg )
+const void* ScIMapDlgGetObj( const SvxIMapDlg* pDlg )
 {
     if ( pDlg )
         return pDlg->GetEditingObject();
@@ -41,7 +41,7 @@ const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg )
         return nullptr;
 }
 
-const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg )
+const ImageMap& ScIMapDlgGetMap( const SvxIMapDlg* pDlg )
 {
     return pDlg->GetImageMap();
 }
diff --git a/sc/source/ui/view/imapwrap.hxx b/sc/source/ui/view/imapwrap.hxx
index c3733f5c8158..ed1897dbffc2 100644
--- a/sc/source/ui/view/imapwrap.hxx
+++ b/sc/source/ui/view/imapwrap.hxx
@@ -30,9 +30,9 @@ class SvxIMapDlg;
 
 sal_uInt16 ScIMapChildWindowId();
 
-ImageMap const & ScIMapDlgGetMap(SvxIMapDlg * pDlg);
+ImageMap const & ScIMapDlgGetMap(const SvxIMapDlg * pDlg);
 
-void const * ScIMapDlgGetObj(SvxIMapDlg * pDlg);
+void const * ScIMapDlgGetObj(const SvxIMapDlg * pDlg);
 
 void ScIMapDlgSet(
     Graphic const & rGraphic, ImageMap const * pImageMap,
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 348cfddcecc9..536c104f0ed7 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -113,7 +113,7 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
     Draw();
 }
 
-static void lcl_DrawWin( SdrObject* pObject, vcl::RenderContext* pWindow, const MapMode& rMap )
+static void lcl_DrawWin( const SdrObject* pObject, vcl::RenderContext* pWindow, const MapMode& rMap )
 {
     MapMode aOld = pWindow->GetMapMode();
     pWindow->SetMapMode( rMap );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 87e495fac4bc..94e3f55d7b5c 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -668,7 +668,7 @@ void ScOutputData::SetCellRotations()
     }
 }
 
-static ScRotateDir lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+static ScRotateDir lcl_GetRotateDir( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
 {
     const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
     const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
@@ -701,7 +701,7 @@ static ScRotateDir lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, S
     return nRet;
 }
 
-static const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+static const SvxBrushItem* lcl_FindBackground( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
 {
     const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
     const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
@@ -1336,12 +1336,12 @@ void ScOutputData::DrawClear()
 
 // Lines
 
-long lclGetSnappedX( OutputDevice& rDev, long nPosX, bool bSnapPixel )
+long lclGetSnappedX( const OutputDevice& rDev, long nPosX, bool bSnapPixel )
 {
     return (bSnapPixel && nPosX) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( nPosX, 0 ) ) ).Width() : nPosX;
 }
 
-long lclGetSnappedY( OutputDevice& rDev, long nPosY, bool bSnapPixel )
+long lclGetSnappedY( const OutputDevice& rDev, long nPosY, bool bSnapPixel )
 {
     return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY;
 }
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 7658a3765fe1..a5b0dfece4a9 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -827,7 +827,7 @@ double ScOutputData::GetStretch()
 
 //  output strings
 
-static void lcl_DoHyperlinkResult( OutputDevice* pDev, const tools::Rectangle& rRect, ScRefCellValue& rCell )
+static void lcl_DoHyperlinkResult( const OutputDevice* pDev, const tools::Rectangle& rRect, ScRefCellValue& rCell )
 {
     vcl::PDFExtOutDevData* pPDFData = dynamic_cast< vcl::PDFExtOutDevData* >( pDev->GetExtOutDevData() );
 
@@ -879,7 +879,7 @@ static void lcl_SetEditColor( EditEngine& rEngine, const Color& rColor )
     // function is called with update mode set to FALSE
 }
 
-void ScOutputData::SetEditSyntaxColor( EditEngine& rEngine, ScRefCellValue& rCell )
+void ScOutputData::SetEditSyntaxColor( EditEngine& rEngine, const ScRefCellValue& rCell )
 {
     Color aColor;
     switch (rCell.meType)
@@ -1050,7 +1050,7 @@ inline bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAtt
 }
 
 static inline void lcl_CreateInterpretProgress( bool& bProgress, ScDocument* pDoc,
-        ScFormulaCell* pFCell )
+        const ScFormulaCell* pFCell )
 {
     if ( !bProgress && pFCell->GetDirty() )
     {
@@ -2347,7 +2347,7 @@ ScOutputData::DrawEditParam::DrawEditParam(const ScPatternAttr* pPattern, const
 {}
 
 bool ScOutputData::DrawEditParam::readCellContent(
-    ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields)
+    const ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields)
 {
     if (maCell.meType == CELLTYPE_EDIT)
     {
@@ -2544,7 +2544,7 @@ bool ScOutputData::DrawEditParam::isVerticallyOriented() const
 }
 
 void ScOutputData::DrawEditParam::calcStartPosForVertical(
-    Point& rLogicStart, long nCellWidth, long nEngineWidth, long nTopM, OutputDevice* pRefDevice)
+    Point& rLogicStart, long nCellWidth, long nEngineWidth, long nTopM, const OutputDevice* pRefDevice)
 {
     OSL_ENSURE(isVerticallyOriented(), "Use this only for vertically oriented cell!");
 
@@ -2713,7 +2713,7 @@ void ScOutputData::DrawEditParam::adjustForRTL()
     }
 }
 
-void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, OutputDevice* pDev)
+void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, const OutputDevice* pDev)
 {
     // PDF: whole-cell hyperlink from formula?
     vcl::PDFExtOutDevData* pPDFData = dynamic_cast<vcl::PDFExtOutDevData* >( pDev->GetExtOutDevData() );
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index 185000c9c866..b3d09b124a73 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -71,7 +71,7 @@ ScPivotShell::~ScPivotShell()
 {
 }
 
-void ScPivotShell::Execute( SfxRequest& rReq )
+void ScPivotShell::Execute( const SfxRequest& rReq )
 {
     switch ( rReq.GetSlot() )
     {
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index f8091dcdff64..985a8c92adb9 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -69,7 +69,7 @@
 
 #define SC_PREVIEW_SHADOWSIZE   2
 
-static long lcl_GetDisplayStart( SCTAB nTab, ScDocument* pDoc, std::vector<long>& nPages )
+static long lcl_GetDisplayStart( SCTAB nTab, const ScDocument* pDoc, std::vector<long>& nPages )
 {
     long nDisplayStart = 0;
     for (SCTAB i=0; i<nTab; i++)
@@ -791,7 +791,7 @@ long ScPreview::GetFirstPage(SCTAB nTabP)
     return nPage;
 }
 
-static Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab )
+static Size lcl_GetDocPageSize( const ScDocument* pDoc, SCTAB nTab )
 {
     OUString aName = pDoc->GetPageStyle( nTab );
     ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index ebdc9edb15ba..8305df3b532c 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -382,7 +382,7 @@ void ScPrintFunc::SetDrawView( FmFormView* pNew )
     pDrawView = pNew;
 }
 
-static void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
+static void lcl_HidePrint( const ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
 {
     for (SCSIZE nArrY=1; nArrY+1<rTabInfo.mnArrCount; nArrY++)
     {
@@ -1099,7 +1099,7 @@ static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut,
         pOut->Pop();
 }
 
-static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOut, OutputDevice* pRefDev,
+static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOut, const OutputDevice* pRefDev,
                         const tools::Rectangle &rOrg, const tools::Rectangle &rOut,
                         OUString const & referer )
 {
@@ -2943,7 +2943,7 @@ void ScPrintFunc::ResetBreaks( SCTAB nTab )         // Set Breaks correctly for
     pDoc->UpdatePageBreaks( nTab );
 }
 
-static void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowEntry,
+static void lcl_SetHidden( const ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowEntry,
                     SCCOL nStartCol, const std::vector< SCCOL >& rPageEndX )
 {
     size_t nPagesX   = rPageRowEntry.GetPagesX();
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 9be4c1747916..8f0c2941f7ac 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -71,7 +71,7 @@ SfxChildWinInfo ScValidityRefChildWin::GetInfo() const
 
 namespace
 {
-    ScTabViewShell* lcl_GetTabViewShell( SfxBindings* pBindings );
+    ScTabViewShell* lcl_GetTabViewShell( const SfxBindings* pBindings );
 }
 
 #define IMPL_CHILD_CTOR(Class,sid) \
@@ -265,7 +265,7 @@ IMPL_CHILD_CTOR( ScHighlightChgDlgWrapper, FID_CHG_SHOW )
 
 namespace
 {
-    ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings )
+    ScTabViewShell * lcl_GetTabViewShell( const SfxBindings *pBindings )
     {
         if( pBindings )
             if( SfxDispatcher* pDisp = pBindings ->GetDispatcher() )
@@ -279,7 +279,7 @@ namespace
 
 ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window*               pParentP,
                                              sal_uInt16             nId,
-                                             SfxBindings*       p,
+                                             const SfxBindings*     p,
                                              SAL_UNUSED_PARAMETER SfxChildWinInfo* /*pInfo*/ )
                                              : SfxChildWindow(pParentP, nId),
                                              m_bVisibleLock( false ),
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index d90551a882ca..93a77fe2d176 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -501,7 +501,7 @@ void ScTabControl::DoDrag()
     pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
 }
 
-static sal_uInt16 lcl_DocShellNr( ScDocument* pDoc )
+static sal_uInt16 lcl_DocShellNr( const ScDocument* pDoc )
 {
     sal_uInt16 nShellCnt = 0;
     SfxObjectShell* pShell = SfxObjectShell::GetFirst();
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index b242a90557cc..c509f5674cfc 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -23,7 +23,7 @@
 
 #include <vcl/settings.hxx>
 
-ScTabSplitter::ScTabSplitter( vcl::Window* pParent, WinBits nWinStyle, ScViewData* pData ) :
+ScTabSplitter::ScTabSplitter( vcl::Window* pParent, WinBits nWinStyle, const ScViewData* pData ) :
     Splitter(pParent, nWinStyle),
     pViewData(pData)
 {
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index ec7c3bb0973a..27e9e45cc1e3 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -922,7 +922,7 @@ void ScTabView::ActiveGrabFocus()
         pGridWin[ePos]->GrabFocus();
 }
 
-ScSplitPos ScTabView::FindWindow( vcl::Window* pWindow ) const
+ScSplitPos ScTabView::FindWindow( const vcl::Window* pWindow ) const
 {
     ScSplitPos eVal = SC_SPLIT_BOTTOMLEFT;      // Default
     for (sal_uInt16 i=0; i<4; i++)
@@ -1343,7 +1343,7 @@ void ScTabView::ScrollLines( long nDeltaX, long nDeltaY )
 namespace
 {
 
-SCROW lcl_LastVisible( ScViewData& rViewData )
+SCROW lcl_LastVisible( const ScViewData& rViewData )
 {
     // If many rows are hidden at end of the document (what kind of idiot does that?),
     // then there should not be a switch to wide row headers because of this
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 84f19b96ff46..a312d2e7a685 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -49,7 +49,7 @@
 
 namespace {
 
-bool isCellQualified(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, bool bSelectLocked, bool bSelectUnlocked)
+bool isCellQualified(const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, bool bSelectLocked, bool bSelectUnlocked)
 {
     bool bCellProtected = pDoc->HasAttrib(
         nCol, nRow, nTab, nCol, nRow, nTab, HasAttrFlags::Protected);
@@ -64,7 +64,7 @@ bool isCellQualified(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, bool
 }
 
 void moveCursorByProtRule(
-    SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, SCTAB nTab, ScDocument* pDoc)
+    SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, SCTAB nTab, const ScDocument* pDoc)
 {
     bool bSelectLocked = true;
     bool bSelectUnlocked = true;
@@ -187,7 +187,7 @@ bool checkBoundary(SCCOL& rCol, SCROW& rRow)
 
 void moveCursorByMergedCell(
     SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, SCTAB nTab,
-    ScDocument* pDoc, const ScViewData& rViewData)
+    const ScDocument* pDoc, const ScViewData& rViewData)
 {
     SCCOL nOrigX = rViewData.GetCurX();
     SCROW nOrigY = rViewData.GetCurY();
@@ -1121,7 +1121,7 @@ void ScTabView::DeselectAllTables()
 }
 
 static bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom,
-                        long nWindowX, long nWindowY, ScDocument* pDoc, SCTAB nTab,
+                        long nWindowX, long nWindowY, const ScDocument* pDoc, SCTAB nTab,
                         SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
                         SCCOL nFixPosX, SCROW nFixPosY )
 {
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 07d234ecf293..ae53dd3d321a 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2352,7 +2352,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
     // is set (width or height changed).
 }
 
-void ScTabView::PaintRangeFinderEntry (ScRangeFindData* pData, const SCTAB nTab)
+void ScTabView::PaintRangeFinderEntry (const ScRangeFindData* pData, const SCTAB nTab)
 {
     ScRange aRef = pData->aRef;
     aRef.PutInOrder();                 // PutInOrder for the queries below
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 1b383f394e58..332c4711d840 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -340,7 +340,7 @@ void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible,
     rScroll.EnableRTL( bLayoutRTL );
 }
 
-long ScTabView::GetScrollBarPos( ScrollBar& rScroll )
+long ScTabView::GetScrollBarPos( const ScrollBar& rScroll )
 {
     return rScroll.GetThumbPos();
 }
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 88cba7440784..233dc6aee8c7 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -527,7 +527,7 @@ void ScTabView::DigitLanguageChanged()
             pWin->SetDigitLanguage( eNewLang );
 }
 
-void ScTabView::ScrollToObject( SdrObject* pDrawObj )
+void ScTabView::ScrollToObject( const SdrObject* pDrawObj )
 {
     if ( pDrawObj )
     {
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 1c934ffa14dc..f61f2fafabb9 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -109,7 +109,7 @@ SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
     SFX_VIEW_REGISTRATION(ScDocShell);
 }
 
-OUString ScTabViewShell::GetFormula(ScAddress& rAddress)
+OUString ScTabViewShell::GetFormula(const ScAddress& rAddress)
 {
     OUString sFormula;
     ScDocument* pDoc = GetViewData().GetDocument();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index f477bf941440..37af6223b9e0 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -86,7 +86,7 @@ namespace
     };
 
     ScRefFlagsAndType lcl_ParseRangeOrAddress(ScRange& rScRange, ScAddress& rScAddress,
-                                              const OUString& aAddress, ScDocument* pDoc)
+                                              const OUString& aAddress, const ScDocument* pDoc)
     {
         ScRefFlagsAndType aRet;
 
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 83553e9ce839..244aec9bfc06 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1090,7 +1090,7 @@ IMPL_LINK_NOARG(ScTabViewShell, SimpleRefClose, const OUString*, void)
 
 // handlers to call UNO listeners:
 
-static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
+static ScTabViewObj* lcl_GetViewObj( const ScTabViewShell& rShell )
 {
     ScTabViewObj* pRet = nullptr;
     SfxViewFrame* pViewFrame = rShell.GetViewFrame();
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index a75efc3e9f71..c273b642d308 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -310,7 +310,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
     SfxViewShell::Notify( rBC, rHint );
 }
 
-SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewData* pViewData )
+SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, const ScViewData* pViewData )
 {
 
     // construct NumberInfo item
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index bd59e6df9fa2..d86a7349f238 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -42,7 +42,7 @@
 
 class SvxIMapDlg;
 
-void ScTabViewShell::ExecChildWin(SfxRequest& rReq)
+void ScTabViewShell::ExecChildWin(const SfxRequest& rReq)
 {
     sal_uInt16 nSlot = rReq.GetSlot();
     switch(nSlot)
@@ -60,7 +60,7 @@ void ScTabViewShell::ExecChildWin(SfxRequest& rReq)
     }
 }
 
-void ScTabViewShell::ExecGallery( SfxRequest& rReq )
+void ScTabViewShell::ExecGallery( const SfxRequest& rReq )
 {
     const SfxItemSet* pArgs = rReq.GetArgs();
 
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 49754e374a06..be117bfbae5e 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -750,7 +750,7 @@ void ScTabViewShell::GetSaveState( SfxItemSet& rSet )
     }
 }
 
-void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
+void ScTabViewShell::ExecDrawOpt( const SfxRequest& rReq )
 {
     ScViewOptions aViewOptions = GetViewData().GetOptions();
     ScGridOptions aGridOptions = aViewOptions.GetGridOptions();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 5523b733b65a..e709aa738c3e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -69,7 +69,7 @@
 
 using namespace com::sun::star;
 
-void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
+void ScTabViewShell::ConnectObject( const SdrOle2Obj* pObj )
 {
     // is called from paint
 
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 9e0f2b0220bd..4eaca7a70f58 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -121,7 +121,7 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialog* pDialog)
 
 VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
                                 SfxBindings* pB, SfxChildWindow* pCW,
-                                SfxChildWinInfo* pInfo,
+                                const SfxChildWinInfo* pInfo,
                                 vcl::Window* pParent, sal_uInt16 nSlotId )
 {
     // only open dialog when called through ScModule::SetRefDialog,
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 316c81ce3926..6d4bac505d39 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -40,7 +40,7 @@
 
 using namespace com::sun::star;
 
-void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
+void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
 {
     sal_uInt16 nSlotId = rReq.GetSlot();
     const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -130,7 +130,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
     }
 }
 
-static uno::Reference < embed::XEmbeddedObject > lcl_GetSelectedObj( SdrView* pDrView )       //! member of ScDrawView?
+static uno::Reference < embed::XEmbeddedObject > lcl_GetSelectedObj( const SdrView* pDrView )       //! member of ScDrawView?
 {
     uno::Reference < embed::XEmbeddedObject > xRet;
     if (pDrView)
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 0d7d4968a76d..4294c55c1a07 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -812,7 +812,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
     return false;
 }
 
-static bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+static bool lcl_SelHasAttrib( const ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
                         const ScMarkData& rTabSelection, HasAttrFlags nMask )
 {
     ScMarkData::const_iterator itr = rTabSelection.begin(), itrEnd = rTabSelection.end();


More information about the Libreoffice-commits mailing list