public class LocalOfficeBridgeFactory extends Object implements LocalOfficeContextAware, com.sun.star.lang.XEventListener
| Constructor and Description |
|---|
LocalOfficeBridgeFactory(UnoUrl unoUrl)
为指定的UNO URL构造新连接.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(OfficeConnectEventListener connectionEventListener)
将侦听器添加到此连接的连接事件侦听器列表.
|
void |
connect()
建立到office实例的连接
|
void |
disconnect()
关闭连接.
|
void |
disposing(com.sun.star.lang.EventObject eventObject) |
com.sun.star.uno.XComponentContext |
getComponentContext()
获取此上下文的office组件上下文.
|
com.sun.star.frame.XComponentLoader |
getComponentLoader()
获取此上下文的office组件加载程序.
|
com.sun.star.frame.XDesktop |
getDesktop()
获取此上下文的office桌面.
|
boolean |
isConnected()
获取是否连接到office实例.
|
public LocalOfficeBridgeFactory(UnoUrl unoUrl)
unoUrl - 为其创建连接的URL.public void addConnectionEventListener(OfficeConnectEventListener connectionEventListener)
connectionEventListener - 当与office进程建立连接和连接丢失时,它将被通知.public void connect()
throws InstrumentException
InstrumentExceptionpublic void disconnect()
public void disposing(com.sun.star.lang.EventObject eventObject)
disposing in interface com.sun.star.lang.XEventListenerpublic com.sun.star.uno.XComponentContext getComponentContext()
LocalOfficeContextAwaregetComponentContext in interface LocalOfficeContextAwarepublic com.sun.star.frame.XComponentLoader getComponentLoader()
LocalOfficeContextAwaregetComponentLoader in interface LocalOfficeContextAwarepublic com.sun.star.frame.XDesktop getDesktop()
LocalOfficeContextAwaregetDesktop in interface LocalOfficeContextAwarepublic boolean isConnected()
true 连接到office实例 false 未连接.Copyright © 2020. All rights reserved.