[Libreoffice-commits] core.git: hwpfilter/source scaddins/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Jul 18 06:20:22 UTC 2017


 hwpfilter/source/hpara.cxx                  |    2 +-
 hwpfilter/source/hpara.h                    |    2 +-
 hwpfilter/source/hstyle.cxx                 |    6 +++---
 hwpfilter/source/hstyle.h                   |    6 +++---
 hwpfilter/source/hwpeq.cxx                  |    8 ++++----
 hwpfilter/source/hwpeq.h                    |    2 +-
 hwpfilter/source/hwpfile.cxx                |    8 ++++----
 hwpfilter/source/hwpfile.h                  |    8 ++++----
 hwpfilter/source/hwpreader.cxx              |    6 +++---
 hwpfilter/source/hwpreader.hxx              |    6 +++---
 scaddins/source/analysis/analysishelper.hxx |    2 +-
 scaddins/source/datefunc/datefunc.hxx       |    2 +-
 scaddins/source/pricing/pricing.hxx         |    2 +-
 13 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 3ccaa4d9e9e18555e86e111259a4908413d36718
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jul 17 11:04:02 2017 +0200

    loplugin:constparams in scaddins,hwpfilter
    
    Change-Id: I91b3559b9c3f5d8837d182cf9406fad9aeee78b3
    Reviewed-on: https://gerrit.libreoffice.org/40049
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index 5d9dd47c3d24..6b43c3bbf827 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -29,7 +29,7 @@
 #include "hbox.h"
 #include "hutil.h"
 
