sc/source/ui/vba/vbaformat.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit ba1d759187f7bc9b640927e9327182e487ed04d7
Author:     Bogdan Buzea <buzea.bog...@libreoffice.org>
AuthorDate: Mon Oct 21 16:57:03 2024 +0200
Commit:     David Gilbert <freedesk...@treblig.org>
CommitDate: Sun Oct 27 01:12:32 2024 +0200

    tdf#163486: PVS: Identical branches
    
    V1037 Two or more case-branches perform the same actions. Check lines: 138, 
144
    V1037 Two or more case-branches perform the same actions. Check lines: 174, 
180
    V1037 Two or more case-branches perform the same actions. Check lines: 674, 
683
    
    Change-Id: I34790e43cd06578f83185d7de04b2567732fe870
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175349
    Reviewed-by: David Gilbert <freedesk...@treblig.org>
    Tested-by: Jenkins

diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 2a0aea444fe9..a866b7c6105e 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -135,14 +135,12 @@ ScVbaFormat< Ifc... >::getVerticalAlignment(  )
             switch( aAPIAlignment )
             {
                 case table::CellVertJustify2::BOTTOM:
+                case table::CellVertJustify2::STANDARD:
                     aResult <<= excel::XlVAlign::xlVAlignBottom;
                     break;
                 case table::CellVertJustify2::CENTER:
                     aResult <<= excel::XlVAlign::xlVAlignCenter;
                     break;
-                case table::CellVertJustify2::STANDARD:
-                    aResult <<= excel::XlVAlign::xlVAlignBottom;
-                    break;
                 case table::CellVertJustify2::TOP:
                     aResult <<= excel::XlVAlign::xlVAlignTop;
                     break;
@@ -171,14 +169,12 @@ ScVbaFormat< Ifc... >::setHorizontalAlignment( const 
uno::Any& HorizontalAlignme
         switch ( nAlignment )
         {
             case excel::XlHAlign::xlHAlignJustify:
+            case excel::XlHAlign::xlHAlignDistributed:
                 aVal <<= table::CellHoriJustify_BLOCK;
                 break;
             case excel::XlHAlign::xlHAlignCenter:
                 aVal <<= table::CellHoriJustify_CENTER;
                 break;
-            case excel::XlHAlign::xlHAlignDistributed:
-                aVal <<= table::CellHoriJustify_BLOCK;
-                break;
             case excel::XlHAlign::xlHAlignLeft:
                 aVal <<= table::CellHoriJustify_LEFT;
                 break;

Reply via email to