tdf#163486: PVS: Identical branches

V1037 Two or more case-branches perform the same actions. Check lines: 36, 186
V1037 Two or more case-branches perform the same actions. Check lines: 51, 266
V1037 Two or more case-branches perform the same actions. Check lines: 86, 281
V1037 Two or more case-branches perform the same actions. Check lines: 96, 116
V1037 Two or more case-branches perform the same actions. Check lines: 101, 121
V1037 Two or more case-branches perform the same actions. Check lines: 136, 211
V1037 Two or more case-branches perform the same actions. Check lines: 141, 171
V1037 Two or more case-branches perform the same actions. Check lines: 146, 176
V1037 Two or more case-branches perform the same actions. Check lines: 151, 161
V1037 Two or more case-branches perform the same actions. Check lines: 156, 166
V1037 Two or more case-branches perform the same actions. Check lines: 236, 251

Change-Id: I34e62bf931da669e35a0b8e0e25b50402a334c27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175224
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
This commit is contained in:
Bogdan Buzea 2024-10-19 19:19:15 +02:00 committed by David Gilbert
parent 354dc28282
commit f640c0ab08

View file

@ -33,6 +33,7 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 450;
break;
case XML_pct20:
case XML_dashUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 150;
aHatch.Angle = 450;
@ -48,6 +49,7 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 450;
break;
case XML_pct40:
case XML_weave:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 150;
aHatch.Angle = 450;
@ -83,6 +85,7 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 450;
break;
case XML_horz:
case XML_wave:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 0;
@ -93,11 +96,13 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 900;
break;
case XML_ltHorz:
case XML_narHorz:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 0;
break;
case XML_ltVert:
case XML_narVert:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 900;
@ -112,16 +117,6 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Distance = 25;
aHatch.Angle = 900;
break;
case XML_narHorz:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 0;
break;
case XML_narVert:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 900;
break;
case XML_dashHorz:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 150;
@ -133,60 +128,40 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 900;
break;
case XML_cross:
case XML_lgGrid:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 100;
aHatch.Angle = 0;
break;
case XML_dnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 1350;
break;
case XML_upDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 450;
break;
case XML_ltDnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 1350;
break;
case XML_ltUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 450;
break;
case XML_dkDnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 1350;
break;
case XML_dkUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 450;
break;
case XML_wdDnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 1350;
break;
case XML_upDiag:
case XML_wdUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 450;
break;
case XML_ltDnDiag:
case XML_dkDnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 1350;
break;
case XML_ltUpDiag:
case XML_dkUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 50;
aHatch.Angle = 450;
break;
case XML_dashDnDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 150;
aHatch.Angle = 1350;
break;
case XML_dashUpDiag:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 150;
aHatch.Angle = 450;
break;
case XML_diagCross:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 100;
@ -207,11 +182,6 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Distance = 50;
aHatch.Angle = 0;
break;
case XML_lgGrid:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 100;
aHatch.Angle = 0;
break;
case XML_dotGrid:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 400;
@ -233,6 +203,7 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Angle = 0;
break;
case XML_diagBrick:
case XML_dotDmnd:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 300;
aHatch.Angle = 450;
@ -247,11 +218,6 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Distance = 100;
aHatch.Angle = 450;
break;
case XML_dotDmnd:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 300;
aHatch.Angle = 450;
break;
case XML_plaid:
aHatch.Style = drawing::HatchStyle_TRIPLE;
aHatch.Distance = 200;
@ -262,11 +228,6 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Distance = 100;
aHatch.Angle = 0;
break;
case XML_weave:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 150;
aHatch.Angle = 450;
break;
case XML_divot:
aHatch.Style = drawing::HatchStyle_TRIPLE;
aHatch.Distance = 400;
@ -277,11 +238,6 @@ static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
aHatch.Distance = 200;
aHatch.Angle = 1350;
break;
case XML_wave:
aHatch.Style = drawing::HatchStyle_SINGLE;
aHatch.Distance = 100;
aHatch.Angle = 0;
break;
case XML_trellis:
aHatch.Style = drawing::HatchStyle_DOUBLE;
aHatch.Distance = 75;