public class ExternalApps
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BIBTEX |
static short |
BUILD |
static java.lang.String |
DVIPS |
static java.lang.String |
DVIVIEWER |
static short |
EXPORT |
static java.lang.String |
LATEX |
static java.lang.String |
MAKEINDEX |
static java.lang.String |
MK4HT |
static java.lang.String |
PDFLATEX |
static java.lang.String |
PDFVIEWER |
static java.lang.String |
POSTSCRIPTVIEWER |
static short |
PREVIEW |
static java.lang.String |
XELATEX |
Constructor and Description |
---|
ExternalApps(com.sun.star.uno.XComponentContext xContext)
Construct a new ExternalApps object with empty content
|
Modifier and Type | Method and Description |
---|---|
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
|
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
|
java.lang.String[] |
getApplication(java.lang.String sAppName)
Get the definition for an external application
|
short |
getProcessingLevel()
Get the desired processing level (0: export only, 1: export and build, 2: export, build and preview)
|
static java.lang.String |
getUIAppName(java.lang.String sName)
Return the localized name for an external app to use in the UI (only the viewers has a separate UI name)
|
boolean |
getUseDefaultApplication(java.lang.String sAppName)
Get the setting to use the system's default application
|
boolean |
isViewer(java.lang.String sAppName) |
void |
load()
Load the external applications from the registry
|
void |
save()
Save the external applications to the registry
|
void |
setApplication(java.lang.String sAppName,
java.lang.String sExecutable,
java.lang.String sOptions)
Define an external application
|
void |
setProcessingLevel(short nLevel)
Set the desired processing level (0: export only, 1: export and build, 2: export, build and preview)
|
void |
setUseDefaultApplication(java.lang.String sAppName,
boolean bUseDefault)
Define to use the system's default for an external application.
|
public static final short EXPORT
public static final short BUILD
public static final short PREVIEW
public static final java.lang.String LATEX
public static final java.lang.String PDFLATEX
public static final java.lang.String XELATEX
public static final java.lang.String BIBTEX
public static final java.lang.String MAKEINDEX
public static final java.lang.String MK4HT
public static final java.lang.String DVIPS
public static final java.lang.String DVIVIEWER
public static final java.lang.String POSTSCRIPTVIEWER
public static final java.lang.String PDFVIEWER
public ExternalApps(com.sun.star.uno.XComponentContext xContext)
public static java.lang.String getUIAppName(java.lang.String sName)
sName
- the app namepublic void setProcessingLevel(short nLevel)
nLevel
- the desired levelpublic short getProcessingLevel()
public boolean isViewer(java.lang.String sAppName)
public void setApplication(java.lang.String sAppName, java.lang.String sExecutable, java.lang.String sOptions)
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 executionpublic java.lang.String[] getApplication(java.lang.String sAppName)
sAppName
- the name of the application to getpublic void setUseDefaultApplication(java.lang.String sAppName, boolean bUseDefault)
sAppName
- the name of the applicationbUseDefault
- flag defining whether or not to use the defaultpublic boolean getUseDefaultApplication(java.lang.String sAppName)
sAppName
- the name of the applicationpublic 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)
sAppName
- the name of the application to execute (ignored for default apps)sFileName
- 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, ignored for default apps)bWaitFor
- true if the method should wait for the execution to finish (ignored for default apps)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)
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 finishpublic void load()
public void save()