Examples of XDocumentInfoSupplier


Examples of com.sun.star.document.XDocumentInfoSupplier

        }
        xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
        xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
        xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);

        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        xDocInfo = xDocInfoSuppl.getDocumentInfo();
        CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
        xText = xTextDocument.getText();
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

    private void init() {
        xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
        xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
        xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        xDocInfo = xDocInfoSuppl.getDocumentInfo();
        CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
        xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
        xText = xTextDocument.getText();
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
        xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
        xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);

        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        xDocInfo = xDocInfoSuppl.getDocumentInfo();
        CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

            currentDate.Year = (short)year;
            DateUtils du = new DateUtils(xMSF, this.xTextDocument);
            int ff = du.getFormat( NumberFormatIndex.DATE_SYS_DDMMYY );
            String myDate = du.format(ff, currentDate);

            XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
            XDocumentInfo xDocInfo = xDocInfoSuppl.getDocumentInfo();
            Helper.setUnoPropertyValue(xDocInfo, "Author", fullname);
            Helper.setUnoPropertyValue(xDocInfo, "ModifiedBy", fullname);
            String description = (String)Helper.getUnoPropertyValue(xDocInfo, "Description");
            description = description + " " + TemplateDescription;
            description = JavaTools.replaceSubString(description, WizardName, "<wizard_name>");
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
        myFieldHandler.changeUserFieldContent("State", txtSenderState.getText());
    }
   
    public void txtTemplateNameTextChanged() {
        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        XDocumentInfo xDocInfo = xDocInfoSuppl.getDocumentInfo();
        String TitleName = txtTemplateName.getText();
        Helper.setUnoPropertyValue(xDocInfo, "Title", TitleName);
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class,model);
        return xDrawPagesSupplier.getDrawPages().getCount();
    }
   
    public static Object getDocumentInfo(Object document) {
        XDocumentInfoSupplier xDocumentInfoSupplier = (XDocumentInfoSupplier)UnoRuntime.queryInterface(XDocumentInfoSupplier.class,document);
        return xDocumentInfoSupplier.getDocumentInfo();
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        log.println("Opening a Writer document");
        xTextDoc = WriterTools.createTextDoc(m_xMSF);
        log.println("... done");

        XDocumentInfoSupplier xDocInfoSup =
            (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
                xTextDoc);
        XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo();
        XPropertyContainer xPropContainer =
            (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class,
                xDocInfo);

        log.println("Trying to add a existing property");

        boolean worked =
            addProperty(xPropContainer, "Author", (short) 0, "");
        assure("Could set an existing property", !worked);
        log.println("...done");

        log.println("Trying to add a integer property");
        worked =
            addProperty(xPropContainer, "intValue", com.sun.star.beans.PropertyAttribute.READONLY,
                new Integer(17));
        assure("Couldn't set an integer property", worked);
        log.println("...done");

        log.println("Trying to add a double property");
        worked =
            addProperty(xPropContainer, "doubleValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE ,
                new Double(17.7));
        assure("Couldn't set an double property", worked);
        log.println("...done");

        log.println("Trying to add a boolean property");
        worked =
            addProperty(xPropContainer, "booleanValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
                Boolean.TRUE);
        assure("Couldn't set an boolean property", worked);
        log.println("...done");

        log.println("Trying to add a date property");
        worked =
            addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
                new Date());
        assure("Couldn't set an date property", worked);
        log.println("...done");
       
        log.println("trying to remove a read only Property");
        try {
            xPropContainer.removeProperty ("intValue");
            assure("Could remove read only property", false);
        } catch (Exception e) {
            log.println("\tException was thrown "+e);
            log.println("\t...OK");
        }
        log.println("...done");       
       

        String tempdir = System.getProperty("java.io.tmpdir");
        String fs = System.getProperty("file.separator");

        if (!tempdir.endsWith(fs)) {
            tempdir += fs;
        }

        tempdir = util.utils.getFullURL(tempdir);

        log.println("Storing the document");

        try {
            XStorable store =
                (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    xTextDoc);
            store.storeToURL(tempdir + "DocInfo.oot",
                new PropertyValue[] {});
            DesktopTools.closeDoc(xTextDoc);
        } catch (Exception e) {
            assure("Couldn't store document", false);
        }

        log.println("...done");

        log.println("loading the document");

        try {
            XComponentLoader xCL =
                (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,
                    m_xMSF.createInstance(
                        "com.sun.star.frame.Desktop"));
            XComponent xComp =
                xCL.loadComponentFromURL(tempdir + "DocInfo.oot",
                    "_blank", 0, new PropertyValue[] {});
            xTextDoc =
                (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class,
                    xComp);
        } catch (Exception e) {
            assure("Couldn't load document", false);
        }

        log.println("...done");

        xDocInfoSup =
            (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
                xTextDoc);
        xDocInfo = xDocInfoSup.getDocumentInfo();

        XPropertySet xProps =
            (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
                xDocInfo);
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
        myFieldHandler.changeUserFieldContent("State", txtSenderState.getText());
    }
   
    public void txtTemplateNameTextChanged() {
        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        XDocumentInfo xDocInfo = xDocInfoSuppl.getDocumentInfo();
        String TitleName = txtTemplateName.getText();
        Helper.setUnoPropertyValue(xDocInfo, "Title", TitleName);
    }
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

            {"end", "office:meta"},
            {"end", "office:document-meta"}} ;

        tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;

        XDocumentInfoSupplier infoSup = (XDocumentInfoSupplier)
            UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xSheetDoc) ;
        final XPropertySet docInfo = (XPropertySet) UnoRuntime.queryInterface
            (XPropertySet.class, infoSup.getDocumentInfo()) ;
        final PrintWriter logF = log ;

        tEnv.addObjRelation("XDocumentHandler.ImportChecker",
            new ifc.xml.sax._XDocumentHandler.ImportChecker() {
                public boolean checkImport() {
View Full Code Here

Examples of com.sun.star.document.XDocumentInfoSupplier

        initializeElements();
        setElements();
    }

    public void txtTemplateNameTextChanged() {
        XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
        XDocumentInfo xDocInfo = xDocInfoSuppl.getDocumentInfo();
        String TitleName = txtTemplateName.getText();
        Helper.setUnoPropertyValue(xDocInfo, "Title", TitleName);
    }
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.