lotuswordpro/source/filter/lwptools.cxx | 98 -------------------------------- 1 file changed, 3 insertions(+), 95 deletions(-)
New commits: commit c818bbfb2c2703e29ce17cf4a319a6d520216e70 Author: Bogdan Buzea <buzea.bog...@libreoffice.org> AuthorDate: Mon Oct 21 11:47:17 2024 +0200 Commit: David Gilbert <freedesk...@treblig.org> CommitDate: Fri Nov 1 01:43:43 2024 +0100 tdf#163486: PVS: Identical branches V1037 Two or more case-branches perform the same actions. Check lines: 352, 369, 549 V1037 Two or more case-branches perform the same actions. Check lines: 672, 689, 784 V1037 Two or more case-branches perform the same actions. Check lines: 740, 771, 801 Change-Id: Ifc34cc2c283138b226b5487a838a93d97e45056e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175312 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesk...@treblig.org> diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx index 0d0461f37e7a..d850bdf96fef 100644 --- a/lotuswordpro/source/filter/lwptools.cxx +++ b/lotuswordpro/source/filter/lwptools.cxx @@ -348,23 +348,8 @@ std::unique_ptr<XFDateStyle> LwpTools::GetSystemDateStyle(bool bLongFormat) break; } case 'h': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - if (j==1) - pDateStyle->AddHour(false); - else - pDateStyle->AddHour(); - break; - } case 'H': + case 'K': { for (j=1;;j++) { @@ -544,23 +529,6 @@ std::unique_ptr<XFDateStyle> LwpTools::GetSystemDateStyle(bool bLongFormat) } break; } - case 'K': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - if (j==1) - pDateStyle->AddHour(false); - else - pDateStyle->AddHour(); - break; - } case 'Z': { for (j=1;;j++) @@ -668,23 +636,8 @@ std::unique_ptr<XFTimeStyle> LwpTools::GetSystemTimeStyle() switch(cSymbol) { case 'h': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - if (j==1) - pTimeStyle->AddHour(false); - else - pTimeStyle->AddHour(); - break; - } case 'H': + case 'K': { for (j=1;;j++) { @@ -735,23 +688,6 @@ std::unique_ptr<XFTimeStyle> LwpTools::GetSystemTimeStyle() pTimeStyle->AddSecond(); break; } - case 'S': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - /*if (j==1) - pDateStyle->AddSecond(sal_False); - else - pDateStyle->AddSecond();*/ - break; - } case 'a': { for (j=1;;j++) @@ -766,36 +702,8 @@ std::unique_ptr<XFTimeStyle> LwpTools::GetSystemTimeStyle() pTimeStyle->SetAmPm(true); break; } + case 'S': case 'k': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - break; - } - case 'K': - { - for (j=1;;j++) - { - cTmp = pattern[i+j]; - if (cTmp != cSymbol) - { - i=i+j; - break; - } - } - if (j==1) - pTimeStyle->AddHour(false); - else - pTimeStyle->AddHour(); - break; - } case '\''://' { for (j=1;;j++)