[Libreoffice-commits] core.git: odk/examples

Noel Grandin noel at peralex.com
Wed Apr 17 04:09:10 PDT 2013


 odk/examples/java/Inspector/ProtocolHandlerAddon.java |   50 ++++++++----------
 1 file changed, 23 insertions(+), 27 deletions(-)

New commits:
commit bea18dd581ac9341a19e757a72662ab7a2e34b0a
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 17 12:57:16 2013 +0200

    fix compile error in unused Java file.
    
    "exception not thrown in catch block"
    
    Change-Id: I13f8be9913f655ab1633b29e9fe686a41c2c0fcb

diff --git a/odk/examples/java/Inspector/ProtocolHandlerAddon.java b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
index 86d03ad..e20d3a2 100644
--- a/odk/examples/java/Inspector/ProtocolHandlerAddon.java
+++ b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
@@ -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
             }
         }
     }


More information about the Libreoffice-commits mailing list