oObj = (XInterface) oInterface;
TestEnvironment tEnv = new TestEnvironment( oObj );
// creating relation for XCachedDynamicResultSetFactory
XDynamicResultSet resSetStub = null ;
try {
Object oUCB = xMSF.createInstanceWithArguments
("com.sun.star.ucb.UniversalContentBroker",
new Object[] {"Local", "Office"}) ;
XContentIdentifierFactory ciFac = (XContentIdentifierFactory)
UnoRuntime.queryInterface(XContentIdentifierFactory.class, oUCB) ;
String url = util.utils.getFullTestURL("SwXTextEmbeddedObject.sxw") ;
String escUrl = "" ;
// In base URL of a JAR file in content URL all directory
// separators ('/') must be replaced with escape symbol '%2F'.
int idx = url.indexOf("/") ;
int lastIdx = -1 ;
while (idx >= 0) {
escUrl += url.substring(lastIdx + 1, idx) + "%2F" ;
lastIdx = idx ;
idx = url.indexOf("/", idx + 1) ;
}
escUrl += url.substring(lastIdx + 1) ;
String cntUrl = "vnd.sun.star.pkg://" + escUrl + "/" ;
XContentIdentifier CI = ciFac.createContentIdentifier(cntUrl) ;
XContentProvider cntProv = (XContentProvider)
UnoRuntime.queryInterface(XContentProvider.class, oUCB) ;
XContent cnt = cntProv.queryContent(CI) ;
XCommandProcessor cmdProc = (XCommandProcessor)
UnoRuntime.queryInterface(XCommandProcessor.class, cnt) ;
Property prop = new Property() ;
prop.Name = "Title" ;
Command cmd = new Command("open", -1, new OpenCommandArgument2
(OpenMode.ALL, 10000, null, new Property[] {prop},
new NumberedSortingInfo[0])) ;
XDynamicResultSet dynResSet = null;
try {
dynResSet = (XDynamicResultSet)
AnyConverter.toObject(new Type(XDynamicResultSet.class),
cmdProc.execute(cmd, 0, null));
} catch (com.sun.star.lang.IllegalArgumentException iae) {