Commits

Anonymous committed 41a6f64

CWS-TOOLING: integrate CWS qadev38
2009-08-26 09:09:14 +0200 lla r275394 : #i104497# fix broken unoapi tests
2009-08-25 15:16:34 +0200 lla r275362 : #i102426# OfficePriver fix
2009-08-25 15:14:19 +0200 lla r275361 : #i104496# cleanups

Comments (0)

Files changed (11)

qadevOOo/runner/base/java_fat.java

                         tEnv = getEnv(entry, param);
                     }
 
-                    MultiMethodTest ifc = null;
+                    // MultiMethodTest ifc = null;
                     lib.TestResult res = null;
 
                     // run the interface test twice if it failed.
                             }
                         }
                     }
-                    if (res != null)
-                    {
-                        for (int k = 0; k < aSubEntry.SubEntryCount; k++)
-                        {
-                            DescEntry aSubSubEntry = aSubEntry.SubEntries[k];
-                            if (res.hasMethod( aSubSubEntry.entryName))
-                            {
-                                aSubSubEntry.State = res.getStatusFor(aSubSubEntry.entryName).toString();
-                            }
-                        }
-                    }
+                    setState(aSubEntry, res);
 
                     sumIt.summarizeUp(aSubEntry);
 
             return retValue;
         }
 
+    private void setState(DescEntry aSubEntry, lib.TestResult res)
+    {
+        if (res != null)
+        {
+            for (int k = 0; k < aSubEntry.SubEntryCount; k++)
+            {
+                DescEntry aSubSubEntry = aSubEntry.SubEntries[k];
+                if (res.hasMethod( aSubSubEntry.entryName))
+                {
+                    aSubSubEntry.State = res.getStatusFor(aSubSubEntry.entryName).toString();
+                }
+            }
+        }
+    }
+
     private TestEnvironment getEnv(DescEntry entry, TestParameters param)
         {
 //        if (dcl == null)

qadevOOo/runner/graphical/IniFile.java

                 while (aLine != null)
                 {
                     aLine = aReader.readLine();
-                    if (aLine != null)
+                    if (aLine != null && aLine.length() > 0)
                     {
                         aLines.add(aLine);
                     }

qadevOOo/runner/graphical/JPEGComparator.java

                 assure("File '" + sJPEGFilename + "' doesn't exists.", aFile.exists(), true);
                 if (aFile.exists())
                 {
+                    GlobalLogWriter.println("Page: " + i);
                     checkOnePicture(sJPEGFilename, _sResult, _aParams);
                 }
-
-
             }
         }
         else
      *       between old and new graphics. The font of the new graphics is little bit bigger, 
      *       so the pixel count between old graphics and new graphics is twice the more.
      * 
+     * @param _sOldGfx path & name to the jpeg file (1)
+     * @param _sNewGfx path & name to the other jpeg file (2)
+     * @param _sDiffGfx path & name to the new difference file which shows the difference between (1) and (2)
+     * @return the count of different pixels
+     * @throws java.io.IOException if file access is not possible
      */
