merged tag ooo/DEV300_m102
[LibreOffice.git] / qadevOOo / runner / convwatch / StatusHelper.java
blobd37fa4a79af48c84bbd85a83ab3f5cd2f406469d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 package convwatch;
30 public class StatusHelper
32 final static public int DIFF_NOT_REALLY_INITIALISED = 1;
33 final static public int DIFF_NO_DIFFERENCES = 2;
34 final static public int DIFF_DIFFERENCES_FOUND = 3;
35 final static public int DIFF_AFTER_MOVE_DONE_NO_PROBLEMS = 4;
36 final static public int DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND = 5;
38 // public String m_sOutputPath;
39 public String m_sMainName;
41 public String m_sOldGfx;
42 public String m_sNewGfx;
43 public String m_sDiffGfx;
44 public int nDiffStatus = DIFF_NOT_REALLY_INITIALISED;
45 public int nPercent = 0;
47 // BorderMove Values
48 public int nPercent2 = 0;
49 public String m_sOld_BM_Gfx;
50 public String m_sNew_BM_Gfx;
51 public String m_sDiff_BM_Gfx;
53 public StatusHelper(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
55 m_sOldGfx = _sOldGfx;
56 m_sNewGfx = _sNewGfx;
57 m_sDiffGfx = _sDiffGfx;
59 public void setFilesForBorderMove(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
61 m_sOld_BM_Gfx = _sOldGfx;
62 m_sNew_BM_Gfx = _sNewGfx;
63 m_sDiff_BM_Gfx = _sDiffGfx;
67 public void printStatus()
69 GlobalLogWriter.get().println(" Original file: " + m_sOldGfx);
70 GlobalLogWriter.get().println(" New file: " + m_sNewGfx);
71 GlobalLogWriter.get().println("Difference file: " + m_sDiffGfx);
72 if (nDiffStatus == DIFF_NOT_REALLY_INITIALISED)
74 GlobalLogWriter.get().println("Early problem, may be the files doesn't exist.");
76 else if (nDiffStatus == DIFF_NO_DIFFERENCES)
78 GlobalLogWriter.get().println("No differences found, ok.");
80 else if (nDiffStatus == DIFF_DIFFERENCES_FOUND)
82 GlobalLogWriter.get().println("Files differ by " + String.valueOf(nPercent) + "%");
84 else if (nDiffStatus == DIFF_AFTER_MOVE_DONE_NO_PROBLEMS)
86 GlobalLogWriter.get().println("No differences found, after move picture.");
88 else if (nDiffStatus == DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND)
90 GlobalLogWriter.get().println("A picture move is done, the files differ by " + String.valueOf(nPercent2) + " old was " + String.valueOf(nPercent) + "%");
92 else
94 GlobalLogWriter.get().println("Unknown DIFF_ values used, not handles yet.");
102 // TODO: stream output
103 // public stream& statusline(stream)
104 // {
105 // stream << name << "PASS" << nDiff==0?"PASS":"FAIL" << endl;
106 // return stream;
107 // }