summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-31 10:15:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-31 10:15:47 +0100
commit9e77c2fb7cadfd477fb1b971b011d43f30781660 (patch)
tree7a7d70822e2628a1e6383a15eeedb8fea5309123 /wizards
parent11235e86497df47ff3acc61c1cab9fff0b91949e (diff)
Remove UNOIDL "array" and "union" vaporware remnants
...and deprecate what cannot be removed for compatibility. Change-Id: I1ea335af775b867b468b8285113631167729a92a
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java43
1 files changed, 8 insertions, 35 deletions
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index 864c41cfc686..c0f88796dae7 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -43,8 +43,7 @@ public class NumericalHelper
public static final int CHAR_TYPE = 6;
public static final int STRING_TYPE = -1;
public static final int BOOLEAN_TYPE = -2;
- public static final int ARRAY_TYPE = -3;
- public static final int SEQUENCE_TYPE = -4;
+ public static final int SEQUENCE_TYPE = -3;
public static final int ASCII_VALUE_0 = 48;
public static final int ASCII_VALUE_A = 65;
public static final int COUNT_CHARS_IN_ALPHABET = 26;
@@ -659,7 +658,7 @@ public class NumericalHelper
case BOOLEAN_TYPE:
retValue = aTypeObject.aValue.toString();
break;
- case ARRAY_TYPE:
+ case SEQUENCE_TYPE:
retValue = new String(toByteArray((aValue)));
break;
default:
@@ -738,11 +737,7 @@ public class NumericalHelper
TypeObject aTypeObject = getTypeObject(anArrayValue);
if (aTypeObject.iType == SEQUENCE_TYPE)
{
- aTypeObject = convertSequenceToObjectArray(aTypeObject);
- }
- if (aTypeObject.iType == ARRAY_TYPE)
- {
- Object[] obj = (Object[]) aTypeObject.aValue;
+ Object[] obj = convertSequenceToObjectArray(aTypeObject);
retValue = new int[obj.length];
for (int i = 0; i < obj.length; i++)
{
@@ -772,11 +767,7 @@ public class NumericalHelper
TypeObject aTypeObject = getTypeObject(anArrayValue);
if (aTypeObject.iType == SEQUENCE_TYPE)
{
- aTypeObject = convertSequenceToObjectArray(aTypeObject);
- }
- if (aTypeObject.iType == ARRAY_TYPE)
- {
- Object[] obj = (Object[]) aTypeObject.aValue;
+ Object[] obj = convertSequenceToObjectArray(aTypeObject);
retValue = new byte[obj.length];
for (int i = 0; i < obj.length; i++)
{
@@ -806,11 +797,7 @@ public class NumericalHelper
TypeObject aTypeObject = getTypeObject(anArrayValue);
if (aTypeObject.iType == SEQUENCE_TYPE)
{
- aTypeObject = convertSequenceToObjectArray(aTypeObject);
- }
- if (aTypeObject.iType == ARRAY_TYPE)
- {
- Object[] obj = (Object[]) aTypeObject.aValue;
+ Object[] obj = convertSequenceToObjectArray(aTypeObject);
retValue = new short[obj.length];
for (int i = 0; i < obj.length; i++)
{
@@ -840,11 +827,7 @@ public class NumericalHelper
TypeObject aTypeObject = getTypeObject(anArrayValue);
if (aTypeObject.iType == SEQUENCE_TYPE)
{
- aTypeObject = convertSequenceToObjectArray(aTypeObject);
- }
- if (aTypeObject.iType == ARRAY_TYPE)
- {
- Object[] obj = (Object[]) aTypeObject.aValue;
+ Object[] obj = convertSequenceToObjectArray(aTypeObject);
retValue = new String[obj.length];
for (int i = 0; i < obj.length; i++)
{
@@ -1120,13 +1103,6 @@ public class NumericalHelper
aTypeObject.iType = BOOLEAN_TYPE;
aTypeObject.aValue = Boolean.valueOf(AnyConverter.toBoolean(aValue));
break;
- case TypeClass.ARRAY_value:
- aTypeObject.iType = ARRAY_TYPE;
- aTypeObject.aValue = new Object[]
- {
- AnyConverter.toArray(aValue)
- };
- break;
case TypeClass.SEQUENCE_value:
aTypeObject.iType = SEQUENCE_TYPE;
aTypeObject.aValue = aValue;
@@ -1302,13 +1278,11 @@ public class NumericalHelper
}
}
- private static TypeObject convertSequenceToObjectArray(
+ private static Object[] convertSequenceToObjectArray(
TypeObject sourceObject)
throws com.sun.star.lang.IllegalArgumentException
{
- TypeObject destObject = new TypeObject();
Object array = sourceObject.aValue;
- destObject.iType = ARRAY_TYPE;
Class<?> c = array.getClass();
Object[] aShortVal = null;
if (c.equals(byte[].class))
@@ -1388,8 +1362,7 @@ public class NumericalHelper
"Cannot convert unknown type: '" + e.getMessage() + "'");
}
}
- destObject.aValue = aShortVal;
- return destObject;
+ return aShortVal;
}
/**