Examples of XStyleFamiliesSupplier


Examples of com.sun.star.style.XStyleFamiliesSupplier

        log.println("creating a test environment");

        try {
            log.println("getting style");
            XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier)
                UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
                xTextDoc);
            XNameAccess oSF = oSFS.getStyleFamilies();
            oSFNA = (XNameAccess) UnoRuntime.queryInterface(
                            XNameAccess.class,oSF.getByName("ParagraphStyles"));
            XIndexAccess oSFIA = (XIndexAccess)
                UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
            String[] els = oSFNA.getElementNames();
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

    public Size getPageSize()
    {
        try
        {
            XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
            com.sun.star.container.XNameAccess xNameAccess = null;
            xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
            com.sun.star.container.XNameContainer xPageStyleCollection = null;
            xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
            XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page"));
            return (Size) Helper.getUnoPropertyValue(xPageStyle, "Size");
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

       
    }
   
    public Size getPageSize() {
        try {
            XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
            com.sun.star.container.XNameAccess xNameAccess = null;
            xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
            com.sun.star.container.XNameContainer xPageStyleCollection = null;
            xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
            XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page"));
            return (Size) Helper.getUnoPropertyValue(xPageStyle, "Size");
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

                    // Give the new style a light blue background
                    xStyleProps.setPropertyValue ( "ParaBackColor", new Integer ( 13421823 ) );

                    // Get the StyleFamiliesSupplier interface of the document
                    XStyleFamiliesSupplier xSupplier = (XStyleFamiliesSupplier)UnoRuntime.queryInterface (
                            XStyleFamiliesSupplier.class, mxDoc );

                    // Use the StyleFamiliesSupplier interface to get the XNameAccess interface of the
                    // actual style families
                    XNameAccess xFamilies = ( XNameAccess ) UnoRuntime.queryInterface (
                            XNameAccess.class, xSupplier.getStyleFamilies() );

                    // Access the 'ParagraphStyles' Family
                    XNameContainer xFamily = (XNameContainer ) UnoRuntime.queryInterface (
                            XNameContainer.class, xFamilies.getByName ( "ParagraphStyles" ) );
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

           
            // use the service 'com.sun.star.style.ParagraphStyle'
            XInterface xInterface = (XInterface) xDocMSF.createInstance( "com.sun.star.style.ParagraphStyle" );
           
            // create a supplier to get the Style family collection
            XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(
                XStyleFamiliesSupplier.class, xTextDocument );
           
            // get the NameAccess interface from the Style family collection
            XNameAccess xNameAccess = xSupplier.getStyleFamilies();
           
            // select the Paragraph styles, you get the Paragraph style collection
            XNameContainer xParaStyleCollection = (XNameContainer) UnoRuntime.queryInterface(
                XNameContainer.class, xNameAccess.getByName( "ParagraphStyles" ));
           
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

        XInterface oObj = null;
        XNameAccess PageStyles = null;
        XStyle StdStyle = null;

        XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
        XNameAccess StyleFamNames = StyleFam.getStyleFamilies();

        // obtains style 'Standard' from style family 'PageStyles'
        try {
            PageStyles = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xDrawDoc);

            //obtain style families
            XStyleFamiliesSupplier styleSup = (XStyleFamiliesSupplier)
                UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xDrawDoc);
            XNameAccess StyleFamilies = styleSup.getStyleFamilies();
            //obtain all style family names
            String[] styleFamiliesNames = StyleFamilies.getElementNames();
            String styleFamilyName = styleFamiliesNames[0];
            //obtain style family with name[0]
            Object objectStyle = StyleFamilies.getByName(styleFamilyName);
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

        XPropertySet PropSet;
        XNameAccess PageStyles = null;
        XStyle StdStyle = null;

        log.println( "creating a test environment" );
        XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
        XNameAccess StyleFamNames = StyleFam.getStyleFamilies();

        // obtains style 'Standatd' from style family 'PageStyles'
        try {
            PageStyles = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

        XInterface oObj = null;
        XPropertySet PropSet;
        XNameAccess PageStyles = null;
        XStyle StdStyle = null;

        XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(
                XStyleFamiliesSupplier.class,
                xSpreadsheetDoc );
        XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
        try{
            PageStyles = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
            StdStyle = (XStyle) AnyConverter.toObject(
                        new Type(XStyle.class),PageStyles.getByName("Default"));
View Full Code Here

Examples of com.sun.star.style.XStyleFamiliesSupplier

        // first we write what we are intend to do to log file

        log.println("creating a test environment");

        log.println("getting style");
        XStyleFamiliesSupplier oStyleFamiliesSupplier = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(
                XStyleFamiliesSupplier.class, xSpreadsheetDoc);
        XNameAccess oStyleFamilies = oStyleFamiliesSupplier.getStyleFamilies();
        XIndexAccess oStyleFamiliesIndexAccess = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class, oStyleFamilies);
        XNameAccess oStyleFamilyNameAccess = null;
        XStyle oStyle = null;
        try {
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.