diff options
-rw-r--r-- | test/source/java/org/openoffice/test/tools/OfficeDocument.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/source/java/org/openoffice/test/tools/OfficeDocument.java b/test/source/java/org/openoffice/test/tools/OfficeDocument.java index 96db51138d67..2a051fddad46 100644 --- a/test/source/java/org/openoffice/test/tools/OfficeDocument.java +++ b/test/source/java/org/openoffice/test/tools/OfficeDocument.java @@ -298,6 +298,14 @@ public class OfficeDocument } /* ------------------------------------------------------------------ */ + /** creates a component at the service factory provided by the document, queried for a given interface type + */ + public <T> T createInstance( String i_serviceSpecifier, Class<T> i_interfaceClass ) throws com.sun.star.uno.Exception + { + return UnoRuntime.queryInterface( i_interfaceClass, createInstance( i_serviceSpecifier ) ); + } + + /* ------------------------------------------------------------------ */ /** creates a component at the service factory provided by the document */ public XInterface createInstanceWithArguments( String serviceSpecifier, Object[] arguments ) throws com.sun.star.uno.Exception |