Kaydet (Commit) 273a60af authored tarafından jailletc36's avatar jailletc36 Kaydeden (comit) Tor Lillqvist

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: 's avatarjailletc36 <christophe.jaillet@wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/1031Reviewed-by: 's avatarTor Lillqvist <tml@iki.fi>
Tested-by: 's avatarTor Lillqvist <tml@iki.fi>
üst fb9522a2
......@@ -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" );
......
......@@ -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();
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment