summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch/PRNCompare.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch/PRNCompare.java')
-rw-r--r--qadevOOo/runner/convwatch/PRNCompare.java109
1 files changed, 0 insertions, 109 deletions
diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java
index dc9b9eb2344f..501ec30ebe17 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -315,115 +315,6 @@ public class PRNCompare
}
- private StatusHelper[] createDiffs(String[] _aRefList, String[] _aPSList, int _nMaxDiffs, TriState _tUseBorderMove)
- {
- if (_nMaxDiffs < 1)
- {
- _nMaxDiffs = 1;
- }
-
- // count, from which file (jpegs) exist more, take the less one
- // more are not compareable
-
- // take the min of both
- int nMin = Math.min(_aRefList.length, _aPSList.length);
- nMin = Math.min(nMin, _nMaxDiffs);
-
- StatusHelper[] aList = new StatusHelper[nMin];
-
-// TODO: if both document do not have same page count, produce an error
-
- int nStatusIndex = 0;
- for (int i=1;i<=nMin;i++)
- {
- String sOldGfx = _aRefList[i];
- String sNewGfx = _aPSList[i];
-
-
- String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx );
- StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
-
- if (sDiffGfx.length() > 0)
- {
- int nResult = identify(sDiffGfx);
- if (nResult == 1)
- {
- aStatus.nDiffStatus = StatusHelper.DIFF_NO_DIFFERENCES;
- }
- else
- {
- try
- {
- int nPercent = estimateGfx(sOldGfx, sNewGfx, sDiffGfx);
-
- aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND;
- aStatus.nPercent = nPercent;
-
- if (nPercent > 75 &&
- ((_tUseBorderMove == TriState.TRUE ) ||
- ((_tUseBorderMove == TriState.UNSET) &&
- m_sDocumentType.indexOf("MS PowerPoint") > 0)))
- {
- _tUseBorderMove = TriState.TRUE;
-// TODO: problem is here, that we have to create some new names.
-
- String sBasename1 = FileHelper.getBasename(sOldGfx);
- String sNameNoSuffix1 = FileHelper.getNameNoSuffix(sBasename1);
- String sBasename2 = FileHelper.getBasename(sNewGfx);
- String sNameNoSuffix2 = FileHelper.getNameNoSuffix(sBasename2);
-
- String sTmpDir = util.utils.getUsersTempDir();
- String fs = System.getProperty("file.separator");
-
- String sOld_BM_Gfx = sTmpDir + fs + sNameNoSuffix1 + "-BM-" + StringHelper.createValueString(i, 4) + ".jpg";
- String sNew_BM_Gfx = sTmpDir + fs + sNameNoSuffix2 + "-BM-" + StringHelper.createValueString(i, 4) + ".jpg";
- try
- {
- BorderRemover a = new BorderRemover();
- a.createNewImageWithoutBorder(sOldGfx, sOld_BM_Gfx);
- a.createNewImageWithoutBorder(sNewGfx, sNew_BM_Gfx);
-
- String sDiff_BM_Gfx = compareJPEGs( sOld_BM_Gfx, sNew_BM_Gfx );
-
- aStatus.setFilesForBorderMove(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx);
-
- if (sDiff_BM_Gfx.length() > 0)
- {
- nResult = identify(sDiff_BM_Gfx);
- if (nResult == 1)
- {
- aStatus.nDiffStatus = StatusHelper.DIFF_AFTER_MOVE_DONE_NO_PROBLEMS;
- aStatus.nPercent2 = 0;
- }
- else
- {
- nPercent = estimateGfx(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx);
- aStatus.nDiffStatus = StatusHelper.DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND;
- aStatus.nPercent2 = nPercent;
- }
- }
- else
- {
- }
- }
- catch(java.io.IOException e)
- {
- GlobalLogWriter.get().println("Exception caught. At border remove: " + e.getMessage());
- }
- }
- }
- catch (java.io.IOException e)
- {
- GlobalLogWriter.get().println(e.getMessage());
- }
- }
-
- }
- aList[nStatusIndex ++] = aStatus;
- }
- return aList;
- }
-
public static String compareJPEGs(String _sOldGfx, String _sNewGfx)
{
String sBasename1 = FileHelper.getBasename(_sOldGfx);