-void LineInfo::Read(HWPFile & hwpf, HWPPara *pPara)
+void LineInfo::Read(HWPFile & hwpf, HWPPara const *pPara)
 {
     if (!hwpf.Read2b(pos))
         return;
diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h
index 55af7e98120b..894e81ffd137 100644
--- a/hwpfilter/source/hpara.h
+++ b/hwpfilter/source/hpara.h
@@ -69,7 +69,7 @@ struct LineInfo
     hunit         height_sp;
     unsigned short    softbreak;                  // column, page, section
 
-    void  Read(HWPFile &hwpf, HWPPara *para);
+    void  Read(HWPFile &hwpf, HWPPara const *para);
 };
 /**
  * It represents the paragraph.
diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index d43b3c8fc785..cc3ef07cc987 100644
--- a/hwpfilter/source/hstyle.cxx
+++ b/hwpfilter/source/hstyle.cxx
@@ -61,7 +61,7 @@ char *HWPStyle::GetName(int n) const
 }
 
 
-void HWPStyle::SetName(int n, char *name)
+void HWPStyle::SetName(int n, char const *name)
 {
     if (n >= 0 && n < nstyles)
     {
@@ -81,7 +81,7 @@ CharShape *HWPStyle::GetCharShape(int n) const
 }
 
 
-void HWPStyle::SetCharShape(int n, CharShape * cshapep)
+void HWPStyle::SetCharShape(int n, CharShape const * cshapep)
 {
     if (n >= 0 && n < nstyles)
     {
@@ -101,7 +101,7 @@ ParaShape *HWPStyle::GetParaShape(int n) const
 }
 
 
-void HWPStyle::SetParaShape(int n, ParaShape * pshapep)
+void HWPStyle::SetParaShape(int n, ParaShape const * pshapep)
 {
     if (n >= 0 && n < nstyles)
     {
diff --git a/hwpfilter/source/hstyle.h b/hwpfilter/source/hstyle.h
index c13523061a74..98b38a4a1840 100644
--- a/hwpfilter/source/hstyle.h
+++ b/hwpfilter/source/hstyle.h
@@ -41,9 +41,9 @@ class DLLEXPORT HWPStyle
         CharShape *GetCharShape( int n ) const;
         ParaShape *GetParaShape( int n ) const;
 
-        void SetName( int n, char *name );
-        void SetCharShape( int n, CharShape *cshapep );
-        void SetParaShape( int n, ParaShape *pshapep );
+        void SetName( int n, char const *name );
+        void SetCharShape( int n, CharShape const *cshapep );
+        void SetParaShape( int n, ParaShape const *pshapep );
 
         void Read( HWPFile &hwpf );
 };
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 519a4457dc03..5be9ad7c2603 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -388,7 +388,7 @@ static const hwpeq eq_tbl[] = {
   { "zeta",       nullptr,       0,  EQ_CASE }
 };
 
-static const hwpeq *lookup_eqn(char *str)
+static const hwpeq *lookup_eqn(char const *str)
 {
   static const int eqCount = SAL_N_ELEMENTS(eq_tbl);
   int l = 0, r = eqCount;
@@ -459,7 +459,7 @@ struct eq_stack {
   istream   *strm;
 
   eq_stack() { strm = nullptr; };
-  bool state(istream *s) {
+  bool state(istream const *s) {
     if( strm != s) { white = nullptr; token = nullptr; }
     return token.length() != 0;
   }
@@ -467,7 +467,7 @@ struct eq_stack {
 
 static eq_stack *stk = nullptr;
 
-void push_token(MzString &white, MzString &token, istream *strm)
+void push_token(MzString const &white, MzString const &token, istream *strm)
 {
   // one time stack
   assert(stk->token.length() == 0);
@@ -749,7 +749,7 @@ static char eq2ltxconv(MzString& sstr, istream *strm, const char *sentinel)
   return token[0];
 }
 
-void eq2latex(MzString& outs, char *s)
+void eq2latex(MzString& outs, char const *s)
 {
   assert(s);
   if( stk == nullptr )
diff --git a/hwpfilter/source/hwpeq.h b/hwpfilter/source/hwpeq.h
index f5ab84a557fe..07e62ab7f985 100644
--- a/hwpfilter/source/hwpeq.h
+++ b/hwpfilter/source/hwpeq.h
@@ -22,7 +22,7 @@
 
 #include "mzstring.h"
 
-void eq2latex(MzString &mstr, char *str);
+void eq2latex(MzString &mstr, char const *str);
 
 #endif // INCLUDED_HWPFILTER_SOURCE_HWPEQ_H
 
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 8507b5056e20..43fad53c3829 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -520,7 +520,7 @@ Table *HWPFile::getTable(int index)
     return tables[index];
 }
 
-void HWPFile::AddParaShape(std::shared_ptr<ParaShape>& pshape)
+void HWPFile::AddParaShape(std::shared_ptr<ParaShape> const & pshape)
 {
     int nscount = 0;
     for(int j = 0 ; j < MAXTABS-1 ; j++)
@@ -552,7 +552,7 @@ void HWPFile::AddParaShape(std::shared_ptr<ParaShape>& pshape)
         pshape->index = value;
 }
 
-void HWPFile::AddCharShape(std::shared_ptr<CharShape>& cshape)
+void HWPFile::AddCharShape(std::shared_ptr<CharShape> const & cshape)
 {
     int value = compareCharShape(cshape.get());
     if (value == 0)
@@ -606,7 +606,7 @@ void HWPFile::AddFBoxStyle(FBoxStyle * fbstyle)
     fbslist.push_back(fbstyle);
 }
 
-int HWPFile::compareCharShape(CharShape *shape)
+int HWPFile::compareCharShape(CharShape const *shape)
 {
     int count = cslist.size();
     if( count > 0 )
@@ -632,7 +632,7 @@ int HWPFile::compareCharShape(CharShape *shape)
 }
 
 
-int HWPFile::compareParaShape(ParaShape *shape)
+int HWPFile::compareParaShape(ParaShape const *shape)
 {
     int count = pslist.size();
     if( count > 0 )
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index e86d5bd60663..75f17d19a448 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -212,8 +212,8 @@ class DLLEXPORT HWPFile
         void AddPage(){ m_nCurrentPage++;}
         void AddColumnInfo();
         void SetColumnDef(ColumnDef *coldef);
-        void AddParaShape(std::shared_ptr<ParaShape>&);
-        void AddCharShape(std::shared_ptr<CharShape>&);
+        void AddParaShape(std::shared_ptr<ParaShape> const &);
+        void AddCharShape(std::shared_ptr<CharShape> const &);
         void AddFBoxStyle(FBoxStyle *);
         void AddDateFormat(DateCode *);
         void AddHeaderFooter(HeaderFooter *);
@@ -253,8 +253,8 @@ class DLLEXPORT HWPFile
           void setMaxSettedPage(){ m_nMaxSettedPage = m_nCurrentPage; }
 
     private:
-        int compareCharShape(CharShape *shape);
-        int compareParaShape(ParaShape *shape);
+        int compareCharShape(CharShape const *shape);
+        int compareParaShape(ParaShape const *shape);
 
     public:
         int   version;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 29a884521265..8ac074eff35c 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3136,7 +3136,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
 }
 
 
-void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox)
+void HwpReader::makeFieldCode(hchar_string const & rStr, FieldCode const *hbox)
 {
 /* Push frame */
     if( hbox->type[0] == 4 && hbox->type[1] == 0 )