-    public int estimateGfx(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
+
+    public static int estimateGfx(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
         throws java.io.IOException
         {
             // new count pixels
-            int nNotWhiteCount_OldGraphic = PixelCounter.countNotWhitePixelsFromImage(_sOldGfx);
-            int nNotWhiteCount_NewGraphic = PixelCounter.countNotWhitePixelsFromImage(_sNewGfx);
-            int nNotBlackCount_DiffGraphic = PixelCounter.countNotBlackPixelsFromImage(_sDiffGfx);
+            final int nNotWhiteCount_OldGraphic = PixelCounter.countNotWhitePixelsFromImage(_sOldGfx);
+            final int nNotWhiteCount_NewGraphic = PixelCounter.countNotWhitePixelsFromImage(_sNewGfx);
+            final int nNotBlackCount_DiffGraphic = PixelCounter.countNotBlackPixelsFromImage(_sDiffGfx);
                 
             int nMinNotWhiteCount = Math.min(nNotWhiteCount_NewGraphic, nNotWhiteCount_OldGraphic);
                 
             return nPercent;
         }
 
-        public int compareJPEG(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
+        private static int compareJPEG(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
         {
             String sComposite = "composite";
             if (OSHelper.isWindows())
                 String sBack = aHandler.getOutputText();
                 GlobalLogWriter.get().println("'" + sBack + "'");
             }
+            else
+            {
+                // creates an extra smaller difference picture
+                File aDiffFile = new File(_sDiffGfx);
+                if (aDiffFile.exists())
+                {
+                    JPEGCreator.convertToNearSameFileWithWidth340(_sDiffGfx);
+                }
+            }
             return nExitCode;
         }
         
             }
             catch(java.lang.NumberFormatException e)
             {
-                GlobalLogWriter.get().println("Number format exception");
+                GlobalLogWriter.get().println("identify(): Number format exception");
                 nResult = 0;
             }
             return nResult;

qadevOOo/runner/graphical/JPEGCreator.java

          int nPages = countPages(sJPEGNameSchema);
          if (nPages > 0)
          {
+             createSmallPictures(sJPEGNameSchema);
+
              String sIndexFile = FileHelper.appendPath(_sResult, "index.ini");         
              File aIndexFile = new File(sIndexFile);
              if (aIndexFile.exists())
              }
          }
     }
