[Libreoffice-commits] core.git: 2 commits - filter/source formula/source include/filter include/formula

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 4 06:16:30 UTC 2019


 filter/source/flash/swfwriter.hxx               |    2 +-
 filter/source/graphicfilter/icgm/cgm.cxx        |    2 +-
 filter/source/graphicfilter/icgm/cgm.hxx        |    2 +-
 filter/source/graphicfilter/icgm/chart.cxx      |    2 +-
 filter/source/graphicfilter/icgm/chart.hxx      |    2 +-
 filter/source/graphicfilter/ios2met/ios2met.cxx |    4 ++--
 filter/source/msfilter/mstoolbar.cxx            |    4 ++--
 filter/source/msfilter/svdfppt.cxx              |    2 +-
 filter/source/svg/svgwriter.hxx                 |    2 +-
 filter/source/xsltfilter/LibXSLTTransformer.hxx |    6 +++---
 formula/source/core/api/token.cxx               |    2 +-
 formula/source/ui/dlg/ControlHelper.hxx         |    4 ++--
 formula/source/ui/dlg/funcpage.cxx              |    6 +++---
 formula/source/ui/dlg/funcpage.hxx              |    8 ++++----
 formula/source/ui/dlg/funcutl.cxx               |    4 ++--
 formula/source/ui/dlg/parawin.cxx               |    4 ++--
 formula/source/ui/dlg/parawin.hxx               |    6 +++---
 formula/source/ui/dlg/structpg.cxx              |    6 +++---
 formula/source/ui/dlg/structpg.hxx              |   10 +++++-----
 include/filter/msfilter/escherex.hxx            |    6 +++---
 include/filter/msfilter/mstoolbar.hxx           |   20 ++++++++++----------
 include/filter/msfilter/svdfppt.hxx             |    2 +-
 include/formula/tokenarray.hxx                  |    6 +++---
 23 files changed, 56 insertions(+), 56 deletions(-)

New commits:
commit 2c7aa60b69967a80b7874503f0e9e85546a04cde
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Sep 3 16:17:03 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 4 08:16:00 2019 +0200

    loplugin:constmethod in filter
    
    Change-Id: Ib337c45c0ee7de881313b000bf2f8d816fd17884
    Reviewed-on: https://gerrit.libreoffice.org/78565
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 7d65a21a20fa..ecb04e9dd0ce 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -145,7 +145,7 @@ public:
     void write( SvStream& out );
 
     sal_uInt16 getID() const { return mnId; }
-    const vcl::Font& getFont() { return maFont; }
+    const vcl::Font& getFont() const { return maFont; }
 
 private:
     const vcl::Font maFont;
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 22240779768d..8122d399eaa6 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -75,7 +75,7 @@ CGM::~CGM()
     maDefRepSizeList.clear();
 };
 
-sal_uInt32 CGM::GetBackGroundColor()
+sal_uInt32 CGM::GetBackGroundColor() const
 {
     return pElement ? pElement->aColorTable[ 0 ] : 0;
 }
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 388b5eea3dcc..19773b9117c1 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -133,7 +133,7 @@ class CGM
                             ~CGM();
 
                             CGM(css::uno::Reference< css::frame::XModel > const & rModel);
-        sal_uInt32          GetBackGroundColor();
+        sal_uInt32          GetBackGroundColor() const;
         bool                IsValid() const { return mbStatus; };
         bool                IsFinished() const { return mbIsFinished; };
         bool                Write( SvStream& rIStm );
diff --git a/filter/source/graphicfilter/icgm/chart.cxx b/filter/source/graphicfilter/icgm/chart.cxx
index 845fab4e0d77..439d941c33ad 100644
--- a/filter/source/graphicfilter/icgm/chart.cxx
+++ b/filter/source/graphicfilter/icgm/chart.cxx
@@ -50,7 +50,7 @@ void CGMChart::ResetAnnotation()
     mDataNode[ 0 ].nZoneEnum = 0;
 }
 
-bool CGMChart::IsAnnotation()
+bool CGMChart::IsAnnotation() const
 {
     return ( mDataNode[ 0 ].nZoneEnum == 0 );
 }
diff --git a/filter/source/graphicfilter/icgm/chart.hxx b/filter/source/graphicfilter/icgm/chart.hxx
index 837015614696..839be2e4a196 100644
--- a/filter/source/graphicfilter/icgm/chart.hxx
+++ b/filter/source/graphicfilter/icgm/chart.hxx
@@ -74,7 +74,7 @@ class CGMChart final
         void                    InsertTextEntry( std::unique_ptr<TextEntry> );
 
         void                    ResetAnnotation();
