diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-09-30 07:44:27 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-09-30 07:44:27 +0000 |
commit | 122adddbef72cf66affd2c7c77f146d6b3461f9b (patch) | |
tree | afe42e1c328dc82500cccd969b34e85ef1f6e8cf | |
parent | 32bdad3936d902cf3626ceed29c2025a17ca2d0c (diff) |
CWS-TOOLING: integrate CWS qadev33
94 files changed, 1098 insertions, 1094 deletions
diff --git a/qadevOOo/makefile.mk b/qadevOOo/makefile.mk index 70c6332a4c87..de756b44a149 100755 --- a/qadevOOo/makefile.mk +++ b/qadevOOo/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.7 $ +# $Revision: 1.7.2.2 $ # # This file is part of OpenOffice.org. # @@ -34,6 +34,13 @@ PRJNAME = OOoRunner TARGET=qadevOOo PRJ=. +# ------------------------------------------------ +# NEVER REMOVE THIS! +# The OOoRunner.jar and OOoRunnerLight.jar should build with debug information all the time, also in the .pro builds. +# If you have any questions about this, ask the qadevOOo Maintainer. +debug=true +# ------------------------------------------------ + .INCLUDE : ant.mk TST: @@ -41,11 +48,7 @@ TST: .IF "$(SOLAR_JAVA)"=="TRUE" .IF "$(ANT_HOME)"!="NO_ANT_HOME" -.IF "$(JDK)"=="gcj" ANT_FLAGS+=-Dbuild.source=1.5 -.ELSE -ANT_FLAGS+=-Dbuild.source=1.4 -.ENDIF ALLTAR: ANTBUILD .ENDIF .ENDIF diff --git a/qadevOOo/runner/base/java_complex.java b/qadevOOo/runner/base/java_complex.java index 0a69d047d5ac..0690fb8a0138 100644 --- a/qadevOOo/runner/base/java_complex.java +++ b/qadevOOo/runner/base/java_complex.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: java_complex.java,v $ - * $Revision: 1.13 $ + * $Revision: 1.13.8.1 $ * * This file is part of OpenOffice.org. * @@ -84,10 +84,11 @@ public class java_complex implements TestBase{ public boolean executeTest(TestParameters param, DescEntry[] entries) { // is there an ini file for the complex tests defined? String complexIniFileName = ((String)param.get("ComplexIni")); - if (complexIniFileName != null) { + if (complexIniFileName != null) + { CfgParser ini = new CfgParser(complexIniFileName); ini.getIniParameters(param); - } + } DynamicClassLoader dcl = new DynamicClassLoader(); ComplexTestCase testClass = null; diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java index 19b451f39138..64f55e8f0814 100644 --- a/qadevOOo/runner/base/java_fat.java +++ b/qadevOOo/runner/base/java_fat.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: java_fat.java,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.2.1 $ * * This file is part of OpenOffice.org. * @@ -522,7 +522,9 @@ public class java_fat implements TestBase { XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager( param); - param.put("ServiceFactory", msf); + if (msf != null){ + param.put("ServiceFactory", msf); + } return office; } diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java index 2a7c54bdd848..4fb5d757fb0e 100644 --- a/qadevOOo/runner/complexlib/ComplexTestCase.java +++ b/qadevOOo/runner/complexlib/ComplexTestCase.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ComplexTestCase.java,v $ - * $Revision: 1.16 $ + * $Revision: 1.16.2.1 $ * * This file is part of OpenOffice.org. * @@ -42,7 +42,7 @@ import java.io.PrintWriter; /** * Base class for all complex tests. */ -public abstract class ComplexTestCase implements ComplexTest { +public abstract class ComplexTestCase extends Assurance implements ComplexTest { /** The test parameters **/ protected static TestParameters param = null; @@ -50,10 +50,6 @@ public abstract class ComplexTestCase implements ComplexTest { protected static LogWriter log = null; /** Description entry **/ protected DescEntry subEntry = null; - /** State of the current test method **/ - protected boolean state = true; - /** The message if the test did fail **/ - protected String message = null; /** * The method name which will be written into f.e. the data base **/ @@ -240,268 +236,5 @@ public abstract class ComplexTestCase implements ComplexTest { return this.getClass().getName(); } - /** - * Assure that s is true. - * This function generates "Assure failed." as standard message. - * @param s The condition that should be true. - */ - protected void assure(boolean s) { - assure("Assure failed.", s, false); - } - - /** - * Assure that s is true. - * The given message will be only evaluated, if s is false. - * @param msg The message that is evaluated. - * @param s The condition that should be true. - */ - protected void assure(String msg, boolean s) { - assure(msg, s, false); - } - - /** - * Assure that two boolean values are equal - * @param expected specifies the expected boolean value - * @param actual specifies the actual boolean value - */ - protected void assureEquals( boolean expected, boolean actual ) { - assureEquals( "Equality test failed", new Boolean( expected ), new Boolean( actual ), false ); - } - - /** - * Assure that two boolean values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected boolean value - * @param actual specifies the actual boolean value - */ - protected void assureEquals( String message, boolean expected, boolean actual ) { - assureEquals( message, new Boolean( expected ), new Boolean( actual ), false ); - } - - /** - * Assure that two byte values are equal - * @param expected specifies the expected byte value - * @param actual specifies the actual byte value - */ - protected void assureEquals( byte expected, byte actual ) { - assureEquals( "Equality test failed", new Byte( expected ), new Byte( actual ), false ); - } - - /** - * Assure that two byte values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected byte value - * @param actual specifies the actual byte value - */ - protected void assureEquals( String message, byte expected, byte actual ) { - assureEquals( message, new Byte( expected ), new Byte( actual ), false ); - } - - /** - * Assure that two double values are equal - * @param expected specifies the expected double value - * @param actual specifies the actual double value - */ - protected void assureEquals( double expected, double actual ) { - assureEquals( "Equality test failed", new Double( expected ), new Double( actual ), false ); - } - - /** - * Assure that two double values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected double value - * @param actual specifies the actual double value - */ - protected void assureEquals( String message, double expected, double actual ) { - assureEquals( message, new Double( expected ), new Double( actual ), false ); - } - - /** - * Assure that two float values are equal - * @param expected specifies the expected float value - * @param actual specifies the actual float value - */ - protected void assureEquals( float expected, float actual ) { - assureEquals( "Equality test failed", new Float( expected ), new Float( actual ), false ); - } - - /** - * Assure that two float values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected float value - * @param actual specifies the actual float value - */ - protected void assureEquals( String message, float expected, float actual ) { - assureEquals( message, new Float( expected ), new Float( actual ), false ); - } - - /** - * Assure that two short values are equal - * @param expected specifies the expected short value - * @param actual specifies the actual short value - */ - protected void assureEquals( short expected, short actual ) { - assureEquals( "Equality test failed", new Short( expected ), new Short( actual ), false ); - } - - /** - * Assure that two short values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected short value - * @param actual specifies the actual short value - */ - protected void assureEquals( String message, short expected, short actual ) { - assureEquals( message, new Short( expected ), new Short( actual ), false ); - } - - /** - * Assure that two int values are equal - * @param expected specifies the expected int value - * @param actual specifies the actual int value - */ - protected void assureEquals( int expected, int actual ) { - assureEquals( "Equality test failed", new Integer( expected ), new Integer( actual ), false ); - } - - /** - * Assure that two int values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected int value - * @param actual specifies the actual int value - */ - protected void assureEquals( String message, int expected, int actual ) { - assureEquals( message, new Integer( expected ), new Integer( actual ), false ); - } - - /** - * Assure that two long values are equal - * @param expected specifies the expected long value - * @param actual specifies the actual long value - */ - protected void assureEquals( long expected, long actual ) { - assureEquals( "Equality test failed", new Long( expected ), new Long( actual ), false ); - } - - /** - * Assure that two long values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected long value - * @param actual specifies the actual long value - */ - protected void assureEquals( String message, long expected, long actual ) { - assureEquals( message, new Long( expected ), new Long( actual ), false ); - } - - /** - * Assure that two string values are equal - * @param expected specifies the expected string value - * @param actual specifies the actual string value - */ - protected void assureEquals( String expected, String actual ) { - assureEquals( "Equality test failed", expected, actual, false ); - } - /** - * Assure that two string values are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected string value - * @param actual specifies the actual string value - */ - protected void assureEquals( String message, String expected, String actual ) { - assureEquals( message, expected, actual, false ); - } - - /** - * Assure that two object are equal - * @param expected specifies the expected object value - * @param actual specifies the actual object value - */ - protected void assureEquals( Object expected, Object actual ) { - assureEquals( "Equality test failed", expected, actual, false ); - } - - /** - * Assure that two objects are equal - * @param message the message to print when the equality test fails - * @param expected specifies the expected object value - * @param actual specifies the actual object value - */ - protected void assureEquals( String message, Object expected, Object actual ) { - assureEquals( message, expected, actual, false ); - } - - /** - * Mark the currently executed method as failed. - * This function generates "Test did fail." as standard message. - */ - protected void failed() { - assure("Test did fail.", false, false); - } - - /** - * Mark the currently executed method as failed. - * with the given message. - * @param msg The message of the failure. - */ - protected void failed(String msg) { - assure(msg, false, false); - } - - /** - * Assure that s is true. - * The given message will be only evaluated, if s is false. - * Normally, assure() leaves the current test method, and the next one - * is executed. With the parameter 'cont' set to true, the current test - * method will continue.<br> - * The current method will of course marked as failed. - * @param msg The message that is evaluated. - * @param s The condition that should be true. - * @param cont Continue with test method, even if s is false. - */ - protected void assure(String msg, boolean s, boolean cont) { - state &= s; - if (!s) { - message += msg + "\r\n"; - log.println(msg); - if (!cont) { - throw new AssureException(msg); - } - } - } - - protected void assureEquals( String message, Object expected, Object actual, boolean cont ) { - assure( message + " (expected: " + expected.toString() + ", actual: " + actual.toString() + ")", - expected.equals( actual ), cont ); - } - - /** - * Mark the currently executed method as failed. - * with the given message. - * The given message will be only evaluated, if s is false. - * With the parameter 'cont' set to true, the current test - * method will continue.<br> - * The current method will of course marked as failed. - * @param msg The message that is evaluated. - * @param cont Continue with test method, even if s is false. - */ - protected void failed(String msg, boolean cont) { - assure(msg, false, cont); - } - - /** - * @deprecated - */ - protected void addResult(String message, boolean state) { - String msg = message + " - " + state; - this.state &= state; - this.message += msg + "\r\n"; - log.println(msg); - } - - public class AssureException extends RuntimeException { - - public AssureException(String msg) { - super(msg); - } - } }
\ No newline at end of file diff --git a/qadevOOo/runner/convwatch/BuildID.java b/qadevOOo/runner/convwatch/BuildID.java index ae8283eb35ef..fed56715fafa 100644 --- a/qadevOOo/runner/convwatch/BuildID.java +++ b/qadevOOo/runner/convwatch/BuildID.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: BuildID.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -31,7 +31,7 @@ package convwatch; import java.io.File; -import convwatch.OSHelper; +import helper.OSHelper; import convwatch.IniFile; import java.util.Date; diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java index 1d55e85fb8f2..45fd78cf80c3 100644 --- a/qadevOOo/runner/convwatch/ConvWatchStarter.java +++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ConvWatchStarter.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.8.1 $ * * This file is part of OpenOffice.org. * @@ -47,6 +47,7 @@ import convwatch.NameHelper; import convwatch.HTMLOutputter; import helper.OfficeProvider; import helper.OfficeWatcher; +import helper.OSHelper; import convwatch.PerformanceContainer; /** @@ -246,7 +247,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase { // check a whole directory // a whole directory - FileFilter aFileFilter = aGTA.getFileFilter(); + FileFilter aFileFilter = FileHelper.getFileFilter(); Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories()); if (aList.length == 0) diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java index b53e05faacf9..4f6ab74a738b 100644 --- a/qadevOOo/runner/convwatch/DB.java +++ b/qadevOOo/runner/convwatch/DB.java @@ -3,6 +3,7 @@ package convwatch; import java.sql.Connection; import java.util.StringTokenizer; import java.util.ArrayList; +import helper.OSHelper; // import convwatch.DBHelper; diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java index b82b99085cbf..6c4e821a481e 100644 --- a/qadevOOo/runner/convwatch/DocumentConverter.java +++ b/qadevOOo/runner/convwatch/DocumentConverter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DocumentConverter.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -176,9 +176,9 @@ public class DocumentConverter extends EnhancedComplexTestCase String sRemovePath = aInputPath.getAbsolutePath(); // a whole directory - FileFilter aFileFilter = aGTA.getFileFilter(); + FileFilter aFileFilter = FileHelper.getFileFilter(); - Object[] aList = DirectoryHelper.traverse(m_sInputPath, aGTA.getFileFilter(), aGTA.includeSubDirectories()); + Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories()); for (int i=0;i<aList.length;i++) { String sEntry = (String)aList[i]; diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java index 222db6eea17a..821d4afdd98f 100644 --- a/qadevOOo/runner/convwatch/FileHelper.java +++ b/qadevOOo/runner/convwatch/FileHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: FileHelper.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -34,6 +34,7 @@ import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.StringTokenizer; +import helper.OSHelper; import javax.swing.JOptionPane; @@ -366,5 +367,43 @@ public class FileHelper GlobalLogWriter.get().println("Message: " + e.getMessage()); } } + + /** + * Within the directory run through, it's possible to say which file extension types should not + * consider like '*.prn' because it's not a document. + * + * @return a FileFilter function + */ + public static FileFilter getFileFilter() + { + FileFilter aFileFilter = new FileFilter() + { + public boolean accept( File pathname ) + { + // leave out files which started by '~$' these are Microsoft Office temp files + if (pathname.getName().startsWith("~$")) + { + return false; + } + + if (pathname.getName().endsWith(".prn")) + { + return false; + } + // This type of document no one would like to load. + if (pathname.getName().endsWith(".zip")) + { + return false; + } + // just a hack + if (pathname.getName().endsWith("_")) + { + return false; + } + return true; + } + }; + return aFileFilter; + } } diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java index 0247f8e37414..59d2045937c0 100644 --- a/qadevOOo/runner/convwatch/FilenameHelper.java +++ b/qadevOOo/runner/convwatch/FilenameHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: FilenameHelper.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.8.1 $ * * This file is part of OpenOffice.org. * @@ -39,7 +39,7 @@ package convwatch; import helper.URLHelper; import convwatch.FileHelper; -import convwatch.StringHelper; +import helper.StringHelper; import util.utils; interface Filenamer diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java index 26d18c0bec83..a12378189b07 100644 --- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java +++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: GraphicalDifferenceCheck.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -97,7 +97,7 @@ public class GraphicalDifferenceCheck String sRemovePath = aInputPath.getAbsolutePath(); // a whole directory - Object[] aList = DirectoryHelper.traverse(_sInputPath, _aGTA.getFileFilter(), _aGTA.includeSubDirectories()); + Object[] aList = DirectoryHelper.traverse(_sInputPath, FileHelper.getFileFilter(), _aGTA.includeSubDirectories()); for (int i=0;i<aList.length;i++) { String sEntry = (String)aList[i]; @@ -190,7 +190,7 @@ public class GraphicalDifferenceCheck { String fs = System.getProperty("file.separator"); // a whole directory - Object[] aList = DirectoryHelper.traverse(_sInputPath, _aGTA.getFileFilter(), _aGTA.includeSubDirectories()); + Object[] aList = DirectoryHelper.traverse(_sInputPath, FileHelper.getFileFilter(), _aGTA.includeSubDirectories()); if (aList.length != 0) { for (int i=0;i<aList.length;i++) diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java index d58308245e03..34a73ef8f11a 100644 --- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java +++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: GraphicalTestArguments.java,v $ - * $Revision: 1.13 $ + * $Revision: 1.13.8.1 $ * * This file is part of OpenOffice.org. * @@ -423,43 +423,6 @@ public class GraphicalTestArguments public boolean isHidden() {return m_bHidden;} public String getDefaultXMLFormatApp() {return m_sDefaultXMLFormatApplication;} - /** - * Within the directory run through, it's possible to say which file extension types should not - * consider like '*.prn' because it's not a document. - * - * @return a FileFilter function - */ - public FileFilter getFileFilter() - { - FileFilter aFileFilter = new FileFilter() - { - public boolean accept( File pathname ) - { - // leave out files which started by '~$' these are Microsoft Office temp files - if (pathname.getName().startsWith("~$")) - { - return false; - } - - if (pathname.getName().endsWith(".prn")) - { - return false; - } - // This type of document no one would like to load. - if (pathname.getName().endsWith(".zip")) - { - return false; - } - // just a hack - if (pathname.getName().endsWith("_")) - { - return false; - } - return true; - } - }; - return aFileFilter; - } /** * @return true, if subdirectories should run through diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java index 6e84d8cd1243..f2d10ba71bcc 100644 --- a/qadevOOo/runner/convwatch/HTMLOutputter.java +++ b/qadevOOo/runner/convwatch/HTMLOutputter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: HTMLOutputter.java,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.8.1 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ package convwatch; import java.io.File; import java.io.FileWriter; import util.utils; +import helper.OSHelper; public class HTMLOutputter { diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java index 7e748a7999be..6c79aa1c647a 100644 --- a/qadevOOo/runner/convwatch/MSOfficePrint.java +++ b/qadevOOo/runner/convwatch/MSOfficePrint.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MSOfficePrint.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.8.1 $ * * This file is part of OpenOffice.org. * @@ -36,9 +36,10 @@ import java.io.FileWriter; import java.io.RandomAccessFile; import convwatch.GraphicalTestArguments; import helper.ProcessHandler; -import convwatch.StringHelper; +import helper.StringHelper; import convwatch.ConvWatchException; import java.util.ArrayList; +import helper.OSHelper; /** * This object gives all functionallity to print msoffice documents. diff --git a/qadevOOo/runner/convwatch/NameHelper.java b/qadevOOo/runner/convwatch/NameHelper.java index 14ca5e8c3607..05c1b36cdf2a 100644 --- a/qadevOOo/runner/convwatch/NameHelper.java +++ b/qadevOOo/runner/convwatch/NameHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: NameHelper.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.8.1 $ * * This file is part of OpenOffice.org. * @@ -34,7 +34,7 @@ package convwatch; * This container class should help to handle the name of the current document */ -class NameHelper +public class NameHelper { /** * diff --git a/qadevOOo/runner/convwatch/OSHelper.java b/qadevOOo/runner/convwatch/OSHelper.java index 19407ff9f9a9..9924dbd89c11 100644 --- a/qadevOOo/runner/convwatch/OSHelper.java +++ b/qadevOOo/runner/convwatch/OSHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OSHelper.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -29,59 +29,59 @@ ************************************************************************/ package convwatch; - -class OSHelper -{ - public static boolean isWindows() - { - String sOSName = System.getProperty("os.name"); - if (sOSName.toLowerCase().startsWith("windows")) - { - return true; - } - return false; - } - // not need - // public static boolean isUnix() - public static boolean isSolarisIntel() - { - if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || - System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && - System.getProperty("os.arch").equals("x86")) - { - return true; - } - return false; - } - public static boolean isSolarisSparc() - { - if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || - System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && - System.getProperty("os.arch").equals("sparc")) - { - return true; - } - return false; - } - public static boolean isLinuxIntel() - { - if (System.getProperty("os.name").toLowerCase().startsWith("linux") && - System.getProperty("os.arch").equals("i386")) - { - return true; - } - return false; - } - - public static boolean isUnix() - { - if (isLinuxIntel() || - isSolarisIntel() || - isSolarisSparc()) - { - return true; - } - return false; - } - -} +// +// class OSHelper +// { +// public static boolean isWindows() +// { +// String sOSName = System.getProperty("os.name"); +// if (sOSName.toLowerCase().startsWith("windows")) +// { +// return true; +// } +// return false; +// } +// // not need +// // public static boolean isUnix() +// public static boolean isSolarisIntel() +// { +// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || +// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && +// System.getProperty("os.arch").equals("x86")) +// { +// return true; +// } +// return false; +// } +// public static boolean isSolarisSparc() +// { +// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || +// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && +// System.getProperty("os.arch").equals("sparc")) +// { +// return true; +// } +// return false; +// } +// public static boolean isLinuxIntel() +// { +// if (System.getProperty("os.name").toLowerCase().startsWith("linux") && +// System.getProperty("os.arch").equals("i386")) +// { +// return true; +// } +// return false; +// } +// +// public static boolean isUnix() +// { +// if (isLinuxIntel() || +// isSolarisIntel() || +// isSolarisSparc()) +// { +// return true; +// } +// return false; +// } +// +// } diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java index 89a3379eec32..39b11433e692 100644 --- a/qadevOOo/runner/convwatch/OfficePrint.java +++ b/qadevOOo/runner/convwatch/OfficePrint.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OfficePrint.java,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.8.1 $ * * This file is part of OpenOffice.org. * @@ -54,6 +54,7 @@ import com.sun.star.uno.AnyConverter; import helper.URLHelper; import helper.PropertyHelper; +import helper.OSHelper; import convwatch.FileHelper; import convwatch.MSOfficePrint; import convwatch.GraphicalTestArguments; diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java index 65860d92bc92..f21d3f1821c4 100644 --- a/qadevOOo/runner/convwatch/PRNCompare.java +++ b/qadevOOo/runner/convwatch/PRNCompare.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: PRNCompare.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -35,8 +35,8 @@ import helper.ProcessHandler; import java.io.File; import convwatch.PixelCounter; import convwatch.StatusHelper; -import convwatch.OSHelper; -import convwatch.StringHelper; +import helper.OSHelper; +import helper.StringHelper; import java.util.ArrayList; import util.utils; diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java index 3f01428c28d7..4e93e7d77798 100644 --- a/qadevOOo/runner/convwatch/PixelCounter.java +++ b/qadevOOo/runner/convwatch/PixelCounter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: PixelCounter.java,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.8.1 $ * * This file is part of OpenOffice.org. * @@ -190,7 +190,7 @@ public class PixelCounter { public static void main(String[] args) { - String a = StringHelper.createValueString(10, 4); + String a = helper.StringHelper.createValueString(10, 4); int dummy = 1; /* BorderRemover a = new BorderRemover(); diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java index 7d91501810ba..efdd22826581 100644 --- a/qadevOOo/runner/convwatch/ReferenceBuilder.java +++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ReferenceBuilder.java,v $ - * $Revision: 1.12 $ + * $Revision: 1.12.8.1 $ * * This file is part of OpenOffice.org. * @@ -183,9 +183,9 @@ public class ReferenceBuilder extends EnhancedComplexTestCase String sRemovePath = aInputPath.getAbsolutePath(); // a whole directory - FileFilter aFileFilter = aGTA.getFileFilter(); + FileFilter aFileFilter = FileHelper.getFileFilter(); - Object[] aList = DirectoryHelper.traverse(m_sInputPath, aGTA.getFileFilter(), aGTA.includeSubDirectories()); + Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories()); // fill into DB // DB.filesRemove(aGTA.getDBInfoString()); // for (int j=0;j<aList.length;j++) diff --git a/qadevOOo/runner/convwatch/ReportDesignerTest.java b/qadevOOo/runner/convwatch/ReportDesignerTest.java index b241bde12e80..3933f9da318b 100755 --- a/qadevOOo/runner/convwatch/ReportDesignerTest.java +++ b/qadevOOo/runner/convwatch/ReportDesignerTest.java @@ -1,4 +1,5 @@ -/************************************************************************* +/* + ************************************************************************ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -7,7 +8,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ReportDesignerTest.java,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.8.1 $ * * This file is part of OpenOffice.org. * @@ -160,9 +161,13 @@ public class ReportDesignerTest extends ComplexTestCase { String mTestDocumentPath; + /** + * This method returns a list of Strings, each string must be a function name in this class. + * @return + */ public String[] getTestMethodNames() { - return new String[] {"ReportDesignTest"}; + return new String[] {"ReportDesignTest"}; // MAIN } private void checkIfOfficeExists(String _sOfficePathWithTrash) @@ -182,6 +187,13 @@ public class ReportDesignerTest extends ComplexTestCase { } } + // if (sOfficePath.startsWith("\"") || + // sOfficePath.startsWith("'")) + // { + // sOfficePath = sOfficePath.substring(1); + // } + sOfficePath = helper.StringHelper.removeQuoteIfExists(sOfficePath); + log.println(sOfficePath); File sOffice = new File(sOfficePath); if (! sOffice.exists()) @@ -262,10 +274,15 @@ public class ReportDesignerTest extends ComplexTestCase { private static String m_sSourceVersion; private static String m_sDestinationVersion; + private static String m_sSourceName; + private static String m_sDestinationName; private static final int WRITER = 1; private static final int CALC = 2; + /** + * This is the main test Function of current ReportDesignerTest + */ public void ReportDesignTest() { convwatch.GlobalLogWriter.set(log); @@ -280,6 +297,7 @@ public class ReportDesignerTest extends ComplexTestCase { // -------------------- preconditions, try to find an office -------------------- String sAppExecutionCommand = (String) param.get("AppExecutionCommand"); + log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'"); String sUser = System.getProperty("user.name"); log.println("user.name='" + sUser + "'"); @@ -293,7 +311,9 @@ public class ReportDesignerTest extends ComplexTestCase { m_sParentDistinct = System.getProperty("ParentDistinct"); m_sSourceVersion = System.getProperty("SourceVersion"); + m_sSourceName = System.getProperty("SourceName"); m_sDestinationVersion = System.getProperty("DestinationVersion"); + m_sDestinationName = System.getProperty("DestinationName"); // createDBEntry(); // log.println("Current CWS: " + m_sCWS_WORK_STAMP); // log.println("Current MWS: " + m_sUPDMinor); @@ -324,6 +344,7 @@ public class ReportDesignerTest extends ComplexTestCase { // String sCurrentDirectory = System.getProperty("user.dir"); // log.println("Current Dir: " + sCurrentDirectory); String sDocument = (String) param.get(convwatch.PropertyName.DOC_COMPARATOR_INPUT_PATH); + sDocument = helper.StringHelper.removeQuoteIfExists( sDocument ); startTestForFile(sDocument); // if (sDocument.toLowerCase().indexOf("writer") >= 0) // { @@ -352,7 +373,7 @@ public class ReportDesignerTest extends ComplexTestCase { private void startTestForFile(String _sDocument /*, int _nType*/) { File aFile = new File(_sDocument); - assure("Test File doesn't '" + _sDocument + "'exist.", aFile.exists()); + assure("Test File '" + _sDocument + "' doesn't exist.", aFile.exists()); String sFileURL = URLHelper.getFileURLFromSystemPath(_sDocument); log.println("File URL: " + sFileURL); @@ -462,16 +483,17 @@ public class ReportDesignerTest extends ComplexTestCase { // String sFixRefSubDirectory = "ReportDesign_qa_complex_" + getFileFormat(_nType); String sFixRefSubDirectory = "ReportDesignFixRef"; - // String sSourceVersion = m_sSourceVersion; - String sSourceVersion = sFixRefSubDirectory; - String sSourceName = ""; - String sSourceCreatorType = "fixref"; + String sSourceVersion = m_sSourceVersion; + // String sSourceVersion = sFixRefSubDirectory; + String sSourceName = m_sSourceName; + // String sSourceCreatorType = "fixref"; + String sSourceCreatorType = ""; String sDestinationVersion = m_sDestinationVersion; // if (sDestinationVersion.length() == 0) // { // sDestinationVersion = m_sUPDMinor; // } - String sDestinationName = ""; + String sDestinationName = m_sDestinationName; String sDestinationCreatorType = ""; String sDocumentPoolDir = getOutputPath(/*_nType*/); String sDocumentPoolName = getDocumentPoolName(/*_nType*/); @@ -560,6 +582,7 @@ public class ReportDesignerTest extends ComplexTestCase { if (m_sOutputPath == null) { String sOutputPath = (String)param.get( convwatch.PropertyName.DOC_COMPARATOR_OUTPUT_PATH ); + sOutputPath = helper.StringHelper.removeQuoteIfExists(sOutputPath); if (!sOutputPath.endsWith("/") || // construct the output file name !sOutputPath.endsWith("\\")) @@ -639,6 +662,7 @@ public class ReportDesignerTest extends ComplexTestCase { PropertyValue[] aLoadProperties = PropertyHelper.createPropertyValueArrayFormArrayList(_aPropertyList); log.println("Load component: '" + _sName + "'"); xDocComponent = xComponentLoader.loadComponentFromURL(_sName, "_blank", 0, aLoadProperties); + log.println("Load component: '" + _sName + "' done"); } catch (com.sun.star.io.IOException e) { diff --git a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java index 6cef81568b5b..ff00c1bff0c7 100644 --- a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java +++ b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SimpleFileSemaphore.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -32,6 +32,7 @@ package convwatch; import java.io.File; import java.io.RandomAccessFile; +import helper.OSHelper; public class SimpleFileSemaphore /* extends *//* implements */ { diff --git a/qadevOOo/runner/convwatch/StringHelper.java b/qadevOOo/runner/convwatch/StringHelper.java index 69042404d515..7042382bc052 100644 --- a/qadevOOo/runner/convwatch/StringHelper.java +++ b/qadevOOo/runner/convwatch/StringHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: StringHelper.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.8.1 $ * * This file is part of OpenOffice.org. * @@ -28,56 +28,79 @@ * ************************************************************************/ -package convwatch; - -public class StringHelper { - - public static String doubleQuote(String _sStr) - { - return "\"" + _sStr + "\""; - } - - public static String singleQuote(String _sStr) - { - return "'" + _sStr + "'"; - } - - public static String doubleQuoteIfNeed(String _sStr) - { - if (_sStr.startsWith("\"") && _sStr.endsWith("\"")) - { - // don't quote twice - return _sStr; - } - if (_sStr.indexOf(" ") == -1) - { - // don't quote, if there is no space in name - return _sStr; - } - if (_sStr.indexOf("%") != -1) - { - return singleQuote(_sStr); - } - - return doubleQuote(_sStr); - } - - /** - * Convert a value to a string with a given length, if the len is greater the len of the value string representation - * fill it's front with '0' - * So ("5", 4) will result in a string "0005" - */ - public static String createValueString(int _nValue, int _nLen) - { - String sValue = String.valueOf(_nValue); - StringBuffer a = new StringBuffer(); - while (_nLen > sValue.length()) - { - a.append('0'); - _nLen --; - } - a.append(sValue); - return a.toString(); - } - -} +// LLA: moved to helper.StringHelper package convwatch; +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper public class StringHelper { +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper public static String doubleQuote(String _sStr) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper return "\"" + _sStr + "\""; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper public static String singleQuote(String _sStr) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper return "'" + _sStr + "'"; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper public static String removeQuoteIfNeed(String _sPath) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper String sNewPath = _sPath; +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper if (_sPath.startsWith("\"") || +// LLA: moved to helper.StringHelper _sPath.startsWith("'")) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper // remove trailing quotes, if exists +// LLA: moved to helper.StringHelper sNewPath = sNewPath.substring(1); +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper if (_sPath.endsWith("\"") || +// LLA: moved to helper.StringHelper _sPath.endsWith("'")) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper // remove trailing quotes, if exists +// LLA: moved to helper.StringHelper sNewPath = sNewPath.substring(0, sNewPath.length() - 1); +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper return sNewPath; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper public static String doubleQuoteIfNeed(String _sStr) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper if (_sStr.startsWith("\"") && _sStr.endsWith("\"")) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper // don't quote twice +// LLA: moved to helper.StringHelper return _sStr; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper if (_sStr.indexOf(" ") == -1) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper // don't quote, if there is no space in name +// LLA: moved to helper.StringHelper return _sStr; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper if (_sStr.indexOf("%") != -1) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper return singleQuote(_sStr); +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper return doubleQuote(_sStr); +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper /** +// LLA: moved to helper.StringHelper * Convert a value to a string with a given length, if the len is greater the len of the value string representation +// LLA: moved to helper.StringHelper * fill it's front with '0' +// LLA: moved to helper.StringHelper * So ("5", 4) will result in a string "0005" +// LLA: moved to helper.StringHelper * @param _nValue +// LLA: moved to helper.StringHelper * @param _nLen +// LLA: moved to helper.StringHelper * @return +// LLA: moved to helper.StringHelper */ +// LLA: moved to helper.StringHelper public static String createValueString(int _nValue, int _nLen) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper String sValue = String.valueOf(_nValue); +// LLA: moved to helper.StringHelper StringBuffer a = new StringBuffer(); +// LLA: moved to helper.StringHelper while (_nLen > sValue.length()) +// LLA: moved to helper.StringHelper { +// LLA: moved to helper.StringHelper a.append('0'); +// LLA: moved to helper.StringHelper _nLen --; +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper a.append(sValue); +// LLA: moved to helper.StringHelper return a.toString(); +// LLA: moved to helper.StringHelper } +// LLA: moved to helper.StringHelper +// LLA: moved to helper.StringHelper } diff --git a/qadevOOo/runner/convwatch/TriState.java b/qadevOOo/runner/convwatch/TriState.java index 37b33a3d8035..35e5d9f4c10c 100644 --- a/qadevOOo/runner/convwatch/TriState.java +++ b/qadevOOo/runner/convwatch/TriState.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: TriState.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -51,7 +51,7 @@ public class TriState /** Returns the value of this TriState object as an int - @returns the primitive <code>int</code> value of this object. + * @return the primitive <code>int</code> value of this object. */ public int intValue() { diff --git a/qadevOOo/runner/convwatch/makefile.mk b/qadevOOo/runner/convwatch/makefile.mk index 8b29e23b5125..3c9d24fd7407 100644 --- a/qadevOOo/runner/convwatch/makefile.mk +++ b/qadevOOo/runner/convwatch/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.13 $ +# $Revision: 1.13.8.1 $ # # This file is part of OpenOffice.org. # @@ -69,7 +69,6 @@ JAVAFILES = \ EnhancedComplexTestCase.java \ MSOfficePrint.java \ GraphicalTestArguments.java \ - StringHelper.java \ GraphicalDifferenceCheck.java \ DocumentConverter.java\ DBHelper.java\ diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java index 9e58fd30ac27..a9f23161bc25 100644 --- a/qadevOOo/runner/helper/BuildEnvTools.java +++ b/qadevOOo/runner/helper/BuildEnvTools.java @@ -75,12 +75,19 @@ public class BuildEnvTools { if (mDebug) { log.println("### " + mPlatform); } - if ((mPlatform == null) || ((!mPlatform.equals(PropertyName.UNXSOLS)) && - (!mPlatform.equalsIgnoreCase(PropertyName.UNXSOLI)) && (!mPlatform.equals(PropertyName.UNXLNGI)) && - (!mPlatform.equals(PropertyName.WNTMSCI)))) { - + if (mPlatform == null){ msg += PropertyName.OPERATING_SYSTEM + "\nFill this parameter with an operating system like unxsols," + - " unxsoli, unxlngi or wntmsci. \n\n"; + " unxsoli, unxlngi, unxmacxi or wntmsci. \n\n"; + } + if( + (!mPlatform.equalsIgnoreCase(PropertyName.UNXSOLS)) && + (!mPlatform.equalsIgnoreCase(PropertyName.UNXSOLI)) && + (!mPlatform.equalsIgnoreCase(PropertyName.UNXLNGI)) && + (!mPlatform.equalsIgnoreCase(PropertyName.UNXMACXI))&& + (!mPlatform.equalsIgnoreCase(PropertyName.WNTMSCI)) ){ + + msg += PropertyName.OPERATING_SYSTEM + ":" + mPlatform + "\nFill this parameter with an operating system like unxsols," + + " unxsoli, unxlngi, unxmacxi or wntmsci. \n\n"; error = true; } diff --git a/qadevOOo/runner/helper/CfgParser.java b/qadevOOo/runner/helper/CfgParser.java index 56aa35601b36..95ea722481a8 100644 --- a/qadevOOo/runner/helper/CfgParser.java +++ b/qadevOOo/runner/helper/CfgParser.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: CfgParser.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -80,6 +80,11 @@ public class CfgParser { System.setProperty("DOCPTH",(String)pValue); } + if (pName.equals(PropertyName.SRC_ROOT)) { + + System.setProperty(pName,(String)pValue); + + } } } diff --git a/qadevOOo/runner/helper/ClParser.java b/qadevOOo/runner/helper/ClParser.java index b8d27938187d..3e0907122877 100644 --- a/qadevOOo/runner/helper/ClParser.java +++ b/qadevOOo/runner/helper/ClParser.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ClParser.java,v $ - * $Revision: 1.12 $ + * $Revision: 1.12.2.1 $ * * This file is part of OpenOffice.org. * @@ -32,9 +32,9 @@ package helper; import java.util.Properties; import lib.TestParameters; +import util.PropertyName; import util.utils; - /** * This class parses commandline Argument and stores <br> * them into TestParameter @@ -44,6 +44,7 @@ public class ClParser { * Parses the commandline argument and puts them<br> * into the TestParameters */ + public void getCommandLineParameter(TestParameters param, String[] args) { Properties mapping = getMapping(); @@ -65,23 +66,26 @@ public class ClParser { if (pValue.startsWith("-")) { i++; pValue = "yes"; - } else if (pValue.startsWith("'")){ + } else if (pValue.startsWith("'")) { i++; - while ( ! pValue.endsWith("'")){ + while (!pValue.endsWith("'")) { i++; pValue = pValue + " " + args[i].trim(); } pValue = utils.replaceAll13(pValue, "'", ""); i++; - } - else { + } else { i += 2; } if (pName.equals("TestDocumentPath")) { System.setProperty("DOCPTH", pValue); } + if (pName.equals(PropertyName.SRC_ROOT)) { + System.setProperty(pName,pValue); + + } } else { pValue = "yes"; i++; diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index 3cc94c59004d..64408418f22a 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OfficeProvider.java,v $ - * $Revision: 1.22 $ + * $Revision: 1.22.2.5 $ * * This file is part of OpenOffice.org. * @@ -45,6 +45,8 @@ import java.io.File; import java.io.PrintWriter; import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; import lib.TestParameters; import share.DescEntry; @@ -229,18 +231,31 @@ public class OfficeProvider implements AppProvider { int k = 0; - while ((k < 21) && (msf == null)) { - try { - Thread.sleep(k * 1000); + // wait up to 21 seconds to get an office connection + while ((k < 42) && (msf == null)) + { + try + { msf = connect(cncstr); - } catch (com.sun.star.uno.Exception ue) { + } + catch (com.sun.star.uno.Exception ue) + { exConnectFailed = ue; exc = ue.getMessage(); - } catch (java.lang.Exception je) { + } + catch (java.lang.Exception je) + { exConnectFailed = je; exc = je.getMessage(); } - + if (msf == null) + { + try + { + Thread.sleep(k * 500); + } + catch (InterruptedException ex){ } + } k++; } @@ -252,12 +267,17 @@ public class OfficeProvider implements AppProvider { if (bAppExecutionHasWarning) { System.out.println(errorMessage); } - } else if (isExecutable) { - backupUserLayer(param, msf); + } else if (isExecutable) + { + if (! param.getBool(util.PropertyName.DONT_BACKUP_USERLAYER)) + { + backupUserLayer(param, msf); + } } } else { - System.out.println("Could not connect an Office" + - " and cannot start one."); + System.out.println("Could not connect an Office and cannot start one.\n". + concat("please start an office with following parameter:\n"). + concat("\nsoffice -accept=").concat((String) param.get("ConnectionString")).concat(";urp;\n")); if (bAppExecutionHasWarning) { System.out.println(errorMessage); } @@ -336,7 +356,7 @@ public class OfficeProvider implements AppProvider { dbg("OfficeWatcher will be finished"); ow.finish = true; } else { - dbg("OfficeWatcher seems to be finishedß"); + dbg("OfficeWatcher seems to be finished"); } return true; @@ -425,14 +445,17 @@ public class OfficeProvider implements AppProvider { } } - final String AppKillCommand = (String) param.get("AppKillCommand"); - if (AppKillCommand != null) { - final StringTokenizer aKillCommandToken = new StringTokenizer(AppKillCommand, ";"); - while (aKillCommandToken.hasMoreTokens()) { + final String AppKillCommand = (String) param.get(util.PropertyName.APP_KILL_COMMAND); + if (AppKillCommand != null) + { + String sAppKillCommand = StringHelper.removeSurroundQuoteIfExists(AppKillCommand); + final StringTokenizer aKillCommandToken = new StringTokenizer(sAppKillCommand, ";"); + while (aKillCommandToken.hasMoreTokens()) + { final String sKillCommand = aKillCommandToken.nextToken(); dbg("User defined an application to destroy the started process. Trying to execute: " + sKillCommand); - final ProcessHandler pHdl = new ProcessHandler(sKillCommand, 3000); + final ProcessHandler pHdl = new ProcessHandler(sKillCommand, 1000); // 3000 seems to be too long pHdl.runCommand(); pHdl.kill(); @@ -455,27 +478,34 @@ public class OfficeProvider implements AppProvider { param.remove("AppProvider"); param.remove("ServiceFactory"); - //copy user_backup into user layer - try { - final String userLayer = (String) param.get("userLayer"); - final String copyLayer = (String) param.get("copyLayer"); - if (userLayer != null && copyLayer != null) { - final File copyFile = new File(copyLayer); - dbg("copy '" + copyFile + "' -> '" + userLayer + "'"); - FileTools.copyDirectory(copyFile, new File(userLayer), new String[]{"temp"}); - dbg("copy '" + copyFile + "' -> '" + userLayer + "' finished"); + if (! param.getBool(util.PropertyName.DONT_BACKUP_USERLAYER)) + { + //copy user_backup into user layer + try { + final String userLayer = (String) param.get("userLayer"); + final String copyLayer = (String) param.get("copyLayer"); + if (userLayer != null && copyLayer != null) + { + final File copyFile = new File(copyLayer); + dbg("copy '" + copyFile + "' -> '" + userLayer + "'"); + FileTools.copyDirectory(copyFile, new File(userLayer), new String[]{"temp"}); + dbg("copy '" + copyFile + "' -> '" + userLayer + "' finished"); - // remove all user_backup folder in temp dir - // this is for the case the runner was killed and some old backup folder still stay in temp dir + // remove all user_backup folder in temp dir + // this is for the case the runner was killed and some old backup folder still stay in temp dir - } else { - System.out.println("Cannot copy layer: '" + copyLayer + "' back to user layer: '" + userLayer + "'"); + } + else + { + System.out.println("Cannot copy layer: '" + copyLayer + "' back to user layer: '" + userLayer + "'"); + } + } + catch (java.io.IOException e) + { + dbg("Couldn't recover from backup\n" + e.getMessage()); } - } catch (java.io.IOException e) { - dbg("Couldn't recover from backup\n" + e.getMessage()); } - return result; } @@ -624,7 +654,7 @@ public class OfficeProvider implements AppProvider { ow.ping(); try { System.out.println(utils.getDateTime() + "OfficeProvider:Owp: sleep "); - OfficeWatcherPing.sleep(5000); + OfficeWatcherPing.sleep(1000); // 5000 } catch (InterruptedException ex) { ex.printStackTrace(); } diff --git a/qadevOOo/runner/helper/OfficeWatcher.java b/qadevOOo/runner/helper/OfficeWatcher.java index 1196283df4bd..c2f32d02314a 100644 --- a/qadevOOo/runner/helper/OfficeWatcher.java +++ b/qadevOOo/runner/helper/OfficeWatcher.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OfficeWatcher.java,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.2.1 $ * * This file is part of OpenOffice.org. * @@ -92,7 +92,7 @@ public class OfficeWatcher extends Thread implements share.Watcher { if (ph != null) { dbg("the Office is idle for " + timeOut / 1000 + " seconds, it probably hangs and is killed NOW."); - final String AppKillCommand = (String) params.get("AppKillCommand"); + final String AppKillCommand = (String) params.get(util.PropertyName.APP_KILL_COMMAND); if (AppKillCommand != null) { final StringTokenizer aKillCommandToken = new StringTokenizer(AppKillCommand, ";"); while (aKillCommandToken.hasMoreTokens()) { diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index 0e2638b7f1be..af469fdf6442 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ProcessHandler.java,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.2.2 $ * * This file is part of OpenOffice.org. * @@ -410,7 +410,7 @@ public class ProcessHandler { proc.destroy(); try { - Thread.sleep(5000 * counter); + Thread.sleep(1000 * counter); // 5000 } catch (java.lang.InterruptedException e) { } try { @@ -444,6 +444,8 @@ public class ProcessHandler { log.print(cmdLineArray[i]); log.print(" "); } + log.println(""); + proc = runtime.exec(cmdLineArray, envVars); } else { if (workDir != null) { diff --git a/qadevOOo/runner/helper/PropertyHelper.java b/qadevOOo/runner/helper/PropertyHelper.java index 3210a1e9e846..0747caafece5 100755 --- a/qadevOOo/runner/helper/PropertyHelper.java +++ b/qadevOOo/runner/helper/PropertyHelper.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: PropertyHelper.java,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.8.1 $ * * This file is part of OpenOffice.org. * @@ -52,18 +52,20 @@ public class PropertyHelper } else { - if (_aPropertyList.size() > 0) - { - aSaveProperties = new PropertyValue[_aPropertyList.size()]; - for (int i = 0;i<_aPropertyList.size(); i++) - { - aSaveProperties[i] = (PropertyValue) _aPropertyList.get(i); - } - } - else - { - aSaveProperties = new PropertyValue[0]; - } + aSaveProperties = (PropertyValue[])_aPropertyList.toArray(new PropertyValue[_aPropertyList.size()]); + // old java 1.4 +// if (_aPropertyList.size() > 0) +// { +// aSaveProperties = new PropertyValue[_aPropertyList.size()]; +// for (int i = 0;i<_aPropertyList.size(); i++) +// { +// aSaveProperties[i] = (PropertyValue) _aPropertyList.get(i); +// } +// } +// else +// { +// aSaveProperties = new PropertyValue[0]; +// } } return aSaveProperties; } diff --git a/qadevOOo/runner/lib/TestParameters.java b/qadevOOo/runner/lib/TestParameters.java index 66beb3bdd127..c87a5b21f263 100644 --- a/qadevOOo/runner/lib/TestParameters.java +++ b/qadevOOo/runner/lib/TestParameters.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: TestParameters.java,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.2.1 $ * * This file is part of OpenOffice.org. * @@ -113,10 +113,9 @@ public class TestParameters extends Hashtable { /** * The Path to the test documents that are loaded during the test <br> - * default will be the tmp dir */ - public String TestDocumentPath=util.utils.getUsersTempDir(); + public String TestDocumentPath="unkown"; /** * 'true' is a log should be written, 'false' elsewhere <br> @@ -312,6 +311,8 @@ public class TestParameters extends Hashtable { } else { operatingSystem = PropertyName.UNXSOLS; } + } else if (osname.indexOf ("mac")>-1) { + operatingSystem = PropertyName.UNXMACXI; } else { System.out.println("ERROR: not supported platform: " + osname); System.exit(1); diff --git a/qadevOOo/runner/makefile.mk b/qadevOOo/runner/makefile.mk index 5ab2b51dee36..b3afff1ba9ce 100644 --- a/qadevOOo/runner/makefile.mk +++ b/qadevOOo/runner/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.15 $ +# $Revision: 1.15.2.1 $ # # This file is part of OpenOffice.org. # @@ -38,7 +38,7 @@ TARGET = $(PRJNAME) SUBDIRS_TESTS = mod ifc complex SUBDIRS_RUNNER = util share stats lib complexlib helper basicrunner \ - base org$/openoffice convwatch + base org$/openoffice convwatch graphical JARCOMMANDS_TESTS = $(foreach,i,$(SUBDIRS_TESTS) -C $(CLASSDIR) $i) JARCOMMANDS_RUNNER = $(foreach,i,$(SUBDIRS_RUNNER) -C $(CLASSDIR) $i) diff --git a/qadevOOo/runner/org/openoffice/Runner.java b/qadevOOo/runner/org/openoffice/Runner.java index 99b1965e8fe5..ee135f7e976a 100644 --- a/qadevOOo/runner/org/openoffice/Runner.java +++ b/qadevOOo/runner/org/openoffice/Runner.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Runner.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.8.2 $ * * This file is part of OpenOffice.org. * @@ -42,10 +42,58 @@ import helper.CfgParser; * fill the TestParameters.<br> * Will then call the appropriate Testbase to run the tests. */ -public class Runner { +public class Runner +{ + private static long m_nStartTime; + + private static long getStartTime() + { + return m_nStartTime; + } + /* + simple helper functions to start/stop a timer, to know how long a process need in milliseconds + */ + private static long getTime() + { + return System.currentTimeMillis(); + } + private static void setStartTime(long _nStartTime) + { + m_nStartTime = _nStartTime; + } + + /* + return the time, which is done until last startTime() + */ + private static long meanTime(long _nCurrentTimer) + { + if (_nCurrentTimer == 0) + { + System.out.println("Forgotten to initialise a start timer?"); + return 0; + } + long nMeanTime = getTime(); + return nMeanTime - _nCurrentTimer; + } + + private static String beautifyTime(long _nTime) + { + long sec = (_nTime / 1000) % 60; + long min = (_nTime / (60 * 1000)) % 60; + long hour = _nTime / (60 * 60 * 1000); + StringBuffer aTime = new StringBuffer(); + aTime.append(helper.StringHelper.createValueString((int)hour, 2)). + append(':'). + append(helper.StringHelper.createValueString((int)min, 2)). + append(':'). + append(helper.StringHelper.createValueString((int)sec, 2)); + return aTime.toString(); + } public static void main(String[] args) { + setStartTime(getTime()); + DynamicClassLoader dcl = new DynamicClassLoader(); // get a class for test parameters @@ -63,6 +111,7 @@ public class Runner { ini.getIniParameters(param); //parse the commandline arguments + // TODO: no right error message, if no parameter given! cli.getCommandLineParameter(param,args); Object tj = param.get("TestJob"); @@ -83,11 +132,18 @@ public class Runner { (String)param.get("TestBase")); boolean worked = toExecute.executeTest(param); + long nTime = meanTime(getStartTime()); + String sBeautifyTime = beautifyTime(nTime); - if (!worked) { + System.out.println("Job run took: " + nTime + "ms " + " [" + sBeautifyTime + "]"); + + if (!worked) + { System.out.println("Job "+param.get("TestJob")+" failed"); System.exit(-1); - } else { + } + else + { System.out.println("Job "+param.get("TestJob")+" done"); System.exit(0); } diff --git a/qadevOOo/runner/stats/SimpleLogWriter.java b/qadevOOo/runner/stats/SimpleLogWriter.java index 534f1a28f135..965bf6ebc7ad 100644 --- a/qadevOOo/runner/stats/SimpleLogWriter.java +++ b/qadevOOo/runner/stats/SimpleLogWriter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SimpleLogWriter.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.2.2 $ * * This file is part of OpenOffice.org. * @@ -64,13 +64,25 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter { } public void println(String msg) { - if ((ow == null) && (entry != null)) { + if ((ow == null) && (entry != null)) + { this.ow = (share.Watcher) entry.UserDefinedParams.get("Watcher"); - if (this.ow != null) { + if (this.ow != null) + { this.ow.ping(); } - } else { - this.ow.ping(); + } + else + { + if (ow != null) + { + this.ow.ping(); + } + else + { + // special case: ow == null && entry == null + System.out.println(msg); + } } if (m_bLogging) { @@ -92,7 +104,11 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter { return this.ow; } - public void setWatcher(Object watcher) { - entry.UserDefinedParams.put("Watcher", (share.Watcher) watcher); + public void setWatcher(Object watcher) + { + if (watcher != null) + { + entry.UserDefinedParams.put("Watcher", (share.Watcher) watcher); + } } } diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java index b31fa31b7dad..16d3386633d4 100644 --- a/qadevOOo/runner/util/AccessibilityTools.java +++ b/qadevOOo/runner/util/AccessibilityTools.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibilityTools.java,v $ - * $Revision: 1.12 $ + * $Revision: 1.12.8.1 $ * * This file is part of OpenOffice.org. * @@ -259,12 +259,14 @@ public class AccessibilityTools { XAccessibleContext ac = xacc.getAccessibleContext(); boolean isShowing = ac.getAccessibleStateSet() .contains(com.sun.star.accessibility.AccessibleStateType.SHOWING); - if ((ac.getAccessibleRole() == role) && + + // hotfix for i91828: + // if role to serach is 0 then ignore the role. + if ( (role == 0 || ac.getAccessibleRole() == role) && (ac.getAccessibleName().indexOf(name) > -1) && (utils.getImplName(ac).indexOf(implName) > -1) && isShowing) { SearchedAccessible = xacc; - //System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing); return ac; } else { diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java index 3f0835dd6438..2e34e4de49d3 100644 --- a/qadevOOo/runner/util/DesktopTools.java +++ b/qadevOOo/runner/util/DesktopTools.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DesktopTools.java,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.8.2 $ * * This file is part of OpenOffice.org. * @@ -34,26 +34,21 @@ import com.sun.star.awt.WindowDescriptor; import com.sun.star.awt.XToolkit; import com.sun.star.awt.XWindowPeer; import com.sun.star.awt.XTopWindow; -import com.sun.star.beans.PropertyState; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XEnumeration; -import com.sun.star.container.XEnumerationAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameContainer; import com.sun.star.container.XNameReplace; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XDesktop; +import com.sun.star.frame.XFrame; import com.sun.star.frame.XModel; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XServiceInfo; -import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.uno.UnoRuntime; // access the implementations via names import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; import com.sun.star.util.XCloseable; import com.sun.star.util.XModifiable; import com.sun.star.view.XViewSettingsSupplier; @@ -123,6 +118,17 @@ public class DesktopTools { } /** + * returns the current component on the desktop + * @param xMSF the XMultiServiceFactory + * @return XComponent of the current component on the desktop + */ + public static XFrame getCurrentFrame(XMultiServiceFactory xMSF) { + XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface( + XDesktop.class, createDesktop(xMSF)); + return xDesktop.getCurrentFrame(); + } + + /** * returns an object arrary of all open documents * @param xMSF the MultiServiceFactory * @return returns an Array of document kinds like ["swriter"] @@ -239,7 +245,7 @@ public class DesktopTools { { throw new IllegalArgumentException("Document could not be loaded"); } - + bringWindowToFront(oDoc); return oDoc; } //finish openNewDoc @@ -259,7 +265,9 @@ public class DesktopTools { XCloseable.class, DocumentToClose); try { - modified.setModified(false); + if (modified != null){ + modified.setModified(false); + } closer.close(true); } catch (com.sun.star.util.CloseVetoException e) { System.out.println("Couldn't close document"); @@ -399,12 +407,24 @@ public class DesktopTools { } /** + * Due to typo deprecated + * @param xModel + * @deprecated + */ + @Deprecated + public static void bringWindowToFromt(XModel xModel){ + 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. * @param xModel the XModel of the document to bring to top */ - public static void bringWindowToFromt(XModel xModel){ + public static void bringWindowToFront(XModel xModel){ + System.out.println("DEBUG: bring to front xModel"); + XTopWindow xTopWindow = (XTopWindow) UnoRuntime.queryInterface( XTopWindow.class, @@ -412,4 +432,12 @@ public class DesktopTools { xTopWindow.toFront(); } + + public static void bringWindowToFront(XComponent xComponent){ + System.out.println("DEBUG: bring to front xCompoent"); + XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent); + if (xModel != null){ + bringWindowToFront(xModel); + } + } } diff --git a/qadevOOo/runner/util/PropertyName.java b/qadevOOo/runner/util/PropertyName.java index 71ba8d5df809..1b0b8ffb7445 100644 --- a/qadevOOo/runner/util/PropertyName.java +++ b/qadevOOo/runner/util/PropertyName.java @@ -39,6 +39,10 @@ public interface PropertyName { */ final public static String APP_EXECUTION_COMMAND = "AppExecutionCommand"; /** + * parameter name: "AppKillCommand" + */ + final public static String APP_KILL_COMMAND = "AppKillCommand"; + /** * parameter name: "ConnectionString" */ final public static String CONNECTION_STRING = "ConnectionString"; @@ -147,4 +151,13 @@ public interface PropertyName { * internal only, no parameter */ final public static String UNXSOLI = "unxsoli"; + /** + * internal only, no parameter + */ + final public static String UNXMACXI = "unxmacxi"; + + /** + * can be used to dont backup the user layer, faster office start/stop but less secure default is to backup the user layer + */ + final public static String DONT_BACKUP_USERLAYER = "DontBackupUserLayer"; } diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java index 8d2c9dc0136f..a1aecee855f0 100644 --- a/qadevOOo/runner/util/SOfficeFactory.java +++ b/qadevOOo/runner/util/SOfficeFactory.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SOfficeFactory.java,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.8.2 $ * * This file is part of OpenOffice.org. * @@ -27,7 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - package util; import java.util.Hashtable; @@ -60,32 +59,31 @@ public class SOfficeFactory { private static Hashtable lookup = new Hashtable(10); protected XComponentLoader oCLoader; - private SOfficeFactory( XMultiServiceFactory xMSF ) { + private SOfficeFactory(XMultiServiceFactory xMSF) { // get XInterface of Desktop service Object oInterface; try { - oInterface = xMSF.createInstance( "com.sun.star.frame.Desktop" ); - } - catch( com.sun.star.uno.Exception e ) { + oInterface = xMSF.createInstance("com.sun.star.frame.Desktop"); + } catch (com.sun.star.uno.Exception e) { throw new IllegalArgumentException( - "Desktop Service not available" ); + "Desktop Service not available"); } // query the desktop interface and then it's componentloader - XDesktop oDesktop = ( XDesktop ) UnoRuntime.queryInterface( - XDesktop.class, oInterface ); + XDesktop oDesktop = (XDesktop) UnoRuntime.queryInterface( + XDesktop.class, oInterface); - oCLoader = ( XComponentLoader ) UnoRuntime.queryInterface( - XComponentLoader.class, oDesktop ); + oCLoader = (XComponentLoader) UnoRuntime.queryInterface( + XComponentLoader.class, oDesktop); } - public static SOfficeFactory getFactory( XMultiServiceFactory xMSF ) { + public static SOfficeFactory getFactory(XMultiServiceFactory xMSF) { - SOfficeFactory soFactory = (SOfficeFactory)lookup.get(new Integer(xMSF.hashCode()).toString()); + SOfficeFactory soFactory = (SOfficeFactory) lookup.get(new Integer(xMSF.hashCode()).toString()); - if ( soFactory == null ) { - soFactory = new SOfficeFactory( xMSF ); - lookup.put( new Integer(xMSF.hashCode()).toString(), soFactory ); + if (soFactory == null) { + soFactory = new SOfficeFactory(xMSF); + lookup.put(new Integer(xMSF.hashCode()).toString(), soFactory); } return soFactory; @@ -94,83 +92,75 @@ public class SOfficeFactory { // ********************************************************* // Document creation. The documents needed are created here. // ********************************************************* - /** * method which opens a new TextDocument * * @see XTextDocument */ + public XTextDocument createTextDoc(String frameName) + throws com.sun.star.uno.Exception { - public XTextDocument createTextDoc( String frameName ) - throws com.sun.star.uno.Exception { + XComponent oDoc = openDoc("swriter", frameName); - XComponent oDoc = openDoc("swriter",frameName); - - if ( oDoc != null) { - return (XTextDocument) - UnoRuntime.queryInterface( XTextDocument.class, oDoc ); - } - else { + if (oDoc != null) { + DesktopTools.bringWindowToFront(oDoc); + return (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, oDoc); + } else { return null; } } // finished createTextDoc + /** * method which opens a new TextDocument * * @see XTextDocument */ - - public XTextDocument createTextDoc( String frameName, PropertyValue[] mediaDescriptor ) - throws com.sun.star.uno.Exception { + public XTextDocument createTextDoc(String frameName, PropertyValue[] mediaDescriptor) + throws com.sun.star.uno.Exception { XComponent oDoc = openDoc("swriter", frameName, mediaDescriptor); - if ( oDoc != null) { - return (XTextDocument) UnoRuntime.queryInterface( XTextDocument.class, oDoc ); - } - else { + if (oDoc != null) { + DesktopTools.bringWindowToFront(oDoc); + return (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, oDoc); + } else { return null; } } // finished createTextDoc - - /** + /** * method which opens a new SpreadsheetDocument * * @see XSpreadsheetDocument */ + public XSpreadsheetDocument createCalcDoc(String frameName) + throws com.sun.star.uno.Exception { - public XSpreadsheetDocument createCalcDoc( String frameName ) - throws com.sun.star.uno.Exception { - - XComponent oDoc = openDoc("scalc",frameName); + XComponent oDoc = openDoc("scalc", frameName); - if ( oDoc != null) { - return (XSpreadsheetDocument) - UnoRuntime.queryInterface( XSpreadsheetDocument.class, oDoc ); - } - else { + if (oDoc != null) { + DesktopTools.bringWindowToFront(oDoc); + return (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, oDoc); + } else { return null; } } // finished createCalcDoc - /** + /** * method which opens a new SpreadsheetDocument * * @see XSpreadsheetDocument */ + public XSpreadsheetDocument createCalcDoc(String frameName, PropertyValue[] mediaDescriptor) + throws com.sun.star.uno.Exception { - public XSpreadsheetDocument createCalcDoc( String frameName, PropertyValue[] mediaDescriptor ) - throws com.sun.star.uno.Exception { + XComponent oDoc = openDoc("scalc", frameName, mediaDescriptor); - XComponent oDoc = openDoc("scalc",frameName, mediaDescriptor); - - if ( oDoc != null) { - return (XSpreadsheetDocument) - UnoRuntime.queryInterface( XSpreadsheetDocument.class, oDoc ); - } - else { + if (oDoc != null) { + DesktopTools.bringWindowToFront(oDoc); + return (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, oDoc); + } else { return null; } } // finished createCalcDoc @@ -178,66 +168,58 @@ public class SOfficeFactory { /** * method which opens a new DrawDocument */ + public XComponent createDrawDoc(String frameName) + throws com.sun.star.uno.Exception { - public XComponent createDrawDoc( String frameName ) - throws com.sun.star.uno.Exception { - - return openDoc("sdraw",frameName); + return openDoc("sdraw", frameName); } // finished createDrawDoc /** * method which opens a new ImpressDocument */ - /** * method which opens a new DrawDocument */ + public XComponent createDrawDoc(String frameName, PropertyValue[] mediaDescriptor) + throws com.sun.star.uno.Exception { - public XComponent createDrawDoc( String frameName, PropertyValue[] mediaDescriptor ) - throws com.sun.star.uno.Exception { - - return openDoc("sdraw",frameName, mediaDescriptor ); + return openDoc("sdraw", frameName, mediaDescriptor); } // finished createDrawDoc /** * method which opens a new ImpressDocument */ + public XComponent createImpressDoc(String frameName) + throws com.sun.star.uno.Exception { - public XComponent createImpressDoc( String frameName ) - throws com.sun.star.uno.Exception { - - return openDoc("simpress",frameName); + return openDoc("simpress", frameName); } // finished createImpressDoc /** * method which opens a new ImpressDocument */ + public XComponent createImpressDoc(String frameName, PropertyValue[] mediaDescriptor) + throws com.sun.star.uno.Exception { - public XComponent createImpressDoc( String frameName, PropertyValue[] mediaDescriptor ) - throws com.sun.star.uno.Exception { - - return openDoc("simpress",frameName, mediaDescriptor); + return openDoc("simpress", frameName, mediaDescriptor); } // finished createImpressDoc - /** * method which opens a new MathDocument */ + public XComponent createMathDoc(String frameName) + throws com.sun.star.uno.Exception { - public XComponent createMathDoc( String frameName ) - throws com.sun.star.uno.Exception { - - return openDoc("smath",frameName); + return openDoc("smath", frameName); } // finished createMathDoc /** * method which opens a new MathDocument */ + public XComponent createMathDoc(String frameName, PropertyValue[] mediaDescriptor) + throws com.sun.star.uno.Exception { - public XComponent createMathDoc( String frameName, PropertyValue[] mediaDescriptor ) - throws com.sun.star.uno.Exception { - - return openDoc("smath",frameName, mediaDescriptor); + return openDoc("smath", frameName, mediaDescriptor); } // finished createMathDoc /** @@ -245,121 +227,120 @@ public class SOfficeFactory { * * @see XChartDocument */ - - public XChartDocument createChartDoc( String frameName ) - throws com.sun.star.uno.Exception { + public XChartDocument createChartDoc(String frameName) + throws com.sun.star.uno.Exception { // XComponent oDoc = loadDocument( // util.utils.getFullTestURL("emptyChart.sds")); XComponent oDoc = loadDocument("private:factory/schart"); - if ( oDoc != null) { - return (XChartDocument) - UnoRuntime.queryInterface( XChartDocument.class, oDoc ); - } - else { + if (oDoc != null) { + DesktopTools.bringWindowToFront(oDoc); + return (XChartDocument) UnoRuntime.queryInterface(XChartDocument.class, oDoc); + } else { return null; } } // finished createChartDoc - /** * creates a simple TextTable defaultet to 2 rows and 2 columns */ - public static XTextTable createTextTable( XTextDocument xTextDoc ) - throws com.sun.star.uno.Exception { + public static XTextTable createTextTable(XTextDocument xTextDoc) + throws com.sun.star.uno.Exception { TableDsc tDsc = new TableDsc(); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextTable oTable = (XTextTable)instCreate.getInstance(); + XTextTable oTable = (XTextTable) instCreate.getInstance(); return oTable; } + /** * creates a TextTable with a specified count of rows and columns */ - public static XTextTable createTextTable( XTextDocument xTextDoc, - int rows, int columns ) - throws com.sun.star.uno.Exception { + public static XTextTable createTextTable(XTextDocument xTextDoc, + int rows, int columns) + throws com.sun.star.uno.Exception { - TableDsc tDsc = new TableDsc( rows, columns ); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + TableDsc tDsc = new TableDsc(rows, columns); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextTable oTable = (XTextTable)instCreate.getInstance(); + XTextTable oTable = (XTextTable) instCreate.getInstance(); return oTable; - } + } + /** * creates a simple TextFrame * ... to be continued */ - public static XTextFrame createTextFrame( XTextDocument xTextDoc ) - throws com.sun.star.uno.Exception { + public static XTextFrame createTextFrame(XTextDocument xTextDoc) + throws com.sun.star.uno.Exception { FrameDsc tDsc = new FrameDsc(); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextFrame oFrame = (XTextFrame)instCreate.getInstance(); + XTextFrame oFrame = (XTextFrame) instCreate.getInstance(); return oFrame; } + /** * creates a simple TextFrame * ... to be continued */ - public static XTextFrame createTextFrame( XTextDocument xTextDoc, - int height, int width ) - { + public static XTextFrame createTextFrame(XTextDocument xTextDoc, + int height, int width) { FrameDsc tDsc = new FrameDsc(height, width); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextFrame oFrame = (XTextFrame)instCreate.getInstance(); + XTextFrame oFrame = (XTextFrame) instCreate.getInstance(); return oFrame; } - public static void insertString( XTextDocument xTextDoc, String cString ) - throws com.sun.star.uno.Exception { - XText xText = xTextDoc.getText(); - XText oText = (XText)UnoRuntime.queryInterface( - XText.class, xText); + public static void insertString(XTextDocument xTextDoc, String cString) + throws com.sun.star.uno.Exception { + XText xText = xTextDoc.getText(); + XText oText = (XText) UnoRuntime.queryInterface( + XText.class, xText); - XTextCursor oCursor = oText.createTextCursor(); - oText.insertString(oCursor, cString, false); + XTextCursor oCursor = oText.createTextCursor(); + oText.insertString(oCursor, cString, false); } - public static void insertTextContent( XTextDocument xTextDoc, - XTextContent xCont ) - throws com.sun.star.lang.IllegalArgumentException { - XText xText = xTextDoc.getText(); - XText oText = (XText)UnoRuntime.queryInterface( - XText.class, xText); + public static void insertTextContent(XTextDocument xTextDoc, + XTextContent xCont) + throws com.sun.star.lang.IllegalArgumentException { + XText xText = xTextDoc.getText(); + XText oText = (XText) UnoRuntime.queryInterface( + XText.class, xText); - XTextCursor oCursor = oText.createTextCursor(); - oText.insertTextContent(oCursor, xCont, false); + XTextCursor oCursor = oText.createTextCursor(); + oText.insertTextContent(oCursor, xCont, false); } - public static com.sun.star.table.XCell getFirstTableCell( - XTextContent oTable ) { + public static com.sun.star.table.XCell getFirstTableCell( + XTextContent oTable) { - String CellNames[] = ((XTextTable)oTable).getCellNames(); + String CellNames[] = ((XTextTable) oTable).getCellNames(); - com.sun.star.table.XCell oCell = ((XTextTable)oTable).getCellByName( - CellNames[0]); - return oCell; + com.sun.star.table.XCell oCell = ((XTextTable) oTable).getCellByName( + CellNames[0]); + return oCell; } /** * the method createBookmark */ - public static XTextContent createBookmark( XTextDocument xTextDoc ) - throws com.sun.star.uno.Exception { + public static XTextContent createBookmark(XTextDocument xTextDoc) + throws com.sun.star.uno.Exception { BookmarkDsc tDsc = new BookmarkDsc(); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextContent oBookmark = (XTextContent)instCreate.getInstance(); + XTextContent oBookmark = (XTextContent) instCreate.getInstance(); return oBookmark; } /// finish createBookmark @@ -367,13 +348,13 @@ public class SOfficeFactory { /** * the method createReferenceMark */ - public static XTextContent createReferenceMark( XTextDocument xTextDoc ) - throws com.sun.star.uno.Exception { + public static XTextContent createReferenceMark(XTextDocument xTextDoc) + throws com.sun.star.uno.Exception { ReferenceMarkDsc tDsc = new ReferenceMarkDsc(); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextContent oReferenceMark = (XTextContent)instCreate.getInstance(); + XTextContent oReferenceMark = (XTextContent) instCreate.getInstance(); return oReferenceMark; } /// finish createReferenceMark @@ -381,13 +362,13 @@ public class SOfficeFactory { /** * the method createFootnote */ - public static XTextContent createFootnote( XTextDocument xTextDoc ) - throws com.sun.star.uno.Exception { + public static XTextContent createFootnote(XTextDocument xTextDoc) + throws com.sun.star.uno.Exception { FootnoteDsc tDsc = new FootnoteDsc(); - InstCreator instCreate = new InstCreator( xTextDoc, tDsc ); + InstCreator instCreate = new InstCreator(xTextDoc, tDsc); - XTextContent oFootnote = (XTextContent)instCreate.getInstance(); + XTextContent oFootnote = (XTextContent) instCreate.getInstance(); return oFootnote; } /// finish createFootnote @@ -395,68 +376,64 @@ public class SOfficeFactory { /** * the method create Index */ + public static XTextContent createIndex(XTextDocument xTextDoc, String kind) + throws com.sun.star.uno.Exception { - public static XTextContent createIndex( XTextDocument xTextDoc, String kind) - throws com.sun.star.uno.Exception { + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, + xTextDoc); - XMultiServiceFactory oDocMSF = (XMultiServiceFactory) - UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc ); + Object oInt = oDocMSF.createInstance(kind); - Object oInt = oDocMSF.createInstance( kind ); - - XTextContent xTC = (XTextContent) - UnoRuntime.queryInterface(XDocumentIndex.class,oInt); + XTextContent xTC = (XTextContent) UnoRuntime.queryInterface(XDocumentIndex.class, oInt); return xTC; } - public static XSpreadsheet createSpreadsheet( XSpreadsheetDocument oDoc ) - throws com.sun.star.uno.Exception { + public static XSpreadsheet createSpreadsheet(XSpreadsheetDocument oDoc) + throws com.sun.star.uno.Exception { - XMultiServiceFactory oDocMSF = (XMultiServiceFactory) - UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc ); + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); Object oInt = oDocMSF.createInstance( - "com.sun.star.sheet.Spreadsheet" ); + "com.sun.star.sheet.Spreadsheet"); - XSpreadsheet oSpreadsheet = (XSpreadsheet) - UnoRuntime.queryInterface( XSpreadsheet.class, oInt ); + XSpreadsheet oSpreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(XSpreadsheet.class, oInt); return oSpreadsheet; } - public static XIndexAccess getTableCollection( XTextDocument oDoc ){ + public static XIndexAccess getTableCollection(XTextDocument oDoc) { - XTextTablesSupplier oTTS = (XTextTablesSupplier) - UnoRuntime.queryInterface( XTextTablesSupplier.class, oDoc ); + XTextTablesSupplier oTTS = (XTextTablesSupplier) UnoRuntime.queryInterface(XTextTablesSupplier.class, oDoc); XNameAccess oNA = oTTS.getTextTables(); - XIndexAccess oIA = (XIndexAccess) - UnoRuntime.queryInterface( XIndexAccess.class, oNA ); + XIndexAccess oIA = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, oNA); return oIA; } - public static String getUniqueName( XInterface oInterface, String prefix ) { - XNameAccess oNameAccess = (XNameAccess) - UnoRuntime.queryInterface( XNameAccess.class, oInterface ); - if (oNameAccess == null) + public static String getUniqueName(XInterface oInterface, String prefix) { + XNameAccess oNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oInterface); + if (oNameAccess == null) { return null; + } int i; - for (i = 0; oNameAccess.hasByName( prefix + i ); i++ ) {}; + for (i = 0; oNameAccess.hasByName(prefix + i); i++) { + } + ; return prefix + i; } public XShape createShape(XComponent oDoc, int height, int width, int x, int y, String kind) { //possible values for kind are 'Ellipse', 'Line' and 'Rectangle' - ShapeDsc sDsc = new ShapeDsc( height, width, x, y, kind ); - InstCreator instCreate = new InstCreator( oDoc, sDsc ); + ShapeDsc sDsc = new ShapeDsc(height, width, x, y, kind); + InstCreator instCreate = new InstCreator(oDoc, sDsc); - XShape oShape = (XShape)instCreate.getInstance(); + XShape oShape = (XShape) instCreate.getInstance(); - return oShape; + return oShape; } @@ -467,194 +444,189 @@ public class SOfficeFactory { XInterface oInterface = null; XDiagram oDiagram = null; - //get LineDiagram - XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc ); + //get LineDiagram + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); - try{ - oInterface = (XInterface) oDocMSF.createInstance("com.sun.star.chart."+kind); - oDiagram = (XDiagram) UnoRuntime.queryInterface(XDiagram.class, oInterface); - } catch ( Exception e ) { + try { + oInterface = (XInterface) oDocMSF.createInstance("com.sun.star.chart." + kind); + oDiagram = (XDiagram) UnoRuntime.queryInterface(XDiagram.class, oInterface); + } catch (Exception e) { // Some exception occures.FAILED - System.out.println( "Couldn't create "+kind+"-Diagram "+ e ); + System.out.println("Couldn't create " + kind + "-Diagram " + e); } return oDiagram; } /* // create a Control-Instance which specified in kind(String) - */ + */ public XInterface createControl(XComponent oDoc, String kind) { XInterface oControl = null; - XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc ); + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); - try{ - oControl = (XInterface) oDocMSF.createInstance("com.sun.star.form.component."+kind); - } catch ( Exception e ) { + try { + oControl = (XInterface) oDocMSF.createInstance("com.sun.star.form.component." + kind); + } catch (Exception e) { // Some exception occures.FAILED - System.out.println( "Couldn't create instance "+ kind + ": "+ e ); + System.out.println("Couldn't create instance " + kind + ": " + e); } - return oControl; + return oControl; } /* // create an Instance which is specified in kind(String) - */ + */ public Object createInstance(XComponent oDoc, String kind) { Object oInstance = null; - XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc ); + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); - try{ - oInstance = (Object) oDocMSF.createInstance(kind); - } catch ( Exception e ) { + try { + oInstance = (Object) oDocMSF.createInstance(kind); + } catch (Exception e) { // Some exception occures.FAILED - System.out.println( "Couldn't create instance "+ kind + ": "+ e ); + System.out.println("Couldn't create instance " + kind + ": " + e); } - return oInstance; + return oInstance; } - public 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) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc ); - - try{ - Object oInt = oDocMSF.createInstance("com.sun.star.drawing.ControlShape"); - Object aCon = oDocMSF.createInstance("com.sun.star.form.component."+kind); - aControl = (XControlModel) UnoRuntime.queryInterface( XControlModel.class, aCon ); - oCShape = (XControlShape) UnoRuntime.queryInterface( XControlShape.class, oInt ); - size.Height = height; - size.Width = width; - position.X = x; - position.Y = y; - oCShape.setSize(size); - oCShape.setPosition(position); - - - } catch ( Exception e ) { + XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); + + try { + Object oInt = oDocMSF.createInstance("com.sun.star.drawing.ControlShape"); + Object aCon = oDocMSF.createInstance("com.sun.star.form.component." + kind); + aControl = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, aCon); + oCShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, oInt); + size.Height = height; + size.Width = width; + position.X = x; + position.Y = y; + oCShape.setSize(size); + oCShape.setPosition(position); + + + } catch (Exception e) { // Some exception occures.FAILED - System.out.println( "Couldn't create instance "+ e ); + System.out.println("Couldn't create instance " + e); } - try{ - oCShape.setControl(aControl); - } catch ( Exception e ) { + try { + oCShape.setControl(aControl); + } catch (Exception e) { // Some exception occures.FAILED - System.out.println( "Couldn't get Control "+ e ); + System.out.println("Couldn't get Control " + e); } - return oCShape; + return oCShape; } - public XComponent loadDocument( String fileName ) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.io.IOException, - com.sun.star.uno.Exception { + public XComponent loadDocument(String fileName) + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.io.IOException, + com.sun.star.uno.Exception { - // that noargs thing for load attributes - PropertyValue [] szEmptyArgs = new PropertyValue [0]; - String frameName = "_blank"; - - XComponent oDoc = oCLoader.loadComponentFromURL( - fileName, frameName, 0, szEmptyArgs ); + // that noargs thing for load attributes + PropertyValue[] szEmptyArgs = new PropertyValue[0]; + String frameName = "_blank"; - if ( oDoc == null ) { - return null; - } + XComponent oDoc = oCLoader.loadComponentFromURL( + fileName, frameName, 0, szEmptyArgs); - return oDoc; + if (oDoc == null) { + return null; + } + DesktopTools.bringWindowToFront(oDoc); + return oDoc; } - public XComponent loadDocument( String fileName , PropertyValue[] Args) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.io.IOException, - com.sun.star.uno.Exception { + public XComponent loadDocument(String fileName, PropertyValue[] Args) + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.io.IOException, + com.sun.star.uno.Exception { - // that noargs thing for load attributes - String frameName = "_blank"; + // that noargs thing for load attributes + String frameName = "_blank"; - XComponent oDoc = oCLoader.loadComponentFromURL( - fileName, frameName, 0, Args ); + XComponent oDoc = oCLoader.loadComponentFromURL( + fileName, frameName, 0, Args); - if ( oDoc == null ) { - return null; - } + if (oDoc == null) { + return null; + } + DesktopTools.bringWindowToFront(oDoc); - return oDoc; + return oDoc; } public XComponent openDoc(String kind, String frameName) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.io.IOException, - com.sun.star.uno.Exception { + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.io.IOException, + com.sun.star.uno.Exception { // that noargs thing for load attributes - PropertyValue [] Args = null; + PropertyValue[] Args = null; if (kind.equals("simpress")) { - Args = new PropertyValue [1]; + Args = new PropertyValue[1]; PropertyValue Arg = new PropertyValue(); Arg.Name = "OpenFlags"; Arg.Value = "S"; Arg.Handle = -1; Arg.State = PropertyState.DEFAULT_VALUE; - Args[0]=Arg; - } - else { - Args = new PropertyValue [0]; + Args[0] = Arg; + } else { + Args = new PropertyValue[0]; } - if ( frameName == null ) { + if (frameName == null) { frameName = "_blank"; } // load a blank a doc - XComponent oDoc = oCLoader.loadComponentFromURL( - "private:factory/"+kind, frameName, 40, Args ); + XComponent oDoc = oCLoader.loadComponentFromURL("private:factory/" + kind, frameName, 40, Args); + DesktopTools.bringWindowToFront(oDoc); return oDoc; } // finished openDoc - - public XComponent openDoc(String kind, String frameName, PropertyValue[] mediaDescriptor) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.io.IOException, - com.sun.star.uno.Exception { + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.io.IOException, + com.sun.star.uno.Exception { - if ( frameName == null ) { - frameName = "_blank"; - } - // load a blank a doc - XComponent oDoc = oCLoader.loadComponentFromURL( - "private:factory/"+kind, frameName, 40, mediaDescriptor ); + if (frameName == null) { + frameName = "_blank"; + } + // load a blank a doc + XComponent oDoc = oCLoader.loadComponentFromURL( + "private:factory/" + kind, frameName, 40, mediaDescriptor); + DesktopTools.bringWindowToFront(oDoc); - return oDoc; + return oDoc; } // finished openDoc // query for XServiceInfo - public Object queryXServiceInfo( Object oObj ) - { - if ( oObj != null ) { + public Object queryXServiceInfo(Object oObj) { + if (oObj != null) { XServiceInfo oInfo = (XServiceInfo) UnoRuntime.queryInterface( - XServiceInfo.class, oObj); - System.out.println ("!!!! XServiceInfo n.a. !!!! "); - } - else { - System.out.println ("Object is empty!!!! "); + XServiceInfo.class, oObj); + System.out.println("!!!! XServiceInfo n.a. !!!! "); + } else { + System.out.println("Object is empty!!!! "); } return null; } // finish queryXServiceInfo - }
\ No newline at end of file diff --git a/qadevOOo/runner/util/compare/GraphicalComparator.java b/qadevOOo/runner/util/compare/GraphicalComparator.java index 7ab13882487f..3f154fa6248c 100644 --- a/qadevOOo/runner/util/compare/GraphicalComparator.java +++ b/qadevOOo/runner/util/compare/GraphicalComparator.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: GraphicalComparator.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -122,7 +122,7 @@ class GraphicalComparator implements DocComparator String sInputPath = m_aArguments.getInputPath(); if (FileHelper.isDir(sInputPath)) { - Object[] aList = DirectoryHelper.traverse(sInputPath, m_aArguments.getFileFilter(), m_aArguments.includeSubDirectories()); + Object[] aList = DirectoryHelper.traverse(sInputPath, FileHelper.getFileFilter(), m_aArguments.includeSubDirectories()); for (int i=0;i<aList.length;i++) { // get document + path diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index 5c682d31507f..f4cf3d1253dd 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: utils.java,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.2.3 $ * * This file is part of OpenOffice.org. * @@ -68,6 +68,8 @@ public class utils { * * This method adds the DOCPTH to a given file * + * @param sDocName the file which should be completed to the test doc path + * @return $TESTDOCPATH/sDocName */ public static String getFullTestDocName(String sDocName) { String docpth = System.getProperty("DOCPTH"); @@ -75,17 +77,46 @@ public class utils { docpth = docpth.substring(0, docpth.length() - 1); } + System.out.println("docpth:" + docpth); + + String pthSep = System.getProperty("file.separator"); + + if (docpth.equals("unkown")) { + System.out.println("try to get tDoc from $SRC_ROOT/qadevOOo"); + String srcRoot = System.getProperty(PropertyName.SRC_ROOT); + if (srcRoot != null) { + File srcR = new File(srcRoot); + String[] list = srcR.list(new FilenameFilter() { + + public boolean accept(File dir, String name) { + return name.startsWith("qadevOOo"); + } + }); + + if (list[0] != null) { + String tDoc = srcRoot.concat(pthSep).concat(list[0]).concat(pthSep).concat("testdocs"); + + if (new File(tDoc).exists()) { + docpth = tDoc; + } + } + } + } + if (docpth.startsWith("http:")) { return docpth + "/" + sDocName; } String testdocPth = ""; - String pthSep = System.getProperty("file.separator"); - if (docpth == null) { + + if (docpth.equals("unkown")) { + System.out.println("try to get tDoc from OBJDSCS"); String objdscPth = System.getProperty("OBJDSCS"); - int i = objdscPth.indexOf("objdsc"); - String arcPth = objdscPth.substring(0, i - 1); - testdocPth = arcPth + pthSep + "doc" + pthSep + "java" + - pthSep + "testdocs" + pthSep + sDocName; + if (objdscPth != null) { + int i = objdscPth.indexOf("objdsc"); + String arcPth = objdscPth.substring(0, i - 1); + testdocPth = arcPth + pthSep + "doc" + pthSep + "java" + + pthSep + "testdocs" + pthSep + sDocName; + } } else { testdocPth = docpth + pthSep + sDocName; } @@ -924,7 +955,8 @@ public class utils { XDispatchProvider xDispProv = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xCont); - XURLTransformer xParser = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, + XURLTransformer xParser = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface( + XURLTransformer.class, xMSF.createInstance("com.sun.star.util.URLTransformer")); // Because it's an in/out parameter we must use an array of URL objects. diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java index 98dda6dc1ae8..80648ae34e06 100644 --- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java +++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java @@ -72,11 +72,11 @@ import util.utils; */ public class CheckModuleAPI extends ComplexTestCase { - private String mSRC_ROOT = null; - private boolean mIsInitialized = false; + private static String mSRC_ROOT = null; + private static boolean mIsInitialized = false; private final static boolean mContinue = true; - private boolean mDebug = false; - private BuildEnvTools bet = null; + private static boolean mDebug = false; + private static BuildEnvTools bet = null; /** * Initialize the test environment. @@ -104,30 +104,6 @@ public class CheckModuleAPI extends ComplexTestCase { mDebug = param.getBool(PropertyName.DEBUG_IS_ACTIVE); - // this test is desingt to run against a freshly installed office. Maybe this office has currently no - // no user installation. The first start of an office creates this installation and this takes some - // more time to connect to the office. - // Note: This is only usefull with parameter -NoOffice true - try { - final OfficeProvider officeProvider = new OfficeProvider(); - log.println("Receiving the ServiceManager of the Office to create User installation..."); - - final int timeOut = param.getInt(PropertyName.TIME_OUT); - param.put(PropertyName.TIME_OUT, new Integer(4 * timeOut)); - - final XMultiServiceFactory msf = (XMultiServiceFactory) officeProvider.getManager(param); - - officeProvider.backupUserLayer(param, msf); - - param.put(PropertyName.TIME_OUT, new Integer(timeOut)); - - if (msf == null) { - failed("Could not connect the office"); - } - } catch (Throwable t) { - failed("Could not start office " + t.toString()); - } - } } @@ -232,8 +208,8 @@ public class CheckModuleAPI extends ComplexTestCase { cmdLines = new String[]{"cdd " + sUnoapi, "dmake"}; // cmdLines = new String[]{shell, "/C ", "\"echo Test ^ " + envcmd + " ^ cdd " + sUnoapi + "^ pwd ^ dmake\""}; } else { - cmdLines = new String[]{"cd " + sUnoapi, "dmake"}; - } + cmdLines = new String[]{"cd " + sUnoapi, "dmake"}; + } return cmdLines; } diff --git a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java index 20180f232efc..701a402aaa22 100644 --- a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java +++ b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: _XUserInputInterception.java,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.8.1 $ * * This file is part of OpenOffice.org. * @@ -473,7 +473,7 @@ public class _XUserInputInterception extends MultiMethodTest { private void clickIntoDoc(){ try{ - util.DesktopTools.bringWindowToFromt(xModel); + util.DesktopTools.bringWindowToFront(xModel); XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) tParam.getMSF(), diff --git a/qadevOOo/tests/java/ifc/lang/_XComponent.java b/qadevOOo/tests/java/ifc/lang/_XComponent.java index 46ba69f93685..1af6e6daa071 100644 --- a/qadevOOo/tests/java/ifc/lang/_XComponent.java +++ b/qadevOOo/tests/java/ifc/lang/_XComponent.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: _XComponent.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.8.1 $ * * This file is part of OpenOffice.org. * @@ -143,7 +143,7 @@ public class _XComponent extends MultiMethodTest { disposed = false; executeMethod("removeEventListener()"); - log.println( "begin dispose" + Thread.currentThread()); + log.println( "begin dispose in thread " + Thread.currentThread()); XDesktop oDesk = (XDesktop) tEnv.getObjRelation("Desktop"); if (oDesk !=null) { oDesk.terminate(); diff --git a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java index 4db803924d82..fc60dff0fb26 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java +++ b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: _XEnhancedMouseClickBroadcaster.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -66,7 +66,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest { public void before() { docModel = (XModel) UnoRuntime.queryInterface( XModel.class,tEnv.getObjRelation("FirstModel")); - DesktopTools.bringWindowToFromt(docModel); + DesktopTools.bringWindowToFront(docModel); } public void _addEnhancedMouseClickHandler() { diff --git a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java index 645ef9a5043d..5327b7b11098 100644 --- a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java +++ b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: _XContextMenuInterception.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -78,7 +78,7 @@ public class _XContextMenuInterception extends MultiMethodTest { //ensure that the first model is focused log.println("ensure that the first model is focused"); - DesktopTools.bringWindowToFromt(docModel); + DesktopTools.bringWindowToFront(docModel); utils.shortWait(3000); } diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java index 4c5dcb4e0092..10659c973fae 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java +++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OQueryDesign.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.8.1 $ * * This file is part of OpenOffice.org. * @@ -31,6 +31,11 @@ package mod._dbaccess; //import com.sun.star.awt.XControl; //import com.sun.star.awt.XControlModel; +import com.sun.star.container.NoSuchElementException; +import com.sun.star.lang.WrappedTargetException; +import com.sun.star.sdbc.SQLException; +import com.sun.star.sdbc.XConnection; +import com.sun.star.uno.Exception; import java.io.PrintWriter; import lib.TestCase; @@ -55,18 +60,23 @@ import com.sun.star.util.URL; import lib.StatusException; import util.SOfficeFactory; import com.sun.star.sdb.XDocumentDataSource; +import com.sun.star.sdbc.XDataSource; +import com.sun.star.ucb.XSimpleFileAccess; public class OQueryDesign extends TestCase { - private XDesktop Desk; - private XFrame Frame; + private static XDesktop xDesk; + private static XFrame xFrame; private final String sDataSourceName = "Bibliography"; + private static XConnection xConn; + private static XTextDocument xTextDoc; + /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). */ protected void initialize(TestParameters Param, PrintWriter log) { - Desk = (XDesktop) UnoRuntime.queryInterface( + xDesk = (XDesktop) UnoRuntime.queryInterface( XDesktop.class, DesktopTools.createDesktop((XMultiServiceFactory)Param.getMSF()) ); } @@ -77,9 +87,50 @@ public class OQueryDesign extends TestCase { XInterface oObj = null; XDispatchProvider aProv = (XDispatchProvider) - UnoRuntime.queryInterface(XDispatchProvider.class,Desk); + UnoRuntime.queryInterface(XDispatchProvider.class,xDesk); XDispatch getting = null; + XMultiServiceFactory xMSF = (XMultiServiceFactory) Param.getMSF(); + + XNameAccess xNameAccess = null; + + // we use the first datasource + XDataSource xDS = null; + try { + xNameAccess = (XNameAccess) UnoRuntime.queryInterface( + XNameAccess.class, + xMSF.createInstance("com.sun.star.sdb.DatabaseContext")); + } catch (Exception ex) { + ex.printStackTrace( log ); + throw new StatusException( "Could not get Databasecontext", ex ); + } + try { + xDS = (XDataSource) UnoRuntime.queryInterface( + XDataSource.class, xNameAccess.getByName( "Bibliography" )); + } catch (NoSuchElementException ex) { + ex.printStackTrace( log ); + throw new StatusException( "Could not get XDataSource", ex ); + } catch (WrappedTargetException ex) { + ex.printStackTrace( log ); + throw new StatusException( "Could not get XDataSource", ex ); + } + try { + xNameAccess = (XNameAccess) UnoRuntime.queryInterface( + XNameAccess.class, + xMSF.createInstance("com.sun.star.sdb.DatabaseContext")); + } catch (Exception ex) { + ex.printStackTrace( log ); + throw new StatusException( "Could not get DatabaseConext", ex ); + } + + log.println("check XMultiServiceFactory"); + + try { + xConn = xDS.getConnection(new String(), new String()); + } catch (SQLException ex) { + ex.printStackTrace( log ); + throw new StatusException( "Could not get XConnection", ex ); + } log.println( "opening QueryDesign" ); URL the_url = new URL(); @@ -94,15 +145,16 @@ public class OQueryDesign extends TestCase { param2.Name = "QueryDesignView"; param2.Value = new Boolean(false); Args[1] = param2; + param1.Name = "ActiveConnection"; + param1.Value = xConn; + Args[1] = param2; getting.dispatch(the_url,Args); shortWait(); Object oDBC = null; - XMultiServiceFactory xMSF; try { - xMSF = (XMultiServiceFactory)Param.getMSF(); oDBC = xMSF.createInstance( "com.sun.star.sdb.DatabaseContext" ); } catch( com.sun.star.uno.Exception e ) { @@ -119,13 +171,14 @@ public class OQueryDesign extends TestCase { throw new StatusException("could not get '" + sDataSourceName + "'" , e) ; } XDocumentDataSource xDDS = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class, oDataSource); - XModel xMod = (XModel) UnoRuntime.queryInterface(XModel.class, xDDS.getDatabaseDocument ()); +// XModel xMod = (XModel) UnoRuntime.queryInterface(XModel.class, xDDS.getDatabaseDocument ()); + +// Frame = xMod.getCurrentController().getFrame(); - Frame = xMod.getCurrentController().getFrame(); + xFrame = DesktopTools.getCurrentFrame(xMSF); // get an instance of Frame Object oFrame = null; - XTextDocument xTextDoc = null;; SOfficeFactory SOF = null; SOF = SOfficeFactory.getFactory( xMSF ); @@ -156,7 +209,7 @@ public class OQueryDesign extends TestCase { params[2] = param3; - oObj = Frame.getController(); + oObj = xFrame.getController(); TestEnvironment tEnv = new TestEnvironment(oObj); @@ -182,7 +235,7 @@ public class OQueryDesign extends TestCase { tEnv.addObjRelation("XInitialization.ExceptionArgs", ExceptionParams); - tEnv.addObjRelation("Frame", Frame); + tEnv.addObjRelation("Frame", xFrame); tEnv.addObjRelation("XInitialization.xIni", getUnititializedObj(Param)); @@ -245,6 +298,21 @@ public class OQueryDesign extends TestCase { } + @Override + protected void cleanup(TestParameters tParam, PrintWriter log) { + try { + xConn.close() ; + DesktopTools.closeDoc(xFrame); + DesktopTools.closeDoc(xTextDoc); + } catch (com.sun.star.uno.Exception e) { + log.println("Can't close the connection") ; + e.printStackTrace(log) ; + } catch (com.sun.star.lang.DisposedException e) { + log.println("Connection was already closed. It's OK.") ; + } + + } + /** * Sleeps for 0.2 sec. to allow StarOffice to react on <code> * reset</code> call. diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java index 6d3da690a227..957fcfaa0596 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DrawController_HandoutView.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -233,7 +233,7 @@ public class DrawController_HandoutView extends TestCase { XInterface oObj = aModel.getCurrentController(); log.println("bring first document to front..."); - DesktopTools.bringWindowToFromt(aModel); + DesktopTools.bringWindowToFront(aModel); XModel aModel2 = (XModel) UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java index 41c0794ff89b..a99dafbfb20a 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DrawController_NotesView.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -230,7 +230,7 @@ public class DrawController_NotesView extends TestCase { XInterface oObj = aModel.getCurrentController(); log.println("bring first document to front..."); - DesktopTools.bringWindowToFromt(aModel); + DesktopTools.bringWindowToFront(aModel); XModel aModel2 = (XModel) UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java index 0357426e0830..deaf2cafe752 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DrawController_OutlineView.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -230,7 +230,7 @@ public class DrawController_OutlineView extends TestCase { XInterface oObj = aModel.getCurrentController(); log.println("bring first document to front..."); - DesktopTools.bringWindowToFromt(aModel); + DesktopTools.bringWindowToFront(aModel); XModel aModel2 = (XModel) UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java index 45139fe507cd..d3e5bf84cc4d 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DrawController_PresentationView.java,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.8.1 $ * * This file is part of OpenOffice.org. * @@ -230,7 +230,7 @@ public class DrawController_PresentationView extends TestCase { XInterface oObj = aModel.getCurrentController(); log.println("bring first document to front..."); - DesktopTools.bringWindowToFromt(aModel); + DesktopTools.bringWindowToFront(aModel); XModel aModel2 = (XModel) UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java index 7c03fb089f31..32717be5f6d2 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleBrowseBox.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.2 $ * * This file is part of OpenOffice.org. * @@ -27,7 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - package mod._svtools; import java.io.PrintWriter; @@ -51,31 +50,31 @@ import com.sun.star.frame.XDispatch; import com.sun.star.frame.XDispatchProvider; import com.sun.star.frame.XFrame; import com.sun.star.frame.XModel; -import com.sun.star.lang.XInitialization; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.text.XTextDocument; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.URL; +import com.sun.star.view.XSelectionSupplier; public class AccessibleBrowseBox extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). */ protected void initialize(TestParameters Param, PrintWriter log) { the_Desk = (XDesktop) UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop((XMultiServiceFactory)Param.getMSF()) ); + XDesktop.class, DesktopTools.createDesktop((XMultiServiceFactory) Param.getMSF())); } /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ - protected void cleanup( TestParameters Param, PrintWriter log) { + protected void cleanup(TestParameters Param, PrintWriter log) { log.println("disposing xTextDoc"); @@ -98,41 +97,40 @@ public class AccessibleBrowseBox extends TestCase { */ protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - log.println( "creating a test environment" ); - - if (xTextDoc != null) xTextDoc.dispose(); + log.println("creating a test environment"); - // get a soffice factory object - SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF()); + if (xTextDoc != null) { + xTextDoc.dispose(); // get a soffice factory object + } + SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory) tParam.getMSF()); try { - log.println( "creating a text document" ); + log.println("creating a text document"); xTextDoc = SOF.createTextDoc(null); - } catch ( com.sun.star.uno.Exception e ) { + } catch (com.sun.star.uno.Exception e) { // Some exception occures.FAILED - e.printStackTrace( log ); - throw new StatusException( "Couldn't create document", e ); + e.printStackTrace(log); + throw new StatusException("Couldn't create document", e); } shortWait(); - XModel aModel1 = (XModel) - UnoRuntime.queryInterface(XModel.class, xTextDoc); + XModel aModel1 = (XModel) UnoRuntime.queryInterface(XModel.class, xTextDoc); XController secondController = aModel1.getCurrentController(); - XDispatchProvider aProv = (XDispatchProvider) - UnoRuntime.queryInterface(XDispatchProvider.class,secondController); + XDispatchProvider aProv = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, + secondController); XDispatch getting = null; - log.println( "opening DatasourceBrowser" ); + log.println("opening DatasourceBrowser"); URL the_url = new URL(); the_url.Complete = ".component:DB/DataSourceBrowser"; - getting = aProv.queryDispatch(the_url,"_beamer",12); + getting = aProv.queryDispatch(the_url, "_beamer", 12); PropertyValue[] noArgs = new PropertyValue[0]; - getting.dispatch(the_url,noArgs); + getting.dispatch(the_url, noArgs); shortWait(); @@ -142,71 +140,61 @@ public class AccessibleBrowseBox extends TestCase { log.println("Current frame was not found !!!"); } - XFrame the_frame2 = the_frame1.findFrame("_beamer",4); + XFrame the_frame2 = the_frame1.findFrame("_beamer", 4); the_frame2.setName("DatasourceBrowser"); XInterface oObj = null; - final XInitialization xInit = (XInitialization) - UnoRuntime.queryInterface( - XInitialization.class, the_frame2.getController()); - - Object[] params = new Object[3]; - PropertyValue param1 = new PropertyValue(); - param1.Name = "DataSourceName"; - param1.Value = "Bibliography"; - params[0] = param1; - PropertyValue param2 = new PropertyValue(); - param2.Name = "CommandType"; - param2.Value = new Integer(com.sun.star.sdb.CommandType.TABLE); - params[1] = param2; - PropertyValue param3 = new PropertyValue(); - param3.Name = "Command"; - param3.Value = "biblio"; - params[2] = param3; - - final Object[] fParams = params; + final XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface( + XSelectionSupplier.class, the_frame2.getController()); + + PropertyValue[] params = new PropertyValue[]{new PropertyValue(), new PropertyValue(), new PropertyValue()}; + params[0].Name = "DataSourceName"; + params[0].Value = "Bibliography"; + params[1].Name = "CommandType"; + params[1].Value = new Integer(com.sun.star.sdb.CommandType.TABLE); + params[2].Name = "Command"; + params[2].Value = "biblio"; + + final PropertyValue[] fParams = params; shortWait(); try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()).createInstance - ("com.sun.star.awt.Toolkit") ; + oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance("com.sun.star.awt.Toolkit"); } catch (com.sun.star.uno.Exception e) { log.println("Couldn't get toolkit"); e.printStackTrace(log); - throw new StatusException("Couldn't get toolkit", e ); + throw new StatusException("Couldn't get toolkit", e); } - XExtendedToolkit tk = (XExtendedToolkit) - UnoRuntime.queryInterface(XExtendedToolkit.class,oObj); + XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(XExtendedToolkit.class, oObj); AccessibilityTools at = new AccessibilityTools(); - XWindow xWindow = (XWindow) - UnoRuntime.queryInterface(XWindow.class,tk.getActiveTopWindow()); + XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); XAccessible xRoot = at.getAccessibleObject(xWindow); at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.PANEL, "", "AccessibleBrowseBox"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL, "", "AccessibleBrowseBox"); - log.println("ImplementationName: "+util.utils.getImplName(oObj)); + log.println("ImplementationName: " + util.utils.getImplName(oObj)); - TestEnvironment tEnv = new TestEnvironment( oObj ); + TestEnvironment tEnv = new TestEnvironment(oObj); tEnv.addObjRelation("EventProducer", - new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){ + new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() { + public void fireEvent() { try { - xInit.initialize(fParams); - } catch(com.sun.star.uno.Exception e) { + xSelect.select(fParams); + } catch (com.sun.star.uno.Exception e) { e.printStackTrace(); } } @@ -216,15 +204,15 @@ public class AccessibleBrowseBox extends TestCase { } /** - * Sleeps for 0.5 sec. to allow StarOffice to react on <code> - * reset</code> call. - */ + * Sleeps for 0.5 sec. to allow StarOffice to react on <code> + * reset</code> call. + */ private void shortWait() { try { - Thread.currentThread().sleep(500) ; + Thread.sleep(5000); + ; } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; + System.out.println("While waiting :" + e); } } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java index 7541f02da164..0a4a516752e4 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleBrowseBoxHeaderBar.java,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.8.1 $ * * This file is part of OpenOffice.org. * @@ -83,8 +83,8 @@ import com.sun.star.util.URL; * @see ifc.accessibility._XAccessibleContext */ public class AccessibleBrowseBoxHeaderBar extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -266,7 +266,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000);; } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java index 6468376f73ba..ca6104cd219f 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleBrowseBoxHeaderCell.java,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.8.1 $ * * This file is part of OpenOffice.org. * @@ -247,7 +247,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500) ; + Thread.sleep(5000); ; } catch (InterruptedException e) { System.out.println("While waiting :" + e) ; } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java index 033a003ffd1b..ec48b02b1f34 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleBrowseBoxTable.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -76,8 +76,8 @@ import com.sun.star.util.URL; * @see ifc.accessibility._XAccessibleContext */ public class AccessibleBrowseBoxTable extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -248,7 +248,7 @@ public class AccessibleBrowseBoxTable extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java index 71c9060b0802..c0a50d4f01db 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleBrowseBoxTableCell.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -76,8 +76,8 @@ import com.sun.star.util.URL; */ public class AccessibleBrowseBoxTableCell extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -238,7 +238,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500) ; + Thread.sleep(5000); ; } catch (InterruptedException e) { System.out.println("While waiting :" + e) ; } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java index 7091db184604..d73f197f18d4 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleIconChoiceCtrl.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -84,9 +84,9 @@ import com.sun.star.util.XURLTransformer; * @see ifc.accessibility._XAccessibleSelection */ public class AccessibleIconChoiceCtrl extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; - XAccessibleAction accCloseButton = null; + static XDesktop the_Desk; + static XTextDocument xTextDoc; + static XAccessibleAction accCloseButton = null; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -282,7 +282,7 @@ public class AccessibleIconChoiceCtrl extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java index 68fe710c4247..aff986416948 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleIconChoiceCtrlEntry.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -84,9 +84,9 @@ import com.sun.star.util.XURLTransformer; */ public class AccessibleIconChoiceCtrlEntry extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; - XAccessibleAction accCloseButton = null; + static XDesktop the_Desk; + static XTextDocument xTextDoc; + static XAccessibleAction accCloseButton = null; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -258,7 +258,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500) ; + Thread.sleep(5000); ; } catch (InterruptedException e) { System.out.println("While waiting :" + e) ; } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java index 61e7356d95f7..8927bc015e60 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleTabBar.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -51,7 +51,7 @@ import com.sun.star.util.XCloseable; public class AccessibleTabBar extends TestCase { - XComponent xDoc; + static XComponent xDoc; /** * Disposes the document, if exists, created in @@ -150,12 +150,12 @@ public class AccessibleTabBar extends TestCase { } /** - * Sleeps for 0.5 sec. to allow StarOffice to react on <code> + * Sleeps for 3 sec. to allow StarOffice to react on <code> * reset</code> call. */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java index c01ce213fccc..6ab70b2af79e 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleTabBarPage.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.8.1 $ * * This file is part of OpenOffice.org. * @@ -87,7 +87,7 @@ import com.sun.star.uno.XInterface; */ public class AccessibleTabBarPage extends TestCase { - XComponent xDoc; + static XComponent xDoc; /** * Disposes the document, if exists, created in @@ -197,7 +197,7 @@ public class AccessibleTabBarPage extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500) ; + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e) ; } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java index 93d8a7d6fa5c..7b376ac029bf 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleTabBarPageList.java,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.8.1 $ * * This file is part of OpenOffice.org. * @@ -79,7 +79,7 @@ import com.sun.star.util.XCloseable; * @see ifc.accessibility._XAccessibleContext */ public class AccessibleTabBarPageList extends TestCase { - XComponent xDoc; + static XComponent xDoc; /** * Disposes the document, if exists, created in @@ -191,7 +191,7 @@ public class AccessibleTabBarPageList extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java index a9c0d92953ae..73453427ce4d 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleTreeListBox.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -82,8 +82,8 @@ import com.sun.star.util.URL; */ public class AccessibleTreeListBox extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -257,7 +257,7 @@ public class AccessibleTreeListBox extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(2000) ; + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e) ; } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java index ab38895ca994..8746ed4328ed 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleTreeListBoxEntry.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.8.1 $ * * This file is part of OpenOffice.org. * @@ -291,7 +291,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { */ private void shortWait() { try { - Thread.currentThread().sleep(500); + Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("While waiting :" + e); } diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java index 447cb33473ce..bf1845ad7812 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleControlShape.java,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.8.2 $ * * This file is part of OpenOffice.org. * @@ -54,8 +54,8 @@ import com.sun.star.uno.XInterface; public class AccessibleControlShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -93,7 +93,7 @@ public class AccessibleControlShape extends TestCase { (xDrawDoc,3000,4500,15000,1000,"CommandButton"); AccessibilityTools at = new AccessibilityTools(); - + utils.shortWait(5000); XWindow xWindow = at.getCurrentWindow ((XMultiServiceFactory)tParam.getMSF(),aModel); XAccessible xRoot = at.getAccessibleObject(xWindow); @@ -101,8 +101,9 @@ public class AccessibleControlShape extends TestCase { at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE, - "Button"); +// oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE, +// "Button"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "Button"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java b/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java index 3924663b86c0..3a140ebef08a 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleEditableTextPara.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.2 $ * * This file is part of OpenOffice.org. * @@ -54,7 +54,7 @@ import com.sun.star.uno.XInterface; public class AccessibleEditableTextPara extends TestCase { - XComponent xSpreadsheetDoc = null; + static XComponent xSpreadsheetDoc = null; /** * Called to create an instance of <code>TestEnvironment</code> @@ -81,7 +81,9 @@ public class AccessibleEditableTextPara extends TestCase { XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) Param.getMSF(), aModel); XAccessible xRoot = at.getAccessibleObject(xWindow); - XAccessibleContext InputLine = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL,"Input line"); + at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); + + XAccessibleContext InputLine = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TEXT_FRAME,"Input line"); try { oObj = InputLine.getAccessibleChild(0); XAccessibleEditableText et = (XAccessibleEditableText) UnoRuntime.queryInterface(XAccessibleEditableText.class, oObj); @@ -89,7 +91,6 @@ public class AccessibleEditableTextPara extends TestCase { } catch (com.sun.star.lang.IndexOutOfBoundsException e) { } - at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); log.println("ImplementationName " + utils.getImplName(oObj)); TestEnvironment tEnv = new TestEnvironment(oObj); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleGraphicShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleGraphicShape.java index b3c34f51a732..6e8bc7a8c9fd 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleGraphicShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleGraphicShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleGraphicShape.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.2 $ * * This file is part of OpenOffice.org. * @@ -54,8 +54,8 @@ import com.sun.star.uno.XInterface; public class AccessibleGraphicShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -104,8 +104,9 @@ public class AccessibleGraphicShape extends TestCase { XAccessible xRoot = at.getAccessibleObject(xWindow); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "GraphicObject"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "GraphicObject"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "GraphicObject"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java index ee89b660d02a..a3c121c147c1 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleOLEShape.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.2 $ * * This file is part of OpenOffice.org. * @@ -55,8 +55,8 @@ import com.sun.star.uno.XInterface; public class AccessibleOLEShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -127,8 +127,9 @@ public class AccessibleOLEShape extends TestCase { at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "OLEShape"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "OLEShape"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "OLEShape"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java index bf6b897ed43b..1159431705e5 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessiblePageShape.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.2 $ * * This file is part of OpenOffice.org. * @@ -54,8 +54,8 @@ import com.sun.star.uno.XInterface; public class AccessiblePageShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -100,8 +100,9 @@ public class AccessiblePageShape extends TestCase { at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE, - "PageShape"); +// oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE, +// "PageShape"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "PageShape"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java index e640bedadd61..e55a8cecd1d9 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessiblePresentationGraphicShape.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.2 $ * * This file is part of OpenOffice.org. * @@ -55,8 +55,8 @@ import com.sun.star.uno.XInterface; public class AccessiblePresentationGraphicShape extends TestCase { - XComponent xDoc; - XModel aModel; + static XComponent xDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -124,8 +124,9 @@ public class AccessiblePresentationGraphicShape extends TestCase { XWindow xWindow = at.getCurrentWindow ((XMultiServiceFactory)tParam.getMSF(),aModel); XAccessible xRoot = at.getAccessibleObject(xWindow); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "GraphicObject"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "GraphicObject"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "GraphicObject"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java index e3d50e3fff82..3e77ec54027d 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessiblePresentationOLEShape.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.2 $ * * This file is part of OpenOffice.org. * @@ -55,8 +55,8 @@ import com.sun.star.uno.XInterface; public class AccessiblePresentationOLEShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -133,8 +133,9 @@ public class AccessiblePresentationOLEShape extends TestCase { XAccessible xRoot = at.getAccessibleObject(xWindow); at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "ImpressOLE"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "ImpressOLE"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "ImpressOLE"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java index 6e45d604076e..d271c56cf751 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessiblePresentationShape.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.2 $ * * This file is part of OpenOffice.org. * @@ -55,8 +55,8 @@ import com.sun.star.uno.XInterface; public class AccessiblePresentationShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -120,8 +120,9 @@ public class AccessiblePresentationShape extends TestCase { XAccessible xRoot = at.getAccessibleObject(xWindow); at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "ImpressHandout"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "ImpressHandout"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "ImpressHandout"); log.println("Implementation Name: "+utils.getImplName(oObj)); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleShape.java index c45d3f50e9a4..0cbbb0a3c5ba 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleShape.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.2 $ * * This file is part of OpenOffice.org. * @@ -54,8 +54,8 @@ import com.sun.star.uno.XInterface; public class AccessibleShape extends TestCase { - XComponent xDrawDoc; - XModel aModel; + static XComponent xDrawDoc; + static XModel aModel; protected void initialize( TestParameters tParam, PrintWriter log ) { @@ -104,8 +104,9 @@ public class AccessibleShape extends TestCase { at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); - oObj = at.getAccessibleObjectForRole - (xRoot, AccessibleRole.SHAPE, "Rectangle"); +// oObj = at.getAccessibleObjectForRole +// (xRoot, AccessibleRole.SHAPE, "Rectangle"); + oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.UNKNOWN, "Rectangle"); // create test environment here TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_svx/GraphicExporter.java b/qadevOOo/tests/java/mod/_svx/GraphicExporter.java index 48bbbe169994..0ddba38e3fac 100644 --- a/qadevOOo/tests/java/mod/_svx/GraphicExporter.java +++ b/qadevOOo/tests/java/mod/_svx/GraphicExporter.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: GraphicExporter.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -79,7 +79,7 @@ import util.XMLTools; * @see ifc.document._XExporter */ public class GraphicExporter extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * Creates a new draw document. diff --git a/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java b/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java index cc7462c365e7..51b8757b72eb 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java +++ b/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxDrawPage.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -101,7 +101,7 @@ import util.ShapeDsc; * @see ifc.drawing._XShapeCombiner */ public class SvxDrawPage extends TestCase { - XSpreadsheetDocument xDoc = null; + static XSpreadsheetDocument xDoc = null; /** * Creates a new Draw document. diff --git a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java index 6f5e4cbc4fa1..933395b4784c 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java +++ b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxGraphCtrlAccessibleContext.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -67,7 +67,7 @@ import com.sun.star.view.XSelectionSupplier; */ public class SvxGraphCtrlAccessibleContext extends TestCase{ - XComponent xDrawDoc = null; + static XComponent xDrawDoc = null; /** * Called to create an instance of <code>TestEnvironment</code> diff --git a/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java b/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java index a76b4aa560f7..bfc1604343fb 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java +++ b/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxGraphicObject.java,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.8.1 $ * * This file is part of OpenOffice.org. * @@ -109,7 +109,7 @@ import com.sun.star.uno.XInterface; */ public class SvxGraphicObject extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * Creates a new Draw document. diff --git a/qadevOOo/tests/java/mod/_svx/SvxShape.java b/qadevOOo/tests/java/mod/_svx/SvxShape.java index fd96bcc22d6f..1cf58ac95f41 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShape.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShape.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShape.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -123,7 +123,7 @@ import com.sun.star.uno.XInterface; */ public class SvxShape extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * Loads a Draw document with name 'SvxShape.sxd' from test diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java b/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java index aa5f7ced6b82..cfa9e915fe66 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeCircle.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -120,7 +120,7 @@ import com.sun.star.uno.XInterface; */ public class SvxShapeCircle extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * Loads a Draw document with name 'SvxShape.sxd' from test diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeCollection.java b/qadevOOo/tests/java/mod/_svx/SvxShapeCollection.java index 1df394afe2cf..e8a48df78b8a 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeCollection.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeCollection.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeCollection.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -50,7 +50,7 @@ import com.sun.star.uno.XInterface; public class SvxShapeCollection extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java b/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java index 6e8a8679261d..72d8d30d9c6d 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeConnector.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -77,7 +77,7 @@ import com.sun.star.uno.XInterface; */ public class SvxShapeConnector extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java b/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java index 8c1d452ab58f..ca7302cde976 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeControl.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -52,7 +52,7 @@ import com.sun.star.uno.XInterface; public class SvxShapeControl extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java b/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java index 91d6ee89210d..7662f2d8740a 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeDimensioning.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -53,7 +53,7 @@ import com.sun.star.uno.XInterface; public class SvxShapeDimensioning extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java index 6af5862fe36f..2234bad89ff5 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapeGroup.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -65,7 +65,7 @@ import com.sun.star.uno.XInterface; public class SvxShapeGroup extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method initializes the document diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java index 5141d1e2d1f4..a1c38fd7c4fc 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapePolyPolygon.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -124,7 +124,7 @@ import com.sun.star.uno.XInterface; */ public class SvxShapePolyPolygon extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java index a612a7ac0b57..87e20442a35d 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxShapePolyPolygonBezier.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -126,7 +126,7 @@ import com.sun.star.uno.XInterface; */ public class SvxShapePolyPolygonBezier extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoNumberingRules.java b/qadevOOo/tests/java/mod/_svx/SvxUnoNumberingRules.java index 19e161d3c82f..c2887ef73188 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoNumberingRules.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoNumberingRules.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoNumberingRules.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -48,7 +48,7 @@ import util.DrawTools; public class SvxUnoNumberingRules extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; protected void initialize(TestParameters tParam, PrintWriter log) { log.println("creating a drawdoc"); diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoText.java b/qadevOOo/tests/java/mod/_svx/SvxUnoText.java index 30a748070499..d6c8d7937164 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoText.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoText.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoText.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -54,7 +54,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoText extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextContent.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextContent.java index 345622e836e9..4b5d0671d576 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextContent.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextContent.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextContent.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -53,7 +53,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoTextContent extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextContentEnum.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextContentEnum.java index 2dcb483c6fc9..ad5a60d9ff05 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextContentEnum.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextContentEnum.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextContentEnum.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -51,7 +51,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoTextContentEnum extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextCursor.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextCursor.java index 1b3653451787..cc6df28dcb8c 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextCursor.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextCursor.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextCursor.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -50,7 +50,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoTextCursor extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextField.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextField.java index 531491733950..c4c6ee90faf9 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextField.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextField.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextField.java,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.8.1 $ * * This file is part of OpenOffice.org. * @@ -59,7 +59,7 @@ import com.sun.star.uno.XInterface; */ public class SvxUnoTextField extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextRange.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextRange.java index e941019e7081..8d5e008994a2 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextRange.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextRange.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextRange.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -53,7 +53,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoTextRange extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument diff --git a/qadevOOo/tests/java/mod/_svx/SvxUnoTextRangeEnumeration.java b/qadevOOo/tests/java/mod/_svx/SvxUnoTextRangeEnumeration.java index 7d0c96c0b4b6..fac53e9f0deb 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxUnoTextRangeEnumeration.java +++ b/qadevOOo/tests/java/mod/_svx/SvxUnoTextRangeEnumeration.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SvxUnoTextRangeEnumeration.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -53,7 +53,7 @@ import com.sun.star.uno.XInterface; public class SvxUnoTextRangeEnumeration extends TestCase { - XComponent xDrawDoc; + static XComponent xDrawDoc; /** * in general this method creates a testdocument |