summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/graphical/MSOfficePostscriptCreator.java')
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java54
1 files changed, 27 insertions, 27 deletions
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index 86eb28143ed2..8a07436ac502 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ import org.w3c.dom.Node;
public class MSOfficePostscriptCreator implements IOffice
{
private String m_sPrinterName; // within Windows the tools need a printer name;
-
+
public void setPrinterName(String _s)
{
m_sPrinterName = _s;
@@ -63,7 +63,7 @@ public class MSOfficePostscriptCreator implements IOffice
private ParameterHelper m_aParameterHelper;
private String m_sDocumentName;
private String m_sResult;
-
+
// CTor
public MSOfficePostscriptCreator(ParameterHelper _aParam, String _sResult)
{
@@ -245,7 +245,7 @@ public class MSOfficePostscriptCreator implements IOffice
realStartCommand(aStartCommand);
}
}
-
+
// -----------------------------------------------------------------------------
/**
* print the given file (_sInputFile) to the file name (_sPrintFile)
@@ -326,14 +326,14 @@ public class MSOfficePostscriptCreator implements IOffice
FileHelper.createInfoFile(_sPrintFilename, _aGTA, "msoffice");
TimeHelper.waitInSeconds(2, "Give Microsoft Office some time to print.");
}
-
+
public void realStartCommand(ArrayList _aStartCommand) throws OfficeException
- {
+ {
if (_aStartCommand.isEmpty())
{
throw new OfficeException/*WrongEnvironmentException*/("Given list is empty.");
- }
-
+ }
+
try
{
// Convert the StartCommand ArrayList to a String List
@@ -359,7 +359,7 @@ public class MSOfficePostscriptCreator implements IOffice
// TODO: use a better Exception!!!
throw new WrongEnvironmentException("We doesn't work within windows environment.");
}
-
+
ProcessHandler aHandler = new ProcessHandler(aList);
boolean bBackValue = aHandler.executeSynchronously();
@@ -368,10 +368,10 @@ public class MSOfficePostscriptCreator implements IOffice
{
throw new WrongEnvironmentException("Given list is too short.");
}
-
+
// return aHandler.getExitCode();
}
-
+
private String getPerlExe()
{
@@ -392,7 +392,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
return aList;
}
-
+
String sFileName = FileHelper.appendPath(sTmpPath, sPrintViaWord);
File aFile = new File(sFileName);
FileWriter out = new FileWriter(aFile);
@@ -494,14 +494,14 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("Search for local existance of " + aPerlScript.getAbsolutePath());
}
-
+
if (aPerlScript.exists())
{
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.println("OK, found it, use this instead the internal one.");
}
-
+
String sName = aPerlScript.getAbsolutePath();
// String sCommand = "perl " + sName;
// System.out.println(sCommand);
@@ -511,13 +511,13 @@ public class MSOfficePostscriptCreator implements IOffice
}
return aList;
}
-
+
ArrayList<String> createWordStoreHelper() throws java.io.IOException
{
// create a program in tmp file
String sTmpPath = util.utils.getUsersTempDir();
String ls = System.getProperty("line.separator");
-
+
// ArrayList aList = new ArrayList();
String sSaveViaWord = "saveViaWord.pl";
@@ -526,13 +526,13 @@ public class MSOfficePostscriptCreator implements IOffice
{
return aList;
}
-
+
String sName = FileHelper.appendPath(sTmpPath, sSaveViaWord);
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -592,7 +592,7 @@ public class MSOfficePostscriptCreator implements IOffice
aList.add(sName);
return aList;
}
-
+
ArrayList<String> createExcelPrintHelper() throws java.io.IOException
{
@@ -612,7 +612,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -715,10 +715,10 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
-
+
out.write( "eval 'exec perl -wS $0 ${1+\"$@\"}' " + ls );
out.write( " if 0; " + ls );
out.write( "use strict; " + ls );
@@ -785,7 +785,7 @@ public class MSOfficePostscriptCreator implements IOffice
aList.add(sName);
return aList;
}
-
+
ArrayList<String> createPowerPointPrintHelper() throws java.io.IOException
{
// create a program in tmp file
@@ -793,7 +793,7 @@ public class MSOfficePostscriptCreator implements IOffice
String ls = System.getProperty("line.separator");
String sPrintViaPowerPoint = "printViaPowerPoint.pl";
-
+
ArrayList<String> aList = searchLocalFile(sPrintViaPowerPoint);
if (aList.isEmpty() == false)
{
@@ -804,7 +804,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -912,7 +912,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
aLine = aLine.trim();
if ( (! (aLine.length() < 2) ) &&
- (! aLine.startsWith("#")) &&
+ (! aLine.startsWith("#")) &&
(! aLine.startsWith(";")) )
{
int nIdx = aLine.indexOf("mso-application");
@@ -947,7 +947,7 @@ public class MSOfficePostscriptCreator implements IOffice
}
try
{
- aReader.close();
+ aReader.close();
}
catch (java.io.IOException ie)
{