Kaydet (Commit) 53521f50 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS qadev27 (1.8.20); FILE MERGED

2006/08/22 08:27:57 cn 1.8.20.1: #i68762# fixing bug in "select database". The selection does not work with "initialize()" but with "select()"
üst 664ca4f1
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: AccessibleBrowseBoxHeaderCell.java,v $ * $RCSfile: AccessibleBrowseBoxHeaderCell.java,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: rt $ $Date: 2005-09-09 03:29:46 $ * last change: $Author: vg $ $Date: 2006-11-21 14:13:45 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
package mod._svtools; package mod._svtools;
import com.sun.star.view.XSelectionSupplier;
import java.io.PrintWriter; import java.io.PrintWriter;
import lib.StatusException; import lib.StatusException;
...@@ -81,8 +82,8 @@ import com.sun.star.util.URL; ...@@ -81,8 +82,8 @@ import com.sun.star.util.URL;
*/ */
public class AccessibleBrowseBoxHeaderCell extends TestCase { public class AccessibleBrowseBoxHeaderCell extends TestCase {
XDesktop the_Desk; static XDesktop the_Desk;
XTextDocument xTextDoc; static XTextDocument xTextDoc;
/** /**
* Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>).
...@@ -184,7 +185,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { ...@@ -184,7 +185,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase {
UnoRuntime.queryInterface( UnoRuntime.queryInterface(
XInitialization.class, the_frame2.getController()); XInitialization.class, the_frame2.getController());
Object[] params = new Object[3]; PropertyValue[] params = new PropertyValue[3];
PropertyValue param1 = new PropertyValue(); PropertyValue param1 = new PropertyValue();
param1.Name = "DataSourceName"; param1.Name = "DataSourceName";
param1.Value = "Bibliography"; param1.Value = "Bibliography";
...@@ -198,14 +199,22 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { ...@@ -198,14 +199,22 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase {
param3.Value = "biblio"; param3.Value = "biblio";
params[2] = param3; params[2] = param3;
XController xCont = the_frame2.getController();
XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
XSelectionSupplier.class, xCont);
try {
xSelect.select(params);
} catch (com.sun.star.lang.IllegalArgumentException ex) {
throw new StatusException("Could not select Biblio-Database", ex);
}
try { try {
oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()).createInstance oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()).createInstance
("com.sun.star.awt.Toolkit"); ("com.sun.star.awt.Toolkit");
xInit.initialize(params);
} catch (com.sun.star.uno.Exception e) { } catch (com.sun.star.uno.Exception e) {
log.println("Couldn't get toolkit");
e.printStackTrace(log);
throw new StatusException("Couldn't get toolkit", e ); throw new StatusException("Couldn't get toolkit", e );
} }
......
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