Package com.sun.star.document

Examples of com.sun.star.document.XStandaloneDocumentInfo


                m_aTestHelper.Message ( "Document stored." );
               
                //create StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo =
                        (XStandaloneDocumentInfo) UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo );
                xStandaloneDocInfo.loadFromURL ( sURL );
                m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
               
                //get the title from the object and check it
                XPropertySet xPropSet =
                        (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo );
                String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
                m_aTestHelper.Message ( "Get title: " + sTitle );
                if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
                    m_aTestHelper.Error ( "Title not match. Expected \""
                            + sDocTitle[i] +
                            "\"" );
                    return false;
                } else {
                    m_aTestHelper.Message ( "Title matched." );
                }
               
                //set a new title to the object
                sTitle += "_new";
                xPropSet.setPropertyValue ( "Title", sTitle );
                m_aTestHelper.Message ( "Set new title: " + sTitle );
               
                //store the object to the same file
                xStandaloneDocInfo.storeIntoURL ( sURL );
                m_aTestHelper.Message ( "Document info stored." );
               
                //create a new StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo_ = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo_ =
                        (XStandaloneDocumentInfo)UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo_ );
                xStandaloneDocInfo_.loadFromURL ( sURL );
                m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
               
                //get the title and check it
                XPropertySet xPropSet_ = (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo_ );
View Full Code Here


        }

        String Iname = util.utils.getImplName(oObj);
        log.println("Implementation Name: "+Iname);
        TestEnvironment tEnv = new TestEnvironment(oObj);
        XStandaloneDocumentInfo the_info = (XStandaloneDocumentInfo)
                UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
        try {
            the_info.loadFromURL(destUrl);
        } catch (com.sun.star.io.IOException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't load document: " + destUrl,e);
        }
        tEnv.addObjRelation("DOCURL",destUrl);
View Full Code Here

                m_aTestHelper.Message ( "Document stored." );
               
                //create StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo =
                        (XStandaloneDocumentInfo) UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo );
                xStandaloneDocInfo.loadFromURL ( sURL );
                m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
               
                //get the title from the object and check it
                XPropertySet xPropSet =
                        (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo );
                String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
                m_aTestHelper.Message ( "Get title: " + sTitle );
                if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
                    m_aTestHelper.Error ( "Title not match. Expected \""
                            + sDocTitle[i] +
                            "\"" );
                    return false;
                } else {
                    m_aTestHelper.Message ( "Title matched." );
                }
               
                //set a new title to the object
                sTitle += "_new";
                xPropSet.setPropertyValue ( "Title", sTitle );
                m_aTestHelper.Message ( "Set new title: " + sTitle );
               
                //store the object to the same file
                xStandaloneDocInfo.storeIntoURL ( sURL );
                m_aTestHelper.Message ( "Document info stored." );
               
                //create a new StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo_ = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo_ =
                        (XStandaloneDocumentInfo)UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo_ );
                xStandaloneDocInfo_.loadFromURL ( sURL );
                m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
               
                //get the title and check it
                XPropertySet xPropSet_ = (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo_ );
View Full Code Here

        }

        String Iname = util.utils.getImplName(oObj);
        log.println("Implementation Name: "+Iname);
        TestEnvironment tEnv = new TestEnvironment(oObj);
        XStandaloneDocumentInfo the_info = (XStandaloneDocumentInfo)
                UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
        try {
            the_info.loadFromURL(destUrl);
        } catch (com.sun.star.io.IOException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't load document: " + destUrl,e);
        }
        tEnv.addObjRelation("DOCURL",destUrl);
View Full Code Here

                m_aTestHelper.Message ( "Document stored." );
               
                //create StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo =
                        UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo);
                xStandaloneDocInfo.loadFromURL ( sURL );
                m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
               
                //get the title from the object and check it
                XPropertySet xPropSet =
                        UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo);
                String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
                m_aTestHelper.Message ( "Get title: " + sTitle );
                if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
                    m_aTestHelper.Error ( "Title not match. Expected \""
                            + sDocTitle[i] +
                            "\"" );
                    return false;
                } else {
                    m_aTestHelper.Message ( "Title matched." );
                }
               
                //set a new title to the object
                sTitle += "_new";
                xPropSet.setPropertyValue ( "Title", sTitle );
                m_aTestHelper.Message ( "Set new title: " + sTitle );
               
                //store the object to the same file
                xStandaloneDocInfo.storeIntoURL ( sURL );
                m_aTestHelper.Message ( "Document info stored." );
               
                //create a new StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo_ = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo_ =
                        UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo_);
                xStandaloneDocInfo_.loadFromURL ( sURL );
                m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
               
                //get the title and check it
                XPropertySet xPropSet_ = UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo_);
                String sTitle_ = xPropSet_.getPropertyValue ( "Title" ).toString ();
