diff options
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r-- | qadevOOo/tests/java/ifc/io/_XPersistObject.java | 10 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/util/_XCloneable.java | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/io/_XPersistObject.java b/qadevOOo/tests/java/ifc/io/_XPersistObject.java index 083d0f71c692..717a611eb8e2 100644 --- a/qadevOOo/tests/java/ifc/io/_XPersistObject.java +++ b/qadevOOo/tests/java/ifc/io/_XPersistObject.java @@ -33,6 +33,7 @@ import com.sun.star.io.XObjectInputStream; import com.sun.star.io.XObjectOutputStream; import com.sun.star.io.XOutputStream; import com.sun.star.io.XPersistObject; +import com.sun.star.lang.XComponent; import com.sun.star.uno.UnoRuntime; @@ -154,6 +155,11 @@ public class _XPersistObject extends MultiMethodTest { } bResult &= locRes; } + + XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy); + if (comp != null) { + comp.dispose(); + } } else { Object oCopy = tParam.getMSF().createInstance(sname); XPersistObject persCopy = UnoRuntime.queryInterface(XPersistObject.class, oCopy); @@ -162,6 +168,10 @@ public class _XPersistObject extends MultiMethodTest { bResult = persCopy.getServiceName().equals(sname); + XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy); + if (comp != null) { + comp.dispose(); + } } } catch (com.sun.star.uno.Exception e) { diff --git a/qadevOOo/tests/java/ifc/util/_XCloneable.java b/qadevOOo/tests/java/ifc/util/_XCloneable.java index 62de17b010a0..1f446d801aee 100644 --- a/qadevOOo/tests/java/ifc/util/_XCloneable.java +++ b/qadevOOo/tests/java/ifc/util/_XCloneable.java @@ -22,6 +22,7 @@ import lib.MultiMethodTest; import java.util.Arrays; +import com.sun.star.lang.XComponent; import com.sun.star.lang.XServiceInfo; import com.sun.star.lang.XTypeProvider; import com.sun.star.uno.UnoRuntime; @@ -57,6 +58,11 @@ public class _XCloneable extends MultiMethodTest { result &= checkImplementationID(oObj, clone); tRes.tested("createClone()", result) ; + + XComponent comp = UnoRuntime.queryInterface(XComponent.class, clone); + if (comp != null) { + comp.dispose(); + } } protected byte[] getImplementationID(XInterface ifc) { |