Examples of XCloseable


Examples of com.sun.star.util.XCloseable

                        catch(com.sun.star.io.IOException e) {
                            failed("Could not store to '" + url + "'", true);
                        }
                    }
                    // close the doc
                    XCloseable xCloseable = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xStorable);
                    try {
                        xCloseable.close(true);
                    }
                    catch(com.sun.star.util.CloseVetoException e) {
                        e.printStackTrace((java.io.PrintWriter)log);
                        failed("Cannot close document: test is futile, Office will surely use more space.");
                    }
View Full Code Here

Examples of com.sun.star.util.XCloseable

            e.printStackTrace();
        }
        runAllInterfaceTests();

        if (xTextDoc != null) {
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xTextDoc);
            try {
                xClose.close(false);
            }
            catch(com.sun.star.util.CloseVetoException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.sun.star.util.XCloseable

            e.printStackTrace();
        }
        runAllInterfaceTests();

        if (xMathDoc != null) {
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xMathDoc);
            try {
                xClose.close(false);
            }
            catch(com.sun.star.util.CloseVetoException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.sun.star.util.XCloseable

            e.printStackTrace();
        }
        runAllInterfaceTests();

        if (xDrawDoc != null) {
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xDrawDoc);
            try {
                xClose.close(false);
            }
            catch(com.sun.star.util.CloseVetoException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.sun.star.util.XCloseable

            e.printStackTrace();
        }
        runAllInterfaceTests();

        if (xImpressDoc != null) {
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xImpressDoc);
            try {
                xClose.close(false);
            }
            catch(com.sun.star.util.CloseVetoException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.sun.star.util.XCloseable

            e.printStackTrace();
        }
        runAllInterfaceTests();

        if (xSpreadsheetDoc != null) {
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xSpreadsheetDoc);
            try {
                xClose.close(false);
            }
            catch(com.sun.star.util.CloseVetoException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of com.sun.star.util.XCloseable

      XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class, object);
      XComponent xComponent = xComponentLoader.loadComponentFromURL(m_database.getDocumentURL(), "_blank",FrameSearchFlag.ALL, new PropertyValue[0]);
      m_database.close();
      XStorable storable = (XStorable)UnoRuntime.queryInterface(XStorable.class,xComponent);
      storable.store();
            XCloseable close = (XCloseable)UnoRuntime.queryInterface(XCloseable.class,xComponent);
            close.close(true);
        }
        catch ( AssureException e ) { throw e; }
        catch ( Exception e )
        {
            assure( "caught an unexpected exception: " + e.getMessage(), false );
View Full Code Here

Examples of com.sun.star.util.XCloseable

        try {
            //XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myDocument);
            //if (xCloseable != null)
            //    xCloseable.close(false);
           
            XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myFrame);
            if (xCloseable != null)
                xCloseable.close(false);
        }
        catch (Exception ex) {ex.printStackTrace();}
       
    }
View Full Code Here

Examples of com.sun.star.util.XCloseable

    */
    protected void cleanup(TestParameters tParam, PrintWriter log) {
        log.println("    disposing xSheetDoc ");

        try {
            XCloseable oCloser = (XCloseable) UnoRuntime.queryInterface(
                                         XCloseable.class, xSheetDoc);
            oCloser.close(true);
        } catch (com.sun.star.util.CloseVetoException e) {
            log.println("Couldn't close document");
        } catch (com.sun.star.lang.DisposedException e) {
            log.println("Document already disposed");
        } catch (java.lang.NullPointerException e) {
View Full Code Here

Examples of com.sun.star.util.XCloseable

    public static boolean close(XComponent xComponent) {
        boolean bState = false;
        XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent);

        if (xModel != null) {
            XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xModel);

            if (xCloseable != null) {
                try {
                    xCloseable.close(true);
                    bState = true;
                } catch (com.sun.star.util.CloseVetoException exCloseVeto) {
                    System.out.println("could not close doc");
                    bState = false;
                }
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.