[Libreoffice-commits] .: 9 commits - binfilter/bf_starmath binfilter/bf_svx filter/source hwpfilter/source lotuswordpro/source

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


 binfilter/bf_starmath/source/mathtype.hxx               |   12 +++----
 binfilter/bf_svx/source/svdraw/svdtxhdl.hxx             |    2 -
 binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx         |    2 -
 filter/source/graphicfilter/icgm/bundles.cxx            |    2 -
 filter/source/graphicfilter/icgm/bundles.hxx            |    2 -
 filter/source/graphicfilter/icgm/cgm.hxx                |    4 +-
 filter/source/graphicfilter/idxf/dxfgrprd.cxx           |    6 +--
 filter/source/graphicfilter/idxf/dxfgrprd.hxx           |   26 ++++++++--------
 filter/source/svg/gfxtypes.hxx                          |    2 -
 hwpfilter/source/hstream.cpp                            |    2 -
 hwpfilter/source/hstream.h                              |    2 -
 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |    2 -
 12 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 6f6f83d042e09d738ecf28abccc8f0d796a8d7f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:38:01 2010 +0000

    cppcheck: methods can be const

diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index f10ab48..e102d6a 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -69,7 +69,7 @@ private:
     std::vector< OUString > m_vStringChunks;
     SvStream& m_InputStream;
 
-    bool CheckValidData( sal_Int8 nChar )
+    bool CheckValidData( sal_Int8 nChar ) const
     {
         if( ( nChar >= 0x20 && nChar <= 0x7E ) && ( nChar != 0X40 ) )
             return  true;
commit be0b0602b14071417e890dbb2ec951b389665825
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:31:45 2010 +0000

    cppcheck: methods can be const

diff --git a/filter/source/svg/gfxtypes.hxx b/filter/source/svg/gfxtypes.hxx
index 242888f..8cad135 100644
--- a/filter/source/svg/gfxtypes.hxx
+++ b/filter/source/svg/gfxtypes.hxx
@@ -40,7 +40,7 @@ namespace svgi
 
 struct ARGBColor
 {
-    double toDoubleColor( sal_uInt8 val ) { return val/255.0; }
+    double toDoubleColor( sal_uInt8 val ) const { return val/255.0; }
 
     ARGBColor() : a(1.0), r(0.0), g(0.0), b(0.0)
     {}
commit 01aded0633413f3c84b38662a687e5ae49bda135
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:25:42 2010 +0000

    cppcheck: methods can be const

diff --git a/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx b/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx
index be691f5..fa54a5c 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx
@@ -60,7 +60,7 @@ namespace binfilter {
 /*N*/ 		nLCnt=0;
 /*N*/ 		nRCnt=0;
 /*N*/ 	}
-/*N*/ 	bool IsDecided() { return bEdge || bIntersect || bPntInRect; }
+/*N*/ 	bool IsDecided() const { return bEdge || bIntersect || bPntInRect; }
 /*N*/ 	void CheckPntInRect(const Point& rP)
 /*N*/ 	{
 /*N*/ 		if (!bPntInRect) {
commit fdfda0eb98f3cb52156150a97cbc5b2256c800cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 11:02:45 2010 +0000

    cppcheck: methods can be const

diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
index f87aea2..2344ca8 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
@@ -185,7 +185,7 @@ USHORT DXFGroupReader::Read()
 }
 
 
-long DXFGroupReader::GetI(USHORT nG)
+long DXFGroupReader::GetI(USHORT nG) const
 {
     sal_Int32 nRetValue = 0;
     if ( ( nG >= 60 ) && ( nG <= 79 ) )
@@ -199,7 +199,7 @@ long DXFGroupReader::GetI(USHORT nG)
     return nRetValue;
 }
 
-double DXFGroupReader::GetF(USHORT nG)
+double DXFGroupReader::GetF(USHORT nG) const
 {
     nG-=10;
     if (nG<50) return F10_59[nG];
@@ -218,7 +218,7 @@ double DXFGroupReader::GetF(USHORT nG)
     }
 }
 
-const char * DXFGroupReader::GetS(USHORT nG)
+const char * DXFGroupReader::GetS(USHORT nG) const
 {
     if (nG<10) return S0_9[nG];
     else if ( nG == 100 )
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
index 10bed4d..e368af3 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
@@ -44,7 +44,7 @@ public:
 
     DXFGroupReader( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent );
 
-    BOOL GetStatus();
+    BOOL GetStatus() const;
 
     void SetError();
 
@@ -53,20 +53,20 @@ public:
         // Im Falle eines Fehlers liefert GetStatus() FALSE, Gruppencode wird 0
         // gesetzt, und es wird SetS(0,"EOF") ausgefuehrt.
 
-    USHORT GetG();
+    USHORT GetG() const;
         // Liefert den letzten Gruppencode (also was Read() zuletzt lieferte)
 
-    long   GetI();
+    long   GetI() const;
         // Liefert den Integer-Wert zur Gruppe, die vorher mit Read() gelesen wurde.
         // Dabei muss es sich um einen Gruppencode fuer den Datentyp Integer
         // gehandelt haben, wenn nicht, wird 0 gelieferet.
 
-    double GetF();
+    double GetF() const;
         // Liefert den Floatingpoint-Wert zur Gruppe, die vorher mit Read() gelesen wurde.
         // Dabei muss es sich um einen Gruppencode fuer den Datentyp Floatingpoint
         // gehandelt haben, wenn nicht, wird 0 geliefert.
 
-    const char * GetS();
+    const char * GetS() const;
         // Liefert den String zur Gruppe, die vorher mit Read() gelesen wurde.
         // Dabei muss es sich um einen Gruppencode fuer den Datentyp String
         // gehandelt haben, wenn nicht, wird NULL geliefert.
@@ -75,9 +75,9 @@ public:
     // aktuelle Gruppencode angegeben werden. (DXFGroupReader speichert die Parameter
     // zu allen Gruppencodes. Dadurch ist es moeglich, dass zunaechst mit Read() einige
     // verschiedene Gruppen eingelesen werden, bevor sie ausgewertet werden.)
-    long         GetI(USHORT nG);
-    double       GetF(USHORT nG);
-    const char * GetS(USHORT nG);
+    long         GetI(USHORT nG) const;
+    double       GetF(USHORT nG) const;
+    const char * GetS(USHORT nG) const;
 
     // Mit folgenden Methoden koennen die aktuell gespeicherten Werte zu den
     // Gruppencodes veraendert werden. (z.B. um Defaultwerte zu setzen, bevor
@@ -120,7 +120,7 @@ private:
 };
 
 
-inline BOOL DXFGroupReader::GetStatus()
+inline BOOL DXFGroupReader::GetStatus() const
 {
     return bStatus;
 }
@@ -131,22 +131,22 @@ inline void DXFGroupReader::SetError()
     bStatus=FALSE;
 }
 
-inline USHORT DXFGroupReader::GetG()
+inline USHORT DXFGroupReader::GetG() const
 {
     return nLastG;
 }
 
-inline long DXFGroupReader::GetI()
+inline long DXFGroupReader::GetI() const
 {
     return GetI(nLastG);
 }
 
-inline double DXFGroupReader::GetF()
+inline double DXFGroupReader::GetF() const
 {
     return GetF(nLastG);
 }
 
-inline const char * DXFGroupReader::GetS()
+inline const char * DXFGroupReader::GetS() const
 {
     return GetS(nLastG);
 }
commit f4cf9c391eed4cc875f169c0b4796bcba43c5632
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:58:54 2010 +0000

    cppcheck: methods can be const

diff --git a/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx b/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx
index 4a1ca22..aa5205c 100644
--- a/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx
+++ b/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx
@@ -89,7 +89,7 @@ public:
     void DrawTextToPath(ExtOutputDevice& rXOut, bool bDrawEffect=TRUE);
 
     // wird von DrawTextToPath() gesetzt:
-    const Rectangle& GetFormTextBoundRect() { return aFormTextBoundRect; }
+    const Rectangle& GetFormTextBoundRect() const { return aFormTextBoundRect; }
 
 
     // #101498#
commit 26aa38f44d2352c215a7621de82620f2172f57d9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:57:32 2010 +0000

    cppcheck: methods can be const

diff --git a/binfilter/bf_starmath/source/mathtype.hxx b/binfilter/bf_starmath/source/mathtype.hxx
index e7ff5ad..5d3d0af 100644
--- a/binfilter/bf_starmath/source/mathtype.hxx
+++ b/binfilter/bf_starmath/source/mathtype.hxx
@@ -99,12 +99,12 @@ private:
     SvStorageStream *pS;
 
 
-    int xfLMOVE(sal_uInt8 nTest) {return nTest&0x80;}
-    int xfAUTO(sal_uInt8 nTest) {return nTest&0x10;}
-    int xfEMBELL(sal_uInt8 nTest) {return nTest&0x20;}
-    int xfNULL(sal_uInt8 nTest) {return nTest&0x10;}
-    int xfLSPACE(sal_uInt8 nTest) {return nTest&0x40;}
-    int xfRULER(sal_uInt8 nTest) {return nTest&0x20;}
+    int xfLMOVE(sal_uInt8 nTest) const {return nTest&0x80;}
+    int xfAUTO(sal_uInt8 nTest) const {return nTest&0x10;}
+    int xfEMBELL(sal_uInt8 nTest) const {return nTest&0x20;}
+    int xfNULL(sal_uInt8 nTest) const {return nTest&0x10;}
+    int xfLSPACE(sal_uInt8 nTest) const {return nTest&0x40;}
+    int xfRULER(sal_uInt8 nTest) const {return nTest&0x20;}
 
 
     String &rRet;
commit 28e3d0b04eb28d7a8be2c733a7109c5e10f1a14c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:56:32 2010 +0000

    cppcheck: methods can be const

diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index c59ab80..2992c0c 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -49,7 +49,7 @@ void Bundle::SetColor( sal_uInt32 nColor )
     mnColor = nColor;
 }
 
