summaryrefslogtreecommitdiffstats
path: root/qadevOOo/runner/convwatch
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch')
-rw-r--r--qadevOOo/runner/convwatch/BuildID.java4
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchStarter.java5
-rw-r--r--qadevOOo/runner/convwatch/DB.java1
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java6
-rw-r--r--qadevOOo/runner/convwatch/FileHelper.java41
-rw-r--r--qadevOOo/runner/convwatch/FilenameHelper.java4
-rw-r--r--qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java6
-rw-r--r--qadevOOo/runner/convwatch/GraphicalTestArguments.java39
-rw-r--r--qadevOOo/runner/convwatch/HTMLOutputter.java3
-rw-r--r--qadevOOo/runner/convwatch/MSOfficePrint.java5
-rw-r--r--qadevOOo/runner/convwatch/NameHelper.java4
-rw-r--r--qadevOOo/runner/convwatch/OSHelper.java114
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java3
-rw-r--r--qadevOOo/runner/convwatch/PRNCompare.java6
-rw-r--r--qadevOOo/runner/convwatch/PixelCounter.java4
-rw-r--r--qadevOOo/runner/convwatch/ReferenceBuilder.java6
-rwxr-xr-xqadevOOo/runner/convwatch/ReportDesignerTest.java42
-rw-r--r--qadevOOo/runner/convwatch/SimpleFileSemaphore.java3
-rw-r--r--qadevOOo/runner/convwatch/StringHelper.java131
-rw-r--r--qadevOOo/runner/convwatch/TriState.java4
-rw-r--r--qadevOOo/runner/convwatch/makefile.mk3
21 files changed, 244 insertions, 190 deletions
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\