Kaydet (Commit) bea18dd5 authored tarafından Noel Grandin's avatar Noel Grandin

fix compile error in unused Java file.

"exception not thrown in catch block"

Change-Id: I13f8be9913f655ab1633b29e9fe686a41c2c0fcb
üst f4b7fa5c
......@@ -204,35 +204,31 @@ public class ProtocolHandlerAddon {
}
public void showMessageBox(String sTitle, String sMessage) {
try {
if ( null != m_xFrame && null != m_xToolkit ) {
// describe window properties.
WindowDescriptor aDescriptor = new WindowDescriptor();
aDescriptor.Type = WindowClass.MODALTOP;
aDescriptor.WindowServiceName = new String( "infobox" );
aDescriptor.ParentIndex = -1;
aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
XWindowPeer.class, m_xFrame.getContainerWindow());
aDescriptor.Bounds = new Rectangle(0,0,300,200);
aDescriptor.WindowAttributes = WindowAttribute.BORDER |
WindowAttribute.MOVEABLE |
WindowAttribute.CLOSEABLE;
XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
if ( null != xPeer ) {
XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
XMessageBox.class, xPeer);
if ( null != xMsgBox )
{
xMsgBox.setCaptionText( sTitle );
xMsgBox.setMessageText( sMessage );
xMsgBox.execute();
}
if ( null != m_xFrame && null != m_xToolkit ) {
// describe window properties.
WindowDescriptor aDescriptor = new WindowDescriptor();
aDescriptor.Type = WindowClass.MODALTOP;
aDescriptor.WindowServiceName = new String( "infobox" );
aDescriptor.ParentIndex = -1;
aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
XWindowPeer.class, m_xFrame.getContainerWindow());
aDescriptor.Bounds = new Rectangle(0,0,300,200);
aDescriptor.WindowAttributes = WindowAttribute.BORDER |
WindowAttribute.MOVEABLE |
WindowAttribute.CLOSEABLE;
XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
if ( null != xPeer ) {
XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
XMessageBox.class, xPeer);
if ( null != xMsgBox )
{
xMsgBox.setCaptionText( sTitle );
xMsgBox.setMessageText( sMessage );
xMsgBox.execute();
}
}
} catch ( com.sun.star.uno.Exception e) {
// do your error handling
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment