chart2/source/controller/main/ChartController_Properties.cxx |   18 ++---------
 1 file changed, 4 insertions(+), 14 deletions(-)

New commits:
commit fc211dc6f3ccf4aca96735564c4d5300c7f1bdcf
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Oct 17 15:55:29 2024 +0200
Commit:     David Gilbert <freedesk...@treblig.org>
CommitDate: Sun Oct 27 19:07:33 2024 +0100

    tdf#163486: PVS: Identical branches
    
    V1037: Two or more case-branches perform the same actions. Check lines: 
106, 141, 288
    Change-Id: I160bc72851f24503f23a96048feb071f164cbdef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175090
    Reviewed-by: David Gilbert <freedesk...@treblig.org>
    Tested-by: Jenkins

diff --git a/chart2/source/controller/main/ChartController_Properties.cxx 
b/chart2/source/controller/main/ChartController_Properties.cxx
index 7ff6db70e922..304af1d07dc6 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -102,6 +102,10 @@ wrapper::ItemConverter* createItemConverter(
         //create itemconverter for a single object
         switch(eObjectType)
         {
+            case OBJECTTYPE_DATA_STOCK_LOSS:
+            case OBJECTTYPE_DATA_STOCK_GAIN:
+            case OBJECTTYPE_DIAGRAM_WALL:
+            case OBJECTTYPE_DIAGRAM_FLOOR:
             case OBJECTTYPE_PAGE:
                 pItemConverter =  new wrapper::GraphicPropertyItemConverter(
                                         xObjectProperties, 
rDrawModel.GetItemPool(),
@@ -136,13 +140,6 @@ wrapper::ItemConverter* createItemConverter(
                     break;
             case OBJECTTYPE_DIAGRAM:
                     break;
-            case OBJECTTYPE_DIAGRAM_WALL:
-            case OBJECTTYPE_DIAGRAM_FLOOR:
-                pItemConverter =  new wrapper::GraphicPropertyItemConverter(
-                                        xObjectProperties, 
rDrawModel.GetItemPool(),
-                                        rDrawModel, xChartModel,
-                                        
wrapper::GraphicObjectType::LineAndFillProperties );
-                    break;
             case OBJECTTYPE_AXIS:
             {
                 std::optional<awt::Size> pRefSize;
@@ -283,13 +280,6 @@ wrapper::ItemConverter* createItemConverter(
             }
             case OBJECTTYPE_DATA_STOCK_RANGE:
                     break;
-            case OBJECTTYPE_DATA_STOCK_LOSS:
-            case OBJECTTYPE_DATA_STOCK_GAIN:
-                pItemConverter =  new wrapper::GraphicPropertyItemConverter(
-                                        xObjectProperties, 
rDrawModel.GetItemPool(),
-                                        rDrawModel, xChartModel,
-                                        
wrapper::GraphicObjectType::LineAndFillProperties );
-                    break;
             case OBJECTTYPE_DATA_TABLE:
             {
                 pItemConverter =  new wrapper::DataTableItemConverter(

Reply via email to