Package com.sun.star.uno

Examples of com.sun.star.uno.XInterface


    public void enableFinishButton(boolean enabled) {
        setControlProperty("btnWizardFinish", "Enabled", enabled ? Boolean.TRUE : Boolean.FALSE);
    }

    public void setStepEnabled(int _nStep, boolean bEnabled) {
        XInterface xRoadmapItem = getRoadmapItemByID(_nStep);
        if (xRoadmapItem != null)
            Helper.setUnoPropertyValue(xRoadmapItem, "Enabled", new Boolean(bEnabled));
    }
View Full Code Here


    }

    public boolean isStepEnabled(int _nStep) {
        try {
            boolean bIsEnabled;
            XInterface xRoadmapItem = getRoadmapItemByID(_nStep);
            if (xRoadmapItem == null)
                // Todo: In this case an exception should be thrown
                return false;
            bIsEnabled = AnyConverter.toBoolean(Helper.getUnoPropertyValue(xRoadmapItem, "Enabled"));
            return bIsEnabled;
View Full Code Here

   
    public String getStorePath(){
    try {
        StoreName = getStoreName();        
        String StorePath;
        XInterface xInterface = (XInterface) CurReportDocument.xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
        XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
        StorePath = FileAccess.getOfficePath(CurReportDocument.xMSF, "Temp", xSimpleFileAccess) + "/" + StoreName;             
        return StorePath;
    } catch (Exception e) {
        e.printStackTrace(System.out);
View Full Code Here

    void getInterfaces(XMultiServiceFactory xMSF) {
        try {
            this.xMSF = xMSF;
            xDatabaseContext = (XInterface) xMSF.createInstance("com.sun.star.sdb.DatabaseContext");
            xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDatabaseContext);
            XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.sdb.InteractionHandler");
            oInteractionHandler = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xInteractionHandler);
            DataSourceNames = xNameAccess.getElementNames();
        } catch (Exception exception) {
            exception.printStackTrace(System.out);
        }
View Full Code Here

        getDataSourceInterfaces();
        if (bPasswordIsRequired == false) {
            DBConnection = xDataSource.getConnection("", "");
            bgetConnection = true;
        } else {
            XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.sdb.InteractionHandler");
            XInteractionHandler interactionHandler = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xInteractionHandler);
            boolean bExitLoop = true;
            do {
                XCompletedConnection xCompleted = (XCompletedConnection) UnoRuntime.queryInterface(XCompletedConnection.class, xDataSource);
                try {
View Full Code Here

        XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, _xDocNameAccess);
        Object oDBDocument = xDocMSF.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition", aDocProperties);
        XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocNameAccess);
        String sdocname = Desktop.getUniqueName(_xDocNameAccess, basename);
        xHier.insertByHierarchicalName(sdocname, oDBDocument);
        XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
        XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
        xSimpleFileAccess.kill(sPath);
    } catch (Exception e) {
        e.printStackTrace(System.out);
    }}
View Full Code Here

    }


    public boolean storeDatabaseDocumentToTempPath(XComponent _xcomponent, String _storename){
    try{
        XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
        XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
        String storepath = FileAccess.getOfficePath(xMSF, "Temp", xSimpleFileAccess) + "/" + _storename;
        XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, _xcomponent);
        PropertyValue[] oStoreProperties = new PropertyValue[1];
        oStoreProperties[0] = Properties.createProperty("FilterName", "writer8");
View Full Code Here

                    public void start(XClientObject client) {
                        client.call(
                            new XServerObject() {
                                public void call(XInterface object) {}
                            },
                            new XInterface() {});
                    }
                };
        }
View Full Code Here

    }

    public XNamed addLinkedTextSection(XTextCursor xTextCursor, String sLinkRegion, DBColumn CurDBColumn, Object CurGroupValue) {
    XNamed xNamedTextSection = null;
    try {
        XInterface xTextSection = (XInterface) CurReportDocument.xMSFDoc.createInstance("com.sun.star.text.TextSection");
        XTextContent xTextSectionContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextSection);
        xNamedTextSection = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextSection);
        xTextCursor.gotoEnd(false);
        xTextCursor.getText().insertTextContent(xTextCursor, xTextSectionContent, true);
        Helper.setUnoPropertyValue(xTextSection, "LinkRegion", sLinkRegion);
View Full Code Here

        }
    }

    private static final class Provider implements XInstanceProvider {
        public Object getInstance(String instanceName) {
            return new XInterface() {};
        }
View Full Code Here

TOP

Related Classes of com.sun.star.uno.XInterface

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.