Merge remote-tracking branch 'origin/master' into YaSp
[scilab.git] / scilab / modules / graphics / src / c / getHandleProperty / get_mark_foreground_property.c
index 79c42d2..ed2bb9f 100644 (file)
@@ -32,7 +32,7 @@
 #include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
-int get_mark_foreground_property(void* _pvCtx, int iObjUID)
+void* get_mark_foreground_property(void* _pvCtx, int iObjUID)
 {
     int iMarkForeground = 0;
     int* piMarkForeground = &iMarkForeground;
@@ -41,23 +41,23 @@ int get_mark_foreground_property(void* _pvCtx, int iObjUID)
     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 -1;
-    }
-
-    if (numMarkForegrounds == 0)
-    {
-        getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, &piMarkForeground);
-        return sciReturnDouble(_pvCtx, iMarkForeground);
-    }
-    else
-    {
-        getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUNDS__, jni_int_vector, &markForegrounds);
-        return sciReturnRowVectorFromInt(_pvCtx, markForegrounds, 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);
+       }
 }
 /*------------------------------------------------------------------------*/