summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-06-09 22:32:17 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-06-09 22:32:17 +0200
commit121ec60a5d711178380cf68a1416dbe3274fe54b (patch)
tree03227941449b8fd2d4dff8566496ce198e9cd44d /lotuswordpro/source
parent8821487f7a475630112778e9f45e8f2792115edc (diff)
Some cppcheck cleaning
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/localtime.cxx3
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx8
-rw-r--r--lotuswordpro/source/filter/lwptools.hxx4
3 files changed, 5 insertions, 10 deletions
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
index c59ca62bc738..1eee2bfab2d4 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 73b436fa3f09..04fba146d28a 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 5111582ed9b2..1ecc9cd6643e 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