[Libreoffice-commits] .: sax/source sc/source sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 12 02:59:16 PST 2012
sax/source/expatwrap/saxwriter.cxx | 2 +-
sc/source/ui/miscdlgs/acredlin.cxx | 4 ++--
sw/source/filter/ww8/ww8par5.cxx | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 273a60af9aae1a0b87d2ff43bdfb0cd849b29d27
Author: jailletc36 <christophe.jaillet at wanadoo.fr>
Date: Sun Nov 11 10:42:37 2012 +0100
cppCheck: clarifyCondition
Remove some warnings about:
Boolean result is used in bitwise operation
Suspicious condition (assignment + comparison)
Also reduce scope of a variable.
Change-Id: I553e5a09ed1d6276be61efbbb2c28d165a69af39
Signed-off-by: jailletc36 <christophe.jaillet at wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/1031
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Tor Lillqvist <tml at iki.fi>
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index e54c9fc..1caf6cd 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -1307,7 +1307,7 @@ void SAXWriter::startCDATA(void) throw(SAXException, RuntimeException)
void SAXWriter::endCDATA(void) throw (RuntimeException)
{
- if( ! m_bDocStarted | ! m_bIsCDATA)
+ if( ! m_bDocStarted || ! m_bIsCDATA)
{
SAXException except;
except.Message = OUString( "endCDATA was called without startCDATA" );
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index dfc0f93..8a7c092 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -402,7 +402,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
pNewData->nActionNo=pScChangeAction->GetActionNumber();
pNewData->bIsAcceptable=pScChangeAction->IsClickable();
pNewData->bIsRejectable=pScChangeAction->IsRejectable();
- pNewData->bDisabled=!pNewData->bIsAcceptable | bDisabled;
+ pNewData->bDisabled=!pNewData->bIsAcceptable || bDisabled;
pNewData->aDateTime=aDateTime;
pNewData->nRow = aRef.aStart.Row();
pNewData->nCol = aRef.aStart.Col();
@@ -579,7 +579,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
pNewData->nActionNo=pScChangeAction->GetActionNumber();
pNewData->bIsAcceptable=pScChangeAction->IsClickable();
pNewData->bIsRejectable=pScChangeAction->IsRejectable();
- pNewData->bDisabled=!pNewData->bIsAcceptable | bDisabled;
+ pNewData->bDisabled=!pNewData->bIsAcceptable || bDisabled;
pNewData->aDateTime=aDateTime;
pNewData->nRow = aRef.aStart.Row();
pNewData->nCol = aRef.aStart.Col();
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index f53d354..037c4be 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3464,12 +3464,12 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
String sURL, sTarget, sMark;
bool bDataImport = false;
//HYPERLINK "filename" [switches]
- bool bOptions=false;
rStr = comphelper::string::stripEnd(rStr, 1);
if (!bDataImport)
{
+ bool bOptions = false;
long nRet;
_ReadFieldParams aReadParam( rStr );
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -3477,7 +3477,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
switch( nRet )
{
case -2:
- if (!sURL.Len() & !bOptions)
+ if (!sURL.Len() && !bOptions)
ConvertFFileName(sURL, aReadParam.GetResult());
break;
More information about the Libreoffice-commits
mailing list