diff options
Diffstat (limited to 'qadevOOo/runner/convwatch/GfxCompare.java')
-rw-r--r-- | qadevOOo/runner/convwatch/GfxCompare.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qadevOOo/runner/convwatch/GfxCompare.java b/qadevOOo/runner/convwatch/GfxCompare.java index b45897475c23..a2baadf60c3e 100644 --- a/qadevOOo/runner/convwatch/GfxCompare.java +++ b/qadevOOo/runner/convwatch/GfxCompare.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,13 +53,13 @@ public class GfxCompare extends EnhancedComplexTestCase * Return all test methods. * @return The test methods. */ - + public String[] getTestMethodNames() { return new String[]{"gfxcompare"}; } /** - * + * * @return a List of software which must accessable as an external executable */ protected Object[] mustInstalledSoftware() @@ -95,7 +95,7 @@ public class GfxCompare extends EnhancedComplexTestCase String sFile2 = (String)param.get("FILE2"); compare(sFile1, sFile2); } - + // ----------------------------------------------------------------------------- String createJPEG(String _sFile, String _sAdditional) @@ -122,20 +122,20 @@ public class GfxCompare extends EnhancedComplexTestCase String sFileDir = FileHelper.getPath(_sFile); String sBasename = FileHelper.getBasename(_sFile); String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename); - + String fs = System.getProperty("file.separator"); String sTmpDir = util.utils.getUsersTempDir(); if (m_aArguments.getOutputPath() != null) { sTmpDir = m_aArguments.getOutputPath(); } - + if (_sFile.toLowerCase().endsWith("ps") || _sFile.toLowerCase().endsWith("prn") || _sFile.toLowerCase().endsWith("pdf")) { // seems to be a Postscript of PDF file - + String[] aList = PRNCompare.createJPEGFromPostscript(sTmpDir, sFileDir, sBasename, m_aArguments.getResolutionInDPI()); sJPEGFile = aList[0]; } @@ -173,8 +173,8 @@ public class GfxCompare extends EnhancedComplexTestCase } return sJPEGFile; } - - + + public String compare(String _sFile1, String _sFile2) { String sJPEGFile1 = createJPEG(_sFile1, "-1"); @@ -183,7 +183,7 @@ public class GfxCompare extends EnhancedComplexTestCase if (sJPEGFile1.length() > 0 && sJPEGFile2.length() > 0) { String sDiffFile = PRNCompare.compareJPEGs(sJPEGFile1, sJPEGFile2); - + if (sDiffFile.length() > 0) { GlobalLogWriter.get().println("Difference created: " + sDiffFile); |