[Libreoffice-commits] .: lotuswordpro/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Thu Jun 9 13:32:40 PDT 2011
lotuswordpro/source/filter/localtime.cxx | 3 +--
lotuswordpro/source/filter/lwpgrfobj.cxx | 8 ++------
lotuswordpro/source/filter/lwptools.hxx | 4 ++--
3 files changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 17d41cd0634e32778a1a6b595a9489e986f61500
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Jun 9 22:32:17 2011 +0200
Some cppcheck cleaning
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
index c59ca62..1eee2bf 100644
--- a/lotuswordpro/source/filter/localtime.cxx
+++ b/lotuswordpro/source/filter/localtime.cxx
@@ -176,7 +176,6 @@ bool LtgGmTime(long rtime,LtTm& rtm)
};
bool LtgLocalTime(long rtime,LtTm& rtm)
{
- long ltime;
if (rtime < 0)
{
return false;
@@ -186,7 +185,7 @@ bool LtgLocalTime(long rtime,LtTm& rtm)
{
TimeZone* pLocalZone = TimeZone::createDefault();
long offset = (pLocalZone->getRawOffset())/1000;
- ltime = rtime + offset;
+ long ltime = rtime + offset;
return LtgGmTime(ltime,rtm);
}
return false;
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index e447385..de66951 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -158,13 +158,12 @@ void LwpGraphicObject::Read()
m_bIsLinked = m_pObjStrm->QuickReadInt16();
//OUString pLinkedFilePath;
unsigned char * pFilterContext = NULL;
- sal_uInt32 nFilterContextSize = 0;
if (m_bIsLinked)
{
m_LinkedFilePath = m_pObjStrm->QuickReadStringPtr();
- nFilterContextSize = m_pObjStrm->QuickReaduInt32();
+ sal_uInt32 nFilterContextSize = m_pObjStrm->QuickReaduInt32();
if (nFilterContextSize > 0)
{
pFilterContext = new unsigned char[nFilterContextSize];
@@ -175,8 +174,6 @@ void LwpGraphicObject::Read()
// read external file object stuff
sal_uInt16 type = m_pObjStrm->QuickReaduInt16();
-// if (EF_ODMA == type)
-// ;
if ((EF_ODMA != type) && (EF_NONE != type)) // don't know about this
{
sal_uInt32 size = m_pObjStrm->QuickReaduInt32();
@@ -786,7 +783,6 @@ void LwpGraphicObject::XFConvertEquation(XFContentContainer * pCont)
//total head length = 45
sal_uInt32 nBegin = 45;
sal_uInt32 nEnd = nDataLen -1;
- sal_uInt32 nIndex = 0;
if(pGrafData[nEnd] == '$' && pGrafData[nEnd-1]!= '\\')
{
@@ -798,7 +794,7 @@ void LwpGraphicObject::XFConvertEquation(XFContentContainer * pCont)
if(nEnd >= nBegin)
{
sal_uInt8* pEquData = new sal_uInt8[nEnd - nBegin + 1];
- for(nIndex = 0; nIndex < nEnd - nBegin +1 ; nIndex++)
+ for(sal_uInt32 nIndex = 0; nIndex < nEnd - nBegin +1 ; nIndex++)
{
pEquData[nIndex] = pGrafData[nBegin + nIndex];
}
diff --git a/lotuswordpro/source/filter/lwptools.hxx b/lotuswordpro/source/filter/lwptools.hxx
index 750010d..c423927 100644
--- a/lotuswordpro/source/filter/lwptools.hxx
+++ b/lotuswordpro/source/filter/lwptools.hxx
@@ -135,11 +135,11 @@ inline sal_Int32 LwpTools::ConvertToUnits(const double& fInch)
}
inline sal_Bool LwpTools::IsOddNumber(sal_uInt16& nNumber)
{
- return nNumber%2? sal_True : sal_False;
+ return (nNumber%2)? sal_True : sal_False;
}
inline sal_Bool LwpTools::IsEvenNumber(sal_uInt16& nNumber)
{
- return nNumber%2? sal_False : sal_True;
+ return (nNumber%2)? sal_False : sal_True;
}
class BadSeek : public std::runtime_error
More information about the Libreoffice-commits
mailing list