public class LocalOfficeConnection extends java.lang.Object implements OfficeConnection
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OFFICE_APP_NAME |
static java.lang.String |
OFFICE_ID_SUFFIX |
static java.lang.String |
OFFICE_LIB_NAME |
| Modifier | Constructor and Description |
|---|---|
|
LocalOfficeConnection()
Constructor.
|
protected |
LocalOfficeConnection(com.sun.star.uno.XComponentContext xContext)
protected Constructor
Initialise a LocalOfficeConnection with an already running office.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(com.sun.star.lang.XEventListener listener)
Adds an event listener to the object.
|
OfficeWindow |
createOfficeWindow(java.awt.Container container)
Deprecated.
|
void |
dispose()
Closes the connection.
|
com.sun.star.uno.XComponentContext |
getComponentContext()
Retrieves the UNO component context.
|
void |
removeEventListener(com.sun.star.lang.XEventListener listener)
Removes an event listener from the listener list.
|
void |
setContainerFactory(ContainerFactory containerFactory)
Deprecated.
|
void |
setUnoUrl(java.lang.String url)
Sets a connection URL.
|
public static final java.lang.String OFFICE_APP_NAME
public static final java.lang.String OFFICE_LIB_NAME
public static final java.lang.String OFFICE_ID_SUFFIX
public LocalOfficeConnection()
OFFICE_PROP_FILE in the user
home directory.protected LocalOfficeConnection(com.sun.star.uno.XComponentContext xContext)
xContext - public void setUnoUrl(java.lang.String url)
throws java.net.MalformedURLException
url := uno:localoffice[,<params>];urp;StarOffice.ServiceManager params := <path>[,<pipe>] path := path=<pathv> pipe := pipe=<pipev> pathv := platform_specific_path_to_the_local_office_distribution pipev := local_office_connection_pipe_name
setUnoUrl in interface OfficeConnectionurl - This is UNO URL which describes the type of a connection.java.net.MalformedURLException@Deprecated public void setContainerFactory(ContainerFactory containerFactory)
setContainerFactory in interface OfficeConnectioncontainerFactory - This is an application provided AWT container
factory.public com.sun.star.uno.XComponentContext getComponentContext()
null if it fails to connect
to the office application.getComponentContext in interface OfficeConnection@Deprecated public OfficeWindow createOfficeWindow(java.awt.Container container)
createOfficeWindow in interface OfficeConnectioncontainer - This is an AWT container.public void dispose()
dispose in interface com.sun.star.lang.XComponentpublic void addEventListener(com.sun.star.lang.XEventListener listener)
addEventListener in interface com.sun.star.lang.XComponentlistener - is a listener object.public void removeEventListener(com.sun.star.lang.XEventListener listener)
removeEventListener in interface com.sun.star.lang.XComponentlistener - is a listener object.