@@ -3259,7 +3259,7 @@ void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox)
  * Completed
  * In LibreOffice, refer bookmarks as reference, but hwp doesn't have the sort of feature.
  */
-void HwpReader::makeBookmark(Bookmark * hbox)
+void HwpReader::makeBookmark(Bookmark const * hbox)
 {
     if (hbox->type == 0)
     {
@@ -4768,7 +4768,7 @@ void HwpReader::makeMailMerge(MailMerge * hbox)
 }
 
 
-void HwpReader::makeOutline(Outline * hbox)
+void HwpReader::makeOutline(Outline const * hbox)
 {
     if( hbox->kind == 1 )
         rchars( reinterpret_cast<sal_Unicode const *>(hbox->GetUnicode().c_str()) );
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index 5354b930725b..8acc30879cc0 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -116,8 +116,8 @@ private:
     void makeChars(hchar_string & rStr);
 
     /* -------- Special Char Parsing --------- */
-    void makeFieldCode(hchar_string & rStr, FieldCode *hbox); //6
-    void makeBookmark(Bookmark *hbox);      //6
+    void makeFieldCode(hchar_string const & rStr, FieldCode const *hbox); //6
+    void makeBookmark(Bookmark const *hbox);      //6
     void makeDateFormat(DateCode *hbox);    //7
     void makeDateCode(DateCode *hbox);      //8
     void makeTab();            //9
@@ -133,7 +133,7 @@ private:
     void makeAutoNum(AutoNum *hbox);
     void makeShowPageNum();
     void makeMailMerge(MailMerge *hbox);
-    void makeOutline(Outline *hbox);
+    void makeOutline(Outline const *hbox);
 
     /* --------- Styles Parsing ------------ */
     void makePageStyle();
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 24d3f24de657..8e4528339c39 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -254,7 +254,7 @@ struct FindFuncData
 {
     const OUString& m_rId;
     explicit FindFuncData( const OUString& rId ) : m_rId(rId) {}
-    bool operator() ( FuncData& rCandidate ) const { return rCandidate.Is(m_rId); }
+    bool operator() ( FuncData const & rCandidate ) const { return rCandidate.Is(m_rId); }
 };
 
 class AnalysisResId : public ResId
diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx
index 8299a3635418..816aaffd6c19 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -99,7 +99,7 @@ struct FindScaFuncData
 {
     const OUString& m_rId;
     explicit FindScaFuncData( const OUString& rId ) : m_rId(rId) {}
-    bool operator() ( ScaFuncData& rCandidate ) const { return rCandidate.Is(m_rId); }
+    bool operator() ( ScaFuncData const & rCandidate ) const { return rCandidate.Is(m_rId); }
 };
 
 
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index 111f739e60e7..18acc54c811f 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -117,7 +117,7 @@ struct FindScaFuncData
 {
     const OUString& m_rId;
     explicit FindScaFuncData( const OUString& rId ) : m_rId(rId) {}
-    bool operator() ( ScaFuncData& rCandidate ) const { return rCandidate.Is(m_rId); }
+    bool operator() ( ScaFuncData const & rCandidate ) const { return rCandidate.Is(m_rId); }
 };
 
 } // namespace pricing


More information about the Libreoffice-commits mailing list