[Libreoffice-commits] .: 4 commits - chart2/source sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Nov 25 08:05:56 PST 2010


 chart2/source/tools/DataSeriesHelper.cxx     |    2 +-
 sc/source/filter/xml/XMLExportSharedData.cxx |    4 ++--
 sc/source/filter/xml/XMLExportSharedData.hxx |    6 +++---
 sc/source/ui/dbgui/csvgrid.cxx               |    6 ++++--
 sc/source/ui/unoobj/funcuno.cxx              |    2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit e16922710717f2aec775e0ffc51667b463634959
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:51:40 2010 +0000

    cppcheck: methods can be const

diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index fa82ab0..e62fdb4 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -467,7 +467,7 @@ public:
         else
             mbArgError = true;
     }
-    bool hasArgError() { return mbArgError; }
+    bool hasArgError() const { return mbArgError; }
 };
     
 template< class seq >
commit 06aab6afa5f2cfb1aee51efefc93c5594f474897
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:48:10 2010 +0000

    cppcheck: methods can be const

diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index da1e5c2..0a9d61f 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -61,14 +61,16 @@ struct Func_SetType
 {
     sal_Int32                   mnType;
     inline                      Func_SetType( sal_Int32 nType ) : mnType( nType ) {}
-    inline void                 operator()( ScCsvColState& rState ) { rState.mnType = mnType; }
+    inline void                 operator()( ScCsvColState& rState ) const
+        { rState.mnType = mnType; }
 };
 
 struct Func_Select
 {
     bool                        mbSelect;
     inline                      Func_Select( bool bSelect ) : mbSelect( bSelect ) {}
-    inline void                 operator()( ScCsvColState& rState ) { rState.Select( mbSelect ); }
+    inline void                 operator()( ScCsvColState& rState ) const
+        { rState.Select( mbSelect ); }
 };
 
 
commit 601c523e8c8618bd36dbe8433aa5c7bf5dc7a388
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:21:11 2010 +0000

    remove empty method

diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index c3de040..7926311 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -69,7 +69,7 @@ void ScMySharedData::SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol)
     if(nCol > nLastColumns[nTable]) nLastColumns[nTable] = nCol;
 }
 
-sal_Int32 ScMySharedData::GetLastColumn(const sal_Int32 nTable)
+sal_Int32 ScMySharedData::GetLastColumn(const sal_Int32 nTable) const
 {
     return nLastColumns[nTable];
 }
@@ -79,7 +79,7 @@ void ScMySharedData::SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow)
     if(nRow > nLastRows[nTable]) nLastRows[nTable] = nRow;
 }
 
-sal_Int32 ScMySharedData::GetLastRow(const sal_Int32 nTable)
+sal_Int32 ScMySharedData::GetLastRow(const sal_Int32 nTable) const
 {
     return nLastRows[nTable];
 }
diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx
index 48497b5..e496775 100644
--- a/sc/source/filter/xml/XMLExportSharedData.hxx
+++ b/sc/source/filter/xml/XMLExportSharedData.hxx
@@ -68,12 +68,12 @@ public:
 
     void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol);
     void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow);
-    sal_Int32 GetLastColumn(const sal_Int32 nTable);
-    sal_Int32 GetLastRow(const sal_Int32 nTable);
+    sal_Int32 GetLastColumn(const sal_Int32 nTable) const;
+    sal_Int32 GetLastRow(const sal_Int32 nTable) const;
     void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
     void SetDrawPageHasForms(const sal_Int32 nTable, sal_Bool bHasForms);
     com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
-    sal_Bool HasDrawPage() { return pDrawPages != NULL; }
+    sal_Bool HasDrawPage() const { return pDrawPages != NULL; }
     sal_Bool HasForm(const sal_Int32 nTable, com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& xDrawPage);
     void AddNewShape(const ScMyShape& aMyShape);
     void SortShapesContainer();
commit 8385867e4fc9f4d9bd619fcfa4c3dbd8f3720beb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:48:29 2010 +0000

    cppcheck: methods can be const

diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 4fd4ba6..d755572 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -739,7 +739,7 @@ bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries )
 
 struct lcl_LessIndex
 {
-    inline bool operator() ( const sal_Int32& first, const sal_Int32& second )
+    inline bool operator() ( const sal_Int32& first, const sal_Int32& second ) const
     {
         return ( first < second );
     }


More information about the Libreoffice-commits mailing list