tdf#163486: PVS: Identical branches

Change-Id: Ic54a8e009f68ab992831ba849ae1349a6235bedd
V1037: Two or more case-branches perform the same actions. Check lines: 1276 and 1408, 1434 and 1510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175149
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
This commit is contained in:
Bogdan Buzea 2024-10-18 17:17:03 +02:00 committed by David Gilbert
parent aa416c7d88
commit 354dc28282

View file

@ -1273,7 +1273,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxINTEGER:
r.ReadInt16( aData.nInteger ); break;
case SbxLONG:
r.ReadInt32( aData.nLong ); break;
case SbxDATAOBJECT:
r.ReadInt32( aData.nLong );
break;
case SbxSINGLE:
{
// Floats as ASCII
@ -1404,9 +1406,6 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxNULL:
case SbxVOID:
break;
case SbxDATAOBJECT:
r.ReadInt32( aData.nLong );
break;
// #78919 For backwards compatibility
case SbxWSTRING:
case SbxWCHAR:
@ -1431,7 +1430,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxINTEGER:
r.WriteInt16( aData.nInteger ); break;
case SbxLONG:
r.WriteInt32( aData.nLong ); break;
case SbxDATAOBJECT:
r.WriteInt32( aData.nLong );
break;
case SbxDATE:
// #49935: Save as double, otherwise an error during the read in
const_cast<SbxValue*>(this)->aData.eType = static_cast<SbxDataType>( ( nType & 0xF000 ) | SbxDOUBLE );
@ -1506,9 +1507,6 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxNULL:
case SbxVOID:
break;
case SbxDATAOBJECT:
r.WriteInt32( aData.nLong );
break;
// #78919 For backwards compatibility
case SbxWSTRING:
case SbxWCHAR: