Package com.sun.star.lang

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


                System.err.println( "### bootstrap context test failed: 2!" );
            }
           
            XComponent xComp = UnoRuntime.queryInterface(
                XComponent.class, xInitialContext );
            xComp.dispose();
    }
    catch(Exception exception) {
      System.err.println("exception occurred:" + exception);
      exception.printStackTrace();
    }
View Full Code Here


                    xContext.getServiceManager().createInstanceWithContext(
                        m_supported_services[ nPos ], xContext ) );
            }

            XComponent xComp = UnoRuntime.queryInterface( XComponent.class, xContext );
            xComp.dispose();
        }
        catch (Exception exc)
        {
            System.err.println( ">>>>>>>>>> exc occured: " + exc.toString() );
            exc.printStackTrace();
View Full Code Here

        for ( int i=0; i<services.length; i++ )
          System.out.println(services[i]);

            XComponent xComp = UnoRuntime.queryInterface(
                XComponent.class, xContext );
            xComp.dispose();
           
      passed = true;
    }   
    catch (Exception e) {
      e.printStackTrace();
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 = UnoRuntime.queryInterface(XNamingService.class, r);
View Full Code Here

       
        log.println("disposing data source...");
        try {
            XComponent dataSourceComp = (XComponent)UnoRuntime.queryInterface(
                XComponent.class, m_dbSrc);
            dataSourceComp.dispose();
        }
        catch (Exception e) {
            log.println("couldn't dispose the data source");
        }
       
View Full Code Here

        // Getting the method dispose() for closing the document
        XComponent xcomponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xstorable);

        // Closing the converted document
        xcomponent.dispose();
        return;
    }

    public static OpenOfficeByteArrayOutputStream convertOODocByteStreamToByteStream(XMultiComponentFactory xmulticomponentfactory,
            OpenOfficeByteArrayInputStream is, String inputMimeType, String outputMimeType) throws Exception {
View Full Code Here

        // Getting the method dispose() for closing the document
        XComponent xcomponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xstorable);

        // Closing the converted document
        xcomponent.dispose();

        return os;
    }

    public static String getFilterNameFromMimeType(String mimeType) {
View Full Code Here

            // Getting the method dispose() for closing the document
            XComponent xcomponent = (XComponent) UnoRuntime.queryInterface(XComponent.class,
            xstorable);

            // Closing the converted document
            xcomponent.dispose();

            Map results = ServiceUtil.returnSuccess();
            return results;
        } catch (Exception e) {
            Debug.logError(e, "Error in OpenOffice operation: ", module);
View Full Code Here

          XComponent xcomponent =
          ( XComponent ) UnoRuntime.queryInterface( XComponent.class,
          xstorable );
         
          // Closing the converted document
          xcomponent.dispose();
        }
        catch( Exception exception ) {
          exception.printStackTrace();
        }
       
View Full Code Here

      // now we dispose the connection to close it
      XComponent xComponent = (XComponent)UnoRuntime.queryInterface(XComponent.class,con);
      if(xComponent != null)
      {
        // connections must be disposed
        xComponent.dispose();
        System.out.println("Connection disposed!");
      }
    }
    else
      System.out.println("Connection could not be created!");
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.