Examples of XCellRangesQuery


Examples of com.sun.star.sheet.XCellRangesQuery

                   
                    // set the new numberformat to the cellrange DM->EUR
                    xCellProp.setPropertyValue( "NumberFormat", new Integer( iNewNumberFormat ) );
                   
                    // interate over all cells from the cellrange with an content and use the DM/EUR factor
                    XCellRangesQuery xCellRangesQuery = (XCellRangesQuery) UnoRuntime.queryInterface(
                        com.sun.star.sheet.XCellRangesQuery.class, xCellRange );
                    XSheetCellRanges xSheetCellRanges = xCellRangesQuery.queryContentCells(
                        (short) com.sun.star.sheet.CellFlags.VALUE );
                   
                    if( xSheetCellRanges.getCount() > 0 ) {
                        XEnumerationAccess xCellEnumerationAccess = xSheetCellRanges.getCells();
                        XEnumeration xCellEnumeration = xCellEnumerationAccess.createEnumeration();
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

        }
    }

    public void setErrorList() {
        try {
            XCellRangesQuery xCellQuery = (XCellRangesQuery)UnoRuntime.queryInterface( XCellRangesQuery.class, getActiveSheet() );
            XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells( (short)com.sun.star.sheet.CellFlags.FORMULA );
            XEnumerationAccess xFormulas = xFormulaCells.getCells();
            XEnumeration xFormulaEnum = xFormulas.createEnumeration();
            Object formulaCell = null;

            //  observ all formula cells
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

    }

    public void setError3List() {
        try {
            HashSet<String> allPrecedentNames = getPrecedentOfAllFormulas();
            XCellRangesQuery xCellQuery = (XCellRangesQuery)UnoRuntime.queryInterface(XCellRangesQuery.class, getActiveSheet());
            XSheetCellRanges xValueCells = xCellQuery.queryContentCells( (short)com.sun.star.sheet.CellFlags.VALUE );
            XEnumerationAccess xValues = xValueCells.getCells();
            XEnumeration xValueEnum = xValues.createEnumeration();
            Object valueCell = null;
            boolean isContain; // true (valid) if at least a formula contains the cell
            // observ all valueCells
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

*/
    public HashSet<String> getPrecedentOfAllFormulas(){

        HashSet<String> precedentNames = new HashSet<String>();

        XCellRangesQuery xCellQuery = (XCellRangesQuery)UnoRuntime.queryInterface( XCellRangesQuery.class, getActiveSheet() );
        XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells( (short)com.sun.star.sheet.CellFlags.FORMULA );
        XEnumerationAccess xFormulas = xFormulaCells.getCells();
        XEnumeration xFormulaEnum = xFormulas.createEnumeration();
        Object formulaCell = null;

        while ( xFormulaEnum.hasMoreElements() ) {
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

            //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL(
            //    "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps);
               
            // *********************************************************
            // example for use of XEnumerationAccess
            XCellRangesQuery xCellQuery = (XCellRangesQuery)
                UnoRuntime.queryInterface(XCellRangesQuery.class, sheet);
            XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells(
                (short)com.sun.star.sheet.CellFlags.FORMULA);
            XEnumerationAccess xFormulas = xFormulaCells.getCells();
            XEnumeration xFormulaEnum = xFormulas.createEnumeration();
           
            while (xFormulaEnum.hasMoreElements()) {
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

                    xCellProp.setPropertyValue( "NumberFormat",
                                                new Integer( iNewNumberFormat ) );
                   
                    // interate over all cells from the cellrange with an
                    // content and use the DM/EUR factor
                    XCellRangesQuery xCellRangesQuery = (XCellRangesQuery)
                        UnoRuntime.queryInterface(
                        XCellRangesQuery.class, xCellRange );
                   
                    XSheetCellRanges xSheetCellRanges =
                        xCellRangesQuery.queryContentCells(
                            (short) com.sun.star.sheet.CellFlags.VALUE );
                   
                    if( xSheetCellRanges.getCount() > 0 ) {
                        XEnumerationAccess xCellEnumerationAccess =
                            xSheetCellRanges.getCells();
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

                    xCellProp.setPropertyValue( "NumberFormat",
                                                new Integer( iNewNumberFormat ) );
                   
                    // interate over all cells from the cellrange with an
                    // content and use the DM/EUR factor
                    XCellRangesQuery xCellRangesQuery = (XCellRangesQuery)
                        UnoRuntime.queryInterface(
                        XCellRangesQuery.class, xCellRange );
                   
                    XSheetCellRanges xSheetCellRanges =
                        xCellRangesQuery.queryContentCells(
                            (short) com.sun.star.sheet.CellFlags.VALUE );
                   
                    if( xSheetCellRanges.getCount() > 0 ) {
                        XEnumerationAccess xCellEnumerationAccess =
                            xSheetCellRanges.getCells();
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

            log.println ("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        }

        XCellRangesQuery oCellRangesQuery = (XCellRangesQuery)
            UnoRuntime.queryInterface(XCellRangesQuery.class, oSheet);
        XSheetCellRanges oSheetCellRanges = oCellRangesQuery.queryVisibleCells();

        oObj = oSheetCellRanges.getCells();

        TestEnvironment tEnv = new TestEnvironment(oObj) ;
        log.println ("Object created.") ;
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

            log.println ("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        }

        XCellRangesQuery oCellRangesQuery = (XCellRangesQuery)
            UnoRuntime.queryInterface(XCellRangesQuery.class, oSheet);
        XSheetCellRanges oSheetCellRanges = oCellRangesQuery.queryVisibleCells();
        oEnum = (XEnumerationAccess) oSheetCellRanges.getCells();
        oObj = oSheetCellRanges.getCells().createEnumeration();

        TestEnvironment tEnv = new TestEnvironment(oObj);
View Full Code Here

Examples of com.sun.star.sheet.XCellRangesQuery

                    xCellProp.setPropertyValue( "NumberFormat",
                                                new Integer( iNewNumberFormat ) );
                   
                    // interate over all cells from the cellrange with an
                    // content and use the DM/EUR factor
                    XCellRangesQuery xCellRangesQuery = (XCellRangesQuery)
                        UnoRuntime.queryInterface(
                        XCellRangesQuery.class, xCellRange );
                   
                    XSheetCellRanges xSheetCellRanges =
                        xCellRangesQuery.queryContentCells(
                            (short) com.sun.star.sheet.CellFlags.VALUE );
                   
                    if( xSheetCellRanges.getCount() > 0 ) {
                        XEnumerationAccess xCellEnumerationAccess =
                            xSheetCellRanges.getCells();
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.