This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new 084e071 Fixed typos, removed whitespace
084e071 is described below
commit 084e0718daaccace197b8798c4eb787f28d8e719
Author: mseidel <[email protected]>
AuthorDate: Thu Mar 11 21:38:04 2021 +0100
Fixed typos, removed whitespace
(cherry picked from commit b57f57573a250213d9f284e3b5fd3d3e548405eb)
---
.../mod/_dbaccess/ConnectionLineAccessibility.java | 96 +++++++++++-----------
.../tests/java/mod/_dbaccess/DBContentLoader.java | 10 +--
.../java/mod/_dbaccess/JoinViewAccessibility.java | 76 ++++++++---------
.../java/mod/_dbaccess/OCommandDefinition.java | 10 +--
.../tests/java/mod/_dbaccess/ODatabaseContext.java | 15 ++--
.../tests/java/mod/_dbaccess/ODatabaseSource.java | 39 ++++-----
.../_dbaccess/ODatasourceAdministrationDialog.java | 10 +--
.../java/mod/_dbaccess/ODatasourceBrowser.java | 38 +++++----
.../java/mod/_dbaccess/OInteractionHandler.java | 12 +--
.../qadevOOo/tests/java/mod/_dbaccess/ORowSet.java | 43 +++++-----
.../java/mod/_dbaccess/OSQLMessageDialog.java | 18 ++--
.../mod/_dbaccess/OSingleSelectQueryComposer.java | 39 ++++-----
.../tests/java/mod/_dbaccess/SbaXGridControl.java | 72 ++++++++--------
.../mod/_dbaccess/TableWindowAccessibility.java | 86 +++++++++----------
.../qadevOOo/tests/java/mod/_dbaccess/package.html | 8 +-
15 files changed, 293 insertions(+), 279 deletions(-)
diff --git
a/main/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
index 71d5588..8e88c7a 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
package mod._dbaccess;
import java.io.PrintWriter;
@@ -82,14 +83,14 @@ public class ConnectionLineAccessibility extends TestCase
XComponent QueryComponent = null;
String user = "";
String password="";
-
+
/**
* Creates a new DataSource and stores it.
* Creates a connection and using it
* creates two tables in database.
* Creates a new query and adds it to DefinitionContainer.
* Opens the QueryComponent.with loadComponentFromURL
- * and gets the object with the role UNKNOWN and the Impplementation
+ * and gets the object with the role UNKNOWN and the Implementation
* name that contains ConnectionLine
* @param Param test parameters
* @param log writer to log information while testing
@@ -101,13 +102,13 @@ public class ConnectionLineAccessibility extends TestCase
PrintWriter log)
{
XInterface oObj = null;
-
+
Object oDBContext = null;
Object oDBSource = null;
Object newQuery = null;
Object toolkit = null;
XStorable store = null;
-
+
try
{
oDBContext = ((XMultiServiceFactory) Param.getMSF())
@@ -124,24 +125,24 @@ public class ConnectionLineAccessibility extends TestCase
e.printStackTrace(log);
throw new StatusException(Status.failed("Couldn't create
instance"));
}
-
+
String mysqlURL = (String) Param.get("mysql.url");
-
+
if (mysqlURL == null)
{
throw new StatusException(Status.failed(
"Couldn't get 'mysql.url' from ini-file"));
}
-
+
user = (String) Param.get("jdbc.user");
password = (String) Param.get("jdbc.password");
-
+
if ((user == null) || (password == null))
{
throw new StatusException(Status.failed(
"Couldn't get 'jdbc.user' or 'jdbc.password' from
ini-file"));
}
-
+
PropertyValue[] info = new PropertyValue[2];
info[0] = new PropertyValue();
info[0].Name = "user";
@@ -149,10 +150,10 @@ public class ConnectionLineAccessibility extends TestCase
info[1] = new PropertyValue();
info[1].Name = "password";
info[1].Value = password;
-
+
XPropertySet propSetDBSource = (XPropertySet)
UnoRuntime.queryInterface(
XPropertySet.class, oDBSource);
-
+
try
{
propSetDBSource.setPropertyValue("URL", mysqlURL);
@@ -182,7 +183,7 @@ public class ConnectionLineAccessibility extends TestCase
throw new StatusException(Status.failed(
"Couldn't set property value"));
}
-
+
try
{
log.println("writing database file ...");
@@ -190,7 +191,7 @@ public class ConnectionLineAccessibility extends TestCase
UnoRuntime.queryInterface(XDocumentDataSource.class, oDBSource);
store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
xDDS.getDatabaseDocument());
-
+
aFile = utils.getOfficeTemp((XMultiServiceFactory)
Param.getMSF())+"ConnectionLine.odb";
log.println("... filename will be "+aFile);
store.storeAsURL(aFile,new PropertyValue[]
@@ -202,19 +203,19 @@ public class ConnectionLineAccessibility extends TestCase
e.printStackTrace(log);
throw new StatusException(Status.failed("Couldn't register
object"));
}
-
+
isolConnection = (XIsolatedConnection) UnoRuntime.queryInterface(
XIsolatedConnection.class,
oDBSource);
-
+
XConnection connection = null;
XStatement statement = null;
-
+
final String tbl_name1 = "tst_table1";
final String tbl_name2 = "tst_table2";
final String col_name1 = "id1";
final String col_name2 = "id2";
-
+
try
{
connection = isolConnection.getIsolatedConnection(user, password);
@@ -247,16 +248,16 @@ public class ConnectionLineAccessibility extends TestCase
throw new StatusException(Status.failed("SQLException"));
}
}
-
+
XQueryDefinitionsSupplier querySuppl = (XQueryDefinitionsSupplier)
UnoRuntime.queryInterface(
XQueryDefinitionsSupplier.class,
oDBSource);
-
+
XNameAccess defContainer = querySuppl.getQueryDefinitions();
-
+
XPropertySet queryProp = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, newQuery);
-
+
try
{
final String query = "select * from " + tbl_name1 + ", " +
@@ -289,11 +290,11 @@ public class ConnectionLineAccessibility extends TestCase
throw new StatusException(Status.failed(
"Couldn't set property value"));
}
-
+
XNameContainer queryContainer = (XNameContainer)
UnoRuntime.queryInterface(
XNameContainer.class,
defContainer);
-
+
try
{
queryContainer.insertByName("Query1", newQuery);
@@ -325,43 +326,43 @@ public class ConnectionLineAccessibility extends TestCase
e.printStackTrace(log);
throw new StatusException(Status.failed("Couldn't insert query"));
}
-
+
PropertyValue[] loadProps = new PropertyValue[3];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "QueryDesignView";
loadProps[0].Value = Boolean.TRUE;
-
+
loadProps[1] = new PropertyValue();
loadProps[1].Name = "CurrentQuery";
loadProps[1].Value = "Query1";
-
+
loadProps[2] = new PropertyValue();
loadProps[2].Name = "DataSource";
loadProps[2].Value = oDBSource;
-
+
QueryComponent = DesktopTools.loadDoc((XMultiServiceFactory)
Param.getMSF(),".component:DB/QueryDesign",loadProps);
-
+
util.utils.shortWait(1000);
-
+
xWindow = UnoRuntime.queryInterface(XModel.class, QueryComponent).
getCurrentController().getFrame().getContainerWindow();
-
+
XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
-
+
AccessibilityTools.printAccessibleTree (log,xRoot,
Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
-
+
oObj =
AccessibilityTools.getAccessibleObjectForRoleIgnoreShowing(xRoot,
AccessibleRole.UNKNOWN, "", "ConnectionLine");
-
+
log.println("ImplementationName " + util.utils.getImplName(oObj));
-
+
log.println("creating TestEnvironment");
-
+
TestEnvironment tEnv = new TestEnvironment(oObj);
-
+
shortWait();
-
+
final XWindow queryWin = xWindow;
-
+
tEnv.addObjRelation("EventProducer",
new
ifc.accessibility._XAccessibleEventBroadcaster.EventProducer()
{
@@ -371,10 +372,10 @@ public class ConnectionLineAccessibility extends TestCase
queryWin.setPosSize(rect.X, rect.Y, rect.Height-5,
rect.Width-5, PosSize.POSSIZE);
}
});
-
+
return tEnv;
} // finish method getTestEnvironment
-
+
/**
* Closes the DatasourceAdministration dialog and Query Dialog.
*/
@@ -382,7 +383,7 @@ public class ConnectionLineAccessibility extends TestCase
{
try
{
-
+
log.println("closing QueryComponent ...");
DesktopTools.closeDoc(QueryComponent);
log.println("... done");
@@ -398,9 +399,9 @@ public class ConnectionLineAccessibility extends TestCase
e.printStackTrace();
}
}
-
+
/**
- * Sleeps for 1.5 sec. to allow StarOffice to react on <code>
+ * Sleeps for 1.5 sec. to allow OpenOffice to react on <code>
* reset</code> call.
*/
private void shortWait()
@@ -415,3 +416,4 @@ public class ConnectionLineAccessibility extends TestCase
}
}
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/DBContentLoader.java
b/main/qadevOOo/tests/java/mod/_dbaccess/DBContentLoader.java
index a0abf64..0995287 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/DBContentLoader.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/DBContentLoader.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -45,7 +45,7 @@ import com.sun.star.uno.XInterface;
* <li> <code>com::sun::star::lang::XInitialization</code></li>
* </ul>
* This object test <b> is NOT </b> designed to be run in several
-* threads concurently.
+* threads concurrently.
* @see com.sun.star.beans.XPropertySet
* @see com.sun.star.frame.FrameLoader
* @see com.sun.star.frame.XSynchronousFrameLoader
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
b/main/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
index 70809ba..74fd17f 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
package mod._dbaccess;
import java.io.PrintWriter;
@@ -81,14 +82,14 @@ public class JoinViewAccessibility extends TestCase {
XComponent QueryComponent = null;
String user = "";
String password="";
-
+
/**
* Creates a new DataSource and stores it.
* Creates a connection and using it
* creates two tables in database.
* Creates a new query and adds it to DefinitionContainer.
* Opens the QueryComponent.with loadComponentFromURL
- * and gets the object with the role UNKNOWN and the Impplementation
+ * and gets the object with the role UNKNOWN and the Implementation
* name that contains ConnectionLine
* @param Param test parameters
* @param log writer to log information while testing
@@ -100,13 +101,13 @@ public class JoinViewAccessibility extends TestCase {
PrintWriter log)
{
XInterface oObj = null;
-
+
Object oDBContext = null;
Object oDBSource = null;
Object newQuery = null;
Object toolkit = null;
XStorable store = null;
-
+
try
{
oDBContext = ((XMultiServiceFactory) Param.getMSF ())
@@ -122,24 +123,24 @@ public class JoinViewAccessibility extends TestCase {
e.printStackTrace (log);
throw new StatusException (Status.failed ("Couldn't create
instance"));
}
-
+
String mysqlURL = (String) Param.get ("mysql.url");
-
+
if (mysqlURL == null)
{
throw new StatusException (Status.failed (
"Couldn't get 'mysql.url' from ini-file"));
}
-
+
user = (String) Param.get ("jdbc.user");
password = (String) Param.get ("jdbc.password");
-
+
if ((user == null) || (password == null))
{
throw new StatusException (Status.failed (
"Couldn't get 'jdbc.user' or 'jdbc.password' from ini-file"));
}
-
+
PropertyValue[] info = new PropertyValue[2];
info[0] = new PropertyValue ();
info[0].Name = "user";
@@ -147,10 +148,10 @@ public class JoinViewAccessibility extends TestCase {
info[1] = new PropertyValue ();
info[1].Name = "password";
info[1].Value = password;
-
+
XPropertySet propSetDBSource = (XPropertySet)
UnoRuntime.queryInterface (
XPropertySet.class, oDBSource);
-
+
try
{
propSetDBSource.setPropertyValue ("URL", mysqlURL);
@@ -176,7 +177,7 @@ public class JoinViewAccessibility extends TestCase {
throw new StatusException (Status.failed (
"Couldn't set property value"));
}
-
+
try
{
log.println ("writing database file ...");
@@ -194,19 +195,19 @@ public class JoinViewAccessibility extends TestCase {
e.printStackTrace (log);
throw new StatusException (Status.failed ("Couldn't register
object"));
}
-
+
isolConnection = (XIsolatedConnection) UnoRuntime.queryInterface (
XIsolatedConnection.class,
oDBSource);
-
+
XConnection connection = null;
XStatement statement = null;
-
+
final String tbl_name1 = "tst_table1";
final String tbl_name2 = "tst_table2";
final String col_name1 = "id1";
final String col_name2 = "id2";
-
+
try
{
connection = isolConnection.getIsolatedConnection (user, password);
@@ -237,16 +238,16 @@ public class JoinViewAccessibility extends TestCase {
throw new StatusException (Status.failed ("SQLException"));
}
}
-
+
XQueryDefinitionsSupplier querySuppl = (XQueryDefinitionsSupplier)
UnoRuntime.queryInterface (
XQueryDefinitionsSupplier.class,
oDBSource);
-
+
XNameAccess defContainer = querySuppl.getQueryDefinitions ();
-
+
XPropertySet queryProp = (XPropertySet) UnoRuntime.queryInterface (
XPropertySet.class, newQuery);
-
+
try
{
final String query = "select * from " + tbl_name1 + ", " +
@@ -275,11 +276,11 @@ public class JoinViewAccessibility extends TestCase {
throw new StatusException (Status.failed (
"Couldn't set property value"));
}
-
+
XNameContainer queryContainer = (XNameContainer)
UnoRuntime.queryInterface (
XNameContainer.class,
defContainer);
-
+
try
{
queryContainer.insertByName ("Query1", newQuery);
@@ -306,27 +307,27 @@ public class JoinViewAccessibility extends TestCase {
e.printStackTrace (log);
throw new StatusException (Status.failed ("Couldn't insert
query"));
}
-
+
PropertyValue[] loadProps = new PropertyValue[3];
loadProps[0] = new PropertyValue ();
loadProps[0].Name = "QueryDesignView";
loadProps[0].Value = Boolean.TRUE;
-
+
loadProps[1] = new PropertyValue ();
loadProps[1].Name = "CurrentQuery";
loadProps[1].Value = "Query1";
-
+
loadProps[2] = new PropertyValue ();
loadProps[2].Name = "DataSource";
loadProps[2].Value = oDBSource;
-
+
QueryComponent = DesktopTools.loadDoc ((XMultiServiceFactory)
Param.getMSF (),".component:DB/QueryDesign",loadProps);
-
+
xWindow = UnoRuntime.queryInterface(XModel.class, QueryComponent).
getCurrentController().getFrame().getContainerWindow();
-
+
XAccessible xRoot = AccessibilityTools.getAccessibleObject (xWindow);
-
+
AccessibilityTools.printAccessibleTree (log,xRoot,
Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
oObj = AccessibilityTools.getAccessibleObjectForRole(xRoot,
AccessibleRole.VIEW_PORT);
@@ -341,7 +342,7 @@ public class JoinViewAccessibility extends TestCase {
final XWindow queryWin = xWindow;
- tEnv.addObjRelation("EventProducer",
+ tEnv.addObjRelation("EventProducer",
new
ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
public void fireEvent() {
Rectangle rect = queryWin.getPosSize();
@@ -355,10 +356,10 @@ public class JoinViewAccessibility extends TestCase {
/**
* Closes the DatasourceAdministration dialog and Query Dialog.
*/
- protected void cleanup(TestParameters Param, PrintWriter log) {
+ protected void cleanup(TestParameters Param, PrintWriter log) {
try
{
-
+
log.println ("closing QueryComponent ...");
DesktopTools.closeDoc (QueryComponent);
log.println ("... done");
@@ -375,7 +376,7 @@ public class JoinViewAccessibility extends TestCase {
}
/**
- * Sleeps for 1.5 sec. to allow StarOffice to react on <code>
+ * Sleeps for 1.5 sec. to allow OpenOffice to react on <code>
* reset</code> call.
*/
private void shortWait() {
@@ -386,3 +387,4 @@ public class JoinViewAccessibility extends TestCase {
}
}
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/OCommandDefinition.java
b/main/qadevOOo/tests/java/mod/_dbaccess/OCommandDefinition.java
index d7c5773..69c8269 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/OCommandDefinition.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/OCommandDefinition.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -43,7 +43,7 @@ import com.sun.star.uno.XInterface;
* <li> <code>com::sun::star::beans::XPropertySet</code></li>
* </ul>
* This object test <b> can </b> be run in several
-* threads concurently.
+* threads concurrently.
* @see com.sun.star.sdb.QueryDefinition
* @see com.sun.star.beans.XPropertySet
* @see ifc.sdb._QueryDefinition
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseContext.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseContext.java
index 032dee1..3e500c1 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseContext.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseContext.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -116,15 +116,15 @@ public class ODatabaseContext extends TestCase {
UnoRuntime.queryInterface(XPropertySet.class, oInterface) ;
xDSProps.setPropertyValue("URL", "sdbc:dbase:file:///.") ;
-
+
XDocumentDataSource xDDS = (XDocumentDataSource)
UnoRuntime.queryInterface(XDocumentDataSource.class, oInterface);
XStorable store = (XStorable)
UnoRuntime.queryInterface(XStorable.class,
xDDS.getDatabaseDocument ());
String aFile = utils.getOfficeTemp ((XMultiServiceFactory)
Param.getMSF ())+"DatabaseContext.odb";
log.println("store to '" + aFile + "'");
- store.storeAsURL(aFile,new PropertyValue[]{});
-
+ store.storeAsURL(aFile,new PropertyValue[]{});
+
tEnv.addObjRelation("XNamingService.RegisterObject", oInterface) ;
tEnv.addObjRelation("INSTANCE", oInterface);
@@ -143,3 +143,4 @@ public class ODatabaseContext extends TestCase {
} // finish method getTestEnvironment
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseSource.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseSource.java
index 2141e78..57c0802 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseSource.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/ODatabaseSource.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -94,18 +94,18 @@ public class ODatabaseSource extends TestCase {
protected void initialize ( TestParameters Param, PrintWriter log) {
uniqueSuffix = uniqueSuffixStat++ ;
}
-
+
protected void cleanup(TestParameters tParam, PrintWriter log) {
log.println(" disposing not longer needed docs... ");
DesktopTools.closeDoc(xDBDoc);
}
-
-
+
+
/**
* Creating a Testenvironment for the interfaces to be tested.
*
- * Creates new <code>DataSource</code> which represents DBase database
+ * Creates new <code>DataSource</code> which represents dBASE database
* located in temporary directory, and then registers it in service
* <code>com.sun.star.sdb.DatabaseContext</code>.
*
@@ -129,7 +129,7 @@ public class ODatabaseSource extends TestCase {
try{
oInterface = xMSF.createInstance(
"com.sun.star.sdb.DatabaseContext" );
- if (oInterface == null)
+ if (oInterface == null)
throw new StatusException("Could not get
service 'com.sun.star.sdb.DatabaseContext'", new Exception());
}catch( Exception e ) {
@@ -149,8 +149,8 @@ public class ODatabaseSource extends TestCase {
try{
XInterface oDatabaseDoc = (XInterface) xMSF.createInstance
("com.sun.star.sdb.OfficeDatabaseDocument") ;
-
- if (oDatabaseDoc == null)
+
+ if (oDatabaseDoc == null)
throw new StatusException("Could not get
service 'com.sun.star.sdb.OfficeDatabaseDocument'", new Exception());
xDBDoc = (XOfficeDatabaseDocument) UnoRuntime.queryInterface(
@@ -165,12 +165,12 @@ public class ODatabaseSource extends TestCase {
oObj = (XInterface) xDBDoc.getDataSource();
log.println("ImplementationName: " + utils.getImplName(oObj));
-
- // Creating new DBase data source in the TEMP directory
+
+ // Creating new dBASE data source in the TEMP directory
XPropertySet xSrcProp = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, oObj);
-
+
try{
xSrcProp.setPropertyValue("URL", tmpDatabaseUrl) ;
} catch ( UnknownPropertyException e){
@@ -194,7 +194,7 @@ public class ODatabaseSource extends TestCase {
// registering source in DatabaseContext
XStorable store = (XStorable)
UnoRuntime.queryInterface(XStorable.class, xDBDoc);
- String aFile = utils.getOfficeTemp ((XMultiServiceFactory)
Param.getMSF ())+"DataSource.odb";
+ String aFile = utils.getOfficeTemp ((XMultiServiceFactory)
Param.getMSF ())+"DataSource.odb";
try{
store.storeAsURL(aFile,new PropertyValue[]{});
} catch (IOException e){
@@ -206,16 +206,16 @@ public class ODatabaseSource extends TestCase {
e.printStackTrace ();
throw new StatusException("Could not save ", e) ;
}
-
+
try{
- xDBContextNameServ.registerObject(databaseName, oObj) ;
+ xDBContextNameServ.registerObject(databaseName, oObj) ;
} catch (Exception e){
log.println("Could not register data source" );
e.printStackTrace ();
throw new StatusException("Could not register ", e) ;
}
-
+
log.println( " creating a new environment for object" );
TestEnvironment tEnv = new TestEnvironment( oObj );
@@ -229,7 +229,7 @@ public class ODatabaseSource extends TestCase {
e.printStackTrace(log) ;
}
- // dbase does not need user and password
+ // dBASE does not need user and password
tEnv.addObjRelation("UserAndPassword", new String[]{"",""}) ;
tEnv.addObjRelation("XCompletedConnection.Handler",
@@ -239,3 +239,4 @@ public class ODatabaseSource extends TestCase {
} // finish method getTestEnvironment
}
+
diff --git
a/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceAdministrationDialog.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceAdministrationDialog.java
index 29d48ee..60d2ef0 100644
---
a/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceAdministrationDialog.java
+++
b/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceAdministrationDialog.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -47,7 +47,7 @@ import com.sun.star.uno.XInterface;
* </ul> <p>
*
* This object test <b> is NOT </b> designed to be run in several
-* threads concurently.
+* threads concurrently.
*
* @see com.sun.star.lang.XInitialization
* @see com.sun.star.ui.dialogs.XExecutableDialog
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
index 12941e7..587107d 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
package mod._dbaccess;
import java.io.PrintWriter;
@@ -72,7 +73,7 @@ import com.sun.star.view.XControlAccess;
* <li> <code>com::sun::star::lang::XComponent</code></li>
* </ul> <p>
* This object test <b> is NOT </b> designed to be run in several
- * threads concurently.
+ * threads concurrently.
*
* @see com.sun.star.container.XChild
* @see com.sun.star.lang.XInitialization
@@ -103,7 +104,7 @@ public class ODatasourceBrowser extends TestCase {
* Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>).
*/
protected void initialize(TestParameters Param, PrintWriter log) {
- the_Desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
+ the_Desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
DesktopTools.createDesktop(
(XMultiServiceFactory)Param.getMSF()));
System.setProperty("hideMe", "false");
@@ -178,7 +179,7 @@ public class ODatasourceBrowser extends TestCase {
* @see com.sun.star.frame.XController
* @see com.sun.star.frame.XDispatchProvider
*/
- protected synchronized TestEnvironment
createTestEnvironment(TestParameters Param,
+ protected synchronized TestEnvironment
createTestEnvironment(TestParameters Param,
PrintWriter
log) {
log.println("creating a test environment");
@@ -203,14 +204,14 @@ public class ODatasourceBrowser extends TestCase {
log.println("creating a text document");
xTextDoc = SOF.createTextDoc(null);
} catch (com.sun.star.uno.Exception e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
e.printStackTrace(log);
throw new StatusException("Couldn't create document", e);
}
shortWait();
- XModel aModel1 = (XModel) UnoRuntime.queryInterface(XModel.class,
+ XModel aModel1 = (XModel) UnoRuntime.queryInterface(XModel.class,
xTextDoc);
XController secondController = aModel1.getCurrentController();
@@ -262,33 +263,33 @@ public class ODatasourceBrowser extends TestCase {
XInitialization.class, oObj);
xInit.initialize(params);
} catch (com.sun.star.uno.Exception e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
e.printStackTrace(log);
throw new StatusException("Couldn't initialize document", e);
}
shortWait();
- XControlShape aShape = FormTools.createControlShape(xTextDoc, 3000,
- 4500, 15000,
10000,
+ XControlShape aShape = FormTools.createControlShape(xTextDoc, 3000,
+ 4500, 15000, 10000,
"CommandButton");
WriterTools.getDrawPage(xTextDoc).add((XShape) aShape);
XControlModel shapeModel = aShape.getControl();
XControlAccess xCtrlAccess = (XControlAccess)
UnoRuntime.queryInterface(
- XControlAccess.class,
+ XControlAccess.class,
secondController);
XControl xCtrl = null;
try {
xCtrl = xCtrlAccess.getControl(shapeModel);
} catch (com.sun.star.uno.Exception e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
e.printStackTrace(log);
}
- XWindow docWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
+ XWindow docWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
xCtrl);
log.println("creating a new environment for ODatasourceBrowser
object");
@@ -307,15 +308,15 @@ public class ODatasourceBrowser extends TestCase {
tEnv.addObjRelation("HasViewData", new Boolean(false));
- // Addig relation for XDispatchProvider
- tEnv.addObjRelation("XDispatchProvider.URL",
+ // Adding relation for XDispatchProvider
+ tEnv.addObjRelation("XDispatchProvider.URL",
".uno:DataSourceBrowser/FormLetter");
return tEnv;
} // finish method getTestEnvironment
/**
- * Sleeps for 0.2 sec. to allow StarOffice to react on <code>
+ * Sleeps for 0.2 sec. to allow OpenOffice to react on <code>
* reset</code> call.
*/
private void shortWait() {
@@ -326,3 +327,4 @@ public class ODatasourceBrowser extends TestCase {
}
}
} // finish class oDatasourceBrowser
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/OInteractionHandler.java
b/main/qadevOOo/tests/java/mod/_dbaccess/OInteractionHandler.java
index 245daa8..02964d5 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/OInteractionHandler.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/OInteractionHandler.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -45,7 +45,7 @@ import com.sun.star.uno.XInterface;
* <li> <code>com::sun::star::task::XInteractionHandler</code></li>
* </ul>
* This object test <b> is NOT </b> designed to be run in several
-* threads concurently.
+* threads concurrently.
* @see com.sun.star.task.XInteractionHandler
* @see com.sun.star.sdb.InteractionHandler
* @see ifc.task._XInteractionHandler
@@ -71,7 +71,7 @@ public class OInteractionHandler extends TestCase {
* Object relations created :
* <ul>
* <li> <code>'XInteractionHandler.Request'</code> for
- * {@link ifc.task._XInteractionHandler} : this realtion
+ * {@link ifc.task._XInteractionHandler} : this relation
* is <code>com.sun.star.task.XInteractionRequest</code>
* interface implementation which depends on the component
* tested. In this case it emulates SQL error by returning
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
b/main/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
index 46fc7b6..cf04133 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -129,7 +129,7 @@ import util.db.DataSourceDescriptor;
public class ORowSet extends TestCase {
private static int uniqueSuffix = 0 ;
- private DBTools dbTools = null ;
+ private DBTools dbTools = null ;
private static String origDB = null ;
String tableName = null;
DataSourceDescriptor srcInf = null;
@@ -251,8 +251,8 @@ public class ORowSet extends TestCase {
XMultiServiceFactory orb = (XMultiServiceFactory)Param.getMSF();
uniqueSuffix++;
boolean envCreatedOK = false ;
-
- //initialize test table
+
+ // initialize test table
if (isMySQLDB)
{
try
@@ -292,7 +292,7 @@ public class ORowSet extends TestCase {
while ( !utils.tryOverwriteFile( orb, oldF, newF ) );
m_tableFile = newF;
}
-
+
try
{
m_rowSet = orb.createInstance("com.sun.star.sdb.RowSet");
@@ -306,7 +306,7 @@ public class ORowSet extends TestCase {
rowSetProps.setPropertyValue("CommandType",
new Integer(CommandType.TABLE));
- final XRowSet rowSet = UnoRuntime.queryInterface( XRowSet.class,
m_rowSet);
+ final XRowSet rowSet = UnoRuntime.queryInterface( XRowSet.class,
m_rowSet);
rowSet.execute();
m_connection = UnoRuntime.queryInterface( XConnection.class,
rowSetProps.getPropertyValue("ActiveConnection") );
@@ -406,7 +406,7 @@ public class ORowSet extends TestCase {
try
{
String sqlCommand = isMySQLDB
- ? "SELECT Column0 FROM soffice_test_table WHERE ( (
Column0 = :param1 ) )"
+ ? "SELECT Column0 FROM soffice_test_table WHERE ( (
Column0 = :param1 ) )"
: "SELECT \"_TEXT\" FROM \"" + tableName + "\" WHERE ( (
\"_TEXT\" = :param1 ) )";
rowSetProps.setPropertyValue( "DataSourceName", dbSourceName );
rowSetProps.setPropertyValue( "Command", sqlCommand );
@@ -471,7 +471,7 @@ public class ORowSet extends TestCase {
}
catch(com.sun.star.uno.Exception e)
{
- log.println( "couldn't set up tes tenvironment:" );
+ log.println( "couldn't set up testenvironment:" );
e.printStackTrace(log);
try
{
@@ -481,7 +481,7 @@ public class ORowSet extends TestCase {
catch(Exception ex)
{
}
- throw new StatusException( "couldn't set up tes tenvironment", e );
+ throw new StatusException( "couldn't set up testenvironment", e );
}
finally
{
@@ -540,13 +540,13 @@ public class ORowSet extends TestCase {
log.println( "already closed - okay." );
}
- doing = "deleting database file (" + documentFile + ")";
+ doing = "deleting database file (" + documentFile + ")";
log.println( doing );
impl_deleteFile( documentFile );
if ( m_tableFile != null )
{
- doing = "deleting dBase table file (" + m_tableFile + ")";
+ doing = "deleting dBASE table file (" + m_tableFile + ")";
log.println( doing );
impl_deleteFile( m_tableFile );
}
@@ -574,16 +574,16 @@ public class ORowSet extends TestCase {
public class InteractionHandlerImpl implements
_XCompletedExecution.CheckInteractionHandler {
private boolean handlerWasUsed = false;
private PrintWriter log = new PrintWriter(System.out);
-
+
public boolean checkInteractionHandler() {
return handlerWasUsed;
}
-
+
public void handle(XInteractionRequest xInteractionRequest) {
log.println("### _XCompletedExecution.InteractionHandlerImpl:
handle called.");
ParametersRequest req = null;
boolean abort = false;
-
+
Object o = xInteractionRequest.getRequest();
if (o instanceof ParametersRequest) {
req = (ParametersRequest)o;
@@ -598,7 +598,7 @@ public class ORowSet extends TestCase {
log.println("### This is not implemented in
ORowSet.InteractionHandlerImpl test -> abort.");
abort = true;
}
-
+
XInteractionContinuation[]xCont =
xInteractionRequest.getContinuations();
XInteractionSupplyParameters xParamCallback = null;
for(int i=0; i<xCont.length; i++) {
@@ -627,14 +627,15 @@ public class ORowSet extends TestCase {
xParamCallback.select();
}
else { // we should never reach this: abort has to be true first.
- log.println("### _XCompletedExecution.InteractionHandlerImpl:
Got no " +
+ log.println("### _XCompletedExecution.InteractionHandlerImpl:
Got no " +
"'XInteractionSupplyParameters' and no
'XInteractionAbort'.");
}
}
-
+
public void setLog(PrintWriter log) {
this.log = log;
}
-
+
}
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/OSQLMessageDialog.java
b/main/qadevOOo/tests/java/mod/_dbaccess/OSQLMessageDialog.java
index 41d6085..cc6d08a 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/OSQLMessageDialog.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/OSQLMessageDialog.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -46,7 +46,7 @@ import com.sun.star.uno.XInterface;
* <li> <code>com::sun::star::beans::XPropertySet</code></li>
* </ul> <p>
* This object test <b> is NOT </b> designed to be run in several
- * threads concurently.
+ * threads concurrently.
*
* @see com.sun.star.lang.XInitialization
* @see com.sun.star.sdb.ErrorMessageDialog
@@ -108,7 +108,7 @@ public class OSQLMessageDialog extends TestCase {
log.println("could not create instacne of
'com.sun.star.awt.Toolkit'" );
throw new StatusException("could not create instacne of
'com.sun.star.awt.Toolkit'", e) ;
}
-
+
// Describe the properties of the container window.
com.sun.star.awt.WindowDescriptor aDescriptor =
new com.sun.star.awt.WindowDescriptor();
@@ -127,7 +127,7 @@ public class OSQLMessageDialog extends TestCase {
com.sun.star.awt.XWindowPeer xPeer = null;
try{
-
+
xPeer = xToolkit.createWindow(aDescriptor) ;
} catch (com.sun.star.lang.IllegalArgumentException e){
@@ -136,8 +136,8 @@ public class OSQLMessageDialog extends TestCase {
}
com.sun.star.awt.XWindow xWindow =
(com.sun.star.awt.XWindow)UnoRuntime.queryInterface (
- com.sun.star.awt.XWindow .class, xPeer);
-
+ com.sun.star.awt.XWindow .class, xPeer);
+
log.println( " creating a new environment for object" );
TestEnvironment tEnv = new TestEnvironment( oObj );
diff --git
a/main/qadevOOo/tests/java/mod/_dbaccess/OSingleSelectQueryComposer.java
b/main/qadevOOo/tests/java/mod/_dbaccess/OSingleSelectQueryComposer.java
index 654c90e..2133a56 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/OSingleSelectQueryComposer.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/OSingleSelectQueryComposer.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -138,7 +138,7 @@ import com.sun.star.uno.XInterface;
public class OSingleSelectQueryComposer extends TestCase {
private static int uniqueSuffix = 0 ;
- private DBTools dbTools = null ;
+ private DBTools dbTools = null ;
private static String origDB = null ;
private PrintWriter log = null ;
private static String tmpDir = null ;
@@ -184,15 +184,15 @@ public class OSingleSelectQueryComposer extends TestCase {
xMSF = (XMultiServiceFactory)Param.getMSF();
XNameAccess xNameAccess =
(XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class,
+ XNameAccess.class,
xMSF.createInstance("com.sun.star.sdb.DatabaseContext"));
// we use the first datasource
XDataSource xDS = (XDataSource)UnoRuntime.queryInterface(
- XDataSource.class, xNameAccess.getByName( "Bibliography"
));
-
+ XDataSource.class, xNameAccess.getByName( "Bibliography"
));
+
log.println("check XMultiServiceFactory");
XMultiServiceFactory xConn = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,
+ UnoRuntime.queryInterface(XMultiServiceFactory.class,
xDS.getConnection(new String(),new String()));
log.println("check getAvailableServiceNames");
@@ -201,7 +201,7 @@ public class OSingleSelectQueryComposer extends TestCase {
{
log.println("Service 'SingleSelectQueryComposer' not
supported");
}
-
+
oInterface = (XInterface) xConn.createInstance( sServiceNames[0]);
if (oInterface == null) {
@@ -225,26 +225,26 @@ public class OSingleSelectQueryComposer extends TestCase {
oRowSet) ;
xORowSet.execute() ;
-
+
XColumnsSupplier xColSup = (XColumnsSupplier)
UnoRuntime.queryInterface(XColumnsSupplier.class, oRowSet);
-
+
XNameAccess xCols = xColSup.getColumns();
-
+
XPropertySet xCol = (XPropertySet) AnyConverter.toObject(
new Type(XPropertySet.class),
xCols.getByName(xCols.getElementNames()[0]));
-
+
XSingleSelectQueryAnalyzer xQueryAna = (XSingleSelectQueryAnalyzer)
UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class,
oInterface);
-
+
// XSingleSelectQueryComposer
XSingleSelectQueryComposer xComposer = (XSingleSelectQueryComposer)
UnoRuntime.queryInterface(XSingleSelectQueryComposer.class,
xQueryAna);
xQueryAna.setQuery("SELECT * FROM \"biblio\"");
-
+
oObj = (XInterface) oInterface;
log.println("ImplementationName: " + utils.getImplName(oObj));
@@ -253,13 +253,13 @@ public class OSingleSelectQueryComposer extends TestCase {
// for XSingleSelectQueryAnalyzer
tEnv.addObjRelation("xComposer", xComposer);
-
+
// for XSingleSelectQueryComposer
tEnv.addObjRelation("xQueryAna", xQueryAna);
-
+
tEnv.addObjRelation("xProp", xCol);
tEnv.addObjRelation("colName", xCols.getElementNames()[0]);
-
+
envCreatedOK = true ;
return tEnv;
@@ -277,3 +277,4 @@ public class OSingleSelectQueryComposer extends TestCase {
protected void cleanup( TestParameters Param, PrintWriter log) {
}
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/SbaXGridControl.java
b/main/qadevOOo/tests/java/mod/_dbaccess/SbaXGridControl.java
index 9120393..5d8829f 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/SbaXGridControl.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/SbaXGridControl.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
package mod._dbaccess;
import java.io.PrintWriter;
@@ -88,7 +89,7 @@ import com.sun.star.view.XControlAccess;
* <li> <code>com::sun::star::container::XContainer</code></li>
* </ul>
* This object test <b> is NOT </b> designed to be run in several
-* threads concurently.
+* threads concurrently.
* @see com.sun.star.util.XModifyBroadcaster
* @see com.sun.star.form.XGridFieldDataSupplier
* @see com.sun.star.view.XSelectionSupplier
@@ -137,7 +138,7 @@ public class SbaXGridControl extends TestCase {
log.println("creating a textdocument");
xTextDoc = SOF.createTextDoc(null);
} catch (com.sun.star.uno.Exception e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
e.printStackTrace(log);
throw new StatusException("Couldn't create document", e);
}
@@ -147,7 +148,7 @@ public class SbaXGridControl extends TestCase {
* Disposes Writer document.
*/
protected void cleanup(TestParameters tParam, PrintWriter log) {
- //closing the appearing dialog before disposing the document
+ // closing the appearing dialog before disposing the document
XInterface toolkit = null;
try {
@@ -164,12 +165,12 @@ public class SbaXGridControl extends TestCase {
Object atw = tk.getActiveTopWindow();
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
+ XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
atw);
XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
- XInterface button =
AccessibilityTools.getAccessibleObjectForRole(xRoot,
+ XInterface button =
AccessibilityTools.getAccessibleObjectForRole(xRoot,
AccessibleRole.PUSH_BUTTON);
XAccessibleAction action = (XAccessibleAction)
UnoRuntime.queryInterface(
@@ -230,7 +231,7 @@ public class SbaXGridControl extends TestCase {
* inserted into collection. Is a column instance.</li>
* </ul>
*/
- protected TestEnvironment createTestEnvironment(TestParameters Param,
+ protected TestEnvironment createTestEnvironment(TestParameters Param,
PrintWriter log) {
XInterface oObj = null;
XWindowPeer the_win = null;
@@ -243,7 +244,7 @@ public class SbaXGridControl extends TestCase {
XPropertySet aControl4 = null;
XGridColumnFactory columns = null;
- //Insert a ControlShape and get the ControlModel
+ // Insert a ControlShape and get the ControlModel
XControlShape aShape = createGrid(xTextDoc, 3000, 4500, 15000, 10000);
XControlModel the_Model = aShape.getControl();
@@ -252,9 +253,9 @@ public class SbaXGridControl extends TestCase {
XLoadable formLoader = FormTools.bindForm(xTextDoc);
- //Try to query XControlAccess
+ // Try to query XControlAccess
XControlAccess the_access = (XControlAccess) UnoRuntime.queryInterface(
- XControlAccess.class,
+ XControlAccess.class,
xTextDoc.getCurrentController());
try {
@@ -273,19 +274,19 @@ public class SbaXGridControl extends TestCase {
aControl4.setPropertyValue("DataField", "Title");
aControl4.setPropertyValue("Label", "Title");
} catch (com.sun.star.lang.IllegalArgumentException e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
log.println("!!! Couldn't create instance : " + e);
throw new StatusException("Can't create column instances.", e);
} catch (com.sun.star.lang.WrappedTargetException e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
log.println("!!! Couldn't create instance : " + e);
throw new StatusException("Can't create column instances.", e);
} catch (com.sun.star.beans.PropertyVetoException e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
log.println("!!! Couldn't create instance : " + e);
throw new StatusException("Can't create column instances.", e);
} catch (com.sun.star.beans.UnknownPropertyException e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
log.println("!!! Couldn't create instance : " + e);
throw new StatusException("Can't create column instances.", e);
}
@@ -302,7 +303,7 @@ public class SbaXGridControl extends TestCase {
throw new StatusException("Can't insert columns", e);
}
- //now get the OGridControl
+ // now get the OGridControl
try {
oObj = the_access.getControl(the_Model);
the_win = the_access.getControl(the_Model).getPeer();
@@ -317,7 +318,7 @@ public class SbaXGridControl extends TestCase {
// creating another window
- aShape = FormTools.createControlShape(xTextDoc, 3000, 4500, 15000,
+ aShape = FormTools.createControlShape(xTextDoc, 3000, 4500, 15000,
10000, "TextField");
WriterTools.getDrawPage(xTextDoc).add((XShape) aShape);
@@ -325,12 +326,12 @@ public class SbaXGridControl extends TestCase {
the_Model = aShape.getControl();
- //Try to query XControlAccess
+ // Try to query XControlAccess
the_access = (XControlAccess) UnoRuntime.queryInterface(
- XControlAccess.class,
+ XControlAccess.class,
xTextDoc.getCurrentController());
- //now get the TextControl
+ // now get the TextControl
XWindow win = null;
Object cntrl = null;
@@ -348,12 +349,12 @@ public class SbaXGridControl extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
- //Relations for XSelectionSupplier
- tEnv.addObjRelation("Selections",
+ // Relations for XSelectionSupplier
+ tEnv.addObjRelation("Selections",
new Object[] {
new Object[] { new Integer(0) }, new Object[] { new Integer(1) }
});
- tEnv.addObjRelation("Comparer",
+ tEnv.addObjRelation("Comparer",
new Comparator() {
public int compare(Object o1, Object o2) {
return ((Integer) o1).compareTo((Integer)o2);
@@ -365,17 +366,17 @@ public class SbaXGridControl extends TestCase {
});
- //Realtion for XContainer
+ // Relation for XContainer
tEnv.addObjRelation("XContainer.Container", aContainer);
tEnv.addObjRelation("INSTANCE", aControl3);
tEnv.addObjRelation("INSTANCE2", aControl4);
- //Adding ObjRelation for XView
+ // Adding ObjRelation for XView
tEnv.addObjRelation("GRAPHICS", aGraphic);
- //Adding ObjRelation for XControl
+ // Adding ObjRelation for XControl
tEnv.addObjRelation("CONTEXT", xTextDoc);
tEnv.addObjRelation("WINPEER", the_win);
tEnv.addObjRelation("TOOLKIT", the_kit);
@@ -403,7 +404,7 @@ public class SbaXGridControl extends TestCase {
final XLoadable formLoaderF = formLoader;
final XPropertySet ps = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, aControl2);
- tEnv.addObjRelation("XUpdateBroadcaster.Checker",
+ tEnv.addObjRelation("XUpdateBroadcaster.Checker",
new ifc.form._XUpdateBroadcaster.UpdateChecker() {
private String lastText = "";
@@ -420,7 +421,7 @@ public class SbaXGridControl extends TestCase {
XBoundComponent bound = (XBoundComponent)
UnoRuntime.queryInterface(
XBoundComponent.class, ctrl);
XResultSetUpdate update = (XResultSetUpdate)
UnoRuntime.queryInterface(
- XResultSetUpdate.class,
+ XResultSetUpdate.class,
formLoaderF);
bound.commit();
@@ -437,16 +438,16 @@ public class SbaXGridControl extends TestCase {
return tEnv;
} // finish method getTestEnvironment
- public static XControlShape createGrid(XComponent oDoc, int height,
+ public static XControlShape createGrid(XComponent oDoc, int height,
int width, int x, int y) {
Size size = new Size();
Point position = new Point();
XControlShape oCShape = null;
XControlModel aControl = null;
- //get MSF
+ // get MSF
XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
UnoRuntime.queryInterface(
- XMultiServiceFactory.class,
+ XMultiServiceFactory.class,
oDoc);
try {
@@ -456,7 +457,7 @@ public class SbaXGridControl extends TestCase {
"com.sun.star.form.component.GridControl");
XPropertySet model_props = (XPropertySet)
UnoRuntime.queryInterface(
XPropertySet.class, aCon);
- model_props.setPropertyValue("DefaultControl",
+ model_props.setPropertyValue("DefaultControl",
"com.sun.star.form.control.InteractionGridControl");
aControl = (XControlModel) UnoRuntime.queryInterface(
XControlModel.class, aCon);
@@ -469,7 +470,7 @@ public class SbaXGridControl extends TestCase {
oCShape.setSize(size);
oCShape.setPosition(position);
} catch (com.sun.star.uno.Exception e) {
- // Some exception occured.FAILED
+ // Some exception occurred.FAILED
System.out.println("Couldn't create Grid" + e);
throw new StatusException("Couldn't create Grid", e);
}
@@ -479,3 +480,4 @@ public class SbaXGridControl extends TestCase {
return oCShape;
} // finish createGrid
}
+
diff --git
a/main/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
b/main/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
index 1d360bb..29cf9cc 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
package mod._dbaccess;
import java.io.PrintWriter;
@@ -91,14 +92,14 @@ public class TableWindowAccessibility extends TestCase {
* Creates a new query and adds it to DefinitionContainer.
* Opens the QueryComponent.with loadComponentFromURL
* and gets the object with the role PANEL and the implementation
- * name that contains TabelViewAccessibility
+ * name that contains TabelViewAccessibility
* @param Param test parameters
* @param log writer to log information while testing
* @return
* @throws StatusException
* @see TestEnvironment
*/
- protected TestEnvironment createTestEnvironment(TestParameters Param,
+ protected TestEnvironment createTestEnvironment(TestParameters Param,
PrintWriter log) {
XInterface oObj = null;
@@ -106,7 +107,7 @@ public class TableWindowAccessibility extends TestCase {
Object oDBSource = null;
Object newQuery = null;
Object toolkit = null;
- XStorable store = null;
+ XStorable store = null;
try {
oDBContext = ((XMultiServiceFactory) Param.getMSF())
@@ -185,7 +186,7 @@ public class TableWindowAccessibility extends TestCase {
}
isolConnection = (XIsolatedConnection) UnoRuntime.queryInterface(
-
XIsolatedConnection.class,
+ XIsolatedConnection.class,
oDBSource);
XConnection connection = null;
@@ -201,21 +202,21 @@ public class TableWindowAccessibility extends TestCase {
statement = connection.createStatement();
statement.executeUpdate("drop table if exists " + tbl_name1);
statement.executeUpdate("drop table if exists " + tbl_name2);
- statement.executeUpdate("create table " + tbl_name1 + " (" +
+ statement.executeUpdate("create table " + tbl_name1 + " (" +
col_name1 + " int)");
- statement.executeUpdate("create table " + tbl_name2 + " (" +
+ statement.executeUpdate("create table " + tbl_name2 + " (" +
col_name2 + " int)");
} catch (com.sun.star.sdbc.SQLException e) {
try {
shortWait();
- connection = isolConnection.getIsolatedConnection(user,
+ connection = isolConnection.getIsolatedConnection(user,
password);
statement = connection.createStatement();
statement.executeUpdate("drop table if exists " + tbl_name1);
statement.executeUpdate("drop table if exists " + tbl_name2);
- statement.executeUpdate("create table " + tbl_name1 + " (" +
+ statement.executeUpdate("create table " + tbl_name1 + " (" +
col_name1 + " int)");
- statement.executeUpdate("create table " + tbl_name2 + " (" +
+ statement.executeUpdate("create table " + tbl_name2 + " (" +
col_name2 + " int)");
} catch (com.sun.star.sdbc.SQLException e2) {
e2.printStackTrace(log);
@@ -224,7 +225,7 @@ public class TableWindowAccessibility extends TestCase {
}
XQueryDefinitionsSupplier querySuppl = (XQueryDefinitionsSupplier)
UnoRuntime.queryInterface(
-
XQueryDefinitionsSupplier.class,
+
XQueryDefinitionsSupplier.class,
oDBSource);
XNameAccess defContainer = querySuppl.getQueryDefinitions();
@@ -233,9 +234,9 @@ public class TableWindowAccessibility extends TestCase {
XPropertySet.class, newQuery);
try {
- final String query = "select * from " + tbl_name1 + ", " +
- tbl_name2 + " where " + tbl_name1 + "." +
- col_name1 + "=" + tbl_name2 + "." +
+ final String query = "select * from " + tbl_name1 + ", " +
+ tbl_name2 + " where " + tbl_name1 + "." +
+ col_name1 + "=" + tbl_name2 + "." +
col_name2;
queryProp.setPropertyValue("Command", query);
} catch (com.sun.star.lang.WrappedTargetException e) {
@@ -257,7 +258,7 @@ public class TableWindowAccessibility extends TestCase {
}
XNameContainer queryContainer = (XNameContainer)
UnoRuntime.queryInterface(
- XNameContainer.class,
+ XNameContainer.class,
defContainer);
try {
@@ -280,34 +281,34 @@ public class TableWindowAccessibility extends TestCase {
e.printStackTrace(log);
throw new StatusException(Status.failed("Couldn't insert query"));
}
-
+
PropertyValue[] loadProps = new PropertyValue[3];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "QueryDesignView";
loadProps[0].Value = Boolean.TRUE;
-
+
loadProps[1] = new PropertyValue();
loadProps[1].Name = "CurrentQuery";
- loadProps[1].Value = "Query1";
-
+ loadProps[1].Value = "Query1";
+
loadProps[2] = new PropertyValue();
loadProps[2].Name = "DataSource";
- loadProps[2].Value = oDBSource;
-
+ loadProps[2].Value = oDBSource;
+
QueryComponent = DesktopTools.loadDoc((XMultiServiceFactory)
Param.getMSF (),".component:DB/QueryDesign",loadProps);
-
+
xWindow = UnoRuntime.queryInterface(XModel.class, QueryComponent).
getCurrentController().getFrame().getContainerWindow();
- XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
-
+ XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
+
AccessibilityTools.printAccessibleTree (log,xRoot,
Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
- oObj = AccessibilityTools.getAccessibleObjectForRole(xRoot,
AccessibleRole.PANEL, "",
- "TableWindowAccessibility");
-
+ oObj = AccessibilityTools.getAccessibleObjectForRole(xRoot,
AccessibleRole.PANEL, "",
+ "TableWindowAccessibility");
+
log.println("ImplementationName " + util.utils.getImplName(oObj));
-
+
log.println("creating TestEnvironment ... done");
TestEnvironment tEnv = new TestEnvironment(oObj);
@@ -315,21 +316,21 @@ public class TableWindowAccessibility extends TestCase {
shortWait();
XAccessibleComponent accComp = (XAccessibleComponent)
UnoRuntime.queryInterface(
- XAccessibleComponent.class,
+ XAccessibleComponent.class,
oObj);
-
+
final Point point = accComp.getLocationOnScreen();
-
- tEnv.addObjRelation("EventProducer",
+
+ tEnv.addObjRelation("EventProducer",
new
ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
public void fireEvent() {
- try {
+ try {
Robot rob = new Robot();
rob.mouseMove(point.X + 2, point.Y + 7);
- rob.mousePress(InputEvent.BUTTON1_MASK);
+ rob.mousePress(InputEvent.BUTTON1_MASK);
rob.mouseMove(point.X + 400, point.Y);
- rob.mouseRelease (InputEvent.BUTTON1_MASK);
+ rob.mouseRelease (InputEvent.BUTTON1_MASK);
} catch (java.awt.AWTException e) {
System.out.println("desired child doesn't exist");
}
@@ -342,10 +343,10 @@ public class TableWindowAccessibility extends TestCase {
/**
* Closes all open documents.
*/
- protected void cleanup(TestParameters Param, PrintWriter log) {
+ protected void cleanup(TestParameters Param, PrintWriter log) {
try
{
-
+
log.println ("closing QueryComponent ...");
DesktopTools.closeDoc (QueryComponent);
log.println ("... done");
@@ -360,10 +361,10 @@ public class TableWindowAccessibility extends TestCase {
e.printStackTrace ();
}
}
-
+
/**
- * Sleeps for 1.5 sec. to allow StarOffice to react on <code>
+ * Sleeps for 1.5 sec. to allow OpenOffice to react on <code>
* reset</code> call.
*/
private void shortWait() {
@@ -374,3 +375,4 @@ public class TableWindowAccessibility extends TestCase {
}
}
}
+
diff --git a/main/qadevOOo/tests/java/mod/_dbaccess/package.html
b/main/qadevOOo/tests/java/mod/_dbaccess/package.html
index 147d0a5..9f2896e 100644
--- a/main/qadevOOo/tests/java/mod/_dbaccess/package.html
+++ b/main/qadevOOo/tests/java/mod/_dbaccess/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--***********************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
***********************************************************-->
<HTML>
<BODY>