Class ExternalApps
- java.lang.Object
-
- org.openoffice.da.comp.writer4latex.ExternalApps
-
public class ExternalApps extends java.lang.ObjectThis class manages and executes external applications used by Writer4LaTeX. These include TeX and friends as well as viewers for the various backend formats. The registry is used for persistent storage of the settings.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBIBTEXstatic java.lang.StringDVIPSstatic java.lang.StringDVIVIEWERstatic java.lang.StringLATEXstatic java.lang.StringMAKEINDEXstatic java.lang.StringMK4HTstatic java.lang.StringPDFLATEXstatic java.lang.StringPDFVIEWERstatic java.lang.StringPOSTSCRIPTVIEWERstatic java.lang.StringXELATEX
-
Constructor Summary
Constructors Constructor Description ExternalApps(com.sun.star.uno.XComponentContext xContext)Construct a new ExternalApps object, with empty definitions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intexecute(java.lang.String sAppName, java.lang.String sFileName, java.io.File workDir, java.util.Map<java.lang.String,java.lang.String> env, boolean bWaitFor)Execute an external applicationintexecute(java.lang.String sAppName, java.lang.String sCommand, java.lang.String sFileName, java.io.File workDir, java.util.Map<java.lang.String,java.lang.String> env, boolean bWaitFor)Execute an external applicationjava.lang.String[]getApplication(java.lang.String sAppName)Get the definition for an external applicationvoidload()Load the external applications from the registryvoidsave()Save the external applications to the registryvoidsetApplication(java.lang.String sAppName, java.lang.String sExecutable, java.lang.String sOptions)Define an external application
-
-
-
Field Detail
-
LATEX
public static final java.lang.String LATEX
- See Also:
- Constant Field Values
-
PDFLATEX
public static final java.lang.String PDFLATEX
- See Also:
- Constant Field Values
-
XELATEX
public static final java.lang.String XELATEX
- See Also:
- Constant Field Values
-
BIBTEX
public static final java.lang.String BIBTEX
- See Also:
- Constant Field Values
-
MAKEINDEX
public static final java.lang.String MAKEINDEX
- See Also:
- Constant Field Values
-
MK4HT
public static final java.lang.String MK4HT
- See Also:
- Constant Field Values
-
DVIPS
public static final java.lang.String DVIPS
- See Also:
- Constant Field Values
-
DVIVIEWER
public static final java.lang.String DVIVIEWER
- See Also:
- Constant Field Values
-
POSTSCRIPTVIEWER
public static final java.lang.String POSTSCRIPTVIEWER
- See Also:
- Constant Field Values
-
PDFVIEWER
public static final java.lang.String PDFVIEWER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setApplication
public void setApplication(java.lang.String sAppName, java.lang.String sExecutable, java.lang.String sOptions)Define an external application- Parameters:
sAppName- the name of the application to definesExecutable- the system dependent path to the executable filesOptions- the options to the external application; %s will be replaced by the filename on execution
-
getApplication
public java.lang.String[] getApplication(java.lang.String sAppName)
Get the definition for an external application- Parameters:
sAppName- the name of the application to get- Returns:
- a String array containing the system dependent path to the executable file as entry 0, and the parameters as entry 1 returns null if the application is unknown
-
execute
public int execute(java.lang.String sAppName, java.lang.String sFileName, java.io.File workDir, java.util.Map<java.lang.String,java.lang.String> env, boolean bWaitFor)Execute an external application- Parameters:
sAppName- the name of the application to executesFileName- the file name to useworkDir- the working directory to useenv- map of environment variables to set (or null if no variables needs to be set)bWaitFor- true if the method should wait for the execution to finish- Returns:
- error code
-
execute
public int execute(java.lang.String sAppName, java.lang.String sCommand, java.lang.String sFileName, java.io.File workDir, java.util.Map<java.lang.String,java.lang.String> env, boolean bWaitFor)Execute an external application- Parameters:
sAppName- the name of the application to executesCommand- subcommand/option to pass to the commandsFileName- the file name to useworkDir- the working directory to useenv- map of environment variables to set (or null if no variables needs to be set)bWaitFor- true if the method should wait for the execution to finish- Returns:
- error code
-
load
public void load()
Load the external applications from the registry
-
save
public void save()
Save the external applications to the registry
-
-