Package com.sun.star.lang

Examples of com.sun.star.lang.XComponent.dispose()


            log.println("load a blank math doc");
            oDoc = oObj.loadComponentFromURL(
                        "private:factory/smath", frameName, 0, szEmptyArgs );

            log.println("disposing math doc");
            oDoc.dispose();

        }
        catch (com.sun.star.lang.IllegalArgumentException e) {
            log.println("Exception occured while loading");
            e.printStackTrace(log);
View Full Code Here


     *
     */
    public void removeShape(XShape _xShape){
        xDrawPage.remove(_xShape);
        XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, _xShape);
        xComponent.dispose();
    }


    // Destroy all Shapes in Nirwana
    public void removeNirwanaShapes() throws Exception{
View Full Code Here

                    System.out.println("could not close doc");
                    bState = false;
                }
            } else {
                XComponent xDisposeable = (XComponent) UnoRuntime.queryInterface(XComponent.class, xModel);
                xDisposeable.dispose();
                bState = true;
            }
        }
        return bState;
    }  
View Full Code Here

        if (mBridge != null)
        {
            XComponent comp = (XComponent)UnoRuntime.queryInterface(
                    XComponent.class, mBridge);
            if (comp != null)
               comp.dispose();
            else
                System.err.println("LocalOfficeConnection: could not dispose bridge!");
           
            mBridge = null;
        }
View Full Code Here

            else {
                // If Xcloseable is not supported (older versions,
                // use dispose() for closing the document
                XComponent xComponent = ( XComponent ) UnoRuntime.queryInterface(
                    XComponent.class, xstorable );
                xComponent.dispose();
            }
           
//         }
//         catch( Exception exception ) {
//             exception.printStackTrace();
View Full Code Here

        UnoRuntime.queryInterface(XComponent.class, xInterface);

        if (xComponent == null) {
            return;
        }
        xComponent.dispose();
    }
    static public void commit( XInterface xInterface )
    {
        XTransactedObject xTrans = (XTransactedObject)
        UnoRuntime.queryInterface(XTransactedObject.class, xInterface);
View Full Code Here

  
   public void dispose ()
   {
        XComponent xComponent = ( XComponent )UnoRuntime.queryInterface(
            XComponent.class, _xDialog );
       xComponent.dispose();
   }

   public void addEventListener ( com.sun.star.lang.XEventListener xListener )
   {
        XComponent xComponent = ( XComponent )UnoRuntime.queryInterface(
View Full Code Here

      System.err.println("press any key to close the document");
      System.in.read();
      while(System.in.available() > 0)
        System.in.read();

      rComponent.dispose();
    }
  }

  static void doSomething(Object r) throws com.sun.star.uno.Exception, IOException {
    XNamingService rName = (XNamingService)UnoRuntime.queryInterface(XNamingService.class, r);
View Full Code Here

            XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
            XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMsgbox);
            xMsgbox.setMessageText(MessageText);
            iMessage = xMsgbox.execute();
            xComponent.dispose();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace(System.out);
        }
        return iMessage;
View Full Code Here

            // XWindow x = getReportDefinition().getCurrentController().getFrame().getContainerWindow();
            // Object aObj = _xSection.getParent();

            // we don't need the created objects any longer
            final XComponent xFixedTextDeleter = (XComponent)UnoRuntime.queryInterface(XComponent.class, xFixedText);
            xFixedTextDeleter.dispose();

            final XComponent xFixedTextModelDeleter = (XComponent)UnoRuntime.queryInterface(XComponent.class, aFixedTextModel);
            xFixedTextModelDeleter.dispose();
        }
        catch(Exception e)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.