Package com.sun.star.sheet

Examples of com.sun.star.sheet.XCellRangeAddressable


            xNamed.setName("dbRange");

            XCellRangeReferrer aReferrer = (XCellRangeReferrer) UnoRuntime.queryInterface(
                                                   XCellRangeReferrer.class,
                                                   dbrNA.getByName("dbRange"));
            XCellRangeAddressable aRangeA = (XCellRangeAddressable) UnoRuntime.queryInterface(
                                                    XCellRangeAddressable.class,
                                                    aReferrer.getReferredCells());
            aRange = aRangeA.getRangeAddress();
            oObj = (XInterface) AnyConverter.toObject(
                           new Type(XInterface.class),
                           dbrNA.getByName("dbRange"));
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
View Full Code Here


        Object[] selections = {oSheet, cellRange, cell_1, cell_2};
        tEnv.addObjRelation("Selections", selections);
       
        tEnv.addObjRelation("Comparer", new Comparator() {
            public int compare(Object o1, Object o2) {
                XCellRangeAddressable adr1 = (XCellRangeAddressable)
                UnoRuntime.queryInterface(XCellRangeAddressable.class, o1);
                XCellRangeAddressable adr2 = (XCellRangeAddressable)
                UnoRuntime.queryInterface(XCellRangeAddressable.class, o2);
                if (adr1 == null || adr2 == null) return -1;
                CellRangeAddress range1 = adr1.getRangeAddress();
                CellRangeAddress range2 = adr2.getRangeAddress();
                return ValueComparer.equalValue(range1, range2) ? 0 : 1 ;
            }
            public boolean equals(Object obj) {
                return compare(this, obj) == 0;
            } });
View Full Code Here

        XScenariosSupplier xSupp = (XScenariosSupplier)
            UnoRuntime.queryInterface(XScenariosSupplier.class, oSheet);
        XCellRange oRange = (XCellRange)
            UnoRuntime.queryInterface(XCellRange.class, oSheet);
        XCellRange myRange = oRange.getCellRangeByName("A1:N4");
        XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
        CellRangeAddress myAddr = oRangeAddr.getRangeAddress();

        CellRangeAddress[] oAddr = new CellRangeAddress[1];
        oAddr[0] = myAddr;

        xSupp.getScenarios().addNewByName("ScScenarios", oAddr, "Range");
View Full Code Here

        XScenariosSupplier xSupp = (XScenariosSupplier)
            UnoRuntime.queryInterface(XScenariosSupplier.class, oSheet);
        XCellRange oRange = (XCellRange)
            UnoRuntime.queryInterface(XCellRange.class, oSheet);
        XCellRange myRange = oRange.getCellRangeByName("A1:N4");
        XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
        CellRangeAddress myAddr = oRangeAddr.getRangeAddress();

        CellRangeAddress[] oAddr = new CellRangeAddress[1];
        oAddr[0] = myAddr;

        xSupp.getScenarios().addNewByName("ScScenarios", oAddr, "Range");
View Full Code Here

        Rectangle oRect = new Rectangle(500, 3000, 25000, 11000);

        XCellRange oRange = (XCellRange)
            UnoRuntime.queryInterface(XCellRange.class, oSheet);
        XCellRange myRange = oRange.getCellRangeByName("A1:N4");
        XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
        CellRangeAddress myAddr = oRangeAddr.getRangeAddress();

        CellRangeAddress[] oAddr = new CellRangeAddress[1];
        oAddr[0] = myAddr;
        XTableChartsSupplier oSupp = (XTableChartsSupplier)
            UnoRuntime.queryInterface(XTableChartsSupplier.class, oSheet);
View Full Code Here

        XScenariosSupplier xSupp = (XScenariosSupplier)
            UnoRuntime.queryInterface(XScenariosSupplier.class, oSheet);
        XCellRange oRange = (XCellRange)
            UnoRuntime.queryInterface(XCellRange.class, oSheet);
        XCellRange myRange = oRange.getCellRangeByName("A1:N4");
        XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
        CellRangeAddress myAddr = oRangeAddr.getRangeAddress();

        CellRangeAddress[] oAddr = new CellRangeAddress[1];
        oAddr[0] = myAddr;

        xSupp.getScenarios().addNewByName("ScScenarios", oAddr, "Range");
View Full Code Here

    public void _gotoNext(){
        boolean bResult = false;
        int startCol, endCol, startRow, endRow = 0;
        int startCol2, endCol2, startRow2, endRow2 = 0;

        XCellRangeAddressable oRange = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
        CellRangeAddress oAddr = oRange.getRangeAddress();
        startRow = oAddr.StartRow;
        startCol = oAddr.StartColumn;
        endRow = oAddr.EndRow;
        endCol = oAddr.EndColumn;

        oObj.gotoNext();

        oAddr = oRange.getRangeAddress();
        startRow2 = oAddr.StartRow;
        startCol2 = oAddr.StartColumn;
        endRow2 = oAddr.EndRow;
        endCol2 = oAddr.EndColumn;
View Full Code Here

    public void _gotoOffset(){
        boolean bResult = false;
        int startCol, endCol, startRow, endRow = 0;
        int startCol2, endCol2, startRow2, endRow2 = 0;

        XCellRangeAddressable oRange = (XCellRangeAddressable)
            UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
        CellRangeAddress oAddr = oRange.getRangeAddress();
        startRow = oAddr.StartRow;
        startCol = oAddr.StartColumn;
        endRow = oAddr.EndRow;
        endCol = oAddr.EndColumn;

        oObj.gotoOffset(4,4);

        oAddr = oRange.getRangeAddress();
        startRow2 = oAddr.StartRow;
        startCol2 = oAddr.StartColumn;
        endRow2 = oAddr.EndRow;
        endCol2 = oAddr.EndColumn;
        if (!(startCol == startCol2) || (startRow == startRow2)){
View Full Code Here

    public void _gotoPrevious(){
        boolean bResult = false;
        int startCol, endCol, startRow, endRow = 0;
        int startCol2, endCol2, startRow2, endRow2 = 0;

        XCellRangeAddressable oRange = (XCellRangeAddressable)
                  UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
        CellRangeAddress oAddr = oRange.getRangeAddress();
        startRow = oAddr.StartRow;
        startCol = oAddr.StartColumn;
        endRow = oAddr.EndRow;
        endCol = oAddr.EndColumn;

        oObj.gotoPrevious();

        oAddr = oRange.getRangeAddress();
        startRow2 = oAddr.StartRow;
        startCol2 = oAddr.StartColumn;
        endRow2 = oAddr.EndRow;
        endCol2 = oAddr.EndColumn;
View Full Code Here

     */
    public void _gotoStart(){
        boolean bResult = false;
        int startCol, endCol, startRow, endRow = 0;

        XCellRangeAddressable oRange = (XCellRangeAddressable)
                UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
        oObj.gotoStart();
        CellRangeAddress oAddr = oRange.getRangeAddress();
        startRow = oAddr.StartRow;
        startCol = oAddr.StartColumn;
        endRow = oAddr.EndRow;
        endCol = oAddr.EndColumn;
        if ((startCol == endCol) && (endRow == startRow)){
View Full Code Here

TOP

Related Classes of com.sun.star.sheet.XCellRangeAddressable

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.