-sal_uInt32 Bundle::GetColor()
+sal_uInt32 Bundle::GetColor() const
 {
     return mnColor;
 }
diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx
index 837726b..aed9e91 100644
--- a/filter/source/graphicfilter/icgm/bundles.hxx
+++ b/filter/source/graphicfilter/icgm/bundles.hxx
@@ -46,7 +46,7 @@ class Bundle
 
 public:
     void				SetColor( sal_uInt32 nColor ) ;
-    sal_uInt32				GetColor() ;
+    sal_uInt32				GetColor() const;
     long				GetIndex() const { return mnBundleIndex; } ;
     void				SetIndex( long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
 
commit c841d069b1de5609e8182298d205e763a4000f40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:55:17 2010 +0000

    cppcheck: methods can be const

diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 727582d..b705721 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -168,8 +168,8 @@ class CGM
 #endif
         void				ImplComment( sal_uInt32, const char* );
         sal_uInt32				GetBackGroundColor();
-        sal_Bool				IsValid() { return mbStatus; };
-        sal_Bool				IsFinished() { return mbIsFinished; };
+        sal_Bool				IsValid() const { return mbStatus; };
+        sal_Bool				IsFinished() const { return mbIsFinished; };
         sal_Bool				Write( SvStream& rIStm );
 
         friend SvStream& operator>>( SvStream& rOStm, CGM& rCGM );
commit 7ad6b51f55ec2576c735875a72abe98eb1a5e7ba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 25 10:46:22 2010 +0000

    cppcheck: methods can be const

diff --git a/hwpfilter/source/hstream.cpp b/hwpfilter/source/hstream.cpp
index c32a78d..4bd64a8 100644
--- a/hwpfilter/source/hstream.cpp
+++ b/hwpfilter/source/hstream.cpp
@@ -70,7 +70,7 @@ int HStream::skipBytes(int aToSkip)
 }
 
 
-int HStream::available()
+int HStream::available() const
 {
     return size - pos;
 }
diff --git a/hwpfilter/source/hstream.h b/hwpfilter/source/hstream.h
index 3c37f71..f5102d6 100644
--- a/hwpfilter/source/hstream.h
+++ b/hwpfilter/source/hstream.h
@@ -54,7 +54,7 @@ class HStream
 /**
  * @returns Size of remained stream
  */
-        int available();
+        int available() const;
 /**
  * remove the stream from this object.
  */


More information about the Libreoffice-commits mailing list