-        bool                    IsAnnotation();
+        bool                    IsAnnotation() const;
 };
 
 #endif
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index f1d8e5661083..236506aff7cc 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -378,7 +378,7 @@ private:
     Color GetPaletteColor(sal_uInt32 nIndex);
 
 
-    bool    IsLineInfo();
+    bool        IsLineInfo() const;
     void        DrawPolyLine( const tools::Polygon& rPolygon );
     void        DrawPolygon( const tools::Polygon& rPolygon );
     void        DrawPolyPolygon( const tools::PolyPolygon& rPolygon );
@@ -491,7 +491,7 @@ OS2METReader::~OS2METReader()
     }
 }
 
-bool OS2METReader::IsLineInfo()
+bool OS2METReader::IsLineInfo() const
 {
     return ( ! ( aLineInfo.IsDefault() || ( aLineInfo.GetStyle() == LineStyle::NONE ) || ( pVirDev->GetLineColor() == COL_TRANSPARENT ) ) );
 }
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index d8ddc076caec..7d8e25cbdeed 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -437,7 +437,7 @@ TBCExtraInfo::Print( FILE* fp )
 #endif
 
 OUString const &
-TBCExtraInfo::getOnAction()
+TBCExtraInfo::getOnAction() const
 {
     return wstrOnAction.getString();
 }
@@ -764,7 +764,7 @@ bool TB::Read(SvStream &rS)
 
 }
 
-bool TB::IsEnabled()
+bool TB::IsEnabled() const
 {
     return ( bFlags & 0x01 ) != 0x01;
 }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a9db1f9bfec4..3d47c924bc66 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5456,7 +5456,7 @@ PPTPortionObj::~PPTPortionObj()
 {
 }
 
-bool PPTPortionObj::HasTabulator()
+bool PPTPortionObj::HasTabulator() const
 {
     bool bRetValue =    false;
     sal_Int32           nCount;
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index f6ea72fd539c..f0271ed4090b 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -265,7 +265,7 @@ class SVGTextWriter final
     bool nextParagraph();
     bool nextTextPortion();
 
-    bool isTextShapeStarted() { return mbIsTextShapeStarted; }
+    bool isTextShapeStarted() const { return mbIsTextShapeStarted; }
     void startTextShape();
     void endTextShape();
     void startTextParagraph();
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index 2b31a87914bd..d646d5dbfc43 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -162,13 +162,13 @@ namespace XSLT
         error(const OUString& msg);
 
         const OString&
-        getStyleSheetURL() { return m_styleSheetURL; }
+        getStyleSheetURL() const { return m_styleSheetURL; }
 
         const ::std::map<const char*, OString>&
-        getParameters() { return m_parameters; }
+        getParameters() const { return m_parameters; }
 
         const css::uno::Reference<css::uno::XComponentContext>&
-        getComponentContext() {
+        getComponentContext() const {
             return m_xContext;
         }
 
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index 729e98835a63..c723318ebff6 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -600,7 +600,7 @@ public:
     bool        GetPrefSize( const sal_uInt32 nBlibId, Size& rSize, MapMode& rMapMode );
 
     void        SetBaseURI( const OUString& rBaseURI ) { maBaseURI = rBaseURI; };
-    const OUString& GetBaseURI() { return maBaseURI; };
+    const OUString& GetBaseURI() const { return maBaseURI; };
 
     EscherGraphicProvider( EscherGraphicProviderFlags nFlags  = EscherGraphicProviderFlags::NONE );
     virtual ~EscherGraphicProvider();
@@ -922,7 +922,7 @@ public:
     {
         mpHyperlinkRecord.reset( pStream );
     }
-    const std::unique_ptr< SvMemoryStream >&  getHyperlinkRecord() { return mpHyperlinkRecord; }
+    const std::unique_ptr< SvMemoryStream >&  getHyperlinkRecord() const { return mpHyperlinkRecord; }
 };
 
 class EscherExHostAppData
@@ -1125,7 +1125,7 @@ public:
     void            InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue );   // nValue is being inserted into the Stream where it's appropriate (overwrite mode), without that the
                                                                                     // current StreamPosition changes
     void            SetEditAs( const OUString& rEditAs );
