Class ExternalApps
java.lang.Object
org.openoffice.da.comp.writer4latex.ExternalApps
This 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 -
Constructor Summary
ConstructorsConstructorDescriptionExternalApps
(com.sun.star.uno.XComponentContext xContext) Construct a new ExternalApps object, with empty definitions -
Method Summary
Modifier and TypeMethodDescriptionint
Execute an external applicationint
execute
(String sAppName, String sCommand, String sFileName, File workDir, Map<String, String> env, boolean bWaitFor) Execute an external applicationString[]
getApplication
(String sAppName) Get the definition for an external applicationvoid
load()
Load the external applications from the registryvoid
save()
Save the external applications to the registryvoid
setApplication
(String sAppName, String sExecutable, String sOptions) Define an external application
-
Field Details
-
LATEX
- See Also:
-
PDFLATEX
- See Also:
-
XELATEX
- See Also:
-
BIBTEX
- See Also:
-
MAKEINDEX
- See Also:
-
MK4HT
- See Also:
-
DVIPS
- See Also:
-
DVIVIEWER
- See Also:
-
POSTSCRIPTVIEWER
- See Also:
-
PDFVIEWER
- See Also:
-
-
Constructor Details
-
ExternalApps
public ExternalApps(com.sun.star.uno.XComponentContext xContext) Construct a new ExternalApps object, with empty definitions
-
-
Method Details
-
setApplication
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
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(String sAppName, String sFileName, File workDir, Map<String, 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(String sAppName, String sCommand, String sFileName, File workDir, Map<String, 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
-