summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/util
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/util')
-rw-r--r--qadevOOo/runner/util/AccessibilityTools.java160
-rw-r--r--qadevOOo/runner/util/BasicMacroTools.java36
-rw-r--r--qadevOOo/runner/util/BookmarkDsc.java2
-rw-r--r--qadevOOo/runner/util/CalcTools.java26
-rw-r--r--qadevOOo/runner/util/ControlDsc.java2
-rw-r--r--qadevOOo/runner/util/DBTools.java6
-rw-r--r--qadevOOo/runner/util/DefaultDsc.java2
-rw-r--r--qadevOOo/runner/util/DesktopTools.java8
-rw-r--r--qadevOOo/runner/util/DrawTools.java42
-rw-r--r--qadevOOo/runner/util/DynamicClassLoader.java14
-rw-r--r--qadevOOo/runner/util/FootnoteDsc.java2
-rw-r--r--qadevOOo/runner/util/FormTools.java20
-rw-r--r--qadevOOo/runner/util/FrameDsc.java2
-rw-r--r--qadevOOo/runner/util/InstCreator.java2
-rw-r--r--qadevOOo/runner/util/InstDescr.java4
-rw-r--r--qadevOOo/runner/util/ParagraphDsc.java2
-rw-r--r--qadevOOo/runner/util/PropertyName.java10
-rw-r--r--qadevOOo/runner/util/ReferenceMarkDsc.java2
-rw-r--r--qadevOOo/runner/util/RegistryTools.java140
-rw-r--r--qadevOOo/runner/util/SOfficeFactory.java2
-rw-r--r--qadevOOo/runner/util/ShapeDsc.java2
-rw-r--r--qadevOOo/runner/util/StyleFamilyDsc.java2
-rw-r--r--qadevOOo/runner/util/SysUtils.java2
-rw-r--r--qadevOOo/runner/util/TableDsc.java6
-rw-r--r--qadevOOo/runner/util/TextSectionDsc.java2
-rw-r--r--qadevOOo/runner/util/UITools.java298
-rw-r--r--qadevOOo/runner/util/ValueChanger.java8
-rw-r--r--qadevOOo/runner/util/ValueComparer.java22
-rw-r--r--qadevOOo/runner/util/WaitUnreachable.java2
-rw-r--r--qadevOOo/runner/util/WriterTools.java14
-rw-r--r--qadevOOo/runner/util/XInstCreator.java2
-rw-r--r--qadevOOo/runner/util/XLayerHandlerImpl.java40
-rw-r--r--qadevOOo/runner/util/XLayerImpl.java12
-rw-r--r--qadevOOo/runner/util/XMLTools.java6
-rw-r--r--qadevOOo/runner/util/XSchemaHandlerImpl.java48
-rw-r--r--qadevOOo/runner/util/compare/DocComparator.java4
-rw-r--r--qadevOOo/runner/util/compare/DocComparatorFactory.java6
-rw-r--r--qadevOOo/runner/util/compare/GraphicalComparator.java24
-rw-r--r--qadevOOo/runner/util/compare/PDFComparator.java16
-rw-r--r--qadevOOo/runner/util/compare/XMLComparator.java4
-rw-r--r--qadevOOo/runner/util/db/DataSource.java12
-rw-r--r--qadevOOo/runner/util/db/DataSourceDescriptor.java12
-rw-r--r--qadevOOo/runner/util/db/DatabaseDocument.java12
-rw-r--r--qadevOOo/runner/util/dbg.java44
-rw-r--r--qadevOOo/runner/util/utils.java10
45 files changed, 547 insertions, 547 deletions
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java
index 3fb964a2362b..c4bc428ed624 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,105 +44,105 @@ public class AccessibilityTools {
public static XAccessibleContext SearchedContext = null;
public static XAccessible SearchedAccessible = null;
private static boolean debug = false;
-
+
public AccessibilityTools() {
//done = false;
SearchedContext = null;
}
-
+
public static XAccessible getAccessibleObject(XInterface xObject) {
return UnoRuntime.queryInterface(XAccessible.class, xObject);
}
-
+
public static XWindow getCurrentContainerWindow(XMultiServiceFactory msf,
XModel xModel) {
return getWindow(msf, xModel, true);
}
-
+
public static XWindow getCurrentWindow(XMultiServiceFactory msf,
XModel xModel) {
return getWindow(msf, xModel, false);
}
-
+
private static XWindow getWindow(XMultiServiceFactory msf, XModel xModel,
boolean containerWindow) {
XWindow xWindow = null;
-
+
try {
if (xModel == null) {
System.out.println("invalid model (==null)");
}
-
+
XController xController = xModel.getCurrentController();
-
+
if (xController == null) {
System.out.println("can't get controller from model");
}
-
+
XFrame xFrame = xController.getFrame();
-
+
if (xFrame == null) {
System.out.println("can't get frame from controller");
}
-
+
if (containerWindow)
xWindow = xFrame.getContainerWindow();
else
xWindow = xFrame.getComponentWindow();
-
+
if (xWindow == null) {
System.out.println("can't get window from frame");
}
} catch (Exception e) {
System.out.println("caught exception while getting current window" + e);
}
-
+
return xWindow;
}
-
+
public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
short role) {
SearchedContext = null;
SearchedAccessible = null;
getAccessibleObjectForRole_(xacc, role);
-
+
return SearchedContext;
}
-
+
public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
short role,
boolean ignoreShowing) {
SearchedContext = null;
SearchedAccessible = null;
-
+
if (ignoreShowing) {
getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
} else {
getAccessibleObjectForRole_(xacc, role);
}
-
+
return SearchedContext;
}
-
+
public static void getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
short role) {
XAccessibleContext ac = xacc.getAccessibleContext();
-
+
if (ac.getAccessibleRole() == role) {
SearchedContext = ac;
SearchedAccessible = xacc;
} else {
int k = ac.getAccessibleChildCount();
-
+
if (ac.getAccessibleChildCount() > 100) {
k = 50;
}
-
+
for (int i = 0; i < k; i++) {
try {
getAccessibleObjectForRoleIgnoreShowing_(
ac.getAccessibleChild(i), role);
-
+
if (SearchedContext != null) {
return;
}
@@ -152,27 +152,27 @@ public class AccessibilityTools {
}
}
}
-
+
public static void getAccessibleObjectForRole_(XAccessible xacc,
short role) {
XAccessibleContext ac = xacc.getAccessibleContext();
boolean isShowing = ac.getAccessibleStateSet()
.contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
-
+
if ((ac.getAccessibleRole() == role) && isShowing) {
SearchedContext = ac;
SearchedAccessible = xacc;
} else {
int k = ac.getAccessibleChildCount();
-
+
if (ac.getAccessibleChildCount() > 100) {
k = 50;
}
-
+
for (int i = 0; i < k; i++) {
try {
getAccessibleObjectForRole_(ac.getAccessibleChild(i), role);
-
+
if (SearchedContext != null) {
return;
}
@@ -182,13 +182,13 @@ public class AccessibilityTools {
}
}
}
-
+
public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
short role,
String name) {
return getAccessibleObjectForRole(xacc, role, name, "");
}
-
+
public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
short role,
String name,
@@ -200,7 +200,7 @@ public class AccessibilityTools {
return getAccessibleObjectForRole(xacc, role, name, "");
}
}
-
+
public static XAccessibleContext getAccessibleObjectForRoleIgnoreShowing(XAccessible xacc,
short role,
String name,
@@ -210,22 +210,22 @@ public class AccessibilityTools {
(ac.getAccessibleName().indexOf(name) > -1) &&
(utils.getImplName(ac).indexOf(implName) > -1)) {
SearchedAccessible = xacc;
-
+
//System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing);
return ac;
} else {
int k = ac.getAccessibleChildCount();
-
+
if (ac.getAccessibleChildCount() > 100) {
k = 50;
}
-
+
for (int i = 0; i < k; i++) {
try {
XAccessibleContext ac1 = getAccessibleObjectForRoleIgnoreShowing(
ac.getAccessibleChild(i),
role, name, implName);
-
+
if (ac1 != null) {
return ac1;
}
@@ -234,10 +234,10 @@ public class AccessibilityTools {
}
}
}
-
+
return null;
}
-
+
public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
short role,
String name,
@@ -245,7 +245,7 @@ public class AccessibilityTools {
XAccessibleContext ac = xacc.getAccessibleContext();
boolean isShowing = ac.getAccessibleStateSet()
.contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
-
+
// hotfix for i91828:
// if role to serach is 0 then ignore the role.
if ( (role == 0 || ac.getAccessibleRole() == role) &&
@@ -257,17 +257,17 @@ public class AccessibilityTools {
return ac;
} else {
int k = ac.getAccessibleChildCount();
-
+
if (ac.getAccessibleChildCount() > 100) {
k = 50;
}
-
+
for (int i = 0; i < k; i++) {
try {
XAccessibleContext ac1 = getAccessibleObjectForRole(
ac.getAccessibleChild(i),
role, name, implName);
-
+
if (ac1 != null) {
return ac1;
}
@@ -276,10 +276,10 @@ public class AccessibilityTools {
}
}
}
-
+
return null;
}
-
+
/**
* This methods retunrs the <CODE>XAccessibleContext</CODE> of a named Sheet-Cell like "G5".<p>
* @param xSheetAcc The <CODE>XAccessibleContext</CODE> of a Sheet
@@ -287,16 +287,16 @@ public class AccessibilityTools {
* @return the <CODE>XAccessiblecontext</CODE> of the named cell
*/
public static XAccessibleContext getSheetCell(XAccessibleContext xSheetAcc, String cellName){
-
+
int cellIndex = 0;
int column =0;
int charMem = 0;
for (int n=0; n<cellName.length(); n++){
String cha = cellName.substring(n,n+1);
System.out.println("char: " + cha + " ");
-
+
byte[] bytes = cha.getBytes();
-
+
if ((bytes[0] >= 'A') && (bytes[0] <= 'Z')){
charMem = bytes[0]-64;
column++;
@@ -310,47 +310,47 @@ public class AccessibilityTools {
cellIndex += (iNumb-1) * 256;
System.out.println("numb:" + (iNumb-1) * 256);
}
-
+
}
-
+
//System.out.println("cellName: " + cellName + " cellIndex: " + cellIndex);
-
+
try {
XAccessibleContext ac = xSheetAcc.getAccessibleChild(cellIndex).getAccessibleContext();
System.out.println(ac.getAccessibleRole() + "," +
ac.getAccessibleName() + "(" +
ac.getAccessibleDescription() + "):" +
utils.getImplName(ac));
-
+
return ac;
} catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
System.out.println("ERROR: could not get child at index " + cellIndex +"': " + ex.toString());
return null;
}
}
-
+
public static void printAccessibleTree(PrintWriter log, XAccessible xacc, boolean debugIsActive) {
debug = debugIsActive;
if (debug) printAccessibleTree(log, xacc, "");
}
-
+
public static void printAccessibleTree(PrintWriter log, XAccessible xacc) {
printAccessibleTree(log, xacc, "");
}
-
+
protected static void printAccessibleTree(PrintWriter log,
XAccessible xacc, String indent) {
-
+
XAccessibleContext ac = xacc.getAccessibleContext();
-
+
logging(log,indent + ac.getAccessibleRole() + "," +
ac.getAccessibleName() + "(" +
ac.getAccessibleDescription() + "):" +
utils.getImplName(ac));
-
+
XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
XAccessibleComponent.class, xacc);
-
+
if (aComp != null) {
String bounds = "(" + aComp.getBounds().X + "," +
aComp.getBounds().Y + ")" + " (" +
@@ -359,18 +359,18 @@ public class AccessibilityTools {
bounds = "The boundary Rectangle is " + bounds;
logging(log,indent + indent + bounds);
}
-
+
boolean isShowing = ac.getAccessibleStateSet()
.contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
logging(log,indent + indent + "StateType contains SHOWING: " +
isShowing);
-
+
int k = ac.getAccessibleChildCount();
-
+
if (ac.getAccessibleChildCount() > 100) {
k = 50;
}
-
+
for (int i = 0; i < k; i++) {
try {
printAccessibleTree(log, ac.getAccessibleChild(i),
@@ -379,13 +379,13 @@ public class AccessibilityTools {
System.out.println("Couldn't get Child");
}
}
-
+
if (ac.getAccessibleChildCount() > 100) {
k = ac.getAccessibleChildCount();
-
+
int st = ac.getAccessibleChildCount() - 50;
logging(log,indent + " " + " ...... [skipped] ......");
-
+
for (int i = st; i < k; i++) {
try {
printAccessibleTree(log, ac.getAccessibleChild(i),
@@ -396,65 +396,65 @@ public class AccessibilityTools {
}
}
}
-
+
public static String accessibleToString(Object AC) {
XAccessibleContext xAC = (XAccessibleContext) UnoRuntime.queryInterface(
XAccessibleContext.class, AC);
-
+
if (xAC != null) {
return "" + xAC.getAccessibleRole() + "," +
xAC.getAccessibleName() + "(" +
xAC.getAccessibleDescription() + "):";
}
-
+
XAccessible xA = (XAccessible) UnoRuntime.queryInterface(
XAccessible.class, AC);
-
+
if (xA == null) {
return "(Not supported)";
}
-
+
xAC = xA.getAccessibleContext();
-
+
return "" + xAC.getAccessibleRole() + "," + xAC.getAccessibleName() +
"(" + xAC.getAccessibleDescription() + ")";
}
-
+
public static boolean equals(XAccessible c1, XAccessible c2) {
if ((c1 == null) || (c2 == null)) {
return c1 == c2;
}
-
+
return AccessibilityTools.equals(c1.getAccessibleContext(),
c2.getAccessibleContext());
}
-
+
public static boolean equals(XAccessibleContext c1, XAccessibleContext c2) {
if ((c1 == null) || (c2 == null)) {
return c1 == c2;
}
-
+
if (c1.getAccessibleRole() != c2.getAccessibleRole()) {
return false;
}
-
+
if (!c1.getAccessibleName().equals(c2.getAccessibleName())) {
return false;
}
-
+
if (!c1.getAccessibleDescription()
.equals(c2.getAccessibleDescription())) {
return false;
}
-
+
if (c1.getAccessibleChildCount() != c2.getAccessibleChildCount()) {
return false;
}
-
+
return AccessibilityTools.equals(c1.getAccessibleParent(),
c2.getAccessibleParent());
}
-
+
private static void logging(PrintWriter log, String content){
if (debug) log.println(content);
}
diff --git a/qadevOOo/runner/util/BasicMacroTools.java b/qadevOOo/runner/util/BasicMacroTools.java
index 0d64779137f7..5386be217403 100644
--- a/qadevOOo/runner/util/BasicMacroTools.java
+++ b/qadevOOo/runner/util/BasicMacroTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ public class BasicMacroTools {
/*
*While initializing the Basic Libraries will be appendend to the Document
*/
- public BasicMacroTools(XMultiServiceFactory msf, XModel xModel,
+ public BasicMacroTools(XMultiServiceFactory msf, XModel xModel,
XComponent xDoc) throws java.lang.Exception {
try {
mMSF = msf;
@@ -72,14 +72,14 @@ public class BasicMacroTools {
"Couldn't get BasicLibraries-Container from document: " + e.toString());
}
- mLCxNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
+ mLCxNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
DocLibCont);
mLCxLC = (XLibraryContainer) UnoRuntime.queryInterface(
XLibraryContainer.class, DocLibCont);
} catch (Exception e) {
- throw new Exception("could not initialize BasicMacros " +
+ throw new Exception("could not initialize BasicMacros " +
e.toString());
}
}
@@ -104,19 +104,19 @@ public class BasicMacroTools {
"Couldn't create ApplicationScriptLibraryContainer" + e.toString());
}
- mLCxNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
+ mLCxNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
ASLC);
mLCxLC = (XLibraryContainer) UnoRuntime.queryInterface(
XLibraryContainer.class, ASLC);
} catch (Exception e) {
- throw new Exception("could not initialize BasicMacros " +
+ throw new Exception("could not initialize BasicMacros " +
e.toString());
}
}
- private static XDispatchProvider makeDispatchProvider(XMultiServiceFactory mMSF,
+ private static XDispatchProvider makeDispatchProvider(XMultiServiceFactory mMSF,
XModel aModel)
throws java.lang.Exception {
XController xController = aModel.getCurrentController();
@@ -137,7 +137,7 @@ public class BasicMacroTools {
XURLTransformer.class, mMSF.createInstance(
"com.sun.star.util.URLTransformer"));
} catch (Exception e) {
- throw new Exception("could not create UTL-Transformer " +
+ throw new Exception("could not create UTL-Transformer " +
e.toString());
}
}
@@ -148,7 +148,7 @@ public class BasicMacroTools {
appendLibrary(LibraryName, LibraryURL);
} catch (java.lang.Exception e) {
e.printStackTrace();
- throw new Exception("ERROR: Could not append Library " +
+ throw new Exception("ERROR: Could not append Library " +
LibraryName + e.toString());
}
@@ -156,11 +156,11 @@ public class BasicMacroTools {
mLCxLC.loadLibrary(LibraryName);
} catch (com.sun.star.container.NoSuchElementException e) {
e.printStackTrace();
- throw new Exception("ERROR: Could not load Library " +
+ throw new Exception("ERROR: Could not load Library " +
LibraryName + e.toString());
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace();
- throw new Exception("ERROR: Could not load Library " +
+ throw new Exception("ERROR: Could not load Library " +
LibraryName + e.toString());
}
}
@@ -176,11 +176,11 @@ public class BasicMacroTools {
mLCxLC.createLibraryLink(LibraryName, LibraryURL, false);
} catch (com.sun.star.container.ElementExistException e) {
e.printStackTrace();
- throw new Exception("ERROR: Library " + LibraryName +
+ throw new Exception("ERROR: Library " + LibraryName +
"already exist." + e.toString());
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace();
- throw new Exception("Could not link Basic library:" +
+ throw new Exception("Could not link Basic library:" +
LibraryName + e.toString());
}
}
@@ -191,11 +191,11 @@ public class BasicMacroTools {
mLCxLC.removeLibrary(LibraryName);
} catch (com.sun.star.container.NoSuchElementException e) {
e.printStackTrace();
- throw new Exception("Could not remove Basic library:" +
+ throw new Exception("Could not remove Basic library:" +
LibraryName + ": Library does not exist" + e.toString());
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace();
- throw new Exception("Could not remove Basic library:" +
+ throw new Exception("Could not remove Basic library:" +
LibraryName + e.toString());
}
}
@@ -216,7 +216,7 @@ public class BasicMacroTools {
throw new Exception("Could not run Macro " + MacroName);
}
}
-
+
/**
* Set the given <CODE>secureURL</CODE> as secure URL for marco execution.
* The macros of documents located in <CODE>secureURL</CODE> will be executed
@@ -227,9 +227,9 @@ public class BasicMacroTools {
*/
public static void addSecureBasicMarcosURL(XMultiServiceFactory xMSF, String secureURL)
throws Exception {
-
+
secureURL = utils.getFullURL(secureURL);
-
+
// configure Office to allow to execute macos
PropertyValue[] ProvArgs = new PropertyValue [1];
PropertyValue Arg = new PropertyValue();
diff --git a/qadevOOo/runner/util/BookmarkDsc.java b/qadevOOo/runner/util/BookmarkDsc.java
index 5929192ac1df..eb86c528cf0b 100644
--- a/qadevOOo/runner/util/BookmarkDsc.java
+++ b/qadevOOo/runner/util/BookmarkDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/CalcTools.java b/qadevOOo/runner/util/CalcTools.java
index 08a8b945839a..f5c91af06dce 100644
--- a/qadevOOo/runner/util/CalcTools.java
+++ b/qadevOOo/runner/util/CalcTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,9 +48,9 @@ import com.sun.star.uno.UnoRuntime;
* and its sheets.
*/
public class CalcTools {
-
+
/**
- * fills a range of a calc sheet with computed data of type
+ * fills a range of a calc sheet with computed data of type
* <CODE>Double</CODE>.
* @param xSheetDoc the Clac documents wich should be filled
* @param sheetNumber the number of the sheet of <CODE>xSheetDoc</CODE>
@@ -72,10 +72,10 @@ public class CalcTools {
throw new Exception(
"Couldn't fill CalcSheet with content: " + e.toString());
}
- }
-
+ }
+
/**
- * fills a range of a calc sheet with computed data of type
+ * fills a range of a calc sheet with computed data of type
* <CODE>Double</CODE>.
* @param xSheet the sheet to fill with content
* @param startCellX the cell number of the X start point (row) of the range to fill
@@ -84,10 +84,10 @@ public class CalcTools {
* @param rangeLengthY the size of the range expansion in Y-direction
* @throws java.lang.Exception on any error an <CODE>java.lang.Exception</CODE> was thrown
*/
- public static void fillCalcSheetWithContent(XSpreadsheet xSheet,
+ public static void fillCalcSheetWithContent(XSpreadsheet xSheet,
int startCellX, int startCellY, int rangeLengthX, int rangeLengthY)
throws java.lang.Exception {
-
+
try{
// create a range with content
Object[][] newData = new Object[rangeLengthY][rangeLengthX];
@@ -98,7 +98,7 @@ public class CalcTools {
}
XCellRange xRange = null;
try {
- xRange = xSheet.getCellRangeByPosition(startCellX, startCellY,
+ xRange = xSheet.getCellRangeByPosition(startCellX, startCellY,
startCellX+rangeLengthX-1, startCellY+rangeLengthY-1);
} catch ( IndexOutOfBoundsException e){
throw new Exception(
@@ -113,9 +113,9 @@ public class CalcTools {
"Couldn't fill CalcSheet with content: " + e.toString());
}
}
-
+
/**
- *
+ *
* returns an <CODE>XSpreadsheet</CODE> from a Calc document.
* @param xSheetDoc the Calc docuent which containes the sheet
* @param sheetNumber the number of the sheet to return
@@ -125,7 +125,7 @@ public class CalcTools {
*/
public static XSpreadsheet getSpreadSheetFromSheetDoc(XComponent xSheetDoc, int sheetNumber)
throws java.lang.Exception {
-
+
XSpreadsheet xSheet = null;
try{
@@ -154,7 +154,7 @@ public class CalcTools {
} catch (Exception e){
throw new Exception(
"Couldn't get sheet '" +sheetNumber + "' : " + e.toString());
- }
+ }
return xSheet;
}
}
diff --git a/qadevOOo/runner/util/ControlDsc.java b/qadevOOo/runner/util/ControlDsc.java
index f2f1a82e63f4..ae8f17a7969f 100644
--- a/qadevOOo/runner/util/ControlDsc.java
+++ b/qadevOOo/runner/util/ControlDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 440274d8fd9a..89575eef6382 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -328,7 +328,7 @@ public class DBTools {
try {
revokeDB(name) ;
} catch (com.sun.star.uno.Exception e) {}
-
+
XDocumentDataSource xDDS = (XDocumentDataSource)
UnoRuntime.queryInterface(XDocumentDataSource.class, dataSource);
XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
@@ -663,7 +663,7 @@ public class DBTools {
}
else retVal = "file:///" + retVal ;
- }
+ }
return retVal;
}
diff --git a/qadevOOo/runner/util/DefaultDsc.java b/qadevOOo/runner/util/DefaultDsc.java
index 07a2cdd2c5cc..58656e388e74 100644
--- a/qadevOOo/runner/util/DefaultDsc.java
+++ b/qadevOOo/runner/util/DefaultDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index 3384a8b83423..5574cd710a10 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,7 +61,7 @@ public class DesktopTools
/**
* Queries the XComponentLoader
- *
+ *
* @param xMSF the MultiServiceFactory
* @return the gained XComponentLoader
*/
@@ -78,7 +78,7 @@ public class DesktopTools
/**
* Creates an Instance of the Desktop service
- *
+ *
* @param xMSF the MultiServiceFactory
* @return the gained Object
*/
@@ -485,7 +485,7 @@ public class DesktopTools
bringWindowToFront(xModel);
}
- /**
+ /**
* This function brings a document to the front.<P>
* NOTE: it is not possible to change the window order of your Window-Manager!!
* Only the order of Office documents are changeable.
diff --git a/qadevOOo/runner/util/DrawTools.java b/qadevOOo/runner/util/DrawTools.java
index d5f862cb49a7..4a329964b17e 100644
--- a/qadevOOo/runner/util/DrawTools.java
+++ b/qadevOOo/runner/util/DrawTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,26 +53,26 @@ import com.sun.star.uno.Type;
public class DrawTools {
-
+
/**
* Opens a new draw document
* with arguments
* @param xMSF the MultiServiceFactory
* @return the XComponent Interface of the document
- */
+ */
public static XComponent createDrawDoc( XMultiServiceFactory xMSF ) {
PropertyValue[] Args = new PropertyValue [0];
XComponent DrawDoc = DesktopTools.openNewDoc( xMSF, "sdraw", Args );
return DrawDoc;
} // finish createDrawDoc
-
+
/**
* gets the XDrawPages container of a draw document
- *
+ *
* @param aDoc the draw document
* @return the XDrawpages container of the document
- */
+ */
public static XDrawPages getDrawPages ( XComponent aDoc ) {
XDrawPages oDPn = null;
@@ -86,14 +86,14 @@ public class DrawTools {
}
return oDPn;
} // finish getDrawPages
-
+
/**
* gets the specified XDrawPage of a draw document
- *
+ *
* @param aDoc the draw document
* @param nr the index of the DrawPage
* @return the XDrawpage with index nr of the document
- */
+ */
public static XDrawPage getDrawPage ( XComponent aDoc, int nr ) {
XDrawPage oDP = null;
@@ -105,29 +105,29 @@ public class DrawTools {
}
return oDP;
}
-
+
/**
* gets the XShapes container of a draw page
- *
- * @param oDP the draw page
+ *
+ * @param oDP the draw page
* @return the XDrawShape container of the drawpage
- */
+ */
public static XShapes getShapes ( XDrawPage oDP ) {
return (XShapes) UnoRuntime.queryInterface(XShapes.class,oDP);
}
-
+
/**
* creates a XShape
- *
+ *
* @param oDoc the document
* @param height the height of the shape
* @param width the width of the shape
* @param x the x-position of the shape
* @param y the y-position of the shape
* @param kind the kind of the shape ('Ellipse', 'Line' or 'Rectangle')
- * @return the created XShape
- */
+ * @return the created XShape
+ */
public XShape createShape( XComponent oDoc, int height, int width, int x,
int y, String kind ) {
@@ -136,10 +136,10 @@ public class DrawTools {
ShapeDsc sDsc = new ShapeDsc( height, width, x, y, kind );
InstCreator instCreate = new InstCreator( oDoc, sDsc );
XShape oShape = (XShape)instCreate.getInstance();
-
+
return oShape;
}
-
+
/**
* creates a XShape and adds it to the documents
* first drawpage
@@ -149,8 +149,8 @@ public class DrawTools {
* @param x the x-position of the shape
* @param y the y-position of the shape
* @param kind the kind of the shape ('Ellipse', 'Line' or 'Rectangle')
- * @return the created XShape
- */
+ * @return the created XShape
+ */
public void addShape( XComponent oDoc, int height, int width, int x,
int y, String kind ) {
diff --git a/qadevOOo/runner/util/DynamicClassLoader.java b/qadevOOo/runner/util/DynamicClassLoader.java
index 659593e69346..fc8f6ecf37cf 100644
--- a/qadevOOo/runner/util/DynamicClassLoader.java
+++ b/qadevOOo/runner/util/DynamicClassLoader.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,7 +69,7 @@ public class DynamicClassLoader {
}
/**
- * Get an instance of a class. The constructor matching to the
+ * Get an instance of a class. The constructor matching to the
* arguments is used and the arguments are given to this constructor.
* @param className The class to instantiate.
* @param ctorArgs Arguments for the constructor.
@@ -82,12 +82,12 @@ public class DynamicClassLoader {
ctorType[i] = ctorArgs[i].getClass();
}
return getInstance(className, ctorType, ctorArgs);
-
+
}
-
+
/**
- * Get an instance of a class. The constructor matching to the
- * given calss types is used and the instance is created using the arguments
+ * Get an instance of a class. The constructor matching to the
+ * given calss types is used and the instance is created using the arguments
* for the constructor.
* @param className The class to instantiate.
* @param ctorClassTypes The class types matching to the constructor.
@@ -100,7 +100,7 @@ public class DynamicClassLoader {
Class cls = DynamicClassLoader.forName(className);
Constructor ctor = cls.getConstructor(ctorClassTypes);
System.out.println("ctor: " + ctor.getName() + " " + ctor.getModifiers());
-
+
return ctor.newInstance(ctorArgs);
} catch ( ClassNotFoundException e ) {
throw new IllegalArgumentException("Couldn't find " + className
diff --git a/qadevOOo/runner/util/FootnoteDsc.java b/qadevOOo/runner/util/FootnoteDsc.java
index ce7b62d4003b..e5ae1847ba7a 100644
--- a/qadevOOo/runner/util/FootnoteDsc.java
+++ b/qadevOOo/runner/util/FootnoteDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/FormTools.java b/qadevOOo/runner/util/FormTools.java
index 46515043f677..602cf3e16354 100644
--- a/qadevOOo/runner/util/FormTools.java
+++ b/qadevOOo/runner/util/FormTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,28 +53,28 @@ import com.sun.star.uno.Type;
public class FormTools {
-
+
/**
* creates a XControlShape
- *
+ *
* @param oDoc the document
* @param height the height of the shape
* @param width the width of the shape
* @param x the x-position of the shape
* @param y the y-position of the shape
* @param kind the kind of the shape
- * @return the created XControlShape
- */
+ * @return the created XControlShape
+ */
public static XControlShape createControlShape( XComponent oDoc, int height,
int width, int x, int y, String kind ) {
-
- Size size = new Size();
+
+ Size size = new Size();
Point position = new Point();
XControlShape oCShape = null;
XControlModel aControl = null;
//get MSF
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
+ XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );
try{
@@ -263,7 +263,7 @@ public class FormTools {
public static XLoadable bindForm( XTextDocument aDoc, String sourceName, String tableName )
throws com.sun.star.uno.Exception {
- XForm the_form = (XForm) AnyConverter.toObject(new Type(XForm.class),
+ XForm the_form = (XForm) AnyConverter.toObject(new Type(XForm.class),
FormTools.getIndexedForms(WriterTools.getDrawPage(aDoc)).getByIndex(0));
XPropertySet formProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, the_form);
formProps.setPropertyValue("DataSourceName",sourceName);
@@ -306,7 +306,7 @@ public class FormTools {
public static XLoadable bindForm( XTextDocument aDoc, String formName, String sourceName,
String tableName) throws com.sun.star.uno.Exception {
- XForm the_form = (XForm) AnyConverter.toObject(new Type(XForm.class),
+ XForm the_form = (XForm) AnyConverter.toObject(new Type(XForm.class),
FormTools.getForms(WriterTools.getDrawPage(aDoc)).getByName(formName));
XPropertySet formProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, the_form);
formProps.setPropertyValue("DataSourceName",sourceName);
diff --git a/qadevOOo/runner/util/FrameDsc.java b/qadevOOo/runner/util/FrameDsc.java
index 4bfb64e8459c..10a72e2b5c07 100644
--- a/qadevOOo/runner/util/FrameDsc.java
+++ b/qadevOOo/runner/util/FrameDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/InstCreator.java b/qadevOOo/runner/util/InstCreator.java
index b76066d7e95e..e3ab34ca083f 100644
--- a/qadevOOo/runner/util/InstCreator.java
+++ b/qadevOOo/runner/util/InstCreator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/InstDescr.java b/qadevOOo/runner/util/InstDescr.java
index e8343bc866e3..ca5f60073868 100644
--- a/qadevOOo/runner/util/InstDescr.java
+++ b/qadevOOo/runner/util/InstDescr.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ abstract public class InstDescr {
/**
* the method getIfcClass
*/
- public Class getIfcClass() {
+ public Class getIfcClass() {
return ifcClass;
}
/**
diff --git a/qadevOOo/runner/util/ParagraphDsc.java b/qadevOOo/runner/util/ParagraphDsc.java
index acaa630baad5..4b828402e873 100644
--- a/qadevOOo/runner/util/ParagraphDsc.java
+++ b/qadevOOo/runner/util/ParagraphDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/PropertyName.java b/qadevOOo/runner/util/PropertyName.java
index 075fa4d9704e..de8dfc7ad052 100644
--- a/qadevOOo/runner/util/PropertyName.java
+++ b/qadevOOo/runner/util/PropertyName.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ public interface PropertyName {
/**
* parameter name: "AppKillCommand"
*/
- final public static String APP_KILL_COMMAND = "AppKillCommand";
+ final public static String APP_KILL_COMMAND = "AppKillCommand";
/**
* parameter name: "ConnectionString"
*/
@@ -121,17 +121,17 @@ public interface PropertyName {
* the name of the version to test
*/
final public static String VERSION = "Version";
-
+
/**
* parameter name "Shell"<p>
- * Path to a shell.
+ * Path to a shell.
* This shell is used to run some commands outside of Java
* example: /bin/tcsh c:\\myShell\\myShell.exe
*/
final public static String SHELL = "Shell";
/**
* parameter name "Cygwin"<p>
- * If Cygwin is set to TRUE it indicates if the runner runs in a Cygwin
+ * If Cygwin is set to TRUE it indicates if the runner runs in a Cygwin
* environment
*/
final public static String CYGWIN = "Cygwin";
diff --git a/qadevOOo/runner/util/ReferenceMarkDsc.java b/qadevOOo/runner/util/ReferenceMarkDsc.java
index 948fab207a13..14ed78f83b4f 100644
--- a/qadevOOo/runner/util/ReferenceMarkDsc.java
+++ b/qadevOOo/runner/util/ReferenceMarkDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/RegistryTools.java b/qadevOOo/runner/util/RegistryTools.java
index 199eb1c01451..bf5048e44331 100644
--- a/qadevOOo/runner/util/RegistryTools.java
+++ b/qadevOOo/runner/util/RegistryTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ import com.sun.star.uno.Exception;
public class RegistryTools {
/**
- * Creates 'com.sun.star.registry.SimpleRegistry'
+ * Creates 'com.sun.star.registry.SimpleRegistry'
* service.
* @param xMSF Multiservice factory.
* @return Service created.
@@ -55,7 +55,7 @@ public class RegistryTools {
return (XSimpleRegistry) UnoRuntime.queryInterface (
XSimpleRegistry.class, oInterface) ;
}
-
+
/**
* Opens registry file for reading/writing. If file doesn't
* exist a new one created.
@@ -64,13 +64,13 @@ public class RegistryTools {
* @return Opened registry.
*/
public static XSimpleRegistry openRegistry
- (String file, XMultiServiceFactory xMSF)
+ (String file, XMultiServiceFactory xMSF)
throws com.sun.star.uno.Exception {
-
+
XSimpleRegistry reg = createRegistryService(xMSF) ;
-
+
reg.open(file, false, true) ;
-
+
return reg ;
}
@@ -82,15 +82,15 @@ public class RegistryTools {
*/
public static boolean compareKeys
(XRegistryKey key1, XRegistryKey key2) {
-
+
if (key1 == null || key2 == null ||
!key1.isValid() || !key2.isValid())
-
+
return false ;
-
+
String keyName1 = getShortKeyName(key1.getKeyName()) ;
String keyName2 = getShortKeyName(key2.getKeyName()) ;
-
+
if (!keyName1.equals(keyName2)) return false ;
try {
@@ -98,45 +98,45 @@ public class RegistryTools {
} catch (InvalidRegistryException e) {
return false ;
}
-
+
RegistryValueType type ;
try {
type = key1.getValueType() ;
-
+
if (type.equals(RegistryValueType.ASCII)) {
if (!key1.getAsciiValue().equals(key2.getAsciiValue()))
return false ;
- } else
+ } else
if (type.equals(RegistryValueType.STRING)) {
if (!key1.getStringValue().equals(key2.getStringValue()))
return false ;
- } else
+ } else
if (type.equals(RegistryValueType.LONG)) {
if (key1.getLongValue() != key2.getLongValue())
return false ;
- } else
+ } else
if (type.equals(RegistryValueType.BINARY)) {
byte[] bin1 = key1.getBinaryValue() ;
byte[] bin2 = key2.getBinaryValue() ;
if (bin1.length != bin2.length)
return false ;
- for (int i = 0; i < bin1.length; i++)
+ for (int i = 0; i < bin1.length; i++)
if (bin1[i] != bin2[i]) return false ;
- } else
+ } else
if (type.equals(RegistryValueType.ASCIILIST)) {
String[] list1 = key1.getAsciiListValue() ;
String[] list2 = key2.getAsciiListValue() ;
if (list1.length != list2.length)
return false ;
- for (int i = 0; i < list1.length; i++)
+ for (int i = 0; i < list1.length; i++)
if (!list1[i].equals(list2[i])) return false ;
- } else
+ } else
if (type.equals(RegistryValueType.STRINGLIST)) {
String[] list1 = key1.getStringListValue() ;
String[] list2 = key2.getStringListValue() ;
if (list1.length != list2.length)
return false ;
- for (int i = 0; i < list1.length; i++)
+ for (int i = 0; i < list1.length; i++)
if (!list1[i].equals(list2[i])) return false ;
} else
if (type.equals(RegistryValueType.LONGLIST)) {
@@ -144,16 +144,16 @@ public class RegistryTools {
int[] list2 = key2.getLongListValue() ;
if (list1.length != list2.length)
return false ;
- for (int i = 0; i < list1.length; i++)
+ for (int i = 0; i < list1.length; i++)
if (list1[i] != list2[i]) return false ;
}
} catch (Exception e) {
return false ;
}
-
+
return true ;
}
-
+
/**
* Gets name of the key relative to its parent.
* For example if full name of key is '/key1/subkey'
@@ -167,72 +167,72 @@ public class RegistryTools {
if (idx < 0) return keyName ;
else return keyName.substring(idx + 1) ;
}
-
+
/**
* Compare all child keys.
- * @param compareRoot If <code>true</code> method also
+ * @param compareRoot If <code>true</code> method also
* compare root keys, if <code>false</code> it begins recursive
* comparing from children of root keys.
* @return <code>true</code> if keys and their sub keys are equal.
*/
protected static boolean compareKeyTrees
(XRegistryKey tree1, XRegistryKey tree2, boolean compareRoot) {
-
+
if (compareRoot && !compareKeys(tree1, tree2)) return false ;
-
+
try {
String[] keyNames1 = tree1.getKeyNames() ;
String[] keyNames2 = tree2.getKeyNames() ;
if (keyNames1 == null && keyNames2 == null) return true ;
-
+
if (keyNames1 == null || keyNames2 == null ||
keyNames2.length != keyNames1.length)
return false ;
-
+
for (int i = 0; i < keyNames1.length; i++) {
-
+
String keyName = getShortKeyName(keyNames1[i]) ;
XRegistryKey key2 = tree2.openKey(keyName) ;
-
- if (key2 == null)
+
+ if (key2 == null)
// key with the same name doesn't exist in the second tree
return false ;
-
+
if (!tree1.getKeyType(keyName).equals(
tree2.getKeyType(keyName)))
return false ;
-
+
if (tree1.getKeyType(keyName).equals(
RegistryKeyType.LINK)) {
-
+
if (!getShortKeyName(tree1.getLinkTarget(keyName)).equals(
getShortKeyName(tree2.getLinkTarget(keyName))))
-
+
return false ;
} else {
-
- if (compareKeyTrees(tree1.openKey(keyName),
+
+ if (compareKeyTrees(tree1.openKey(keyName),
tree2.openKey(keyName), true) == false) return false ;
}
}
} catch (InvalidRegistryException e) {
return false ;
}
-
- return true ;
+
+ return true ;
}
-
+
/**
* Compare keys specified and all their child keys.
* @return <code>true</code> if keys and their sub keys are equal.
*/
public static boolean compareKeyTrees
(XRegistryKey tree1, XRegistryKey tree2) {
-
+
return compareKeyTrees(tree1, tree2, false) ;
}
-
+
/**
* Prints to a specified output about all keys and subkeys information
* (key name, type, value, link target, attributes) recursively.
@@ -258,7 +258,7 @@ public class RegistryTools {
out.println("/(null)") ;
return ;
}
-
+
out.println("/") ;
try {
printTreeInfo(root, out, " ") ;
@@ -269,13 +269,13 @@ public class RegistryTools {
}
private static void printTreeInfo(XRegistryKey key,
- PrintWriter out, String margin)
+ PrintWriter out, String margin)
throws com.sun.star.registry.InvalidRegistryException {
-
+
String[] subKeys = key.getKeyNames() ;
-
+
if (subKeys == null || subKeys.length == 0) return ;
-
+
for (int i = 0; i < subKeys.length; i++) {
printKeyInfo(key, subKeys[i], out, margin) ;
XRegistryKey subKey = key.openKey
@@ -284,11 +284,11 @@ public class RegistryTools {
subKey.closeKey() ;
}
}
-
- private static void printKeyInfo(XRegistryKey parentKey,
- String keyName, PrintWriter out, String margin)
+
+ private static void printKeyInfo(XRegistryKey parentKey,
+ String keyName, PrintWriter out, String margin)
throws com.sun.star.registry.InvalidRegistryException {
-
+
out.print(margin) ;
keyName = getShortKeyName(keyName) ;
XRegistryKey key = parentKey.openKey(keyName) ;
@@ -298,59 +298,59 @@ public class RegistryTools {
out.println("(null)") ;
return ;
}
-
+
if (!key.isValid()) {
out.println("(not valid)") ;
return ;
}
-
+
if (key.isReadOnly()) {
out.print("(read only) ") ;
}
-
+
if (parentKey.getKeyType(keyName) == RegistryKeyType.LINK) {
out.println("(link to " + parentKey.getLinkTarget(keyName) + ")") ;
return ;
}
-
+
RegistryValueType type ;
try {
type = key.getValueType() ;
-
+
if (type.equals(RegistryValueType.ASCII)) {
out.println("[ASCII] = '" + key.getAsciiValue() + "'") ;
- } else
+ } else
if (type.equals(RegistryValueType.STRING)) {
out.println("[STRING] = '" + key.getStringValue() + "'") ;
- } else
+ } else
if (type.equals(RegistryValueType.LONG)) {
out.println("[LONG] = " + key.getLongValue()) ;
- } else
+ } else
if (type.equals(RegistryValueType.BINARY)) {
out.print("[BINARY] = {") ;
byte[] bin = key.getBinaryValue() ;
- for (int i = 0; i < bin.length; i++)
+ for (int i = 0; i < bin.length; i++)
out.print("" + bin[i] + ",") ;
out.println("}") ;
- } else
+ } else
if (type.equals(RegistryValueType.ASCIILIST)) {
out.print("[ASCIILIST] = {") ;
String[] list = key.getAsciiListValue() ;
- for (int i = 0; i < list.length; i++)
+ for (int i = 0; i < list.length; i++)
out.print("'" + list[i] + "',") ;
out.println("}") ;
- } else
+ } else
if (type.equals(RegistryValueType.STRINGLIST)) {
out.print("[STRINGLIST] = {") ;
String[] list = key.getStringListValue() ;
- for (int i = 0; i < list.length; i++)
+ for (int i = 0; i < list.length; i++)
out.print("'" + list[i] + "',") ;
out.println("}") ;
} else
if (type.equals(RegistryValueType.LONGLIST)) {
out.print("[LONGLIST] = {") ;
int[] list = key.getLongListValue() ;
- for (int i = 0; i < list.length; i++)
+ for (int i = 0; i < list.length; i++)
out.print("" + list[i] + ",") ;
out.println("}") ;
} else {
@@ -363,8 +363,8 @@ public class RegistryTools {
key.closeKey() ;
}
}
-
-
-// public static void compareKeyTrees
+
+
+// public static void compareKeyTrees
}
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java
index 80493fdee058..a39c4d0be781 100644
--- a/qadevOOo/runner/util/SOfficeFactory.java
+++ b/qadevOOo/runner/util/SOfficeFactory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/ShapeDsc.java b/qadevOOo/runner/util/ShapeDsc.java
index df9364a7d9a2..27cbabc80baa 100644
--- a/qadevOOo/runner/util/ShapeDsc.java
+++ b/qadevOOo/runner/util/ShapeDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/StyleFamilyDsc.java b/qadevOOo/runner/util/StyleFamilyDsc.java
index eed3835bfab4..923fbde70c88 100644
--- a/qadevOOo/runner/util/StyleFamilyDsc.java
+++ b/qadevOOo/runner/util/StyleFamilyDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/SysUtils.java b/qadevOOo/runner/util/SysUtils.java
index 110b7ea549d7..d037547fab2a 100644
--- a/qadevOOo/runner/util/SysUtils.java
+++ b/qadevOOo/runner/util/SysUtils.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/TableDsc.java b/qadevOOo/runner/util/TableDsc.java
index d933bc0cb041..bd00c51cb490 100644
--- a/qadevOOo/runner/util/TableDsc.java
+++ b/qadevOOo/runner/util/TableDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,8 +85,8 @@ public class TableDsc extends InstDescr {
XTextTable TT = (XTextTable)UnoRuntime.queryInterface(
ifcClass, SrvObj );
-
- if ( rows > 0 && columns > 0 ) {
+
+ if ( rows > 0 && columns > 0 ) {
TT.initialize( rows, columns );
}
diff --git a/qadevOOo/runner/util/TextSectionDsc.java b/qadevOOo/runner/util/TextSectionDsc.java
index 3afcbbce5dd5..e25f54eed988 100644
--- a/qadevOOo/runner/util/TextSectionDsc.java
+++ b/qadevOOo/runner/util/TextSectionDsc.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index c9562949632f..4edf4c6091b4 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,7 @@ import util.AccessibilityTools;
* This class supports some functions to handle easily accessible objects
*/
public class UITools {
-
+
private static final AccessibilityTools mAT = new AccessibilityTools();
private final XAccessible mXRoot;
private final XMultiServiceFactory mMSF;
@@ -87,7 +87,7 @@ public class UITools {
return mAT.getAccessibleObject(xWindow);
}
-
+
private static String getString(XInterface xInt)
{
XAccessibleText oText = (XAccessibleText)
@@ -97,12 +97,12 @@ public class UITools {
private static void setString(XInterface xInt, String cText)
{
- XAccessibleEditableText oText = (XAccessibleEditableText)
+ XAccessibleEditableText oText = (XAccessibleEditableText)
UnoRuntime.queryInterface(XAccessibleEditableText.class, xInt);
-
+
oText.setText(cText);
}
-
+
private static Object getValue(XInterface xInt)
{
XAccessibleValue oValue = (XAccessibleValue)
@@ -118,7 +118,7 @@ public class UITools {
/**
* get the root element of the accessible tree
* @return the root element
- */
+ */
public XAccessible getRoot()
{
return mXRoot;
@@ -130,14 +130,14 @@ public class UITools {
* @param stringToSet is the string to set
* @throws java.lang.Exception if something fail
*/
- public void setTextEditFiledText(String textfiledName, String stringToSet)
+ public void setTextEditFiledText(String textfiledName, String stringToSet)
throws java.lang.Exception
{
- XInterface oTextField = mAT.getAccessibleObjectForRole(mXRoot,
+ XInterface oTextField = mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.TEXT, textfiledName);
setString(oTextField, stringToSet);
}
-
+
/**
* returns the button by the given name
* @param buttonName is name name of the button to get
@@ -158,13 +158,13 @@ public class UITools {
public void clickButton(String buttonName) throws java.lang.Exception
{
-
+
XAccessibleContext oButton =mAT.getAccessibleObjectForRole
(mXRoot, AccessibleRole.PUSH_BUTTON, buttonName);
if (oButton == null){
throw new Exception("Could not get button '" + buttonName + "'");
}
- XAccessibleAction oAction = (XAccessibleAction)
+ XAccessibleAction oAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, oButton);
// "click" the button
@@ -176,7 +176,7 @@ public class UITools {
}
}
-
+
/**
* Helper method: gets button via accessibility and 'click' it
@@ -192,15 +192,15 @@ public class UITools {
if (oButton != null){
boolean isChecked = oButton.getAccessibleStateSet().contains(com.sun.star.accessibility.AccessibleStateType.CHECKED);
- if((isChecked && !toBePressed) || (!isChecked && toBePressed)){
- XAccessibleAction oAction = (XAccessibleAction)
+ if((isChecked && !toBePressed) || (!isChecked && toBePressed)){
+ XAccessibleAction oAction = (XAccessibleAction)
UnoRuntime.queryInterface(XAccessibleAction.class, oButton);
try{
- // "click" the button
+ // "click" the button
oAction.doAccessibleAction(0);
return true;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- System.out.println("Could not do accessible action with '"
+ System.out.println("Could not do accessible action with '"
+ buttonName + "'" + e.toString());
return false;
}
@@ -209,7 +209,7 @@ public class UITools {
return true;
} else{
System.out.println("Could not get button '" + buttonName + "'");
- return false;
+ return false;
}
}
@@ -218,7 +218,7 @@ public class UITools {
* @param buttonName The name of the button in the Accessibility tree
*
* @return true if the button could be set to deactivated
- */
+ */
public boolean deactivateToggleButton(String buttonName){
return clickToggleButton(buttonName, false);
}
@@ -228,27 +228,27 @@ public class UITools {
* @param buttonName The name of the button in the Accessibility tree
*
* @return true if the button could be set to activated
- */
+ */
public boolean activateToggleButton(String buttonName){
return clickToggleButton(buttonName, true);
}
-
+
/**
* returns the value of named radio button
* @param buttonName the name of the button to get the value of
* @throws java.lang.Exception if something fail
* @return Integer
*/
- public Integer getRadioButtonValue(String buttonName)
- throws java.lang.Exception
+ public Integer getRadioButtonValue(String buttonName)
+ throws java.lang.Exception
{
try {
- XInterface xRB =mAT.getAccessibleObjectForRole(mXRoot,
+ XInterface xRB =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.RADIO_BUTTON, buttonName);
return (Integer) getValue(xRB);
} catch (Exception e) {
- throw new Exception("Could not get value from RadioButton '"
+ throw new Exception("Could not get value from RadioButton '"
+ buttonName + "' : " + e.toString());
}
}
@@ -258,27 +258,27 @@ public class UITools {
* @param GraphicName the name of the graphic
* @return XInterface
* @throws java.lang.Exception if something fail
- */
+ */
public XInterface getGraphic(String GraphicName) throws java.lang.Exception
{
return mAT.getAccessibleObjectForRole(mXRoot, AccessibleRole.GRAPHIC,
GraphicName);
}
-
+
/**
* set a named radio button the a given value
* @param buttonName the name of the button to set
* @param iValue the value to set
* @throws java.lang.Exception if something fail
- */
- public void setRadioButtonValue(String buttonName, int iValue)
- throws java.lang.Exception
- {
+ */
+ public void setRadioButtonValue(String buttonName, int iValue)
+ throws java.lang.Exception
+ {
try {
XInterface xRB =mAT.getAccessibleObjectForRole(mXRoot, AccessibleRole.RADIO_BUTTON, buttonName);
if(xRB == null)
- System.out.println("AccessibleObjectForRole couldn't be found for " + buttonName);
+ System.out.println("AccessibleObjectForRole couldn't be found for " + buttonName);
XAccessibleValue oValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, xRB);
if(oValue == null)
@@ -286,13 +286,13 @@ public class UITools {
oValue.setCurrentValue(new Integer(iValue));
} catch (Exception e) {
e.printStackTrace();
-
- throw new Exception("Could not set value to RadioButton '"
+
+ throw new Exception("Could not set value to RadioButton '"
+ buttonName + "' : " + e.toString());
}
-
+
}
-
+
/**
* select an item in nanmed listbox
* @param ListBoxName the name of the listbox
@@ -304,31 +304,31 @@ public class UITools {
{
try {
XAccessibleContext xListBox = null;
-
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.COMBO_BOX, ListBoxName);
if (xListBox == null){
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.PANEL, ListBoxName);
}
- XAccessible xListBoxAccess = (XAccessible)
+ XAccessible xListBoxAccess = (XAccessible)
UnoRuntime.queryInterface(XAccessible.class, xListBox);
-
+
// if a List is not pulled to be open all entries are not visiblle, therefore the
- // boolean argument
+ // boolean argument
XAccessibleContext xList =mAT.getAccessibleObjectForRole(
xListBoxAccess, AccessibleRole.LIST, true);
XAccessibleSelection xListSelect = (XAccessibleSelection)
UnoRuntime.queryInterface(XAccessibleSelection.class, xList);
-
+
xListSelect.selectAccessibleChild(nChildIndex);
} catch (Exception e) {
- throw new Exception("Could not select item '" +nChildIndex+
+ throw new Exception("Could not select item '" +nChildIndex+
"' in listbox '" + ListBoxName + "' : " + e.toString());
}
}
-
+
/**
* This method returns all entries as XInterface of a list box
* @param ListBoxName the name of the listbox
@@ -343,47 +343,47 @@ public class UITools {
try {
XAccessibleContext xListBox = null;
XAccessibleContext xList = null;
-
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.COMBO_BOX, ListBoxName);
if (xListBox == null){
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.PANEL, ListBoxName);
}
if (xListBox == null){
// get the list of TreeListBox
- xList =mAT.getAccessibleObjectForRole(mXRoot,
+ xList =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.TREE, ListBoxName);
-
+
// all other list boxes have a children of kind of LIST
} else {
-
- XAccessible xListBoxAccess = (XAccessible)
+
+ XAccessible xListBoxAccess = (XAccessible)
UnoRuntime.queryInterface(XAccessible.class, xListBox);
// if a List is not pulled to be open all entries are not visiblle, therefore the
- // boolean argument
+ // boolean argument
xList =mAT.getAccessibleObjectForRole(
xListBoxAccess, AccessibleRole.LIST, true);
}
-
+
for (int i=0;i<xList.getAccessibleChildCount();i++) {
try {
XAccessible xChild = xList.getAccessibleChild(i);
- XAccessibleContext xChildCont =
+ XAccessibleContext xChildCont =
xChild.getAccessibleContext();
- XInterface xChildInterface = (XInterface)
+ XInterface xChildInterface = (XInterface)
UnoRuntime.queryInterface(XInterface.class, xChildCont);
Items.add(xChildInterface);
-
+
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- throw new Exception("Could not get child form list of '"
+ throw new Exception("Could not get child form list of '"
+ ListBoxName + "' : " + e.toString());
}
}
-
+
} catch (Exception e) {
- throw new Exception("Could not get list of items from '"
+ throw new Exception("Could not get list of items from '"
+ ListBoxName + "' : " + e.toString());
}
Object[]ret = new XInterface[Items.size()];
@@ -392,7 +392,7 @@ public class UITools {
}
return ret;
}
-
+
/**
* Helper method: returns the entry manes of a List-Box
* @param ListBoxName the name of the listbox
@@ -407,47 +407,47 @@ public class UITools {
try {
XAccessibleContext xListBox = null;
XAccessibleContext xList = null;
-
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.COMBO_BOX, ListBoxName);
if (xListBox == null){
- xListBox =mAT.getAccessibleObjectForRole(mXRoot,
+ xListBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.PANEL, ListBoxName);
}
if (xListBox == null){
// get the list of TreeListBox
- xList =mAT.getAccessibleObjectForRole(mXRoot,
+ xList =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.TREE, ListBoxName);
-
+
// all other list boxes have a children of kind of LIST
} else {
-
- XAccessible xListBoxAccess = (XAccessible)
+
+ XAccessible xListBoxAccess = (XAccessible)
UnoRuntime.queryInterface(XAccessible.class, xListBox);
// if a List is not pulled to be open all entries are not visiblle, therefore the
- // boolean argument
+ // boolean argument
xList =mAT.getAccessibleObjectForRole(
xListBoxAccess, AccessibleRole.LIST, true);
}
-
+
for (int i=0;i<xList.getAccessibleChildCount();i++) {
try {
XAccessible xChild = xList.getAccessibleChild(i);
- XAccessibleContext xChildCont =
+ XAccessibleContext xChildCont =
xChild.getAccessibleContext();
- XInterface xChildInterface = (XInterface)
+ XInterface xChildInterface = (XInterface)
UnoRuntime.queryInterface(XInterface.class, xChildCont);
Items.add(getString(xChildInterface));
-
+
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- throw new Exception("Could not get child form list of '"
+ throw new Exception("Could not get child form list of '"
+ ListBoxName + "' : " + e.toString());
}
}
-
+
} catch (Exception e) {
- throw new Exception("Could not get list of items from '"
+ throw new Exception("Could not get list of items from '"
+ ListBoxName + "' : " + e.toString());
}
String[]ret = new String[Items.size()];
@@ -465,14 +465,14 @@ public class UITools {
try{
XInterface xNumericField =mAT.getAccessibleObjectForRole(
mXRoot, AccessibleRole.TEXT, NumericFieldName);
- //util.dbg.printInterfaces(xNumericField);
- XAccessibleEditableText oValue = (XAccessibleEditableText)
+ //util.dbg.printInterfaces(xNumericField);
+ XAccessibleEditableText oValue = (XAccessibleEditableText)
UnoRuntime.queryInterface(
XAccessibleEditableText.class, xNumericField);
setString(xNumericField, cValue);
} catch (Exception e) {
- throw new Exception("Could not set value '" + cValue +
+ throw new Exception("Could not set value '" + cValue +
"' into NumericField '" + NumericFieldName + "' : " + e.toString());
}
}
@@ -490,13 +490,13 @@ public class UITools {
XInterface xNumericField =mAT.getAccessibleObjectForRole(
mXRoot, AccessibleRole.TEXT, NumericFieldName);
return (String) getString(xNumericField);
-
+
} catch (Exception e) {
- throw new Exception("Could get value from NumericField '"
+ throw new Exception("Could get value from NumericField '"
+ NumericFieldName + "' : " + e.toString());
}
}
-
+
private String removeCharactersFromCurrencyString(String stringVal)
throws java.lang.Exception
{
@@ -522,22 +522,22 @@ public class UITools {
}
}
String currencyVal = stringVal.substring(beginIndex, endIndex);
-
- currencyVal = currencyVal.substring(0, currencyVal.length()-3) +
+
+ currencyVal = currencyVal.substring(0, currencyVal.length()-3) +
"#" + currencyVal.substring(currencyVal.length()-2);
-
+
currencyVal = utils.replaceAll13(currencyVal, ",", "");
currencyVal = utils.replaceAll13(currencyVal, "\\.", "");
currencyVal = utils.replaceAll13(currencyVal, "#", ".");
-
+
return currencyVal;
} catch (Exception e) {
- throw new Exception("Could get remove characters from currency string '"
+ throw new Exception("Could get remove characters from currency string '"
+ stringVal + "' : " + e.toString());
}
-
+
}
-
+
/**
* returns the numeric value of a numeric filed. This is needed ie. for
* fileds include the moneytary unit.
@@ -553,15 +553,15 @@ public class UITools {
String sValue = getNumericFieldValue(NumericFieldName);
String sAmount = removeCharactersFromCurrencyString(sValue);
retValue = retValue.valueOf(sAmount);
-
+
return retValue;
-
+
} catch (Exception e) {
- throw new Exception("Could get numeric value from NumericField '"
+ throw new Exception("Could get numeric value from NumericField '"
+ NumericFieldName + "' : " + e.toString());
}
}
-
+
/**
* returns the content of a TextBox
@@ -574,33 +574,33 @@ public class UITools {
{
String TextFieldText = null;
try{
- XAccessibleContext xTextField =mAT.getAccessibleObjectForRole(mXRoot,
+ XAccessibleContext xTextField =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.SCROLL_PANE, TextFieldName);
- XAccessible xTextFieldAccess = (XAccessible)
+ XAccessible xTextFieldAccess = (XAccessible)
UnoRuntime.queryInterface(XAccessible.class, xTextField);
XAccessibleContext xFrame =mAT.getAccessibleObjectForRole(
xTextFieldAccess, AccessibleRole.TEXT_FRAME);
for (int i=0;i<xFrame.getAccessibleChildCount();i++) {
try {
XAccessible xChild = xFrame.getAccessibleChild(i);
- XAccessibleContext xChildCont =
+ XAccessibleContext xChildCont =
xChild.getAccessibleContext();
- XInterface xChildInterface = (XInterface)
+ XInterface xChildInterface = (XInterface)
UnoRuntime.queryInterface(XInterface.class, xChildCont);
TextFieldText += (getString(xChildInterface));
-
+
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- throw new Exception("Could not get child fom TextFrame of '"
+ throw new Exception("Could not get child fom TextFrame of '"
+ TextFieldName + "' : " + e.toString());
}
}
return TextFieldText;
} catch (Exception e) {
- throw new Exception("Could not get content fom Textbox '"
+ throw new Exception("Could not get content fom Textbox '"
+ TextFieldName + "' : " + e.toString());
}
}
-
+
/**
* set a value to a named check box
* @param CheckBoxName the name of the check box
@@ -616,18 +616,18 @@ public class UITools {
throws java.lang.Exception
{
try {
- XInterface xCheckBox =mAT.getAccessibleObjectForRole(mXRoot,
+ XInterface xCheckBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.CHECK_BOX, CheckBoxName);
- XAccessibleValue xCheckBoxValue = (XAccessibleValue)
+ XAccessibleValue xCheckBoxValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, xCheckBox);
xCheckBoxValue.setCurrentValue(Value);
-
+
} catch (Exception e) {
- throw new Exception("Could not set value to CheckBox '"
+ throw new Exception("Could not set value to CheckBox '"
+ CheckBoxName + "' : " + e.toString());
}
}
-
+
/**
* returns the value of the named check box
* @param CheckBoxName the name of the check box
@@ -638,18 +638,18 @@ public class UITools {
throws java.lang.Exception
{
try {
- XInterface xCheckBox =mAT.getAccessibleObjectForRole(mXRoot,
+ XInterface xCheckBox =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.CHECK_BOX, CheckBoxName);
- XAccessibleValue xCheckBoxValue = (XAccessibleValue)
+ XAccessibleValue xCheckBoxValue = (XAccessibleValue)
UnoRuntime.queryInterface(XAccessibleValue.class, xCheckBox);
-
+
return (Integer) xCheckBoxValue.getCurrentValue();
} catch (Exception e) {
- throw new Exception("Could not set value to CheckBox '"
+ throw new Exception("Could not set value to CheckBox '"
+ CheckBoxName + "' : " + e.toString());
}
}
-
+
/**
* returns the message of a Basic-MessageBox
* @return the message of a Basic-MessageBox
@@ -660,14 +660,14 @@ public class UITools {
{
String cMessage = null;
try{
- XAccessibleContext xMessage =mAT.getAccessibleObjectForRole(mXRoot,
+ XAccessibleContext xMessage =mAT.getAccessibleObjectForRole(mXRoot,
AccessibleRole.LABEL);
-
- XInterface xMessageInterface = (XInterface)
+
+ XInterface xMessageInterface = (XInterface)
UnoRuntime.queryInterface(XInterface.class, xMessage);
cMessage += (getString(xMessageInterface));
-
+
return cMessage;
} catch (Exception e) {
throw new Exception("Could not get message from Basic-MessageBox: " + e.toString());
@@ -678,7 +678,7 @@ public class UITools {
* fetch the window which is equal to the given <CODE>WindowName</CODE>
* @return the named window
* @throws java.lang.Exception if something fail
- */
+ */
public XWindow getTopWindow(String WindowName, boolean debug) throws java.lang.Exception
{
XInterface xToolKit = null;
@@ -689,18 +689,18 @@ public class UITools {
}
XExtendedToolkit tk = (XExtendedToolkit)
UnoRuntime.queryInterface(XExtendedToolkit.class, xToolKit);
-
+
int count = tk.getTopWindowCount();
-
+
XTopWindow retWindow = null;
-
+
if (debug) System.out.println("getTopWindow ->");
-
+
for (int i=0; i < count ; i++){
XTopWindow xTopWindow = tk.getTopWindow(i);
XAccessible xAcc = mAT.getAccessibleObject(xTopWindow);
String accName = xAcc.getAccessibleContext().getAccessibleName();
-
+
if (debug){
System.out.println("AccessibleName: " + accName);
}
@@ -711,30 +711,30 @@ public class UITools {
}
}
-
+
if (debug) {
if (retWindow == null) System.out.println("could not found window with name '" + WindowName + "'");
System.out.println("<- getTopWindow ");
}
return (XWindow) UnoRuntime.queryInterface(XWindow.class, retWindow);
}
-
+
public void clickMiddleOfAccessibleObject(short role, String name){
-
+
XAccessibleContext xAcc =mAT.getAccessibleObjectForRole(mXRoot, role, name);
XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
XAccessibleComponent.class, xAcc);
-
- System.out.println(xAcc.getAccessibleRole() + "," +
- xAcc.getAccessibleName() + "(" +
- xAcc.getAccessibleDescription() + "):" +
+
+ System.out.println(xAcc.getAccessibleRole() + "," +
+ xAcc.getAccessibleName() + "(" +
+ xAcc.getAccessibleDescription() + "):" +
utils.getImplName(xAcc));
-
+
if (aComp != null) {
Point location = aComp.getLocationOnScreen();
- String bounds = "(" + aComp.getBounds().X + "," +
- aComp.getBounds().Y + ")" + " (" +
- aComp.getBounds().Width + "," +
+ String bounds = "(" + aComp.getBounds().X + "," +
+ aComp.getBounds().Y + ")" + " (" +
+ aComp.getBounds().Width + "," +
aComp.getBounds().Height + ")";
System.out.println("The boundary Rectangle is " + bounds);
try {
@@ -748,25 +748,25 @@ public class UITools {
} catch (java.awt.AWTException e) {
System.out.println("couldn't press mouse button");
}
-
+
}
}
-
+
public void doubleClickMiddleOfAccessibleObject(short role, String name) {
XAccessibleContext xAcc =mAT.getAccessibleObjectForRole(mXRoot, role, name);
XAccessibleComponent aComp = (XAccessibleComponent) UnoRuntime.queryInterface(
XAccessibleComponent.class, xAcc);
-
- System.out.println(xAcc.getAccessibleRole() + "," +
- xAcc.getAccessibleName() + "(" +
- xAcc.getAccessibleDescription() + "):" +
+
+ System.out.println(xAcc.getAccessibleRole() + "," +
+ xAcc.getAccessibleName() + "(" +
+ xAcc.getAccessibleDescription() + "):" +
utils.getImplName(xAcc));
-
+
if (aComp != null) {
Point location = aComp.getLocationOnScreen();
- String bounds = "(" + aComp.getBounds().X + "," +
- aComp.getBounds().Y + ")" + " (" +
- aComp.getBounds().Width + "," +
+ String bounds = "(" + aComp.getBounds().X + "," +
+ aComp.getBounds().Y + ")" + " (" +
+ aComp.getBounds().Width + "," +
aComp.getBounds().Height + ")";
System.out.println("The boundary Rectangle is " + bounds);
try {
@@ -783,10 +783,10 @@ public class UITools {
} catch (java.awt.AWTException e) {
System.out.println("couldn't press mouse button");
}
-
+
}
}
-
+
/**
* <B>DEPRECATED</B>
* Since <CODE>AccessibilityTools</CODE> handle parameter <CODE>debugIsActive</CODE>
@@ -794,21 +794,21 @@ public class UITools {
* @deprecated Since <CODE>AccessibilityTools</CODE> handle parameter <CODE>debugIsActive</CODE>
* this function does not work anymore.
* @param log logWriter
- */
+ */
public void printAccessibleTree(PrintWriter log)
{
mAT.printAccessibleTree(log, mXRoot);
}
-
-
+
+
/**
* Prints the accessible tree to the <CODE>logWriter</CODE> only if <CODE>debugIsActive</CODE>
* is set to <CODE>true</CODE>
* @param log logWriter
* @param debugIsActive prints only if this parameter is set to TRUE
- */
+ */
public void printAccessibleTree(PrintWriter log, boolean debugIsActive) {
mAT.printAccessibleTree(log, mXRoot, debugIsActive);
}
-
+
}
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java
index 8388b4c2222f..ae00eadb2e62 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ public class ValueChanger {
public static Object changePValue( Object oldValue ) {
Object newValue = null;
-
+
if (oldValue instanceof com.sun.star.uno.Any) {
try {
oldValue = AnyConverter.toObject(((Any) oldValue).getType(),oldValue);
@@ -714,7 +714,7 @@ public class ValueChanger {
newVal.Name = ((PropertyValue)oldValue).Name;
newVal.Value = changePValue(((PropertyValue)oldValue).Value);
newValue = newVal;
- } else
+ } else
if (oldValue instanceof com.sun.star.sheet.ValidationAlertStyle){
com.sun.star.sheet.ValidationAlertStyle VAS1 = com.sun.star.sheet.ValidationAlertStyle.INFO;
com.sun.star.sheet.ValidationAlertStyle VAS2 = com.sun.star.sheet.ValidationAlertStyle.MACRO;
@@ -860,7 +860,7 @@ public class ValueChanger {
} else {
if ( oldPPC.Coordinates[0].length == 0 ) {
newPPC.Coordinates = pArray;
- newPPC.Flags = fArray;
+ newPPC.Flags = fArray;
} else {
newPPC.Coordinates[0][0].X = oldPPC.Coordinates[0][0].X +1;
newPPC.Coordinates[0][0].Y = oldPPC.Coordinates[0][0].Y +1;
diff --git a/qadevOOo/runner/util/ValueComparer.java b/qadevOOo/runner/util/ValueComparer.java
index dd9749119a8f..3efd835ad8af 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ public class ValueComparer {
// Method to change a Value, thought for properties
public static boolean equalValue( Object first, Object second ) {
-
+
if (first instanceof com.sun.star.uno.Any) {
try {
first = AnyConverter.toObject(((Any) first).getType(),first);
@@ -55,7 +55,7 @@ public class ValueComparer {
second = AnyConverter.toObject(((Any) second).getType(),second);
} catch (com.sun.star.lang.IllegalArgumentException iae) {
}
- }
+ }
boolean eq = false;
try {
if ( (first==null) || (second == null) ) {
@@ -85,11 +85,11 @@ public class ValueComparer {
HashMap hm1 = new HashMap();
boolean result = true;
int i = 0;
-
+
for (i = 0; i < pv1.length; i++){
hm1.put(pv1[i].Name, pv1[i].Value);
}
-
+
i = 0;
while (i < pv2.length && result) {
result &= equalValue(hm1.get(pv2[i].Name),pv2[i].Value);
@@ -97,12 +97,12 @@ public class ValueComparer {
}
return result;
}
-
+
static boolean compareArrays(Object op1, Object op2) throws Exception {
if (op1 instanceof PropertyValue[] && op2 instanceof PropertyValue[]) {
return compareArrayOfPropertyValue((PropertyValue[])op1,(PropertyValue[])op2);
- }
+ }
boolean result = true;
if((op1.getClass().getComponentType() == op2.getClass().getComponentType())
&& (Array.getLength(op1) == Array.getLength(op2)))
@@ -137,7 +137,7 @@ public class ValueComparer {
Object obj1 = fields[i].get(op1);
Object obj2 = fields[i].get(op2);
if (obj1 instanceof com.sun.star.uno.Any) {
- try {
+ try {
if (utils.isVoid(obj1)) {
obj1 = null;
} else {
@@ -147,7 +147,7 @@ public class ValueComparer {
}
}
if (obj2 instanceof com.sun.star.uno.Any) {
- try {
+ try {
if (utils.isVoid(obj2)) {
obj2 = null;
} else {
@@ -155,8 +155,8 @@ public class ValueComparer {
}
} catch (com.sun.star.lang.IllegalArgumentException iae) {
}
- }
-
+ }
+
result = result & compareObjects(obj1, obj2);
}
diff --git a/qadevOOo/runner/util/WaitUnreachable.java b/qadevOOo/runner/util/WaitUnreachable.java
index f756c9fae648..b4593acce4a3 100644
--- a/qadevOOo/runner/util/WaitUnreachable.java
+++ b/qadevOOo/runner/util/WaitUnreachable.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/WriterTools.java b/qadevOOo/runner/util/WriterTools.java
index 33b5d4f61aab..b71b6bcf3c0a 100644
--- a/qadevOOo/runner/util/WriterTools.java
+++ b/qadevOOo/runner/util/WriterTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ public class WriterTools {
return WriterDoc;
} // finish createTextDoc
- public static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
+ public static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
String url) {
PropertyValue[] Args = new PropertyValue[0];
XTextDocument WriterDoc = loadTextDoc(xMSF, url, Args);
@@ -63,7 +63,7 @@ public class WriterTools {
return WriterDoc;
} // finish createTextDoc
- public static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
+ public static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
String url, PropertyValue[] Args) {
XComponent comp = DesktopTools.loadDoc(xMSF, url, Args);
XTextDocument WriterDoc = (XTextDocument) UnoRuntime.queryInterface(
@@ -86,9 +86,9 @@ public class WriterTools {
return oDP;
}
- public static void insertTextGraphic(XTextDocument aDoc,
- XMultiServiceFactory xMSF, int hpos,
- int vpos, int width, int height,
+ public static void insertTextGraphic(XTextDocument aDoc,
+ XMultiServiceFactory xMSF, int hpos,
+ int vpos, int width, int height,
String pic, String name) {
try {
Object oGObject = (XInterface) xMSF.createInstance(
@@ -110,7 +110,7 @@ public class WriterTools {
oProps.setPropertyValue("Width", new Integer(width));
oProps.setPropertyValue("Height", new Integer(height));
- XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,
+ XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,
oGObject);
the_name.setName(name);
} catch (Exception ex) {
diff --git a/qadevOOo/runner/util/XInstCreator.java b/qadevOOo/runner/util/XInstCreator.java
index 2f6ec3ecf272..f11f21f0285e 100644
--- a/qadevOOo/runner/util/XInstCreator.java
+++ b/qadevOOo/runner/util/XInstCreator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/util/XLayerHandlerImpl.java b/qadevOOo/runner/util/XLayerHandlerImpl.java
index e3a0ae3a1b23..663e33a4964f 100644
--- a/qadevOOo/runner/util/XLayerHandlerImpl.java
+++ b/qadevOOo/runner/util/XLayerHandlerImpl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,88 +32,88 @@ public class XLayerHandlerImpl
protected String ls = System.getProperty("line.separator");
public void addOrReplaceNode(String str, short param)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addOrReplace(" + str + "," + param + ");" + ls);
}
- public void addOrReplaceNodeFromTemplate(String str,
- com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
+ public void addOrReplaceNodeFromTemplate(String str,
+ com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
short param)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addOrReplaceNodeFromTemplate(" + str + "," + templateIdentifier + ");" + ls);
}
- public void addProperty(String str, short param,
+ public void addProperty(String str, short param,
com.sun.star.uno.Type type)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addProperty(" + str + "," + param + "," + type + ");" + ls);
}
public void addPropertyWithValue(String str, short param, Object obj)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addPropertyWithValue(" + str + "," + param + "," + obj + ");" + ls);
}
public void dropNode(String str)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("dropNode(" + str + ");" + ls);
}
public void endLayer()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endLayer();" + ls);
}
public void endNode()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endNode();" + ls);
}
public void endProperty()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endProperty();" + ls);
}
public void overrideNode(String str, short param, boolean param2)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("overrideNode(" + str + "," + param + "," + param2 + ");" + ls);
}
- public void overrideProperty(String str, short param,
+ public void overrideProperty(String str, short param,
com.sun.star.uno.Type type, boolean param3)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("overrideProperty(" + str + "," + param + "," + type + "," + param3 + ");" + ls);
}
public void setPropertyValue(Object obj)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("setPropertyValue(" + obj + ");" + ls);
}
public void setPropertyValueForLocale(Object obj, String str)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("setPropertyValueForLocale(" + obj + "," + str + ");" + ls);
}
public void startLayer()
- throws com.sun.star.configuration.backend.MalformedDataException,
- com.sun.star.lang.WrappedTargetException {
+ throws com.sun.star.configuration.backend.MalformedDataException,
+ com.sun.star.lang.WrappedTargetException {
calls = "startLayer();" + ls;
}
public String getCalls() {
return calls;
- }
+ }
} \ No newline at end of file
diff --git a/qadevOOo/runner/util/XLayerImpl.java b/qadevOOo/runner/util/XLayerImpl.java
index 72dc2a2fa6aa..a1ccaa800ce6 100644
--- a/qadevOOo/runner/util/XLayerImpl.java
+++ b/qadevOOo/runner/util/XLayerImpl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,18 +28,18 @@
package util;
public class XLayerImpl implements com.sun.star.configuration.backend.XLayer {
-
+
protected boolean wasCalled = false;
-
+
public XLayerImpl() {
}
-
+
public void readData(com.sun.star.configuration.backend.XLayerHandler xLayerHandler) throws com.sun.star.lang.NullPointerException, com.sun.star.lang.WrappedTargetException, com.sun.star.configuration.backend.MalformedDataException {
wasCalled = true;
}
-
+
public boolean hasBeenCalled() {
return wasCalled;
}
-
+
}
diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index a744afe0a3f8..786067216938 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -280,7 +280,7 @@ public class XMLTools {
this.printXMLData = printXMLData ;
this.log = log_ ;
}
-
+
/**
* Reset all values. This is important e.g. for test of XFilter
* interface, where 'filter()' method istbstarted twice.
@@ -754,7 +754,7 @@ public class XMLTools {
if (!isWellFormed())
log.println("!!! Some errors were found in XML structure") ;
-
+
boolean result = tags.size() == 0 && chars.size() == 0 && isWellFormed();
reset();
return result;
diff --git a/qadevOOo/runner/util/XSchemaHandlerImpl.java b/qadevOOo/runner/util/XSchemaHandlerImpl.java
index cac0754d9f20..df91acc8ffa9 100644
--- a/qadevOOo/runner/util/XSchemaHandlerImpl.java
+++ b/qadevOOo/runner/util/XSchemaHandlerImpl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,98 +31,98 @@ public class XSchemaHandlerImpl
protected String calls = "";
protected String ls = System.getProperty("line.separator");
- public void addInstance(String str,
+ public void addInstance(String str,
com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addInstance();" + ls);
}
public void addItemType(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addItemType();" + ls);
}
- public void addProperty(String str, short param,
+ public void addProperty(String str, short param,
com.sun.star.uno.Type type)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addProperty();" + ls);
}
public void addPropertyWithDefault(String str, short param, Object obj)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("addPropertyWithDefault();" + ls);
}
public void endComponent()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endComponent();" + ls);
}
public void endNode()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endNode();" + ls);
}
public void endSchema()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endSchema();" + ls);
}
public void endTemplate()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("endTemplate();" + ls);
}
public void importComponent(String str)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("importComponent();" + ls);
}
public void startComponent(String str)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startComponent();" + ls);
}
public void startGroup(String str, short param)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startGroup();" + ls);
}
- public void startGroupTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
+ public void startGroupTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
short param)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startGroupTemplate();" + ls);
}
public void startSchema()
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startSchema();" + ls);
}
- public void startSet(String str, short param,
+ public void startSet(String str, short param,
com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startSet();" + ls);
}
- public void startSetTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
- short param,
+ public void startSetTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
+ short param,
com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier2)
- throws com.sun.star.configuration.backend.MalformedDataException,
+ throws com.sun.star.configuration.backend.MalformedDataException,
com.sun.star.lang.WrappedTargetException {
calls += ("startSetTemplate();" + ls);
}
@@ -130,8 +130,8 @@ public class XSchemaHandlerImpl
public String getCalls() {
return calls;
}
-
+
public void cleanCalls() {
calls = "";
- }
+ }
} \ No newline at end of file
diff --git a/qadevOOo/runner/util/compare/DocComparator.java b/qadevOOo/runner/util/compare/DocComparator.java
index 365850fa4839..5ffa024216bc 100644
--- a/qadevOOo/runner/util/compare/DocComparator.java
+++ b/qadevOOo/runner/util/compare/DocComparator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@ package util.compare;
import java.io.IOException;
/**
- *
+ *
*
*/
diff --git a/qadevOOo/runner/util/compare/DocComparatorFactory.java b/qadevOOo/runner/util/compare/DocComparatorFactory.java
index 5f68606932c0..012bfcdf9388 100644
--- a/qadevOOo/runner/util/compare/DocComparatorFactory.java
+++ b/qadevOOo/runner/util/compare/DocComparatorFactory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,8 +57,8 @@ public class DocComparatorFactory
{
throw new IllegalArgumentException("DocComparator for '" + s + "' not supported!");
}
-
+
// unreachable: return null;
}
-
+
}
diff --git a/qadevOOo/runner/util/compare/GraphicalComparator.java b/qadevOOo/runner/util/compare/GraphicalComparator.java
index 71109e984188..9e734992f26e 100644
--- a/qadevOOo/runner/util/compare/GraphicalComparator.java
+++ b/qadevOOo/runner/util/compare/GraphicalComparator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ class GraphicalComparator implements DocComparator
{
m_aArguments = new GraphicalTestArguments(aParams);
}
-
+
/**
* @return an instance of this object, but only it's interface
*/
@@ -93,7 +93,7 @@ class GraphicalComparator implements DocComparator
sNewSubDir = FileHelper.removeFirstDirectorysAndBasenameFrom(_sEntry, _sInputPath);
}
String sNameNoSuffix = FileHelper.getNameNoSuffix(FileHelper.getBasename(_sEntry));
-
+
// add the sub path to the difference path
String sNewReferencePath;
if (sNewSubDir.length() > 0)
@@ -108,11 +108,11 @@ class GraphicalComparator implements DocComparator
sNewReferencePath += fs + sNameNoSuffix + _sNewSuffix;
return sNewReferencePath;
}
-
+
boolean isReferenceOrDiffExistent(String _sNewSuffix)
{
boolean isExistent = false;
-
+
// LLA? What if sReferencePath is a directory, but directory is empty? is the result then true or false;
// wir muessen durch den InputPath durch und dann fuer jedes Dokument prufen, ob im angegebenen ReferencePath eine Reference existiert.
@@ -134,7 +134,7 @@ class GraphicalComparator implements DocComparator
}
else
{
- // sInputPath is a file
+ // sInputPath is a file
String sNewReferencePath = createSpecialFile(sInputPath, "", m_aArguments.getReferencePath(), _sNewSuffix);
if (FileHelper.exists(sNewReferencePath))
{
@@ -143,7 +143,7 @@ class GraphicalComparator implements DocComparator
}
return isExistent;
}
-
+
/**
* REFERENCE_PATH must set to directory/file, where the reference (*.prn files) (should) exist
*/
@@ -198,7 +198,7 @@ class GraphicalComparator implements DocComparator
System.err.println(" Inputpath: '" + m_aArguments.getInputPath() + "'");
System.err.println(" Outputpath: '" + m_aArguments.getOutputPath() + "'");
System.err.println("Referencepath: '" + m_aArguments.getReferencePath() + "'");
- }
+ }
return GraphicalDifferenceCheck.check(m_aArguments.getInputPath(), m_aArguments.getOutputPath(), m_aArguments.getReferencePath(), m_aArguments);
}
catch(ConvWatchException e)
@@ -228,7 +228,7 @@ class GraphicalComparator implements DocComparator
/**
* INPUT_PATH must set, to directory/file, where the documents exist.
* REFERENCE_PATH must set to directory/file, where the created references (*.prn files) exists.
- * OUTPUT_PATH must set to a directory, where the whole ouptut will create. Here the diffReference will create.
+ * OUTPUT_PATH must set to a directory, where the whole ouptut will create. Here the diffReference will create.
* At the momemt it's not possible to say only where the diffreferences will create.
*/
public void createDiffReference() throws IOException
@@ -236,11 +236,11 @@ class GraphicalComparator implements DocComparator
// this is the same like compareDiff(), but trash the result.
compareDiff();
}
-
+
/**
* INPUT_PATH must set, to directory/file, where the documents exist.
* REFERENCE_PATH must set to directory/file, where the created references (*.prn files) exists.
- * OUTPUT_PATH must set to a directory, where the whole ouptut will create.
+ * OUTPUT_PATH must set to a directory, where the whole ouptut will create.
* DIFF_PATH must set to a directory, where the older difference references exist, it's possible to set this to the same as REFERENCE_PATH
* but this is not the default and will not automatically set.
*/
@@ -256,5 +256,5 @@ class GraphicalComparator implements DocComparator
throw new java.io.IOException(e.getMessage());
}
}
-
+
}
diff --git a/qadevOOo/runner/util/compare/PDFComparator.java b/qadevOOo/runner/util/compare/PDFComparator.java
index fb49b0db40dd..2032a3346561 100644
--- a/qadevOOo/runner/util/compare/PDFComparator.java
+++ b/qadevOOo/runner/util/compare/PDFComparator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@ import util.compare.DocComparator;
import lib.TestParameters;
import util.compare.GraphicalComparator;
-class PDFComparator extends GraphicalComparator implements DocComparator
+class PDFComparator extends GraphicalComparator implements DocComparator
{
protected PDFComparator(TestParameters aParams)
{
@@ -47,16 +47,16 @@ class PDFComparator extends GraphicalComparator implements DocComparator
// all in GraphicalComparator implemented.
// public boolean isReferenceExistent() throws IOException;
- //
+ //
// public void createReference() throws IOException;
- //
+ //
// public boolean compare() throws IOException;
- //
- //
+ //
+ //
// public boolean isDiffReferenceExistent() throws IOException;
- //
+ //
// public void createDiffReference() throws IOException;
- //
+ //
// public boolean compareDiff() throws IOException;
}
diff --git a/qadevOOo/runner/util/compare/XMLComparator.java b/qadevOOo/runner/util/compare/XMLComparator.java
index 470dbaa3ada1..4b7293a212a5 100644
--- a/qadevOOo/runner/util/compare/XMLComparator.java
+++ b/qadevOOo/runner/util/compare/XMLComparator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@ package util.compare;
/**
* This Interface isn't ready yet.
- *
+ *
*/
/*
class XMLComparator implements DocComparator
diff --git a/qadevOOo/runner/util/db/DataSource.java b/qadevOOo/runner/util/db/DataSource.java
index 60c613edd854..8cfdac36b661 100644
--- a/qadevOOo/runner/util/db/DataSource.java
+++ b/qadevOOo/runner/util/db/DataSource.java
@@ -1,22 +1,22 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
- *
+ *
* OpenOffice.org - a multi-platform office productivity suite
- *
+ *
* This file is part of OpenOffice.org.
- *
+ *
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
- *
+ *
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
diff --git a/qadevOOo/runner/util/db/DataSourceDescriptor.java b/qadevOOo/runner/util/db/DataSourceDescriptor.java
index 9faeeb3f51e0..1d2b394087aa 100644
--- a/qadevOOo/runner/util/db/DataSourceDescriptor.java
+++ b/qadevOOo/runner/util/db/DataSourceDescriptor.java
@@ -1,22 +1,22 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
- *
+ *
* OpenOffice.org - a multi-platform office productivity suite
- *
+ *
* This file is part of OpenOffice.org.
- *
+ *
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
- *
+ *
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
diff --git a/qadevOOo/runner/util/db/DatabaseDocument.java b/qadevOOo/runner/util/db/DatabaseDocument.java
index 9022315fbfa4..85a570a4dc8b 100644
--- a/qadevOOo/runner/util/db/DatabaseDocument.java
+++ b/qadevOOo/runner/util/db/DatabaseDocument.java
@@ -1,22 +1,22 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
- *
+ *
* OpenOffice.org - a multi-platform office productivity suite
- *
+ *
* This file is part of OpenOffice.org.
- *
+ *
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
- *
+ *
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
diff --git a/qadevOOo/runner/util/dbg.java b/qadevOOo/runner/util/dbg.java
index 259500fe0c8f..18d360fcdd76 100644
--- a/qadevOOo/runner/util/dbg.java
+++ b/qadevOOo/runner/util/dbg.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,7 +63,7 @@ public class dbg {
* @param extendedInfo Should extended information be printed?
* @see com.sun.star.uno.XInterface
*/
- public static void printInterfaces(XInterface xTarget,
+ public static void printInterfaces(XInterface xTarget,
boolean extendedInfo){
Type[] types = getInterfaceTypes(xTarget);
if( null != types ) {
@@ -92,13 +92,13 @@ public class dbg {
types = xTypeProvider.getTypes();
return types;
}
-
+
/**
- * Returns true if a specified target implements the interface with the
+ * Returns true if a specified target implements the interface with the
* given name. Note that the comparison is not case sensitive.
* @param xTarget The implementation which should be analysed.
- * @param ifcName The name of the interface that is tested. The name can
- * be full qualified, such as 'com.sun.star.io.XInputStream', or only
+ * @param ifcName The name of the interface that is tested. The name can
+ * be full qualified, such as 'com.sun.star.io.XInputStream', or only
* consist of the interface name, such as 'XText'.
* @return True, if xTarget implements the interface named ifcType
* @see com.sun.star.uno.XInterface
@@ -116,7 +116,7 @@ public class dbg {
}
return false;
}
-
+
/**
* Prints information about an interface type.
*
@@ -128,7 +128,7 @@ public class dbg {
Class zClass = aType.getZClass();
Method[] methods = zClass.getDeclaredMethods();
for (int i=0; i<methods.length; i++) {
- System.out.println("\t" + methods[i].getReturnType().getName()
+ System.out.println("\t" + methods[i].getReturnType().getName()
+ " " + methods[i].getName() + "()");
}
}
@@ -152,8 +152,8 @@ public class dbg {
/**
* Print all information about the property <code>name</code> from
* the property set <code>PS</code> to standard out.
- * @param PS The property set which should contain a property called
- * <code>name</code>.
+ * @param PS The property set which should contain a property called
+ * <code>name</code>.
* @param name The name of the property.
* @see com.sun.star.beans.XPropertySet
*/
@@ -164,13 +164,13 @@ public class dbg {
/**
* Print all information about the property <code>name</code> from
* the property set <code>PS</code> to a print writer.
- * @param PS The property set which should contain a property called
- * <code>name</code>.
+ * @param PS The property set which should contain a property called
+ * <code>name</code>.
* @param name The name of the property.
* @param out The print writer which is used as output.
* @see com.sun.star.beans.XPropertySet
*/
- public static void printPropertyInfo(XPropertySet PS, String name,
+ public static void printPropertyInfo(XPropertySet PS, String name,
PrintWriter out) {
try {
XPropertySetInfo PSI = PS.getPropertySetInfo();
@@ -179,7 +179,7 @@ public class dbg {
out.println("Property name is " + prop.Name);
out.println("Property handle is " + prop.Handle);
out.println("Property type is " + prop.Type.getTypeName());
- out.println("Property current value is " +
+ out.println("Property current value is " +
PS.getPropertyValue(name));
out.println("Attributes :");
short attr = prop.Attributes;
@@ -219,13 +219,13 @@ public class dbg {
* @param ps The property which should displayed
* @see com.sun.star.beans.PropertyValue
*/
-
+
public static void printProperyValueSequenzePairs(PropertyValue[] ps){
for( int i = 0; i < ps.length; i++){
printProperyValuePairs(ps[i], new PrintWriter(System.out));
}
}
-
+
/**
* Print the names and the values of a sequenze of <code>PropertyValue</code>
* to a print writer.
@@ -238,7 +238,7 @@ public class dbg {
printProperyValuePairs(ps[i], out);
}
}
-
+
/**
* Print the name and the value of a <code>PropertyValue</code> to to standard out.
* @param ps The property which should displayed
@@ -255,7 +255,7 @@ public class dbg {
* @see com.sun.star.beans.PropertyValue
*/
public static void printProperyValuePairs(PropertyValue ps, PrintWriter out){
-
+
if (ps.Value instanceof String[] ){
String[] values = (String[]) ps.Value;
String oneValue = "value is an empty String[]";
@@ -271,19 +271,19 @@ public class dbg {
out.println(" Name: '" + ps.Name + "' contains String[]:");
out.println(oneValue);
out.println("--------");
-
+
} else if (ps.Value instanceof PropertyValue){
out.println("--------");
out.println(" Name: '" + ps.Name + "' contains PropertyValue:");
printProperyValuePairs((PropertyValue)ps.Value, out);
out.println("--------");
-
+
} else if (ps.Value instanceof PropertyValue[]){
out.println("--------");
out.println(" Name: '" + ps.Name + "' contains PropertyValue[]:");
printProperyValueSequenzePairs((PropertyValue[])ps.Value, out);
out.println("--------");
-
+
} else {
out.println("Name: '" + ps.Name + "' Value: '" + ps.Value.toString() + "'");
}
@@ -302,7 +302,7 @@ public class dbg {
}
/**
- * Print the supported services of a UNO object.
+ * Print the supported services of a UNO object.
* @param aObject A UNO object.
*/
public static void getSuppServices (Object aObject) {
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 3f882f10fafb..90aecd63d1a8 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -294,7 +294,7 @@ public class utils {
* returns the value of the given setting name. For Example the setting name "Temp"
* "Temp" returns the temp folder of the office instance.
* @param msf a XMultiServiceFactory
- * @param setting the name of the setting the value should be returned.
+ * @param setting the name of the setting the value should be returned.
* For example "Temp" reutrns the temp folder of the current office instance.
* @see com.sun.star.util.PathSettings
* @return the value as String
@@ -713,7 +713,7 @@ public class utils {
}
/** returns the path to the office binary folder
- *
+ *
* @param msf The XMultiSeriveFactory
* @return the path to the office binrary or an empty string on any error
*/
@@ -728,7 +728,7 @@ public class utils {
}
/**
- * Get an array of all property names from the property set. With the include
+ * Get an array of all property names from the property set. With the include
* and exclude parameters the properties can be filtered. <br>
* Set excludePropertyAttribute = 0 and includePropertyAttribute = 0
* to include all and exclude none.
@@ -1001,7 +1001,7 @@ public class utils {
/** returns a String which contains the current date and time<br>
* format: [DD.MM.YYYY - HH:MM:SS::mm]
- *
+ *
** @return a String which contains the current date and time
*/
public static String getDateTime() {