-    const OUString& GetEditAs() { return mEditAs; }
+    const OUString& GetEditAs() const { return mEditAs; }
     SvStream&       GetStream() const   { return *mpOutStrm; }
     sal_uLong       GetStreamPos() const    { return mpOutStrm->Tell(); }
 
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 810306149b89..3e546c8dcdb1 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -58,7 +58,7 @@ public:
 
     void setMSOCommandMap( MSOCommandConvertor* pCnvtr ) { pMSOCmdConvertor.reset( pCnvtr ); }
     css::uno::Reference< css::ui::XUIConfigurationManager > getCfgManager();
-    const css::uno::Reference< css::ui::XUIConfigurationManager >& getAppCfgManager() { return m_xAppCfgMgr;}
+    const css::uno::Reference< css::ui::XUIConfigurationManager >& getAppCfgManager() const { return m_xAppCfgMgr;}
 
 
     static css::uno::Any createCommandFromMacro( const OUString& sCmd );
@@ -93,7 +93,7 @@ public:
 #ifdef DEBUG_FILTER_MSTOOLBAR
     virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output
 #endif
-    sal_uInt32 GetOffset() { return nOffSet; }
+    sal_uInt32 GetOffset() const { return nOffSet; }
 };
 
 class Indent
@@ -117,7 +117,7 @@ class MSFILTER_DLLPUBLIC WString : public TBBase
 public:
     WString(){};
     bool Read(SvStream &rS) override;
-    const OUString& getString(){ return sString; }
+    const OUString& getString() const { return sString; }
 };
 
 class MSFILTER_DLLPUBLIC TBCExtraInfo : public TBBase
@@ -138,7 +138,7 @@ public:
 #ifdef DEBUG_FILTER_MSTOOLBAR
     virtual void Print( FILE* ) override;
 #endif
-    OUString const & getOnAction();
+    OUString const & getOnAction() const;
 };
 
 class MSFILTER_DLLPUBLIC TBCGeneralInfo  : public TBBase
@@ -267,13 +267,13 @@ public:
 
     sal_uInt8 getTct() const { return tct; }
     sal_uInt16 getTcID() const { return tcid; }
-    bool isVisible() { return !( bFlagsTCR & 0x1 ); }
-    bool isBeginGroup() { return ( bFlagsTCR & 0x2 ) != 0; }
+    bool isVisible() const { return !( bFlagsTCR & 0x1 ); }
+    bool isBeginGroup() const { return ( bFlagsTCR & 0x2 ) != 0; }
     bool Read(SvStream &rS) override;
 #ifdef DEBUG_FILTER_MSTOOLBAR
     virtual void Print( FILE* ) override;
 #endif
-    sal_uInt32 getTbct() { return tbct; };
+    sal_uInt32 getTbct() const { return tbct; };
 };
 
 class MSFILTER_DLLPUBLIC TBCData : public TBBase
@@ -310,10 +310,10 @@ public:
 #ifdef DEBUG_FILTER_MSTOOLBAR
     virtual void Print( FILE* ) override;
 #endif
-    sal_Int16 getcCL(){ return cCL; }
+    sal_Int16 getcCL() const { return cCL; }
     WString& getName(){ return name; }
-    bool IsEnabled();
-    bool IsMenuToolbar(){ return ( ( ltbtr & 0x2000000 ) == 0x2000000 ); }
+    bool IsEnabled() const;
+    bool IsMenuToolbar() const { return ( ( ltbtr & 0x2000000 ) == 0x2000000 ); }
 };
 
 class MSFILTER_DLLPUBLIC SRECT : public TBBase
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 3261c25f4a8c..7252edf58dcb 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -1131,7 +1131,7 @@ public:
                         const PPTTextObj* pTextObj
                     );
     sal_uInt32      Count() const { return mpFieldItem ? 1 : maString.getLength(); };
-    bool            HasTabulator();
+    bool            HasTabulator() const;
 };
 
 class MSFILTER_DLLPUBLIC PPTParagraphObj
commit 00b8b9e5c478bd6eab55a07982e0d5ad27be456d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Sep 3 16:16:30 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 4 08:15:50 2019 +0200

    loplugin:constmethod in formula
    
    Change-Id: Iae40405e7805b7c7ce3ce7f4b3653094fd49f396
    Reviewed-on: https://gerrit.libreoffice.org/78564
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 8069863ca503..3d466feef5ea 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -888,7 +888,7 @@ void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits )
 }
 
 
