Merge remote-tracking branch 'origin/master' into YaSp 67/16767/1
Vincent COUVERT [Thu, 2 Jul 2015 14:45:26 +0000 (16:45 +0200)]
Conflicts:
scilab/modules/graphics/src/c/getHandleProperty/get_mark_background_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_foreground_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_size_property.c

Change-Id: I3fc26719ceb1ac1671cb986b9a7bc10a853503e3

1  2 
scilab/modules/graphics/src/c/getHandleProperty/get_mark_background_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_foreground_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_size_property.c

@@@ -39,23 -39,22 +39,22 @@@ void* get_mark_background_property(void
      int numMarkBackgrounds = 0;
      int * piNumMarkBackgrounds = &numMarkBackgrounds;
  
 -    getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds);
 +      getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds);
  
-     if (piNumMarkBackgrounds == NULL)
+     if (numMarkBackgrounds == 0)
      {
-         Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background");
-         return NULL;
+         getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground);
+         if (piMarkBackground == NULL)
+         {
+             Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background");
 -            return -1;
++            return NULL;
+         }
 -        return sciReturnDouble(_pvCtx, iMarkBackground);
++        return sciReturnDouble(iMarkBackground);
+     }
+     else
+     {
+         getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds);
 -        return sciReturnRowVectorFromInt(_pvCtx, markBackgrounds, numMarkBackgrounds);
++        return sciReturnRowVectorFromInt(markBackgrounds, numMarkBackgrounds);
      }
-       if (numMarkBackgrounds == 0)
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground);
-               return sciReturnDouble(iMarkBackground);
-       }
-       else
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds);
-               return sciReturnRowVectorFromInt(markBackgrounds, numMarkBackgrounds);
-       }
  }
  /*------------------------------------------------------------------------*/
@@@ -41,23 -41,22 +41,22 @@@ void* get_mark_foreground_property(void
      int numMarkForegrounds = 0;
      int * piNumMarkForegrounds = &numMarkForegrounds;
  
-       getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_FOREGROUNDS__, jni_int, (void**)&piNumMarkForegrounds);
-       if (piNumMarkForegrounds == NULL)
-       {
-               Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_foreground");
-               return NULL;
-       }
-       if (numMarkForegrounds == 0)
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, &piMarkForeground);
-               return sciReturnDouble(iMarkForeground);
-       }
-       else
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUNDS__, jni_int_vector, &markForegrounds);
-               return sciReturnRowVectorFromInt(markForegrounds, numMarkForegrounds);
-       }
+     getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_FOREGROUNDS__, jni_int, (void**)&piNumMarkForegrounds);
+     if (numMarkForegrounds == 0)
+     {
+         getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, &piMarkForeground);
+         if (piMarkForeground == NULL)
+         {
+             Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_foreground");
 -            return -1;
++            return NULL;
+         }
 -        return sciReturnDouble(_pvCtx, iMarkForeground);
++        return sciReturnDouble(iMarkForeground);
+     }
+     else
+     {
+         getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUNDS__, jni_int_vector, &markForegrounds);
 -        return sciReturnRowVectorFromInt(_pvCtx, markForegrounds, numMarkForegrounds);
++        return sciReturnRowVectorFromInt(markForegrounds, numMarkForegrounds);
+     }
  }
  /*------------------------------------------------------------------------*/
@@@ -39,23 -39,22 +39,22 @@@ void* get_mark_size_property(void* _pvC
      int numMarkSizes = 0;
      int * piNumMarkSizes = &numMarkSizes;
  
 -    getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_SIZES__, jni_int, &piNumMarkSizes);
 +      getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_SIZES__, jni_int, &piNumMarkSizes);
  
-     if (piNumMarkSizes == NULL)
+     if (numMarkSizes == 0)
      {
-         Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_size");
-         return NULL;
+         getGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, jni_int, &piMarkSize);
+         if (piMarkSize == NULL)
+         {
+             Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_size");
 -            return -1;
++            return NULL;
+         }
 -        return sciReturnDouble(_pvCtx, iMarkSize);
++        return sciReturnDouble(iMarkSize);
+     }
+     else
+     {
+         getGraphicObjectProperty(iObjUID, __GO_MARK_SIZES__, jni_int_vector, &markSizes);
 -        return sciReturnRowVectorFromInt(_pvCtx, markSizes, numMarkSizes);
++        return sciReturnRowVectorFromInt(markSizes, numMarkSizes);
      }
-       if (numMarkSizes == 0)
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, jni_int, &piMarkSize);
-               return sciReturnDouble(iMarkSize);
-       }
-       else
-       {
-               getGraphicObjectProperty(iObjUID, __GO_MARK_SIZES__, jni_int_vector, &markSizes);
-               return sciReturnRowVectorFromInt(markSizes, numMarkSizes);
-       }
  }
  /*------------------------------------------------------------------------*/