summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-21 08:24:17 +0200
committerNoel Grandin <noel@peralex.com>2014-10-07 13:20:03 +0200
commit81968336ea6433293c603110a75bd13d5898c0eb (patch)
treec4bc0f45710302f3bd6734388ae9ff01d59c68ad /qadevOOo
parentf9be44340a1fbabb67c7a33d8c9b4766a56c1fde (diff)
java: use equalsIgnoreCase() instead of toLowerCase().equals()
Change-Id: I8f4afc7e15a9d85d99ea80edbbbd2b507b254ddc
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java2
-rw-r--r--qadevOOo/runner/convwatch/EnhancedComplexTestCase.java8
-rw-r--r--qadevOOo/runner/convwatch/GraphicalTestArguments.java34
-rw-r--r--qadevOOo/runner/convwatch/MSOfficePrint.java6
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java12
-rw-r--r--qadevOOo/runner/graphical/EnhancedComplexTestCase.java2
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java2
-rw-r--r--qadevOOo/runner/graphical/Office.java12
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java8
-rw-r--r--qadevOOo/runner/graphical/ParameterHelper.java12
-rw-r--r--qadevOOo/runner/util/compare/DocComparatorFactory.java4
11 files changed, 51 insertions, 51 deletions
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index 63252153660d..00df1ed351b9 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -197,7 +197,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
}
GraphicalTestArguments aGTA = getGraphicalTestArguments();
- if (aGTA.getOfficeProgram().toLowerCase().equals("msoffice"))
+ if (aGTA.getOfficeProgram().equalsIgnoreCase("msoffice"))
{
// ReferenceType is MSOffice
GlobalLogWriter.get().println("USE MSOFFICE AS EXPORT FORMAT.");
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 714668025fca..47e23fcca052 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -79,8 +79,8 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
{
sNEEDCHECK = "false";
}
- if (sNEEDCHECK.toLowerCase().equals("yes") ||
- sNEEDCHECK.toLowerCase().equals("true"))
+ if (sNEEDCHECK.equalsIgnoreCase("yes") ||
+ sNEEDCHECK.equalsIgnoreCase("true"))
{
return true;
}
@@ -92,11 +92,11 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
public GraphicalTestArguments getGraphicalTestArguments()
{
GraphicalTestArguments aGTA = new GraphicalTestArguments(param);
- if (aGTA.getImportFilterName() != null && aGTA.getImportFilterName().toLowerCase().equals("help"))
+ if (aGTA.getImportFilterName() != null && aGTA.getImportFilterName().equalsIgnoreCase("help"))
{
aGTA = null;
}
- if (aGTA.getExportFilterName() != null && aGTA.getExportFilterName().toLowerCase().equals("help"))
+ if (aGTA.getExportFilterName() != null && aGTA.getExportFilterName().equalsIgnoreCase("help"))
{
aGTA = null;
}
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index d52add3fb27c..49fb1e07dc9b 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -143,8 +143,8 @@ public class GraphicalTestArguments
{
sRECURSIVE = "true";
}
- if (sRECURSIVE.toLowerCase().equals("no") ||
- sRECURSIVE.toLowerCase().equals("false"))
+ if (sRECURSIVE.equalsIgnoreCase("no") ||
+ sRECURSIVE.equalsIgnoreCase("false"))
{
m_bIncludeSubdirectories = false;
}
@@ -166,7 +166,7 @@ public class GraphicalTestArguments
{
m_sImportFilterName = sImportFilterName;
- if (sImportFilterName.toLowerCase().equals("help"))
+ if (sImportFilterName.equalsIgnoreCase("help"))
{
showInternalFilterName(sImportFilterName, getMultiServiceFactory() );
GlobalLogWriter.get().println("Must quit.");
@@ -177,7 +177,7 @@ public class GraphicalTestArguments
if (sExportFilterName != null && sExportFilterName.length() > 0)
{
m_sExportFilterName = sExportFilterName;
- if (sExportFilterName.toLowerCase().equals("help"))
+ if (sExportFilterName.equalsIgnoreCase("help"))
{
showInternalFilterName(sExportFilterName, getMultiServiceFactory() );
GlobalLogWriter.get().println("Must quit.");
@@ -196,8 +196,8 @@ public class GraphicalTestArguments
{
sREUSE_OFFICE = "false";
}
- if (sREUSE_OFFICE.toLowerCase().equals("yes") ||
- sREUSE_OFFICE.toLowerCase().equals("true"))
+ if (sREUSE_OFFICE.equalsIgnoreCase("yes") ||
+ sREUSE_OFFICE.equalsIgnoreCase("true"))
{
m_bResuseOffice = true;
}
@@ -224,13 +224,13 @@ public class GraphicalTestArguments
// m_tWithBorderMove = TriState.UNSET;
m_tWithBorderMove = TriState.FALSE;
}
- if (sWithBorderMove.toLowerCase().equals("yes") ||
- sWithBorderMove.toLowerCase().equals("true"))
+ if (sWithBorderMove.equalsIgnoreCase("yes") ||
+ sWithBorderMove.equalsIgnoreCase("true"))
{
m_tWithBorderMove = TriState.TRUE;
}
- else if (sWithBorderMove.toLowerCase().equals("no") ||
- sWithBorderMove.toLowerCase().equals("false"))
+ else if (sWithBorderMove.equalsIgnoreCase("no") ||
+ sWithBorderMove.equalsIgnoreCase("false"))
{
m_tWithBorderMove = TriState.FALSE;
}
@@ -262,8 +262,8 @@ public class GraphicalTestArguments
String sOfficeViewable = (String)param.get(PropertyName.OFFICE_VIEWABLE);
if (sOfficeViewable != null)
{
- if (sOfficeViewable.toLowerCase().equals("yes") ||
- sOfficeViewable.toLowerCase().equals("true"))
+ if (sOfficeViewable.equalsIgnoreCase("yes") ||
+ sOfficeViewable.equalsIgnoreCase("true"))
{
setViewable();
}
@@ -276,8 +276,8 @@ public class GraphicalTestArguments
String sCreateDefault = (String)param.get(PropertyName.CREATE_DEFAULT);
if (sCreateDefault != null)
{
- if (sCreateDefault.toLowerCase().equals("yes") ||
- sCreateDefault.toLowerCase().equals("true"))
+ if (sCreateDefault.equalsIgnoreCase("yes") ||
+ sCreateDefault.equalsIgnoreCase("true"))
{
m_bCreateDefaultReference = true;
}
@@ -334,7 +334,7 @@ public class GraphicalTestArguments
if (aNameAccess != null)
{
- if (_sFilterName.toLowerCase().equals("help"))
+ if (_sFilterName.equalsIgnoreCase("help"))
{
GlobalLogWriter.get().println("Show all possible ElementNames from current version." );
String[] aElementNames = aNameAccess.getElementNames();
@@ -372,8 +372,8 @@ public class GraphicalTestArguments
XMultiServiceFactory xMSF = m_aCurrentParams.getMSF();
// check if MultiServiceFactory is given
- if (getReferenceType().toLowerCase().equals("pdf") ||
- getReferenceType().toLowerCase().equals("ooo"))
+ if (getReferenceType().equalsIgnoreCase("pdf") ||
+ getReferenceType().equalsIgnoreCase("ooo"))
{
if (xMSF == null)
{
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index b80bdf57331e..62d8c54e391f 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -115,10 +115,10 @@ public class MSOfficePrint
else if (isPowerPointDocument(sDocumentSuffix))
{
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable.
- if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel"))
+ if (_aGTA.getDefaultXMLFormatApp().equalsIgnoreCase("excel"))
{
aStartCommand = createExcelStoreHelper();
}
@@ -169,7 +169,7 @@ public class MSOfficePrint
{
aStartCommand = createPowerPointPrintHelper();
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// TODO: Open XML File and check if we need excel or word
String sOfficeType = getOfficeType(_sInputFile);
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 38273ecf9c4e..75f117e4bfa6 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -699,16 +699,16 @@ public class OfficePrint {
return true;
}
- if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
+ if (_aGTA.getReferenceType().equalsIgnoreCase("msoffice"))
{
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("pdf"))
{
// TODO: If we rename the stored file to *.pdf, we have to be sure that we use *.pdf also as a available reference
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("ooo"))
{
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
}
@@ -737,16 +737,16 @@ public class OfficePrint {
}
- if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
+ if (_aGTA.getReferenceType().equalsIgnoreCase("ooo"))
{
bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("pdf"))
{
GlobalLogWriter.get().println("USE PDF AS EXPORT FORMAT.");
bBack = storeAsPDF(_aGTA, _sInputFileURL, _sPrintFileURL);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("msoffice"))
{
if (MSOfficePrint.isMSOfficeDocumentFormat(_sInputFileURL))
{
diff --git a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
index dcde84492cc4..6f61d4f90a5b 100644
--- a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
@@ -158,7 +158,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
File aInputPathWithPDF = new File(sInputPathWithPDF);
if (aInputPathWithPDF.exists() &&
- _aParam.getReferenceType().toLowerCase().equals("pdf"))
+ _aParam.getReferenceType().equalsIgnoreCase("pdf"))
{
// create PDF only if a pdf file exists and creatortype is set to PDF
callEntry(sInputPathWithPDF, _aParam);
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index 9e2a9c38ced1..19955a5c04e4 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -185,7 +185,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
aStartCommand = createPowerPointPrintHelper();
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// TODO: Open XML File and check if we need excel or word
String sOfficeType = getOfficeType(_sInputFile);
diff --git a/qadevOOo/runner/graphical/Office.java b/qadevOOo/runner/graphical/Office.java
index 0a08986c4af7..0cba0f63fd70 100644
--- a/qadevOOo/runner/graphical/Office.java
+++ b/qadevOOo/runner/graphical/Office.java
@@ -32,14 +32,14 @@ public class Office implements IOffice
m_aParameterHelper = _aParam;
m_sResult = _sResult;
- if (_aParam.getReferenceType().toLowerCase().equals("ooo") ||
- _aParam.getReferenceType().toLowerCase().equals("o3") ||
- _aParam.getReferenceType().toLowerCase().equals("ps") ||
- _aParam.getReferenceType().toLowerCase().equals("pdf"))
+ if (_aParam.getReferenceType().equalsIgnoreCase("ooo") ||
+ _aParam.getReferenceType().equalsIgnoreCase("o3") ||
+ _aParam.getReferenceType().equalsIgnoreCase("ps") ||
+ _aParam.getReferenceType().equalsIgnoreCase("pdf"))
{
m_aOffice = new OpenOfficePostscriptCreator(_aParam, m_sResult);
}
- else if (_aParam.getReferenceType().toLowerCase().equals("msoffice"))
+ else if (_aParam.getReferenceType().equalsIgnoreCase("msoffice"))
{
m_aOffice = new MSOfficePostscriptCreator(_aParam, m_sResult);
}
@@ -67,7 +67,7 @@ public class Office implements IOffice
{
if (sDocumentSuffix.toLowerCase().endsWith(".odb"))
{
- if (m_aParameterHelper.getReferenceType().toLowerCase().equals("msoffice"))
+ if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("msoffice"))
{
// we can't handle .odb with msoffice
return;
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 7dc60e8cac71..2ab39107c3ce 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -89,9 +89,9 @@ public class OpenOfficePostscriptCreator implements IOffice
if (m_aDocument != null)
{
String sDocumentName = FileHelper.appendPath(m_sOutputURL, m_sBasename);
- if (m_aParameterHelper.getReferenceType().toLowerCase().equals("ooo") ||
- m_aParameterHelper.getReferenceType().toLowerCase().equals("o3") ||
- m_aParameterHelper.getReferenceType().toLowerCase().equals("ps") )
+ if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("ooo") ||
+ m_aParameterHelper.getReferenceType().equalsIgnoreCase("o3") ||
+ m_aParameterHelper.getReferenceType().equalsIgnoreCase("ps") )
{
String sPrintURL = sDocumentName + ".ps";
@@ -99,7 +99,7 @@ public class OpenOfficePostscriptCreator implements IOffice
String sBasename = FileHelper.getBasename(sPrintURL);
FileHelper.addBasenameToIndex(m_sOutputURL, sBasename, "OOo", "postscript", m_sDocumentName);
}
- else if (m_aParameterHelper.getReferenceType().toLowerCase().equals("pdf"))
+ else if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("pdf"))
{
String sPDFURL = sDocumentName + ".pdf";
storeAsPDF(m_aParameterHelper, m_aDocument, sPDFURL);
diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java
index ec7c4b3ed96e..6658564ae9e7 100644
--- a/qadevOOo/runner/graphical/ParameterHelper.java
+++ b/qadevOOo/runner/graphical/ParameterHelper.java
@@ -135,8 +135,8 @@ public class ParameterHelper
{
sRECURSIVE = "true";
}
- if (sRECURSIVE.toLowerCase().equals("no") ||
- sRECURSIVE.toLowerCase().equals("false"))
+ if (sRECURSIVE.equalsIgnoreCase("no") ||
+ sRECURSIVE.equalsIgnoreCase("false"))
{
m_bIncludeSubdirectories = false;
}
@@ -219,10 +219,10 @@ public class ParameterHelper
XMultiServiceFactory xMSF = m_aCurrentParams.getMSF();
// check if MultiServiceFactory is given
- if (getReferenceType().toLowerCase().equals("pdf") ||
- getReferenceType().toLowerCase().equals("ps") ||
- getReferenceType().toLowerCase().equals("ooo") ||
- getReferenceType().toLowerCase().equals("o3") )
+ if (getReferenceType().equalsIgnoreCase("pdf") ||
+ getReferenceType().equalsIgnoreCase("ps") ||
+ getReferenceType().equalsIgnoreCase("ooo") ||
+ getReferenceType().equalsIgnoreCase("o3") )
{
if (xMSF == null)
{
diff --git a/qadevOOo/runner/util/compare/DocComparatorFactory.java b/qadevOOo/runner/util/compare/DocComparatorFactory.java
index a6f216289292..9b6413c5e8a3 100644
--- a/qadevOOo/runner/util/compare/DocComparatorFactory.java
+++ b/qadevOOo/runner/util/compare/DocComparatorFactory.java
@@ -29,11 +29,11 @@ public class DocComparatorFactory
*/
static public DocComparator createComparator(String s, TestParameters aParams) throws IllegalArgumentException
{
- if (s.toLowerCase().equals("gfx") || s.toLowerCase().equals("graphical"))
+ if (s.equalsIgnoreCase("gfx") || s.equalsIgnoreCase("graphical"))
{
return GraphicalComparator.getInstance(aParams);
}
- else if (s.toLowerCase().equals("pdf"))
+ else if (s.equalsIgnoreCase("pdf"))
{
throw new IllegalArgumentException("PDF not implemented yet.");
}