*/
public void _createSortedDynamicResultSet() {
boolean result = true ;
XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
XDynamicResultSet dynResSet = 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])) ;
dynResSet = (XDynamicResultSet) AnyConverter.toObject(
new Type(XDynamicResultSet.class),cmdProc.execute(cmd, 0, null));
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
}
XDynamicResultSet sortedSet = oObj.createSortedDynamicResultSet
(dynResSet, new NumberedSortingInfo[0], null) ;
int rowCount = -1 ;
if (sortedSet != null) {
XResultSet set = null ;
try {
set = sortedSet.getStaticResultSet() ;
} catch (com.sun.star.ucb.ListenerAlreadySetException e) {
e.printStackTrace(log);
}
try {