From 354dc28282ec72326b6decf0b34df57ed43858fb Mon Sep 17 00:00:00 2001 From: Bogdan Buzea Date: Fri, 18 Oct 2024 17:17:03 +0200 Subject: 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 --- basic/source/sbx/sbxvalue.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'basic/source') diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 6587d08f5da4..f3122fe71904 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -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(this)->aData.eType = static_cast( ( 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: -- cgit