-    
+
+/**
+ * Create a lot of smaller and nicer Pictures of the big fat pages.
+ * Looks better
+ * @param _sJPEGSchema
+ */
+    public void createSmallPictures(String _sJPEGSchema)
+    {
+        int nPages = 0;
+        if (_sJPEGSchema.length() > 0)
+        {
+            // TODO: if there doesn't exists a '%04d' in the schema we will return 9999 which is a little bit wrong here.
+            for (int i=1;i<10000;i++)
+            {
+                String sJPEGFilename = getFilenameForJPEGSchema(_sJPEGSchema, i);
+                if (FileHelper.exists(sJPEGFilename))
+                {
+                    convertToNearSameFileWithWidth340(sJPEGFilename);
+                    // m_aFileList.add(sNewJPEGFilename); // as long as the files exist, fill the array
+                    nPages ++;
+                }
+                else
+                {
+                    break;                             // stop file check
+                }
+            }
+        }
+        // return nPages;
+    }
+
+/**
+ * convert a picture to a new picture with 340 pixel width.
+ * @param _sJPEGFilename
+ */
+public static void convertToNearSameFileWithWidth340(String _sJPEGFilename)
+{
+    String sNewJPEGFilename;
+    sNewJPEGFilename = util.utils.replaceAll13(_sJPEGFilename, ".jpg", "_w340.jpg");
+    convertToWidth340(_sJPEGFilename, sNewJPEGFilename);
+}
+
+    /**
+ * convert chart2_Regression.ods.ps_180DPI_0001.jpg -filter Catrom -resize
+340x chart2_Regression.ods.ps_180DPI_0001_w340.jpg
+
+Point wie bisher
+Cubic schlecht, weil unscharf
+...
+Triangle ganz brauchbar (default?)
+Catrom am besten
+
+ * @param _sFrom
+ * @param _To
+ */
+private static void convertToWidth340(String _sFrom, String _To)
+{
+            // int nResult = 0;
+
+            String sConvertEXE = "convert";
+            if (OSHelper.isLinuxIntel())
+            {
+                sConvertEXE = "convert";
+            }
+            if (OSHelper.isWindows())
+            {
+                sConvertEXE = "convert.exe";
+            }
+
+            String[] sCommandArray =
+                {
+                    sConvertEXE,
+                    _sFrom,
+                     "-filter", "Catrom",
+                    "-resize", "340x",
+                    _To
+                };
+            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
+            boolean bBackValue = aHandler.executeSynchronously();
+            int nExitCode = aHandler.getExitCode();
+
+            String sBack = aHandler.getOutputText();
+            if (sBack.length() > 0)
+            {
+                GlobalLogWriter.get().println("'" + sBack + "'");
+            }
+            // try to interpret the result, which we get as a String
+//            try
+//            {
+//                int nIdx = sBack.indexOf("\n");
+//                if (nIdx > 0)
+//                {
+//                    sBack = sBack.substring(0, nIdx);
+//                }
+//
+//                nResult = Integer.valueOf(sBack).intValue();
+//            }
+//            catch(java.lang.NumberFormatException e)
+//            {
+//                GlobalLogWriter.get().println("Number format exception");
+//                nResult = 0;
+//            }
+            // return nResult;
+}
+
 /**
  * create out of a given Postscript/PDF _sFile a list of JPEGs, one for every page
  * @param _sFile

qadevOOo/runner/graphical/PixelCounter.java

 // -----------------------------------------------------------------------------
 abstract class CountPixel
 {
-    int m_nCount = 0;
+    protected int m_nCount = 0;
     public int getCount() {return m_nCount;}
     public abstract void count(int _nRGB);
 }
             // System.out.println("CountWhite()");
         }
     
-    public void count(final int pixel)
+    public void countold(final int pixel)
         {
-            final int alpha = (pixel >> 24) & 0xff;
+            // final int alpha = (pixel >> 24) & 0xff;
             final int red   = (pixel >> 16) & 0xff;
             final int green = (pixel >>  8) & 0xff;
             final int blue  = (pixel      ) & 0xff;
             }
             ++m_nCount;
         }
+    public void count(final int pixel)
+        {
+            // final int alpha = (pixel >> 24) & 0xff;
+            final int blue  = (pixel      ) & 0xff;
+            if (blue != 0xff)
+            {
+                ++m_nCount;
+                return;
+            }
+            final int green = (pixel >>  8) & 0xff;
+            if (green != 0xff)
+            {
+                ++m_nCount;
+                return;
+            }
+            final int red   = (pixel >> 16) & 0xff;
+            if (red != 0xff)
+            {
+                ++m_nCount;
+                return;
+            }
+        }
 }
 
 // -----------------------------------------------------------------------------
             // System.out.println("CountBlack()");
         }
     
-    public void count(final int pixel)
+    public void countold(final int pixel)
         {
-            final int alpha = (pixel >> 24) & 0xff;
+            // final int alpha = (pixel >> 24) & 0xff;
             final int red   = (pixel >> 16) & 0xff;
             final int green = (pixel >>  8) & 0xff;
             final int blue  = (pixel      ) & 0xff;
             }
             ++m_nCount;
         }
+    public void count(final int pixel)
+        {
+            // final int alpha = (pixel >> 24) & 0xff;
+            final int blue  = (pixel      ) & 0xff;
+            if (blue != 0x00)
+            {
+                ++m_nCount;
+                return;
+            }
+            final int green = (pixel >>  8) & 0xff;
+            if (green != 0x00)
+            {
+                ++m_nCount;
+                return;
+            }
+            final int red   = (pixel >> 16) & 0xff;
+            if (red != 0x00)
+            {
+                ++m_nCount;
+                return;
+            }
+        }
 }
 
 // -----------------------------------------------------------------------------
         throws java.io.IOException
         {
             ImageHelper aImage = ImageHelper.createImageHelper(_sFile);
-            int nw = graphics_stuff.countNotWhitePixel(aImage);
+            final int nw = graphics_stuff.countNotWhitePixel(aImage);
             return nw;
         }
 
         throws java.io.IOException
         {
             ImageHelper aImage = ImageHelper.createImageHelper(_sFile);
-            int nw = graphics_stuff.countNotBlackPixel(aImage);
+            final int nw = graphics_stuff.countNotBlackPixel(aImage);
             return nw;
         }
     

qadevOOo/runner/helper/APIDescGetter.java

                 // String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
 
                 DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent);
-                meth_names.add(methDesc);
 
                 if (!ifc_name.equals(old_ifc_name))
                 {
                         ifc_name = ifc_name.substring(0, ifc_name.indexOf("#"));
                     }
 
-                    StringTokenizer st = new StringTokenizer(ifc_name, ":");
-                    String className = "";
-
-                    int count = 3;
-
-                    if (ifc_name.startsWith("drafts"))
-                    {
-                        count = 4;
-                    }
-
-                    for (int i = 0; st.hasMoreTokens(); i++)
-                    {
-                        String token = st.nextToken();
-
-                        // skipping (drafts.)com.sun.star
-                        if (i >= count)
-                        {
-                            if (!st.hasMoreTokens())
-                            {
-                                // inserting '_' before the last token
-                                token = "_" + token;
-                            }
-
-                            className += ("." + token);
-                        }
-                    }
+                    String className = createClassName(ifc_name);
 
                     ifcDesc.EntryType = entryType;
                     ifcDesc.entryName = "ifc" + className;
                     ifcDesc.longName = parent.entryName + "::" + ifc_name;
                 }
+                meth_names.add(methDesc);
 
             }
             catch (java.io.IOException ioe)
 
         return getDescArray(makeArray(ifc_names));
     }
+    private static String createClassName(String _ifc_name)
+    {
+        StringTokenizer st = new StringTokenizer(_ifc_name, ":");
+        String className = "";
+
+        int count = 3;
+
+        if (_ifc_name.startsWith("drafts"))
+        {
+            count = 4;
+        }
+
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            String token = st.nextToken();
+
+            // skipping (drafts.)com.sun.star
+            if (i >= count)
+            {
+                if (!st.hasMoreTokens())
+                {
+                    // inserting '_' before the last token
+                    token = "_" + token;
+                }
+
+                className += ("." + token);
+            }
+        }
+        return className;
+    }
+
     private static String entryType;
 
     private static DescEntry createDescEntry(String meth_name, String ifc_name, DescEntry parent)

qadevOOo/runner/helper/OfficeProvider.java

             OfficeWatcherPing owp = new OfficeWatcherPing((OfficeWatcher) param.get(PropertyName.OFFICE_WATCHER));
             owp.start();
 
+            deleteFilesAndDirector (new File(copyLayer));
             FileTools.copyDirectory(new File(userLayer), new File(copyLayer), new String[]
                     {
                         "temp"
                 final String copyLayer = (String) param.get("copyLayer");
                 if (userLayer != null && copyLayer != null)
                 {
+                    deleteFilesAndDirector(new File(userLayer));
                     final File copyFile = new File(copyLayer);
                     dbg("copy '" + copyFile + "' -> '" + userLayer + "'");
                     FileTools.copyDirectory(copyFile, new File(userLayer), new String[]
             }
         }
     }
+
+private void deleteFilesAndDirector(File file)
+        {   
+            File f = file;   
+            if(f.isDirectory())
+            {   
+                File files[] = f.listFiles();   
+                for(int i = 0; i < files.length; i++)
+                {   
+                    deleteFilesAndDirector(files[i]);   
+                }   
+                f.delete();   
+            }
+            else if (f.isFile())
+            {   
+                f.delete();   
+            }   
+        }   
 }

qadevOOo/runner/lib/MultiPropertyTest.java

  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
-
 package lib;
 
 import com.sun.star.beans.Property;
  * @see #compare
  * @see #toString(Object)
  */
