[Libreoffice-commits] .: 8 commits - basegfx/source cppcanvas/source i18npool/source sax/source unotools/source vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Nov 25 08:06:39 PST 2010
basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx | 4 +--
cppcanvas/source/mtfrenderer/emfplus.cxx | 4 +--
i18npool/source/calendar/calendar_jewish.cxx | 12 ++++-----
sax/source/expatwrap/saxwriter.cxx | 3 +-
unotools/source/accessibility/accessiblestatesethelper.cxx | 16 ++++++-------
unotools/source/config/compatibility.cxx | 2 -
unotools/source/config/historyoptions.cxx | 2 -
vcl/source/gdi/pdfwriter_impl.hxx | 2 -
8 files changed, 23 insertions(+), 22 deletions(-)
New commits:
commit a53e3991d5365333ca6f3972309a8e7348f27bea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:50:06 2010 +0000
cppcheck: methods can be const
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx
index 6a371a0..3ff7f28 100644
--- a/unotools/source/accessibility/accessiblestatesethelper.cxx
+++ b/unotools/source/accessibility/accessiblestatesethelper.cxx
@@ -50,11 +50,11 @@ public:
AccessibleStateSetHelperImpl(const AccessibleStateSetHelperImpl& rImpl);
~AccessibleStateSetHelperImpl();
- sal_Bool IsEmpty ()
+ sal_Bool IsEmpty () const
throw (uno::RuntimeException);
- sal_Bool Contains (sal_Int16 aState)
+ sal_Bool Contains (sal_Int16 aState) const
throw (uno::RuntimeException);
- uno::Sequence<sal_Int16> GetStates()
+ uno::Sequence<sal_Int16> GetStates() const
throw (uno::RuntimeException);
void AddState(sal_Int16 aState)
throw (uno::RuntimeException);
@@ -62,7 +62,7 @@ public:
throw (uno::RuntimeException);
sal_Bool Compare(const AccessibleStateSetHelperImpl* pComparativeValue,
AccessibleStateSetHelperImpl* pOldStates,
- AccessibleStateSetHelperImpl* pNewStates)
+ AccessibleStateSetHelperImpl* pNewStates) const
throw (uno::RuntimeException);
inline void AddStates( const sal_Int64 _nStates ) SAL_THROW( ( ) );
@@ -85,13 +85,13 @@ AccessibleStateSetHelperImpl::~AccessibleStateSetHelperImpl()
{
}
-inline sal_Bool AccessibleStateSetHelperImpl::IsEmpty ()
+inline sal_Bool AccessibleStateSetHelperImpl::IsEmpty () const
throw (uno::RuntimeException)
{
return maStates == 0;
}
-inline sal_Bool AccessibleStateSetHelperImpl::Contains (sal_Int16 aState)
+inline sal_Bool AccessibleStateSetHelperImpl::Contains (sal_Int16 aState) const
throw (uno::RuntimeException)
{
DBG_ASSERT(aState < BITFIELDSIZE, "the statesset is too small");
@@ -100,7 +100,7 @@ inline sal_Bool AccessibleStateSetHelperImpl::Contains (sal_Int16 aState)
return ((aTempBitSet & maStates) != 0);
}
-inline uno::Sequence<sal_Int16> AccessibleStateSetHelperImpl::GetStates()
+inline uno::Sequence<sal_Int16> AccessibleStateSetHelperImpl::GetStates() const
throw (uno::RuntimeException)
{
uno::Sequence<sal_Int16> aRet(BITFIELDSIZE);
@@ -144,7 +144,7 @@ inline void AccessibleStateSetHelperImpl::RemoveState(sal_Int16 aState)
inline sal_Bool AccessibleStateSetHelperImpl::Compare(
const AccessibleStateSetHelperImpl* pComparativeValue,
AccessibleStateSetHelperImpl* pOldStates,
- AccessibleStateSetHelperImpl* pNewStates)
+ AccessibleStateSetHelperImpl* pNewStates) const
throw (uno::RuntimeException)
{
sal_Bool bResult(sal_False);
commit 802a5b7239916d660bf58e27f640517cd1b6d0c6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:40:58 2010 +0000
cppcheck: methods can be const
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 682cb25..a4c93a5 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -179,7 +179,8 @@ public:
sal_Bool bDoNormalization,
sal_Bool bNormalizeWhitespace) throw( SAXException );
- sal_uInt32 GetLastColumnCount() { return (sal_uInt32)(nCurrentPos - nLastLineFeedPos); }
+ sal_uInt32 GetLastColumnCount() const
+ { return (sal_uInt32)(nCurrentPos - nLastLineFeedPos); }
inline void startDocument() throw( SAXException );
commit 749c4a8b4eaa380a04b8742b5bebd0d2974e2004
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:39:59 2010 +0000
cppcheck: methods can be const
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index ce72411..598e1df 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -201,7 +201,7 @@ public:
return *this;
}
- bool operator==( const BitmapID& rComp )
+ bool operator==( const BitmapID& rComp ) const
{
return (m_aPixelSize == rComp.m_aPixelSize &&
m_nSize == rComp.m_nSize &&
commit 7895b10484bf2f34e5496530840d9d521b12564d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:36:25 2010 +0000
cppcheck: methods can be const
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index 1ad448b..bd6a9a8 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -223,7 +223,7 @@ class SvtCompatibility
return lEntries.size();
}
- const SvtCompatibilityEntry& operator[]( int i )
+ const SvtCompatibilityEntry& operator[]( int i ) const
{
return lEntries[i];
}
commit bf63df4c9aec3bfb706b4c04b5f429360e04dc91
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:34:04 2010 +0000
cppcheck: methods can be const
diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx
index e0cecae..a0b3146 100644
--- a/i18npool/source/calendar/calendar_jewish.cxx
+++ b/i18npool/source/calendar/calendar_jewish.cxx
@@ -192,9 +192,9 @@ public:
+ HebrewEpoch)); // Days elapsed before absolute date 1.
}
- sal_Int32 GetMonth() { return month; }
- sal_Int32 GetDay() { return day; }
- sal_Int32 GetYear() { return year; }
+ sal_Int32 GetMonth() const { return month; }
+ sal_Int32 GetDay() const { return day; }
+ sal_Int32 GetYear() const { return year; }
};
@@ -251,9 +251,9 @@ public:
+ (year - 1)/400); // ...plus prior years divisible by 400
}
- int GetMonth() { return month; }
- int GetDay() { return day; }
- int GetYear() { return year; }
+ int GetMonth() const { return month; }
+ int GetDay() const { return day; }
+ int GetYear() const { return year; }
};
commit ed4751d3833336f5ebe45f71872ab453eb057c69
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:32:47 2010 +0000
cppcheck: methods can be const
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 1a227a3..485d0d1 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -102,7 +102,7 @@ struct IMPL_THistoryItem
sPassword = sNewPassword ;
}
- sal_Bool operator==( const OUString& sSearchedURL )
+ sal_Bool operator==( const OUString& sSearchedURL ) const
{
return( sURL == sSearchedURL );
}
commit a89d0330103a5301f4edad36a377a3550f7d79bd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:09:38 2010 +0000
cppcheck: methods can be const
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 320c393..c890596 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -341,8 +341,8 @@ namespace cppcanvas
}
}
- UINT32 GetType () { return type; }
- const ::Color& GetColor () { return solidColor; }
+ UINT32 GetType() const { return type; }
+ const ::Color& GetColor() const { return solidColor; }
void Read (SvStream& s, ImplRenderer& rR)
{
commit 07f88d3da01a3dcefdf53ca3cb760c0dfbf228fe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 11:03:45 2010 +0000
cppcheck: methods can be const
diff --git a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
index 21d1a7c..f51652f 100644
--- a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
@@ -350,12 +350,12 @@ namespace basegfx
return 0.0f;
}
- bool isEnded()
+ bool isEnded() const
{
return mnYCounter<=0;
}
- bool isDownwards()
+ bool isDownwards() const
{
return mbDownwards;
}
More information about the Libreoffice-commits
mailing list