tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 999, 1003 V1037 Two or more case-branches perform the same actions. Check lines: 1557, 1566, 1595 V1037 Two or more case-branches perform the same actions. Check lines: 2593, 2689 Change-Id: I0a3ab375e9e8c72802615108948c96808a2ec0b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175208 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
This commit is contained in:
parent
c4052eaa4e
commit
cd398f3e74
1 changed files with 3 additions and 25 deletions
|
@ -996,9 +996,6 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
|
|||
}
|
||||
break;
|
||||
case SsGetStar:
|
||||
eState = SsStop;
|
||||
sSymbolBuffer.append(OUStringChar(cToken));
|
||||
break;
|
||||
case SsGetBlank:
|
||||
eState = SsStop;
|
||||
sSymbolBuffer.append(OUStringChar(cToken));
|
||||
|
@ -1554,18 +1551,11 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
|
|||
}
|
||||
break;
|
||||
case SvNumFormatType::PERCENT:
|
||||
switch (eNewType)
|
||||
{
|
||||
case SvNumFormatType::NUMBER: // Only number to percent
|
||||
break;
|
||||
default:
|
||||
return nPos;
|
||||
}
|
||||
break;
|
||||
case SvNumFormatType::SCIENTIFIC:
|
||||
case SvNumFormatType::FRACTION:
|
||||
switch (eNewType)
|
||||
{
|
||||
case SvNumFormatType::NUMBER: // Only number to E
|
||||
case SvNumFormatType::NUMBER:
|
||||
break;
|
||||
default:
|
||||
return nPos;
|
||||
|
@ -1591,15 +1581,6 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SvNumFormatType::FRACTION:
|
||||
switch (eNewType)
|
||||
{
|
||||
case SvNumFormatType::NUMBER: // Only number to fraction
|
||||
break;
|
||||
default:
|
||||
return nPos;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2590,6 +2571,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
|
|||
{
|
||||
case NF_SYMBOLTYPE_BLANK:
|
||||
case NF_SYMBOLTYPE_STAR:
|
||||
case NF_SYMBOLTYPE_STRING:
|
||||
nPos = nPos + sStrArray[i].getLength();
|
||||
i++;
|
||||
break;
|
||||
|
@ -2685,10 +2667,6 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case NF_SYMBOLTYPE_STRING:
|
||||
nPos = nPos + sStrArray[i].getLength();
|
||||
i++;
|
||||
break;
|
||||
case NF_KEY_AMPM: // AM/PM
|
||||
case NF_KEY_AP: // A/P
|
||||
bExp = true; // Abuse for A/P
|
||||
|
|
Loading…
Reference in a new issue