Kaydet (Commit) 7a937660 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: rhbz#1602589 silence coverity copy_paste_error

Change-Id: Idca4bfaaa9f127eae87ae879e2131aed747ce4b3
Reviewed-on: https://gerrit.libreoffice.org/58089
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e41b7bc4
...@@ -5707,6 +5707,7 @@ bool ScCompiler::HandleTableRef() ...@@ -5707,6 +5707,7 @@ bool ScCompiler::HandleTableRef()
default: default:
; // nothing ; // nothing
} }
// coverity[copy_paste_error] - this is correct, aStart in both aDBRange uses
if (aColRange.aStart.Row() != aDBRange.aStart.Row() || aColRange.aEnd.Row() != aDBRange.aStart.Row()) if (aColRange.aStart.Row() != aDBRange.aStart.Row() || aColRange.aEnd.Row() != aDBRange.aStart.Row())
aRange = ScRange( ScAddress::INITIALIZE_INVALID); aRange = ScRange( ScAddress::INITIALIZE_INVALID);
else else
......
...@@ -178,6 +178,7 @@ ScPositionHelper::getNearestByIndex(index_type nIndex) const ...@@ -178,6 +178,7 @@ ScPositionHelper::getNearestByIndex(index_type nIndex) const
} }
auto posLB = std::prev(posUB); auto posLB = std::prev(posUB);
// coverity[copy_paste_error] - posUB is correct
if (posUB == mData.end()) if (posUB == mData.end())
{ {
return *posLB; return *posLB;
...@@ -208,6 +209,7 @@ ScPositionHelper::getNearestByPosition(long nPos) const ...@@ -208,6 +209,7 @@ ScPositionHelper::getNearestByPosition(long nPos) const
} }
auto posLB = std::prev(posUB); auto posLB = std::prev(posUB);
// coverity[copy_paste_error] - posUB is correct
if (posUB == mData.end()) if (posUB == mData.end())
{ {
return *posLB; return *posLB;
......
...@@ -2343,6 +2343,7 @@ void CustomAnimationPane::moveSelection( bool bUp ) ...@@ -2343,6 +2343,7 @@ void CustomAnimationPane::moveSelection( bool bUp )
CustomAnimationEffectPtr pEffect = (*aIter++); CustomAnimationEffectPtr pEffect = (*aIter++);
EffectSequence::iterator aUpEffectPos( pSequence->find( pEffect ) ); EffectSequence::iterator aUpEffectPos( pSequence->find( pEffect ) );
// coverity[copy_paste_error] - this is correct, checking if it exists
if( aUpEffectPos != rEffectSequence.end() ) if( aUpEffectPos != rEffectSequence.end() )
{ {
EffectSequence::iterator aInsertPos( rEffectSequence.erase( aUpEffectPos ) ); EffectSequence::iterator aInsertPos( rEffectSequence.erase( aUpEffectPos ) );
...@@ -2373,6 +2374,7 @@ void CustomAnimationPane::moveSelection( bool bUp ) ...@@ -2373,6 +2374,7 @@ void CustomAnimationPane::moveSelection( bool bUp )
CustomAnimationEffectPtr pEffect = (*aIter++); CustomAnimationEffectPtr pEffect = (*aIter++);
EffectSequence::iterator aDownEffectPos( pSequence->find( pEffect ) ); EffectSequence::iterator aDownEffectPos( pSequence->find( pEffect ) );
// coverity[copy_paste_error] - this is correct, checking if it exists
if( aDownEffectPos != rEffectSequence.end() ) if( aDownEffectPos != rEffectSequence.end() )
{ {
EffectSequence::iterator aInsertPos( rEffectSequence.erase( aDownEffectPos ) ); EffectSequence::iterator aInsertPos( rEffectSequence.erase( aDownEffectPos ) );
......
...@@ -6287,6 +6287,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool ...@@ -6287,6 +6287,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool
aTextLineColor = COL_WHITE; aTextLineColor = COL_WHITE;
if( aOverlineColor == COL_BLACK ) if( aOverlineColor == COL_BLACK )
aOverlineColor = COL_WHITE; aOverlineColor = COL_WHITE;
// coverity[copy_paste_error] - aReliefColor depending on aTextColor is correct
if( aTextColor == COL_WHITE ) if( aTextColor == COL_WHITE )
aReliefColor = COL_BLACK; aReliefColor = COL_BLACK;
......
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