Kaydet (Commit) 4af95888 authored tarafından Stephan Wunderlich's avatar Stephan Wunderlich

CHG: using AnyConverter instead of simple cast

üst f629b4a3
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: CachedContentResultSetFactory.java,v $ * $RCSfile: CachedContentResultSetFactory.java,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change:$Date: 2003-01-27 18:14:22 $ * last change:$Date: 2003-01-31 09:51:42 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -77,6 +77,8 @@ import com.sun.star.ucb.XContentProvider; ...@@ -77,6 +77,8 @@ import com.sun.star.ucb.XContentProvider;
import com.sun.star.ucb.XDynamicResultSet; import com.sun.star.ucb.XDynamicResultSet;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface; import com.sun.star.uno.XInterface;
import com.sun.star.uno.Type;
import com.sun.star.uno.AnyConverter;
import java.io.PrintWriter; import java.io.PrintWriter;
import lib.StatusException; import lib.StatusException;
import lib.TestCase; import lib.TestCase;
...@@ -189,8 +191,14 @@ public class CachedContentResultSetFactory extends TestCase { ...@@ -189,8 +191,14 @@ public class CachedContentResultSetFactory extends TestCase {
(OpenMode.ALL, 10000, null, new Property[] {prop}, (OpenMode.ALL, 10000, null, new Property[] {prop},
new NumberedSortingInfo[0])) ; new NumberedSortingInfo[0])) ;
XDynamicResultSet dynResSet = (XDynamicResultSet) XDynamicResultSet dynResSet = null;
cmdProc.execute(cmd, 0, null) ; try {
dynResSet = (XDynamicResultSet)
AnyConverter.toObject(new Type(XDynamicResultSet.class),
cmdProc.execute(cmd, 0, null));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
throw new StatusException("Couldn't convert Any ",iae);
}
XResultSet resSet = dynResSet.getStaticResultSet() ; XResultSet resSet = dynResSet.getStaticResultSet() ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment