diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-08-02 08:44:54 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-08-02 08:44:54 +0000 |
commit | 07fdf4bd60d6a0e24f3581c22669f758b85c0e54 (patch) | |
tree | 771e859dccd3bd4f3f3390edbcdee3a700b76218 /javaunohelper/test/com/sun/star/lib/uno/helper | |
parent | bb195c3eaf54f5e0b55d99fda47ba55d0b8fefda (diff) |
INTEGRATION: CWS jl10 (1.5.104); FILE MERGED
2004/07/22 12:52:01 jl 1.5.104.1: #115688#
Diffstat (limited to 'javaunohelper/test/com/sun/star/lib/uno/helper')
-rw-r--r-- | javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java index 2b07402642c5..991938369e6e 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java @@ -2,9 +2,9 @@ * * $RCSfile: PropertySet_Test.java,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jl $ $Date: 2002-10-21 11:23:24 $ + * last change: $Author: rt $ $Date: 2004-08-02 09:44:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -189,6 +189,10 @@ public class PropertySet_Test cl.setPropertyValue("PropXWeakA",value); ret= cl.getPropertyValue("PropXWeakA"); r[i++]= ((XWeak) ret).equals((XWeak) value); + value = com.sun.star.beans.PropertyState.AMBIGUOUS_VALUE; + cl.setPropertyValue("PropEnum",value); + ret= cl.getPropertyValue("PropEnum"); + r[i++]= ret == value; value= new byte[]{1,2,3}; cl.setPropertyValue("PropArrayByteA", value); ret= cl.getPropertyValue("PropArrayByteA"); @@ -1153,6 +1157,9 @@ class TestClass extends PropertySet public XInterface xInterfacePropA; public Property propXWeakA= new Property("PropXWeakA", 13, new Type(Any.class), (short) 0); public XWeak xWeakPropA; + public Property propEnum = + new Property("PropEnum", 14, new Type("com.sun.star.beans.PropertyState", TypeClass.ENUM), (short)0); + public com.sun.star.beans.PropertyState enumPropertyState = com.sun.star.beans.PropertyState.DEFAULT_VALUE; // Test private, protected, package access, Anys as arguments and members, members whith a value public Property propBoolB= new Property("PropBoolB", 101, new Type(Boolean.TYPE), (short) 0); @@ -1203,6 +1210,7 @@ class TestClass extends PropertySet registerProperty(propAnyA, "anyPropA"); registerProperty(propXInterfaceA, "xInterfacePropA"); registerProperty(propXWeakA, "xWeakPropA"); + registerProperty(propEnum,"enumPropertyState"); registerProperty(propBoolB, "boolPropB"); registerProperty(propBoolC, "boolPropC"); registerProperty(propBoolD, "boolPropD"); @@ -1224,7 +1232,7 @@ class TestClass extends PropertySet propBoolA, propCharA, propByteA, propShortA, propIntA, propLongA, propFloatA, propDoubleA, propStringA, propArrayByteA, propTypeA, propObjectA, - propAnyA, propXInterfaceA, propXWeakA, propBoolB, + propAnyA, propXInterfaceA, propXWeakA, propEnum, propBoolB, propBoolC, propBoolD, propBoolClass, propCharClass, propByteClass, propShortClass, propIntClass, propLongClass, propFloatClass, propDoubleClass @@ -1307,6 +1315,10 @@ class TestClass extends PropertySet r[i++]= convertPropertyValue(propXWeakA, outNewVal, outOldVal, value); r[i++]= outNewVal[0] instanceof XWeak && outNewVal[0].equals(value); + value = com.sun.star.beans.PropertyState.DIRECT_VALUE; + r[i++]= convertPropertyValue(propEnum, outNewVal, outOldVal, value); + r[i++]= outNewVal[0] instanceof com.sun.star.uno.Enum && outNewVal[0].equals(value); + // Any arguments ------------------------------------------------------------------ value= new Any( new Type(Integer.class),new Integer(111)); r[i++]= convertPropertyValue(propIntA, outNewVal, outOldVal, value); @@ -1440,9 +1452,9 @@ class TestClass extends PropertySet r[i++]= xInterfacePropA instanceof XInterface && xInterfacePropA.equals(value); setPropertyValueNoBroadcast(propXWeakA, value); r[i++]= xInterfacePropA instanceof XWeak && xInterfacePropA.equals(value); - objectPropA= new Object(); - - + value = com.sun.star.beans.PropertyState.AMBIGUOUS_VALUE; + setPropertyValueNoBroadcast(propEnum, value); + r[i++]= enumPropertyState == value; value= new Boolean(true); setPropertyValueNoBroadcast(propBoolB, value); r[i++]= boolPropB == ((Boolean) value).booleanValue(); @@ -1482,6 +1494,7 @@ class TestClass extends PropertySet anyPropA= null; xInterfacePropA= null; xWeakPropA= null; + enumPropertyState = com.sun.star.beans.PropertyState.DEFAULT_VALUE; boolPropB= false; boolPropC= false; boolPropD= false; |