Examples of XTransientDocumentsDocumentContentFactory


Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

    public void checkTransientDocumentsDocumentContent() {
        try {
            // create a content provider
            Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory");

            XTransientDocumentsDocumentContentFactory xTransientDocumentsDocumentContentFactory =
                            (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                            XTransientDocumentsDocumentContentFactory.class, o);
            // get the model from the opened document
            XModel xModel = xTextDoc.getCurrentController().getModel();

            // a little additional check for 114733
            XDocumentSubStorageSupplier xDocumentSubStorageSupplier = (XDocumentSubStorageSupplier)
                            UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
            String[]names = xDocumentSubStorageSupplier.getDocumentSubStoragesNames();
            for (int i=0; i<names.length; i++) {
                log.println("SubStorage names " + i + ": " +names[i]);
            }
            XStorage xStorage = xDocumentSubStorageSupplier.getDocumentSubStorage(names[0], ElementModes.READWRITE);
            assure("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
            // get content
            XContent xContent = xTransientDocumentsDocumentContentFactory.createDocumentContent(xModel);
            // actual test: execute some commands
            XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);

            // create the command and arguments
            Command command = new Command();
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

    @Test public void checkTransientDocumentsDocumentContent() {
        try {
            // create a content provider
            Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory");

            XTransientDocumentsDocumentContentFactory xTransientDocumentsDocumentContentFactory =
                            UnoRuntime.queryInterface(XTransientDocumentsDocumentContentFactory.class, o);
            // get the model from the opened document
            XModel xModel = xTextDoc.getCurrentController().getModel();

            // a little additional check for 114733
            XDocumentSubStorageSupplier xDocumentSubStorageSupplier = UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
            String[]names = xDocumentSubStorageSupplier.getDocumentSubStoragesNames();
            for (int i=0; i<names.length; i++) {
                System.out.println("SubStorage names " + i + ": " +names[i]);
            }
            XStorage xStorage = xDocumentSubStorageSupplier.getDocumentSubStorage(names[0], ElementModes.READWRITE);
            assertTrue("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
            // get content
            XContent xContent = xTransientDocumentsDocumentContentFactory.createDocumentContent(xModel);
            // actual test: execute some commands
            XCommandProcessor xCommandProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, xContent);

            // create the command and arguments
            Command command = new Command();
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

    public void checkTransientDocumentsDocumentContent() {
        try {
            // create a content provider
            Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory");

            XTransientDocumentsDocumentContentFactory xTransientDocumentsDocumentContentFactory =
                            (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                            XTransientDocumentsDocumentContentFactory.class, o);
            // get the model from the opened document
            XModel xModel = xTextDoc.getCurrentController().getModel();

            // a little additional check for 114733
            XDocumentSubStorageSupplier xDocumentSubStorageSupplier = (XDocumentSubStorageSupplier)
                            UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
            String[]names = xDocumentSubStorageSupplier.getDocumentSubStoragesNames();
            for (int i=0; i<names.length; i++) {
                log.println("SubStorage names " + i + ": " +names[i]);
            }
            XStorage xStorage = xDocumentSubStorageSupplier.getDocumentSubStorage(names[0], ElementModes.READWRITE);
            assure("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
            // get content
            XContent xContent = xTransientDocumentsDocumentContentFactory.createDocumentContent(xModel);
            // actual test: execute some commands
            XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);

            // create the command and arguments
            Command command = new Command();
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

        // TODO see if we want to remove the ParcelContainer is no Parcels/Libraries left
    }

    private String getDocUrlFromModel( XModel document )
    {
        XTransientDocumentsDocumentContentFactory factory = null;
        try
        {
            factory = (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                    XTransientDocumentsDocumentContentFactory.class,
                        m_xMultiComponentFactory.createInstanceWithContext(
                            "com.sun.star.frame.TransientDocumentsDocumentContentFactory",
                            m_xContext
                        )
                    );
        }
        catch (Exception ex)
        {
        }

        if ( factory == null )
            throw new com.sun.star.uno.RuntimeException( "ScriptProvider: unable to create a TDOC context factory.", this );

        try
        {
            XContent content = factory.createDocumentContent( document );
            return content.getIdentifier().getContentIdentifier();
        }
        catch( Exception ex )
        {
        }
View Full Code Here

Examples of com.sun.star.frame.XTransientDocumentsDocumentContentFactory

    public void checkTransientDocumentsDocumentContent() {
        try {
            // create a content provider
            Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory");

            XTransientDocumentsDocumentContentFactory xTransientDocumentsDocumentContentFactory =
                            (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
                            XTransientDocumentsDocumentContentFactory.class, o);
            // get the model from the opened document
            XModel xModel = xTextDoc.getCurrentController().getModel();

            // a little additional check for 114733
            XDocumentSubStorageSupplier xDocumentSubStorageSupplier = (XDocumentSubStorageSupplier)
                            UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
            String[]names = xDocumentSubStorageSupplier.getDocumentSubStoragesNames();
            for (int i=0; i<names.length; i++) {
                log.println("SubStorage names " + i + ": " +names[i]);
            }
            XStorage xStorage = xDocumentSubStorageSupplier.getDocumentSubStorage(names[0], ElementModes.READWRITE);
            assure("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
            // get content
            XContent xContent = xTransientDocumentsDocumentContentFactory.createDocumentContent(xModel);
            // actual test: execute some commands
            XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);

            // create the command and arguments
            Command command = new Command();
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.