1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package convwatch;
25 
26 import com.sun.star.lang.XMultiServiceFactory;
27 import lib.TestParameters;
28 import java.io.File;
29 
30 import com.sun.star.container.XNameAccess;
31 import com.sun.star.uno.UnoRuntime;
32 
33 /**
34  * This class object is more a Helper or Controller.
35  * It stores information like:
36  * - How to create a document (with a OpenOffice.org method, or with MS Word, or with OpenOffice.org as pdf)
37  * - some more infos for OpenOffice.org method
38  *   - a service factory pointer
39  *   - if hidden mode should use
40  *   - target name
41  *
42  * - printer name
43  *
44  * - how to handle .xml files, which in Microsoft could be Excel or Word documents
45  *
46  * HOWTO USE:
47  * For OOo,
48  *   create an GraphicalTestArguments with a set of TestParameters
49  *    GraphicalTestArguments a = new GraphicalTestArguments(params);
50  *
51  *  If you wish to use pdf export instead of normal printer output, set also the reference type to 'pdf'
52  *    a.setReferenceType("pdf");
53  *
54  *
55  * For MS Office:
56  *   create an GraphicalTestArguments and set the reference type to 'msoffice'
57  *    GraphicalTestArguments a = new GraphicalTestArguments(params);
58  *    a.setReferenceType("msoffice");
59  *
60  * within windows it's better to set also a printer name so it's simply possible to use for normal work the default printer
61  * and for such tests with ConvWatch a extra printer.
62  *    a.setPrinterName("CrossOffice Printer");
63  *
64  */
65 
66 public class GraphicalTestArguments
67 {
68     /**
69     2DO:
70     Possible reference types are currently
71     // ooo
72     // pdf
73     // msoffice
74     */
75     String m_sReferenceType = "OOo";
76 
77     String m_sTargetFrameName = "_blank";
78 
79     String m_sPrinterName = null;
80 
81     // Hidden = true hiddes a used OpenOffice.org, all code is executed in the background
82     // This parameter is not used for RefType: msoffice
83     boolean m_bHidden = true;
84 
85     String m_sDefaultXMLFormatApplication = null;
86 
87     boolean m_bIncludeSubdirectories;
88 
89     TestParameters m_aCurrentParams;
90 
91     int m_nMaxPages = 0;                           // default is 0 (print all pages)
92     String m_sOnlyPage = "";                       // default is "", there is no page which we want to print only.
93 
94     int m_nResolutionInDPI = 0;
95 
96     boolean m_bStoreFile = true;
97     boolean m_bResuseOffice = false;
98 
99     boolean m_bDebugMode = false;
100 
101     String m_sLeaveOutNames = null;
102 
103     String m_sDistinct = null;
104 
105     boolean m_bCreateDefaultReference = false;
106 
107     // CONSTRUCTOR
GraphicalTestArguments()108     private GraphicalTestArguments(){}
109 
GraphicalTestArguments(TestParameters param)110     public GraphicalTestArguments(TestParameters param)
111         {
112             m_aCurrentParams = param;
113             // collect interesting information from the ComplexTestCase
114             // ....
115 
116             // REFERENCE_TYPE ----------
117             String sReferenceType = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_TYPE );
118             if (sReferenceType == null || sReferenceType.length() == 0)
119             {
120             }
121             else
122             {
123                 // log.println("found REFERENCE_TYPE " + sReferenceType );
124                 setReferenceType(sReferenceType);
125             }
126 
127             // PRINTER_NAME ----------
128             String sPrinterName = (String)param.get( PropertyName.DOC_COMPARATOR_PRINTER_NAME );
129             if (sPrinterName == null || sPrinterName.length() == 0)
130             {
131             }
132             else
133             {
134                 // log.println("found PRINTER_NAME " + sPrinterName );
135                 setPrinterName(sPrinterName);
136             }
137             // DEFAULT_XML_FORMAT_APP ------
138             String sDefaultXMLFormatApp = (String)param.get( PropertyName.DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP );
139             if (sDefaultXMLFormatApp == null || sDefaultXMLFormatApp.length() == 0)
140             {
141             }
142             else
143             {
144                 setDefaultXMLFormatApp(sDefaultXMLFormatApp);
145             }
146 
147             m_bIncludeSubdirectories = true;
148             String sRECURSIVE = (String)param.get( PropertyName.DOC_COMPARATOR_INCLUDE_SUBDIRS );
149 // TODO: I need to get the boolean value with get("name") because, if it is not given getBool() returns
150 //       with a default of 'false' which is not very helpful if the default should be 'true'
151 //       maybe a getBoolean("name", true) could be a better choise.
152             if (sRECURSIVE == null)
153             {
154                 sRECURSIVE = "true";
155             }
156             if (sRECURSIVE.toLowerCase().equals("no") ||
157                 sRECURSIVE.toLowerCase().equals("false"))
158             {
159                 m_bIncludeSubdirectories = false;
160             }
161 
162             // ----------------------------------------
163             m_nMaxPages = param.getInt( PropertyName.DOC_COMPARATOR_PRINT_MAX_PAGE );
164             m_sOnlyPage = (String)param.get(PropertyName.DOC_COMPARATOR_PRINT_ONLY_PAGE);
165 
166             m_nResolutionInDPI = param.getInt( PropertyName.DOC_COMPARATOR_GFX_OUTPUT_DPI_RESOLUTION );
167             if (m_nResolutionInDPI == 0)
168             {
169                 // 212 DPI is 1754 x 2474 pixel for DIN A4
170                 m_nResolutionInDPI = 212;
171             }
172 
173             // ----------------------------------------
174             String sImportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME);
175             if (sImportFilterName != null && sImportFilterName.length() > 0)
176             {
177                 // System.out.println("found " + PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME + " " + sImportFilterName );
178                 m_sImportFilterName = sImportFilterName;
179 
180                 if (sImportFilterName.toLowerCase().equals("help"))
181                 {
182                     showInternalFilterName(sImportFilterName, getMultiServiceFactory() );
183                     GlobalLogWriter.get().println("Must quit.");
184                 }
185             }
186             // ----------------------------------------
187             String sExportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME);
188             if (sExportFilterName != null && sExportFilterName.length() > 0)
189             {
190                 // System.out.println("found " + PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME + " " + sExportFilterName );
191                 m_sExportFilterName = sExportFilterName;
192                 if (sExportFilterName.toLowerCase().equals("help"))
193                 {
194                     showInternalFilterName(sExportFilterName, getMultiServiceFactory() );
195                     GlobalLogWriter.get().println("Must quit.");
196                 }
197             }
198 
199             // ----------------------------------------
200             String sOfficeProgram = (String)param.get(PropertyName.DOC_CONVERTER_OFFICE_PROGRAM);
201             if (sOfficeProgram != null && sOfficeProgram.length() > 0)
202             {
203                 m_sOfficeProgram = sOfficeProgram;
204             }
205             // ----------------------------------------
206             String sREUSE_OFFICE = (String)param.get( PropertyName.DOC_CONVERTER_REUSE_OFFICE);
207             if (sREUSE_OFFICE == null)
208             {
209                 sREUSE_OFFICE = "false";
210             }
211             if (sREUSE_OFFICE.toLowerCase().equals("yes") ||
212                 sREUSE_OFFICE.toLowerCase().equals("true"))
213             {
214                 m_bResuseOffice = true;
215             }
216             else
217             {
218                 m_bResuseOffice = false;
219             }
220 
221 
222             String sHTMLOutputPrefix = (String)param.get( PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX);
223             if (sHTMLOutputPrefix == null)
224             {
225                 m_sHTMLOutputPrefix = "";
226             }
227             else
228             {
229                 m_sHTMLOutputPrefix = sHTMLOutputPrefix;
230             }
231 
232             String sWithBorderMove = (String)param.get( PropertyName.DOC_COMPARATOR_GFXCMP_WITH_BORDERMOVE);
233             if (sWithBorderMove == null)
234             {
235                 sWithBorderMove = "";
236                 // m_tWithBorderMove = TriState.UNSET;
237                 m_tWithBorderMove = TriState.FALSE;
238             }
239             if (sWithBorderMove.toLowerCase().equals("yes") ||
240                 sWithBorderMove.toLowerCase().equals("true"))
241             {
242                 m_tWithBorderMove = TriState.TRUE;
243             }
244             else if (sWithBorderMove.toLowerCase().equals("no") ||
245                      sWithBorderMove.toLowerCase().equals("false"))
246             {
247                 m_tWithBorderMove = TriState.FALSE;
248             }
249             else
250             {
251                 m_tWithBorderMove = TriState.FALSE;
252                 // m_tWithBorderMove = TriState.UNSET;
253             }
254 
255             String sLeaveOutNames = (String)param.get(PropertyName.DOC_COMPARATOR_LEAVE_OUT_FILES);
256             if (sLeaveOutNames != null)
257             {
258                 m_sLeaveOutNames = sLeaveOutNames;
259             }
260 
261             String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING);
262             if (sDBInfoString != null)
263             {
264                 m_sDBInfoString = sDBInfoString;
265             }
266 
267             // DISTINCT ----------
268             String sDistinct = (String)param.get( "DISTINCT" );
269             if (sDistinct == null || sDistinct.length() == 0)
270             {
271                 sDistinct = "";
272             }
273             else
274             {
275                 m_sDistinct = sDistinct;
276             }
277             // HIDDEN
278             String sOfficeViewable = (String)param.get(PropertyName.OFFICE_VIEWABLE);
279             if (sOfficeViewable != null)
280             {
281                 if (sOfficeViewable.toLowerCase().equals("yes") ||
282                     sOfficeViewable.toLowerCase().equals("true"))
283                 {
284                     setViewable();
285                 }
286                 else
287                 {
288                     setHidden();
289                 }
290             }
291             // CREATE_DEFAULT
292             String sCreateDefault = (String)param.get(PropertyName.CREATE_DEFAULT);
293             if (sCreateDefault != null)
294             {
295                 if (sCreateDefault.toLowerCase().equals("yes") ||
296                     sCreateDefault.toLowerCase().equals("true"))
297                 {
298                     m_bCreateDefaultReference = true;
299                 }
300                 else
301                 {
302                     m_bCreateDefaultReference = false;
303                 }
304             }
305 
306         }
307 
checkIfUsableDocumentType(String _sName)308     public boolean checkIfUsableDocumentType(String _sName)
309         {
310             // @todo
311             // check if the name is in the leave out list and then return 'false'
312             if (_sName.toLowerCase().endsWith(".jpg") ||
313                 _sName.toLowerCase().endsWith(".png") ||
314                 _sName.toLowerCase().endsWith(".gif") ||
315                 _sName.toLowerCase().endsWith(".bmp") ||
316                 _sName.toLowerCase().endsWith(".prn") ||
317                 _sName.toLowerCase().endsWith(".ps"))
318             {
319                 return false;
320             }
321 
322             return true;
323         }
324 
showInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)325     static void showInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
326         {
327             if (_sFilterName.length() == 0)
328             {
329                 // System.out.println("No FilterName set.");
330                 return;
331             }
332 
333             if (_xMSF == null)
334             {
335                 GlobalLogWriter.get().println("MultiServiceFactory not set.");
336                 return;
337             }
338             // XFilterFactory aFilterFactory = null;
339             Object aObj = null;
340             try
341             {
342                 aObj = _xMSF.createInstance("com.sun.star.document.FilterFactory");
343             }
344             catch(com.sun.star.uno.Exception e)
345             {
346                 GlobalLogWriter.get().println("Can't get com.sun.star.document.FilterFactory.");
347                 return;
348             }
349             if (aObj != null)
350             {
351                 XNameAccess aNameAccess = (XNameAccess)UnoRuntime.queryInterface(XNameAccess.class, aObj);
352                 if (aNameAccess != null)
353                 {
354 
355                     if (_sFilterName.toLowerCase().equals("help"))
356                     {
357                         GlobalLogWriter.get().println("Show all possible ElementNames from current version." );
358                         String[] aElementNames = aNameAccess.getElementNames();
359                         for (int i = 0; i<aElementNames.length; i++)
360                         {
361                             GlobalLogWriter.get().println(aElementNames[i]);
362                         }
363                     }
364                 }
365             }
366         }
367 
368     /*
369     public GraphicalTestArguments(TestParameters param, Log xxx)
370     {
371         // collect interesting information from the ComplexTestCase
372         // ....
373     }
374     */
375 
376     // set methods
setReferenceType(String _sType)377     public void setReferenceType(String _sType)
378         {
379             // special casse, null is not allowed, set to default.
380             if (_sType == null)
381             {
382                 m_sReferenceType = "OOo";
383             }
384             else
385             {
386                 m_sReferenceType = _sType;
387             }
388         }
setTargetFrameName(String _sTargetFrameName)389     public void setTargetFrameName(String _sTargetFrameName) {m_sTargetFrameName = _sTargetFrameName;}
setPrinterName(String _sName)390     public void setPrinterName(String _sName) {m_sPrinterName = _sName;}
setHidden()391     public void setHidden() { m_bHidden = true;}
setViewable()392     public void setViewable() {m_bHidden = false;}
setDefaultXMLFormatApp(String _sNameOfApp)393     public void setDefaultXMLFormatApp(String _sNameOfApp) {m_sDefaultXMLFormatApplication = _sNameOfApp;}
394 
395     // get methods
getMultiServiceFactory()396     public XMultiServiceFactory getMultiServiceFactory()
397         {
398             XMultiServiceFactory xMSF = (XMultiServiceFactory)m_aCurrentParams.getMSF();
399 
400             // check if MultiServiceFactory is given
401             if (getReferenceType().toLowerCase().equals("pdf") ||
402                 getReferenceType().toLowerCase().equals("ooo"))
403             {
404                 if (xMSF == null)
405                 {
406                     GlobalLogWriter.get().println("ERROR! MultiServiceFactory not given.");
407                 }
408             }
409             return xMSF;
410         }
411 
getReferenceType()412     public String getReferenceType() {return m_sReferenceType;}
getTargetFrameName()413     public String getTargetFrameName() {return m_sTargetFrameName;}
getPrinterName()414     public String getPrinterName() {return m_sPrinterName;}
isHidden()415     public boolean isHidden() {return m_bHidden;}
getDefaultXMLFormatApp()416     public String getDefaultXMLFormatApp() {return m_sDefaultXMLFormatApplication;}
417 
418 
419     /**
420      * @return true, if subdirectories should run through
421      */
includeSubDirectories()422     public boolean includeSubDirectories() {return m_bIncludeSubdirectories;}
423 
424     /**
425      * @return the number of pages to be print
426      */
getMaxPages()427     public int getMaxPages() {return m_nMaxPages;}
428 
429     /**
430      * @return as string, which pages should be print, e.g. '1-4;6' here, page 1 to 4 and page 6.
431      */
getOnlyPages()432     public String getOnlyPages()
433     {
434         if (m_sOnlyPage == null)
435         {
436             return "";
437         }
438         return m_sOnlyPage;
439     }
440 
441     /**
442      * @return true, if there should not print all pages at all, use getMaxPages() and or getOnlyPages() to get which pages to print
443      */
printAllPages()444     public boolean printAllPages()
445         {
446             if ( (getMaxPages() > 0) ||
447                  (getOnlyPages().length() != 0))
448             {
449                 return false;
450             }
451             return true;
452         }
453 
454     /**
455      * @return integer value, which contain resolution in DPI.
456      */
getResolutionInDPI()457     public int getResolutionInDPI() {return m_nResolutionInDPI;}
458 
checkIfMSWindowsConformPath(String _sPath)459     public static void checkIfMSWindowsConformPath(String _sPath)
460         {
461             if (_sPath != null  && _sPath.length() > 1)
462             {
463                 if (_sPath.charAt(1) == ':')
464                 {
465                     if (_sPath.charAt(2) != '\\')
466                     {
467                         GlobalLogWriter.get().println("This is not a Microsoft Windows conform path: '" + _sPath + "' please fix.");
468                         System.exit(1);
469                     }
470                 }
471             }
472         }
473 
474 
475     /**
476      * @return the INPUT_PATH out of the TestParameters
477      */
getInputPath()478     public String getInputPath()
479         {
480             String sInputPath;
481             sInputPath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_INPUT_PATH);
482             checkIfMSWindowsConformPath(sInputPath);
483             return sInputPath;
484         }
485     /**
486      * @return the OUTPUT_PATH out of the TestParameters
487      */
getOutputPath()488     public String getOutputPath()
489         {
490             String sOutputPath;
491             sOutputPath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_OUTPUT_PATH);
492             checkIfMSWindowsConformPath(sOutputPath);
493             return sOutputPath;
494         }
495     /**
496      * @return the REFERENCE_PATH out of the TestParameters
497      */
getReferencePath()498     public String getReferencePath()
499         {
500             String sReferencePath;
501             sReferencePath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_REFERENCE_PATH);
502             checkIfMSWindowsConformPath(sReferencePath);
503             return sReferencePath;
504         }
505     /**
506      * @return the DIFF_PATH out of the TestParameters
507      */
getDiffPath()508     public String getDiffPath()
509         {
510             String sDiffPath;
511             sDiffPath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_DIFF_PATH);
512             checkIfMSWindowsConformPath(sDiffPath);
513             return sDiffPath;
514         }
515 
getOverwrite()516     public boolean getOverwrite()
517         {
518             boolean bOverwrite = m_aCurrentParams.getBool( PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE);
519             return bOverwrite;
520         }
getReferenceInputPath()521     public String getReferenceInputPath()
522         {
523             String sReferenceInputPath;
524             sReferenceInputPath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_REFERENCE_INPUT_PATH);
525             return sReferenceInputPath;
526         }
527 
528     /**
529      * Helper function to get the buildid of the current used OpenOffice.org
530      * out of the AppExecutionCommand the build ID
531      */
getBuildID()532     public String getBuildID()
533         {
534             String sAPP = (String)m_aCurrentParams.get(util.PropertyName.APP_EXECUTION_COMMAND);
535             // return getBuildID(sAPP);
536 //  TODO: here we need the getBuildID(string) method
537             String sBuildID = convwatch.BuildID.getBuildID(sAPP);
538             return sBuildID;
539         }
540 
shouldOfficeStart()541     public boolean shouldOfficeStart()
542         {
543             String sNoOffice = (String)m_aCurrentParams.get( "NoOffice" );
544             if (sNoOffice != null)
545             {
546                 if (sNoOffice.toLowerCase().startsWith("t") || sNoOffice.toLowerCase().startsWith("y"))
547                 {
548                     return false;
549                 }
550             }
551             return true;
552         }
553 
554         // Handle for Reference Build ID, is set in ConvWatch.createPostscriptStartCheck()
555     private String m_sRefBuildID;
556 
setRefBuildID(String _sRef)557     public void setRefBuildID(String _sRef)
558         {
559             m_sRefBuildID = _sRef;
560         }
getRefBuildID()561     public String getRefBuildID()
562         {
563             return m_sRefBuildID;
564         }
565 
disallowStore()566     public void disallowStore()
567         {
568             m_bStoreFile = false;
569         }
allowStore()570     public void allowStore()
571         {
572             m_bStoreFile = true;
573         }
isStoreAllowed()574     public boolean isStoreAllowed()
575         {
576             return m_bStoreFile;
577         }
createDefaultReference()578     public boolean createDefaultReference()
579         {
580             return m_bCreateDefaultReference;
581         }
582 
583 
584     // get/set for FilterName
585     // get the right Filtername (internal Name) from
586     // http://framework.openoffice.org/files/documents/25/897/filter_description.html
587 
588     String m_sImportFilterName = "";
589     String m_sExportFilterName = "";
setImportFilterName(String _sImportFilterName)590     public void setImportFilterName(String _sImportFilterName)
591         {
592             m_sImportFilterName = _sImportFilterName;
593         }
getImportFilterName()594     public String getImportFilterName()
595         {
596             return m_sImportFilterName;
597         }
setExportFilterName(String _sExportFilterName)598     public void setExportFilterName(String _sExportFilterName)
599         {
600             m_sExportFilterName = _sExportFilterName;
601         }
getExportFilterName()602     public String getExportFilterName()
603         {
604             return m_sExportFilterName;
605         }
606 
607     String m_sOfficeProgram = "";
setOfficeProgram(String _sName)608     public void setOfficeProgram(String _sName)
609         {
610             m_sOfficeProgram = _sName;
611         }
getOfficeProgram()612     public String getOfficeProgram()
613         {
614             return m_sOfficeProgram;
615         }
616 
restartOffice()617     public boolean restartOffice()
618         {
619             if (m_bResuseOffice == false)
620             {
621                 return true;
622             }
623             return false;
624         }
625 
626     String m_sHTMLOutputPrefix = "";
getHTMLOutputPrefix()627     public String getHTMLOutputPrefix()
628         {
629             return m_sHTMLOutputPrefix;
630         }
631 
632     TriState m_tWithBorderMove = TriState.UNSET;
633     // public TriState isBorderMove()
634     //     {
635     //         return m_tWithBorderMove;
636     //     }
getBorderMove()637     public TriState getBorderMove()
638         {
639             return m_tWithBorderMove;
640         }
setBorderMove(TriState _tBorderMove)641     public void setBorderMove(TriState _tBorderMove)
642         {
643             m_tWithBorderMove = _tBorderMove;
644         }
645 
646     String m_sDocumentType = "";
setDocumentType(String _sName)647     public void setDocumentType(String _sName)
648         {
649             m_sDocumentType = _sName;
650         }
getDocumentType()651     public String getDocumentType()
652         {
653             return m_sDocumentType;
654         }
655 
656     /*
657       helper class for performance analyser features
658      */
659     PerformanceContainer m_aPerformanceContainer = null;
getPerformance()660     public PerformanceContainer getPerformance()
661         {
662             if (m_aPerformanceContainer == null)
663             {
664                 m_aPerformanceContainer = new PerformanceContainer();
665             }
666             return m_aPerformanceContainer;
667         }
668 
669     private String m_aInputFile;
setInputFile(String _sInputFile)670     public void setInputFile(String _sInputFile)
671         {
672             m_aInputFile = _sInputFile;
673         }
getInputFile()674     public String getInputFile()
675         {
676             return m_aInputFile;
677         }
678 
679     private String m_sDBInfoString;
getDBInfoString()680     public String getDBInfoString()
681         {
682             if (m_sDBInfoString != null)
683             {
684                 if (m_sDBInfoString.length() == 0)
685                 {
686                     return null;
687                 }
688             }
689 
690             return m_sDBInfoString;
691         }
692 
cancelRequest()693     public boolean cancelRequest()
694         {
695             File aCancelFile = null;
696             String fs;
697             fs = System.getProperty("file.separator");
698             String sTempPath = (String)m_aCurrentParams.get( PropertyName.TEMPPATH );
699             if (sTempPath != null)
700             {
701                 String sGDC_Dir = sTempPath;
702 
703                 if (m_sDistinct.length() > 0)
704                 {
705                     sGDC_Dir = sGDC_Dir + fs + m_sDistinct;
706                 }
707 
708                 String sCancelFile = sGDC_Dir + fs + "cancel_compare.txt";
709                 aCancelFile = new File(sCancelFile);
710 
711                 if (aCancelFile.exists())
712                 {
713                     GlobalLogWriter.get().println("ATTENTION: Found file: '" + sCancelFile + "'.");
714                     GlobalLogWriter.get().println("User has canceled the program flow.");
715                     return true;
716                 }
717             }
718             return false;
719         }
720 
721 }
722 
723 
724 /*
725 public class MSGraphicalTestArguments extends GraphicalTestArguments
726 {
727     MSGraphicalTestArguments()
728         {
729             setReferenceType("msoffice");
730         }
731 }
732 
733 public class OOoGraphicalTestArguments extends GraphicalTestArguments
734 {
735     OOoGraphicalTestArguments(XMultiServiceFactory _aFactory)
736         {
737             setMultiServiceFactory(_aFactory);
738         }
739 }
740 */
741