diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-18 13:32:37 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-24 20:45:17 +0000 |
commit | fe095dada4e83129d49c8cc50501aa224d61e0f9 (patch) | |
tree | d351b1938c77c2640438dfc3427fabb8092baca3 /qadevOOo/runner/convwatch | |
parent | df633ac5487fd566fbf526808bb015112bd38e77 (diff) |
java,qadev: remove unused parameters and local vars
Change-Id: Ifb9f9374051fe88dc4cd5a7a28b2c8c992ced873
Reviewed-on: https://gerrit.libreoffice.org/13097
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'qadevOOo/runner/convwatch')
-rw-r--r-- | qadevOOo/runner/convwatch/ConvWatch.java | 5 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/ConvWatchStarter.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/GraphicalTestArguments.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/HTMLOutputter.java | 294 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/INIOutputter.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/IniFile.java | 1 |
6 files changed, 132 insertions, 176 deletions
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java index b1591d40ac09..1c4ac3d08e6b 100644 --- a/qadevOOo/runner/convwatch/ConvWatch.java +++ b/qadevOOo/runner/convwatch/ConvWatch.java @@ -157,7 +157,6 @@ public class ConvWatch } PRNCompare a = new PRNCompare(); - String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile); a.setReferencePath( sReferencePath ); @@ -203,7 +202,7 @@ public class ConvWatch // Status end String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini"; - INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, ""); + INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile); INIoutput.createHeader(); // TODO: version info was fine @@ -265,7 +264,7 @@ public class ConvWatch String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename); String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini"; - INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix); + INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile); INIoutput.createHeader(); // LLA? what if the are no values in the list? true or false; INIoutput.writeSection("global"); diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java index 9c0616252454..520f85079ca9 100644 --- a/qadevOOo/runner/convwatch/ConvWatchStarter.java +++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java @@ -200,7 +200,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase sHTMLName = m_sInputPath.substring(n + 1); sHTMLName += ".html"; } - HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName, ""); + HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName); HTMLoutput.header( m_sOutputPath ); HTMLoutput.indexSection( m_sOutputPath ); LISTOutputter LISToutput = LISTOutputter.create(m_sOutputPath, "allfiles.txt"); diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java index d5cc3c4f5800..2d35b9669eed 100644 --- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java +++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java @@ -234,8 +234,6 @@ public class GraphicalTestArguments // m_tWithBorderMove = TriState.UNSET; } - String sLeaveOutNames = (String)param.get(PropertyName.DOC_COMPARATOR_LEAVE_OUT_FILES); - String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING); if (sDBInfoString != null) { diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java index 087101c97576..9f5b650ea757 100644 --- a/qadevOOo/runner/convwatch/HTMLOutputter.java +++ b/qadevOOo/runner/convwatch/HTMLOutputter.java @@ -22,197 +22,157 @@ import java.io.File; import java.io.FileWriter; import helper.OSHelper; -public class HTMLOutputter -{ +public class HTMLOutputter { private FileWriter m_aOut; private String m_sFilename; - private String m_sNamePrefix; // the HTML files used a suffix to build it's right name /** * ls is the current line separator (carridge return) */ private String ls; - HTMLOutputter() {} - public static HTMLOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix ) - { - FileHelper.makeDirectories("", _sOutputPath); - HTMLOutputter a = new HTMLOutputter(); - String fs = System.getProperty("file.separator"); - String sFilename = _sOutputPath + fs + _sHTMLFilename; - - try - { - File outputFile = new File(sFilename); - a.m_aOut = new FileWriter(outputFile.toString()); - a.ls = System.getProperty("line.separator"); - } - catch (java.io.IOException e) - { - e.printStackTrace(); - GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter"); - return null; - } - a.m_sFilename = sFilename; - a.m_sNamePrefix = _sNamePrefix; - return a; + HTMLOutputter() { + } + + public static HTMLOutputter create(String _sOutputPath, + String _sHTMLFilename) { + FileHelper.makeDirectories("", _sOutputPath); + HTMLOutputter a = new HTMLOutputter(); + String fs = System.getProperty("file.separator"); + String sFilename = _sOutputPath + fs + _sHTMLFilename; + + try { + File outputFile = new File(sFilename); + a.m_aOut = new FileWriter(outputFile.toString()); + a.ls = System.getProperty("line.separator"); + } catch (java.io.IOException e) { + e.printStackTrace(); + GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter"); + return null; } - public String getFilename() {return m_sFilename;} - - public void header(String _sTitle) - { - try - { - m_aOut.write( "<html>" + ls); - m_aOut.write( "<head>" + ls); - m_aOut.write( "<title>" + _sTitle + "</title>" + ls); - m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />" + ls); - m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + ls); - m_aOut.write( "</head>" + ls); - m_aOut.write( "<body bgcolor=white>" + ls); - m_aOut.flush(); - } - catch (java.io.IOException e) - { - } + a.m_sFilename = sFilename; + return a; + } + + public String getFilename() { + return m_sFilename; + } + + public void header(String _sTitle) { + try { + m_aOut.write("<html>" + ls); + m_aOut.write("<head>" + ls); + m_aOut.write("<title>" + _sTitle + "</title>" + ls); + m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />" + + ls); + m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + + ls); + m_aOut.write("</head>" + ls); + m_aOut.write("<body bgcolor=white>" + ls); + m_aOut.flush(); + } catch (java.io.IOException e) { } + } private final static String TEST_TABLETITLE = "Test"; private final static String VISUAL_STATUS_TABLETITLE = "Visual status"; private final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message"; - public void indexSection(String _sOfficeInfo) - { - try - { - m_aOut.write( "<h2>Results for " + _sOfficeInfo + "</h2>" + ls); - m_aOut.write( "<p>Legend:<br>"); - m_aOut.write( stronghtml(FIRSTGFX_TABLETITLE) + " contains the output printed via 'ghostscript' as a jpeg picture.<br>"); - - m_aOut.write( "<table class=\"infotable\">" + ls); - m_aOut.write( "<TR>"); - m_aOut.write( tableHeaderCell(TEST_TABLETITLE)); - m_aOut.write( tableHeaderCell(TEST_TABLETITLE)); - m_aOut.write( tableHeaderCell(VISUAL_STATUS_TABLETITLE)); - m_aOut.write( tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE)); - m_aOut.write( "</TR>" + ls); - m_aOut.flush(); - } - catch (java.io.IOException e) - { - } + public void indexSection(String _sOfficeInfo) { + try { + m_aOut.write("<h2>Results for " + _sOfficeInfo + "</h2>" + ls); + m_aOut.write("<p>Legend:<br>"); + m_aOut.write(stronghtml(FIRSTGFX_TABLETITLE) + + " contains the output printed via 'ghostscript' as a jpeg picture.<br>"); + + m_aOut.write("<table class=\"infotable\">" + ls); + m_aOut.write("<TR>"); + m_aOut.write(tableHeaderCell(TEST_TABLETITLE)); + m_aOut.write(tableHeaderCell(TEST_TABLETITLE)); + m_aOut.write(tableHeaderCell(VISUAL_STATUS_TABLETITLE)); + m_aOut.write(tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE)); + m_aOut.write("</TR>" + ls); + m_aOut.flush(); + } catch (java.io.IOException e) { } + } + + private String getHREF(String _sHREF, String _sPathInfo) { + StringBuffer a = new StringBuffer(); + if (!OSHelper.isWindows()) { + a.append("<A HREF=\""); + a.append(_sHREF); + a.append("\">"); + a.append(_sPathInfo); + a.append("</A>"); + } else { + // ! this should be replaced by a better method + // ! name(WIN|UNIX) + a.append("<A HREF=\""); + a.append(_sHREF); + a.append("\">"); + a.append(_sPathInfo); + a.append("</A>"); - private String getHREF(String _sHREF, String _sPathInfo) - { - StringBuffer a = new StringBuffer(); - if (! OSHelper.isWindows()) - { - a.append("<A HREF=\""); - a.append(_sHREF); - a.append("\">"); - a.append(_sPathInfo); - a.append("</A>"); - } - else - { - //! this should be replaced by a better method - //! name(WIN|UNIX) - a.append("<A HREF=\""); - a.append(_sHREF); - a.append("\">"); - a.append(_sPathInfo); - a.append("</A>"); - - } - return a.toString(); } + return a.toString(); + } + + private String tableDataCell(String _sValue) { + StringBuffer a = new StringBuffer(); + a.append("<TD>"); + a.append(_sValue); + a.append("</TD>"); + return a.toString(); + } + + private String tableHeaderCell(String _sValue) { + StringBuffer a = new StringBuffer(); + a.append("<TH>"); + a.append(_sValue); + a.append("</TH>"); + return a.toString(); + } + + public void indexLine(String _sHTMLFile, String _sHTMLName, + String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough, + String _sStatusMessage) { + try { + m_aOut.write("<TR>"); + m_aOut.write(tableDataCell(getHREF(_sHTMLFile, _sHTMLName))); + if (_sHTMLFile2.length() > 0) { + m_aOut.write(tableDataCell(getHREF(_sHTMLFile2, _sHTMLName2))); + } else { + m_aOut.write(tableDataCell("")); + } - private String tableDataCell(String _sValue) - { - StringBuffer a = new StringBuffer(); - a.append("<TD>"); - a.append(_sValue); - a.append("</TD>"); - return a.toString(); - } + m_aOut.write(tableDataCell(_sStatusRunThrough)); + m_aOut.write(tableDataCell(_sStatusMessage)); + m_aOut.write("</TR>" + ls); - private String tableHeaderCell(String _sValue) - { - StringBuffer a = new StringBuffer(); - a.append("<TH>"); - a.append(_sValue); - a.append("</TH>"); - return a.toString(); - } - - public void indexLine(String _sHTMLFile, String _sHTMLName, String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough, String _sStatusMessage) - { - try - { - m_aOut.write( "<TR>"); - m_aOut.write(tableDataCell( getHREF(_sHTMLFile, _sHTMLName) ) ); - if (_sHTMLFile2.length() > 0) - { - m_aOut.write(tableDataCell( getHREF(_sHTMLFile2, _sHTMLName2) ) ); - } - else - { - m_aOut.write(tableDataCell( "" ) ); - } - - m_aOut.write( tableDataCell(_sStatusRunThrough) ); - m_aOut.write( tableDataCell(_sStatusMessage) ); - m_aOut.write( "</TR>" + ls); - - m_aOut.flush(); - } - catch (java.io.IOException e) - { - } + m_aOut.flush(); + } catch (java.io.IOException e) { } - - public void close() - { - try - { - m_aOut.write( "</TABLE>" + ls); - m_aOut.write( "</BODY></HTML>" + ls); - m_aOut.flush(); - m_aOut.close(); - } - catch (java.io.IOException e) - { - } + } + + public void close() { + try { + m_aOut.write("</TABLE>" + ls); + m_aOut.write("</BODY></HTML>" + ls); + m_aOut.flush(); + m_aOut.close(); + } catch (java.io.IOException e) { } + } - - private String stronghtml(String _sValue) - { - StringBuffer a = new StringBuffer(); - a.append("<STRONG>"); - a.append(_sValue); - a.append("</STRONG>"); - return a.toString(); - } + private String stronghtml(String _sValue) { + StringBuffer a = new StringBuffer(); + a.append("<STRONG>"); + a.append(_sValue); + a.append("</STRONG>"); + return a.toString(); + } private final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg"; - private final static String SECONDGFX_TABLETITLE = "New print file as jpeg"; - private final static String DIFFER_TABLETITLE = "Difference file"; - private final static String STATUS_TABLETITLE = "Status"; - private final static String PIXELDIFF_TABLETITLE = "Pixel difference in %"; - - private final static String PIXELDIFF_BM_TABLETITLE = "P.diff. in % after remove border"; - private final static String DIFFER_BM_TABLETITLE = "Diff file (RB)"; - - private final static String OK_TABLETITLE = "OK?"; - - - - - - - - } diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java index 416519b33ce7..63a6eecd8335 100644 --- a/qadevOOo/runner/convwatch/INIOutputter.java +++ b/qadevOOo/runner/convwatch/INIOutputter.java @@ -28,11 +28,11 @@ public class INIOutputter /** - * ls is the current line separator (carridge return) + * ls is the current line separator (carriage return) */ private String ls; - public static INIOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix ) + public static INIOutputter create( String _sOutputPath, String _sHTMLFilename ) { FileHelper.makeDirectories("", _sOutputPath); INIOutputter a = new INIOutputter(); diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java index 08e9629883ad..ddab207d1769 100644 --- a/qadevOOo/runner/convwatch/IniFile.java +++ b/qadevOOo/runner/convwatch/IniFile.java @@ -34,7 +34,6 @@ class IniFile */ private final String m_sFilename; private final ArrayList<String> m_aList; - private final boolean m_bListContainUnsavedChanges = false; /** open a ini file by its name |