-bool FormulaTokenArray::HasMatrixDoubleRefOps()
+bool FormulaTokenArray::HasMatrixDoubleRefOps() const
 {
     if ( pRPN && nRPN )
     {
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 5e3811f90fa6..fbc7e49cfda6 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -79,11 +79,11 @@ public:
                              RefButton* prefBtn);
 
     void        SetArgName(const OUString &aArg);
-    OUString    GetArgName();
+    OUString    GetArgName() const;
     void        SetArgNameFont(const vcl::Font&);
 
     void        SetArgVal(const OUString &aVal);
-    OUString    GetArgVal();
+    OUString    GetArgVal() const;
 
     void        SelectAll();
 
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index 8b12e82e2707..92cb584fc99c 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -240,17 +240,17 @@ void FuncPage::SetFocus()
     m_xLbFunction->grab_focus();
 }
 
-sal_Int32 FuncPage::GetCategory()
+sal_Int32 FuncPage::GetCategory() const
 {
     return m_xLbCategory->get_active();
 }
 
-sal_Int32 FuncPage::GetFunction()
+sal_Int32 FuncPage::GetFunction() const
 {
     return m_xLbFunction->get_selected_index();
 }
 
-sal_Int32 FuncPage::GetFunctionEntryCount()
+sal_Int32 FuncPage::GetFunctionEntryCount() const
 {
     return m_xLbFunction->n_children();
 }
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 71aba3e1a324..41dfae60a6a4 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -67,9 +67,9 @@ public:
     void            SetCategory(sal_Int32  nCat);
     void            SetFunction(sal_Int32  nFunc);
     void            SetFocus();
-    sal_Int32       GetCategory();
-    sal_Int32       GetFunction();
-    sal_Int32       GetFunctionEntryCount();
+    sal_Int32       GetCategory() const;
+    sal_Int32       GetFunction() const;
+    sal_Int32       GetFunctionEntryCount() const;
 
     sal_Int32       GetFuncPos(const IFunctionDescription* _pDesc);
     const IFunctionDescription* GetFuncDesc( sal_Int32  nPos ) const;
@@ -79,7 +79,7 @@ public:
 
     void            SetSelectHdl( const Link<FuncPage&,void>& rLink ) { aSelectionLink = rLink; }
 
-    bool            IsVisible() { return m_xContainer->get_visible(); }
+    bool            IsVisible() const { return m_xContainer->get_visible(); }
 };
 
 } // formula
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index b1a37292728f..0d8a8656afd4 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -167,7 +167,7 @@ void ArgInput::SetArgName(const OUString &aArg)
 }
 
 // Returns the Name for the Argument
-OUString ArgInput::GetArgName()
+OUString ArgInput::GetArgName() const
 {
     OUString aPrivArgName;
     if (pFtArg)
@@ -197,7 +197,7 @@ void ArgInput::SetArgVal(const OUString &rVal)
 }
 
 //Returns the Value for the Argument
-OUString ArgInput::GetArgVal()
+OUString ArgInput::GetArgVal() const
 {
     OUString aResult;
     if (pEdArg)
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index a255041abca8..4cc3597c4f99 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -276,7 +276,7 @@ OUString ParaWin::GetArgument(sal_uInt16 no)
     return aStr;
 }
 
-OUString  ParaWin::GetActiveArgName()
+OUString  ParaWin::GetActiveArgName() const
 {
     OUString aStr;
     if(nArgs>0 && nEdFocus!=NOT_FOUND)
@@ -448,7 +448,7 @@ void ParaWin::UpdateParas()
 }
 
 
-sal_uInt16 ParaWin::GetSliderPos()
+sal_uInt16 ParaWin::GetSliderPos() const
 {
     return static_cast<sal_uInt16>(m_xSlider->vadjustment_get_value());
 }
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index a4dfa71e9c3e..bcd836c221dc 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -118,17 +118,17 @@ public:
         void            UpdateParas();
         void            ClearAll();
 
-        sal_uInt16      GetActiveLine() { return nActiveLine;}
+        sal_uInt16      GetActiveLine() const { return nActiveLine;}
         void            SetActiveLine(sal_uInt16 no);
         RefEdit*    GetActiveEdit();
-        OUString        GetActiveArgName();
+        OUString        GetActiveArgName() const;
 
         OUString        GetArgument(sal_uInt16 no);
         void            SetArgument(sal_uInt16 no, const OUString& aString);
         void            SetArgumentFonts(const vcl::Font& aBoldFont,const vcl::Font& aLightFont);
 
         void            SetEdFocus(); // visible edit lines