-public class MultiPropertyTest extends MultiMethodTest {
+public class MultiPropertyTest extends MultiMethodTest
+{
+
     /**
      * Contains a XPropertySet interface of the tested object. Is initialized
      * in MultiMethodTest code.
     /**
      * Overrides super.before() to check the service is supported by the object.
      */
-    protected void before() {
-        XServiceInfo xInfo = (XServiceInfo)UnoRuntime.queryInterface(
+    protected void before()
+    {
+        XServiceInfo xInfo = (XServiceInfo) UnoRuntime.queryInterface(
                 XServiceInfo.class, oObj);
-        
+
         optionalService = entry.isOptional;
 
         String theService = getTestedClassName();
-        if (xInfo != null && !xInfo.supportsService(theService)) {
-            log.println("Service "+theService+" not available");
-            if (optionalService) {
+        if (xInfo != null && !xInfo.supportsService(theService))
+        {
+            log.println("Service " + theService + " not available");
+            if (optionalService)
+            {
                 log.println("This is OK since it is optional");
-            } else {
+            }
+            else
+            {
                 Status.failed(theService + " is not supported");
             }
         }
      *
      * @see #MultiMethodTest.invokeTestMethod()
      */
-    protected void invokeTestMethod(Method meth, String methName) {
-        if (meth != null) {
+    protected void invokeTestMethod(Method meth, String methName)
+    {
+        if (meth != null)
+        {
             super.invokeTestMethod(meth, methName);
-        } else {
+        }
+        else
+        {
             testProperty(methName);
         }
     }
      * each property separately, by providing subclass of PropertyTester
      * and passing it to testProperty(String, PropertyTester method).
      */
-    public class PropertyTester {
+    public class PropertyTester
+    {
+
         /**
          * The method defines the whole process of testing propName
          * property.
          * @result - adds the result of testing propName property to
          *           MultiMethodTest.tRes.
          */
-        protected void testProperty(String propName) {
+        protected void testProperty(String propName)
+        {
             XPropertySetInfo info = oObj.getPropertySetInfo();
 
-            if (!info.hasPropertyByName(propName)) {
-                if (isOptional(propName) || optionalService) {
-                    // skipping optional property test
-                    log.println("Property '" + propName
-                            + "' is optional and not supported");
-                    tRes.tested(propName,true);
-                    return;
-                } else {
-                    // cannot test the property
-                    log.println("Tested XPropertySet does not contain'"
-                            + propName + "' property");
-                    tRes.tested(propName, false);
-                    return;
+            if (info != null)
+            {
+                if (!info.hasPropertyByName(propName))
+                {
+                    if (isOptional(propName) || optionalService)
+                    {
+                        // skipping optional property test
+                        log.println("Property '" + propName + "' is optional and not supported");
+                        tRes.tested(propName, true);
+                        return;
+                    }
+                    else
+                    {
+                        // cannot test the property
+                        log.println("Tested XPropertySet does not contain'" + propName + "' property");
+                        tRes.tested(propName, false);
+                        return;
+                    }
                 }
             }
 
-            try {
+            try
+            {
                 Object oldValue = oObj.getPropertyValue(propName);
 
                 Object newValue;
 
                 // trying to create new value
-                try {
+                try
+                {
                     newValue = getNewValue(propName, oldValue);
-                } catch (java.lang.IllegalArgumentException e) {
+                }
+                catch (java.lang.IllegalArgumentException e)
+                {
                     // skipping test since new value is not available
-                    Status.failed("Cannot create new value for '"
-                            + propName + " : " + e.getMessage());
+                    Status.failed("Cannot create new value for '" + propName + " : " + e.getMessage());
                     return;
                 }
 
                 // to pass it to checkResult method
                 Exception exception = null;
 
-                try {
+                try
+                {
                     log.println("try to set:");
                     log.println("old = " + toString(oldValue));
                     log.println("new = " + toString(newValue));
                     oObj.setPropertyValue(propName, newValue);
-                } catch(IllegalArgumentException e) {
+                }
+                catch (IllegalArgumentException e)
+                {
                     exception = e;
-                } catch(PropertyVetoException e) {
+                }
+                catch (PropertyVetoException e)
+                {
                     exception = e;
-                } catch(WrappedTargetException e) {
+                }
+                catch (WrappedTargetException e)
+                {
                     exception = e;
-                } catch(UnknownPropertyException e) {
+                }
+                catch (UnknownPropertyException e)
+                {
                     exception = e;
-                } catch(RuntimeException e) {
+                }
+                catch (RuntimeException e)
+                {
                     exception = e;
                 }
 
 
                 // checking results
                 checkResult(propName, oldValue, newValue, resValue, exception);
-            } catch (Exception e) {
+            }
+            catch (Exception e)
+            {
                 log.println("Exception occured while testing property '" + propName + "'");
                 e.printStackTrace(log);
                 tRes.tested(propName, false);
          */
         protected void checkResult(String propName, Object oldValue,
                 Object newValue, Object resValue, Exception exception)
-                    throws Exception {
+                throws Exception
+        {
             XPropertySetInfo info = oObj.getPropertySetInfo();
+            if (info == null)
+            {
+                log.println("Can't get XPropertySetInfo for property " + propName);
+                tRes.tested(propName, false);
+                return;
+            }
             Property prop = info.getPropertyByName(propName);
 
             short attr = prop.Attributes;
-            boolean readOnly = (prop.Attributes
-                    & PropertyAttribute.READONLY) != 0;
-            boolean maybeVoid = (prop.Attributes
-                    & PropertyAttribute.MAYBEVOID) != 0;
+            boolean readOnly = (prop.Attributes & PropertyAttribute.READONLY) != 0;
+            boolean maybeVoid = (prop.Attributes & PropertyAttribute.MAYBEVOID) != 0;
             //check get-set methods
-            if (maybeVoid) log.println("Property "+propName+" is void");
-            if (readOnly) log.println("Property "+propName+" is readOnly");
-            if (util.utils.isVoid(oldValue) && !maybeVoid) {
-                log.println(propName
-                        + " is void, but it's not MAYBEVOID");
+            if (maybeVoid)
+            {
+                log.println("Property " + propName + " is void");
+            }
+            if (readOnly)
+            {
+                log.println("Property " + propName + " is readOnly");
+            }
+            if (util.utils.isVoid(oldValue) && !maybeVoid)
+            {
+                log.println(propName + " is void, but it's not MAYBEVOID");
                 tRes.tested(propName, false);
-            } else if (oldValue == null ) {
-                log.println(propName
-                        + " has null value, and therefore can't be changed");
+            }
+            else if (oldValue == null)
+            {
+                log.println(propName + " has null value, and therefore can't be changed");
                 tRes.tested(propName, true);
-            } else if (readOnly) {
+            }
+            else if (readOnly)
+            {
                 // check if exception was thrown
-                if (exception != null) {
-                    if (exception instanceof PropertyVetoException) {
+                if (exception != null)
+                {
+                    if (exception instanceof PropertyVetoException)
+                    {
                         // the change of read only prohibited - OK
                         log.println("Property is ReadOnly and wasn't changed");
                         log.println("Property '" + propName + "' OK");
                         tRes.tested(propName, true);
-                    } else if (exception instanceof IllegalArgumentException) {
+                    }
+                    else if (exception instanceof IllegalArgumentException)
+                    {
                         // the change of read only prohibited - OK
                         log.println("Property is ReadOnly and wasn't changed");
                         log.println("Property '" + propName + "' OK");
                         tRes.tested(propName, true);
-                    } else if (exception instanceof UnknownPropertyException) {
+                    }
+                    else if (exception instanceof UnknownPropertyException)
+                    {
                         // the change of read only prohibited - OK
                         log.println("Property is ReadOnly and wasn't changed");
                         log.println("Property '" + propName + "' OK");
                         tRes.tested(propName, true);
-                    }else if (exception instanceof RuntimeException) {
+                    }
+                    else if (exception instanceof RuntimeException)
+                    {
                         // the change of read only prohibited - OK
                         log.println("Property is ReadOnly and wasn't changed");
                         log.println("Property '" + propName + "' OK");
                         tRes.tested(propName, true);
-                    } else {
+                    }
+                    else
+                    {
                         throw exception;
                     }
-                } else {
+                }
+                else
+                {
                     // if no exception - check that value
                     // has not changed
-                    if (!compare(resValue, oldValue)) {
-                        log.println("Read only property '"
-                                + propName + "' has changed");
-                        try {
-                            if (!util.utils.isVoid(oldValue) 
-                                                && oldValue instanceof Any) {
-                                oldValue = AnyConverter.toObject
-                                        (new Type(((Any)oldValue).getClass()),oldValue);
+                    if (!compare(resValue, oldValue))
+                    {
+                        log.println("Read only property '" + propName + "' has changed");
+                        try
+                        {
+                            if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
+                            {
+                                oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
                             }
 //                            log.println("old = " + toString(oldValue));
 //                            log.println("new = " + toString(newValue));
                             log.println("result = " + toString(resValue));
-                        } catch(com.sun.star.lang.IllegalArgumentException iae) {
+                        }
+                        catch (com.sun.star.lang.IllegalArgumentException iae)
+                        {
                             log.println("NOTIFY: this property needs further investigations.");
                             log.println("\t The type seems to be an Any with value of NULL.");
                             log.println("\t Maybe the property should get it's own test method.");
                         }
-                        
+
                         tRes.tested(propName, false);
-                    } else {
-                        log.println("Read only property '"
-                                + propName + "' hasn't changed");
+                    }
+                    else
+                    {
+                        log.println("Read only property '" + propName + "' hasn't changed");
                         log.println("Property '" + propName + "' OK");
                         tRes.tested(propName, true);
                     }
                 }
-            } else {
-                if (exception == null) {
+            }
+            else
+            {
+                if (exception == null)
+                {
                     // if no exception thrown
                     // check that the new value is set
-                    if ((!compare(resValue, newValue)) || (compare(resValue, oldValue))) {
-                        log.println("Value for '" + propName
-                                + "' hasn't changed as expected");
-                        try {
-                            if (!util.utils.isVoid(oldValue) 
-                                            && oldValue instanceof Any) {
-                                oldValue = AnyConverter.toObject
-                                        (new Type(((Any)oldValue).getClass()),oldValue);
+                    if ((!compare(resValue, newValue)) || (compare(resValue, oldValue)))
+                    {
+                        log.println("Value for '" + propName + "' hasn't changed as expected");
+                        try
+                        {
+                            if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
+                            {
+                                oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
                             }
 //                            log.println("old = " + toString(oldValue));
 //                            log.println("new = " + toString(newValue));
                             log.println("result = " + toString(resValue));
-                        } catch(com.sun.star.lang.IllegalArgumentException iae) {
+                        }
+                        catch (com.sun.star.lang.IllegalArgumentException iae)
+                        {
                             log.println("NOTIFY: this property needs further investigations.");
                             log.println("\t The type seems to be an Any with value of NULL.");
                             log.println("\t Maybe the property should get it's own test method.");
-                        }                        
-                        if (resValue != null ) {
-                            if ( (!compare(resValue, oldValue)) || (!resValue.equals(oldValue))) {
+                        }
+                        if (resValue != null)
+                        {
+                            if ((!compare(resValue, oldValue)) || (!resValue.equals(oldValue)))
+                            {
                                 log.println("But it has changed.");
                                 tRes.tested(propName, true);
-                            } else {
+                            }
+                            else
+                            {
                                 tRes.tested(propName, false);
                             }
                         }
-                        else {
+                        else
+                        {
                             tRes.tested(propName, false);
                         }
                         //tRes.tested(propName, false);
-                    } else {
+                    }
+                    else
+                    {
                         log.println("Property '" + propName + "' OK");
-                        try {
-                            if (!util.utils.isVoid(oldValue) 
-                                                   && oldValue instanceof Any) {
-                                oldValue = AnyConverter.toObject
-                                        (new Type(((Any)oldValue).getClass()),oldValue);
+                        try
+                        {
+                            if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
+                            {
+                                oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
                             }
 //                            log.println("old = " + toString(oldValue));
 //                            log.println("new = " + toString(newValue));
                             log.println("result = " + toString(resValue));
-                        } catch(com.sun.star.lang.IllegalArgumentException iae) {
+                        }
+                        catch (com.sun.star.lang.IllegalArgumentException iae)
+                        {
                         }
                         tRes.tested(propName, true);
                     }
-                } else {
+                }
+                else
+                {
                     throw exception;
                 }
             }
          * when oldValue is null.
          */
         protected Object getNewValue(String propName, Object oldValue)
-                throws java.lang.IllegalArgumentException {
+                throws java.lang.IllegalArgumentException
+        {
             return ValueChanger.changePValue(oldValue);
         }
 
          * which is not apropriate in some cases(e.g., structs with equals
          * not overridden).
          */
-        protected boolean compare(Object obj1, Object obj2) {
+        protected boolean compare(Object obj1, Object obj2)
+        {
             return callCompare(obj1, obj2);
         }
 
          * MultipropertyTest.toString(Object), but subclasses can override
          * to change the behaviour.
          */
-        protected String toString(Object obj) {
+        protected String toString(Object obj)
+        {
             return callToString(obj);
         }
     }
      * class returns one of these two values depending on the
      * old value, so new value is not equal to old value.
      */
-    public class PropertyValueSwitcher extends PropertyTester {
-        Object val1 = null ;
-        Object val2 = null ;
+    public class PropertyValueSwitcher extends PropertyTester
+    {
+
+        Object val1 = null;
+        Object val2 = null;
 
         /**
          * Constructs a property tester with two different values
          * @param val1 Not <code>null</code> value for the property
          * tested which differs from the first value.
          */
-        public PropertyValueSwitcher(Object val1, Object val2) {
-            this.val1 = val1 ;
-            this.val2 = val2 ;
+        public PropertyValueSwitcher(Object val1, Object val2)
+        {
+            this.val1 = val1;
+            this.val2 = val2;
         }
 
         /**
          * @return The second value if old value is equal to the first
          * one, the first value otherwise.
          */
-        protected Object getNewValue(String propName, Object old) {
+        protected Object getNewValue(String propName, Object old)
+        {
             if (ValueComparer.equalValue(val1, old))
-                return val2 ;
+            {
+                return val2;
+            }
             else
-                return val1 ;
+            {
+                return val1;
+            }
         }
     }
 
     /**
      * The method performs testing of propName property using propTester.
      */
-    protected void testProperty(String propName, PropertyTester propTester) {
+    protected void testProperty(String propName, PropertyTester propTester)
+    {
         propTester.testProperty(propName);
     }
 
      * The method performs testing of propName property. It uses PropertyTester
      * instance for testing.
      */
-    protected void testProperty(String propName) {
+    protected void testProperty(String propName)
+    {
         testProperty(propName, new PropertyTester());
     }
 
      *
      * @see #PropertyValueSwitcher
      */
-    protected void testProperty(String propName, Object val1, Object val2) {
+    protected void testProperty(String propName, Object val1, Object val2)
+    {
         testProperty(propName, new PropertyValueSwitcher(val1, val2));
     }
 
      * The method just calls compare. This is a workaround to CodeWarrior's
      * compiler bug.
      */
-    private boolean callCompare(Object obj1, Object obj2) {
+    private boolean callCompare(Object obj1, Object obj2)
+    {
         return compare(obj1, obj2);
     }
 
     /**
      * Compares two object. In the implementation calls obj1.equals(obj2).
      */
-    protected boolean compare(Object obj1, Object obj2) {
+    protected boolean compare(Object obj1, Object obj2)
+    {
         return ValueComparer.equalValue(obj1, obj2);
     }
 
      * The method just calls toString. This is a workaround to
      * CodeWarrior's compiler bug.
      */
-    private String callToString(Object obj) {
+    private String callToString(Object obj)
+    {
         return toString(obj);
     }
 
      * Gets string representation of the obj. In the implementation
      * returns obj.toString().
      */
-    protected String toString(Object obj) {
+    protected String toString(Object obj)
+    {
         return obj == null ? "null" : obj.toString();
     }
-}
+}

qadevOOo/runner/lib/TestParameters.java

      * This parameter contains the timeout used<br>
      * by the watcher
      */
-    public Integer TimeOut = new Integer(30000);
+    public Integer TimeOut = new Integer(3000000);
 
     /*
      * This parameter contains the timeout used<br>
      * by the complex tests
      */
-    public Integer ThreadTimeOut = new Integer(30000);
+    public Integer ThreadTimeOut = new Integer(3000000);
 
     /*
      * This parameter contains the time which the office could use to close for

qadevOOo/runner/org/openoffice/Runner.java

 
     public static void main(String[] args)
     {
-        System.out.println("OOoRunner Main()");
+        System.out.println("OOoRunner Main() version from 20090825 (yyyymmdd)");
 
         setStartTime(getTime());
 

qadevOOo/runner/util/DesktopTools.java

         }
         catch (com.sun.star.util.CloseVetoException e)
         {
-            e.printStackTrace();
+            // e.printStackTrace();
             System.out.println("Couldn't close document");
         }
         catch (com.sun.star.lang.DisposedException e)
         {
-            e.printStackTrace();
+            // e.printStackTrace();
             System.out.println("Couldn't close document");
         }
         catch (java.lang.NullPointerException e)
         {
-            e.printStackTrace();
+            // e.printStackTrace();
             System.out.println("Couldn't close document");
         }
         catch (com.sun.star.beans.PropertyVetoException e)
         {
-            e.printStackTrace();
+            // e.printStackTrace();
             System.out.println("Couldn't close document");
         }
     }