View Full Code Here

        }

        String Iname = util.utils.getImplName(oObj);
        log.println("Implementation Name: "+Iname);
        TestEnvironment tEnv = new TestEnvironment(oObj);
        XStandaloneDocumentInfo the_info = (XStandaloneDocumentInfo)
                UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
        try {
            the_info.loadFromURL(destUrl);
        } catch (com.sun.star.io.IOException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't load document: " + destUrl,e);
        }
        tEnv.addObjRelation("DOCURL",destUrl);
View Full Code Here

                m_aTestHelper.Message ( "Document stored." );
               
                //create StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo =
                        (XStandaloneDocumentInfo) UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo );
                xStandaloneDocInfo.loadFromURL ( sURL );
                m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
               
                //get the title from the object and check it
                XPropertySet xPropSet =
                        (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo );
                String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
                m_aTestHelper.Message ( "Get title: " + sTitle );
                if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
                    m_aTestHelper.Error ( "Title not match. Expected \""
                            + sDocTitle[i] +
                            "\"" );
                    return false;
                } else {
                    m_aTestHelper.Message ( "Title matched." );
                }
               
                //set a new title to the object
                sTitle += "_new";
                xPropSet.setPropertyValue ( "Title", sTitle );
                m_aTestHelper.Message ( "Set new title: " + sTitle );
               
                //store the object to the same file
                xStandaloneDocInfo.storeIntoURL ( sURL );
                m_aTestHelper.Message ( "Document info stored." );
               
                //create a new StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo_ = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo_ =
                        (XStandaloneDocumentInfo)UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo_ );
                xStandaloneDocInfo_.loadFromURL ( sURL );
                m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
               
                //get the title and check it
                XPropertySet xPropSet_ = (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo_ );
View Full Code Here

        }

        String Iname = util.utils.getImplName(oObj);
        log.println("Implementation Name: "+Iname);
        TestEnvironment tEnv = new TestEnvironment(oObj);
        XStandaloneDocumentInfo the_info = (XStandaloneDocumentInfo)
                UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
        try {
            the_info.loadFromURL(destUrl);
        } catch (com.sun.star.io.IOException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't load document: " + destUrl,e);
        }
        tEnv.addObjRelation("DOCURL",destUrl);
View Full Code Here

        }

        String Iname = util.utils.getImplName(oObj);
        log.println("Implementation Name: "+Iname);
        TestEnvironment tEnv = new TestEnvironment(oObj);
        XStandaloneDocumentInfo the_info = (XStandaloneDocumentInfo)
                UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
        try {
            the_info.loadFromURL(destUrl);
        } catch (com.sun.star.io.IOException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't load document: " + destUrl,e);
        }
        tEnv.addObjRelation("DOCURL",destUrl);
View Full Code Here

                m_aTestHelper.Message ( "Document stored." );
               
                //create StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo =
                        (XStandaloneDocumentInfo) UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo );
                xStandaloneDocInfo.loadFromURL ( sURL );
                m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
               
                //get the title from the object and check it
                XPropertySet xPropSet =
                        (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo );
                String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
                m_aTestHelper.Message ( "Get title: " + sTitle );
                if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
                    m_aTestHelper.Error ( "Title not match. Expected \""
                            + sDocTitle[i] +
                            "\"" );
                    return false;
                } else {
                    m_aTestHelper.Message ( "Title matched." );
                }
               
                //set a new title to the object
                sTitle += "_new";
                xPropSet.setPropertyValue ( "Title", sTitle );
                m_aTestHelper.Message ( "Set new title: " + sTitle );
               
                //store the object to the same file
                xStandaloneDocInfo.storeIntoURL ( sURL );
                m_aTestHelper.Message ( "Document info stored." );
               
                //create a new StandaloneDocumentInfo object and load it from the file
                Object oStandaloneDocInfo_ = m_xMSF.createInstance (
                        "com.sun.star.document.StandaloneDocumentInfo" );
                XStandaloneDocumentInfo xStandaloneDocInfo_ =
                        (XStandaloneDocumentInfo)UnoRuntime.queryInterface (
                        XStandaloneDocumentInfo.class, oStandaloneDocInfo_ );
                xStandaloneDocInfo_.loadFromURL ( sURL );
                m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
               
                //get the title and check it
                XPropertySet xPropSet_ = (XPropertySet)UnoRuntime.queryInterface (
                        XPropertySet.class, oStandaloneDocInfo_ );
View Full Code Here

TOP

Related Classes of com.sun.star.document.XStandaloneDocumentInfo

Copyright © 2018 www.massapicom. 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.