-        sal_uInt16      GetSliderPos();
+        sal_uInt16      GetSliderPos() const;
         void            SetSliderPos(sal_uInt16 nSliderPos);
 
         void            SetArgModifiedHdl( const Link<ParaWin&,void>& rLink ) { aArgModifiedLink = rLink; }
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 76d2f51fe0ad..f35d34a5a336 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -61,7 +61,7 @@ void StructPage::ClearStruct()
     m_xTlbStruct->clear();
 }
 
-bool StructPage::InsertEntry(const OUString& rText, weld::TreeIter* pParent,
+bool StructPage::InsertEntry(const OUString& rText, const weld::TreeIter* pParent,
                              sal_uInt16 nFlag, int nPos,
                              const FormulaToken* pIFormulaToken,
                              weld::TreeIter& rRet)
@@ -98,7 +98,7 @@ bool StructPage::InsertEntry(const OUString& rText, weld::TreeIter* pParent,
     return bEntry;
 }
 
-OUString StructPage::GetEntryText(weld::TreeIter* pEntry) const
+OUString StructPage::GetEntryText(const weld::TreeIter* pEntry) const
 {
     OUString aString;
     if (pEntry)
@@ -106,7 +106,7 @@ OUString StructPage::GetEntryText(weld::TreeIter* pEntry) const
     return aString;
 }
 
-const FormulaToken* StructPage::GetFunctionEntry(weld::TreeIter* pEntry)
+const FormulaToken* StructPage::GetFunctionEntry(const weld::TreeIter* pEntry)
 {
     if (pEntry)
     {
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index 38afd7172d24..1765254ccfe7 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -46,10 +46,10 @@ private:
 
     DECL_LINK(SelectHdl, weld::TreeView&, void);
 
-    const FormulaToken* GetFunctionEntry(weld::TreeIter* pEntry);
+    const FormulaToken* GetFunctionEntry(const weld::TreeIter* pEntry);
 
     void            SetActiveFlag(bool bFlag);
-    bool            GetActiveFlag() { return bActiveFlag;}
+    bool            GetActiveFlag() const { return bActiveFlag;}
 
 public:
 
@@ -57,18 +57,18 @@ public:
     ~StructPage();
 
     void            ClearStruct();
-    bool InsertEntry(const OUString& rText, weld::TreeIter* pParent,
+    bool InsertEntry(const OUString& rText, const weld::TreeIter* pParent,
                      sal_uInt16 nFlag, int nPos,
                      const FormulaToken* pIFormulaToken,
                      weld::TreeIter& rRet);
 
-    OUString        GetEntryText(weld::TreeIter* pEntry) const;
+    OUString        GetEntryText(const weld::TreeIter* pEntry) const;
 
     void            SetSelectionHdl( const Link<StructPage&,void>& rLink ) { aSelLink = rLink; }
 
     weld::TreeView&  GetTlbStruct() const { return *m_xTlbStruct; }
 
-    bool            IsVisible() { return m_xContainer->get_visible(); }
+    bool            IsVisible() const { return m_xContainer->get_visible(); }
 };
 
 } // formula
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index df82ceb1cb22..635e5c1f3907 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -429,11 +429,11 @@ public:
                                 { return (nMode & ScRecalcMode::EMask) <= ScRecalcMode::ONLOAD_ONCE; }
 
                             /** Get OpCode of the most outer function */
-    inline OpCode           GetOuterFuncOpCode();
+    inline OpCode           GetOuterFuncOpCode() const;
 
                             /** Operators +,-,*,/,^,&,=,<>,<,>,<=,>=
                                 with DoubleRef in Formula? */
-    bool                    HasMatrixDoubleRefOps();
+    bool                    HasMatrixDoubleRefOps() const;
 
     virtual FormulaToken* AddOpCode(OpCode e);
 
@@ -505,7 +505,7 @@ public:
     void ReinternStrings( svl::SharedStringPool& rPool );
 };
 
-inline OpCode FormulaTokenArray::GetOuterFuncOpCode()
+inline OpCode FormulaTokenArray::GetOuterFuncOpCode() const
 {
     if ( pRPN && nRPN )
         return pRPN[nRPN-1]->GetOpCode();


More information about the Libreoffice-commits mailing list