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(XEventListener listener)
Adds an event listener to the object.
|
OfficeWindow |
createOfficeWindow(java.awt.Container container)
Creates an office window.
|
void |
dispose()
Closes the connection.
|
XComponentContext |
getComponentContext()
Retrives the UNO component context.
|
void |
removeEventListener(XEventListener listener)
Removes an event listener from the listener list.
|
void |
setContainerFactory(ContainerFactory containerFactory)
Sets an AWT container catory.
|
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 discribes the type of a connection.java.net.MalformedURLExceptionpublic void setContainerFactory(ContainerFactory containerFactory)
setContainerFactory in interface OfficeConnectioncontainerFactory - This is a application provided AWT container
factory.public XComponentContext getComponentContext()
null if it fails to connect
to the office application.getComponentContext in interface OfficeConnectionpublic OfficeWindow createOfficeWindow(java.awt.Container container)
createOfficeWindow in interface OfficeConnectioncontainer - This is an AWT container.public void dispose()
public void addEventListener(XEventListener listener)
listener - is a listener object.public void removeEventListener(XEventListener listener)
listener - is a listener object.