diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-12-01 01:00:41 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2017-12-01 19:17:54 +0100 |
commit | 350eec67a5989365560e38e9270990dcd0a019e8 (patch) | |
tree | c758839bc70046a86b9f41f698750ed09117defa /qadevOOo | |
parent | dccfe8765c25caf8485e659711a6df6c43ed63a9 (diff) |
tdf#45904 Move _XMultipleOperation Java tests to C++
Change-Id: I102b726e673f69bfe64eff7e28e380dd6f15f1f8
Reviewed-on: https://gerrit.libreoffice.org/45629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
5 files changed, 0 insertions, 179 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index ca7efb955432..d7476b028d5a 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -604,7 +604,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \ qadevOOo/tests/java/ifc/sheet/_XFormulaQuery \ qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions \ - qadevOOo/tests/java/ifc/sheet/_XMultipleOperation \ qadevOOo/tests/java/ifc/sheet/_XRangeSelection \ qadevOOo/tests/java/ifc/sheet/_XRecentFunctions \ qadevOOo/tests/java/ifc/sheet/_XScenario \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv index 0e5e6448c72b..e6b2ef052fd0 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv @@ -123,7 +123,6 @@ "ScCellCursorObj";"com::sun::star::sheet::XCellRangeFormula#optional";"setFormulaArray()" "ScCellCursorObj";"com::sun::star::util::XIndent";"decrementIndent()" "ScCellCursorObj";"com::sun::star::util::XIndent";"incrementIndent()" -"ScCellCursorObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellCursorObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv index 95186af1d9a2..deddc503556a 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv @@ -118,7 +118,6 @@ "ScCellRangeObj";"com::sun::star::sheet::XCellRangeFormula#optional";"setFormulaArray()" "ScCellRangeObj";"com::sun::star::util::XIndent";"decrementIndent()" "ScCellRangeObj";"com::sun::star::util::XIndent";"incrementIndent()" -"ScCellRangeObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellRangeObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv index 4438b3b4d7c9..5356fe01fc80 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv @@ -129,7 +129,6 @@ "ScTableSheetObj";"com::sun::star::sheet::XCellRangeFormula#optional";"setFormulaArray()" "ScTableSheetObj";"com::sun::star::util::XIndent";"decrementIndent()" "ScTableSheetObj";"com::sun::star::util::XIndent";"incrementIndent()" -"ScTableSheetObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"IsVisible" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"PageStyle" diff --git a/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java b/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java deleted file mode 100644 index 4f51db581af4..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package ifc.sheet; - -import com.sun.star.awt.Point; -import com.sun.star.sheet.TableOperationMode; -import com.sun.star.sheet.XCellAddressable; -import com.sun.star.sheet.XCellRangeAddressable; -import com.sun.star.sheet.XMultipleOperation; -import com.sun.star.sheet.XSpreadsheet; -import com.sun.star.table.XCell; -import com.sun.star.table.XCellRange; -import com.sun.star.uno.UnoRuntime; - -import lib.MultiMethodTest; -import lib.Status; -import lib.StatusException; - - -public class _XMultipleOperation extends MultiMethodTest { - public XMultipleOperation oObj = null; - protected XSpreadsheet oSheet = null; - boolean both = true; - - @Override - protected void before() { - oSheet = (XSpreadsheet) tEnv.getObjRelation("SHEET"); - - if (oSheet == null) { - throw new StatusException(Status.failed( - "Object relation oSheet is missing")); - } - - if (UnoRuntime.queryInterface(XSpreadsheet.class, tEnv.getTestObject()) != null) { - log.println("We have a sheet and won't do TableOperationMode.BOTH"); - both = false; - } - } - - public void _setTableOperation() { - boolean res = true; - XCellRange cellRange = oSheet.getCellRangeByName("$A$17:$A$17"); - XCellRangeAddressable CRA = UnoRuntime.queryInterface( - XCellRangeAddressable.class, - cellRange); - XCell cell = null; - XCell cell2 = null; - - try { - cell = oSheet.getCellByPosition(0, 16); - cell.setFormula("=a15+a16"); - cell = oSheet.getCellByPosition(0, 14); - cell2 = oSheet.getCellByPosition(0, 15); - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - log.println("Exception while getting Cell " + e.getMessage()); - } - - XCellAddressable CA = UnoRuntime.queryInterface( - XCellAddressable.class, cell); - XCellAddressable CA2 = UnoRuntime.queryInterface( - XCellAddressable.class, cell2); - Point[] cellCoords = new Point[3]; - double[] cellValues = new double[3]; - - log.println("filling cells"); - fillCells(); - log.println("setting TableOperation with parameter ROW"); - oObj.setTableOperation(CRA.getRangeAddress(), TableOperationMode.ROW, - CA.getCellAddress(), CA2.getCellAddress()); - log.println("checking values"); - cellCoords = new Point[] { - new Point(1, 1), new Point(2, 1), new Point(3, 1) - }; - cellValues = new double[] { 5, 10, 15 }; - res &= checkValues(cellCoords, cellValues); - - log.println("filling cells"); - fillCells(); - log.println("setting TableOperation with parameter COLUMN"); - oObj.setTableOperation(CRA.getRangeAddress(), - TableOperationMode.COLUMN, CA.getCellAddress(), - CA2.getCellAddress()); - log.println("checking values"); - cellCoords = new Point[] { - new Point(1, 1), new Point(1, 2), new Point(1, 3) - }; - cellValues = new double[] { 12, 24, 36 }; - res &= checkValues(cellCoords, cellValues); - - if (both) { - log.println("filling cells"); - fillCells(); - log.println("setting TableOperation with parameter BOTH"); - oObj.setTableOperation(CRA.getRangeAddress(), - TableOperationMode.BOTH, - CA.getCellAddress(), CA2.getCellAddress()); - log.println("checking values"); - cellCoords = new Point[] { - new Point(1, 1), new Point(2, 2), new Point(3, 3) - }; - cellValues = new double[] { 17, 34, 51 }; - res &= checkValues(cellCoords, cellValues); - } - - tRes.tested("setTableOperation()", res); - } - - protected void fillCells() { - XCell cell = null; - - try { - for (int k = 1; k < 5; k++) { - cell = oSheet.getCellByPosition(0, k); - cell.setValue(k * 12); - cell = oSheet.getCellByPosition(k, 0); - cell.setValue(k * 5); - } - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - log.println("Exception while filling Cells " + e.getMessage()); - } - } - - protected boolean checkValues(Point[] cellCoords, double[] cellValues) { - boolean res = true; - - for (int i = 0; i < cellValues.length; i++) { - try { - boolean locres = oSheet.getCellByPosition(cellCoords[i].X, - cellCoords[i].Y) - .getValue() == cellValues[i]; - res &= locres; - - if (!locres) { - log.println("Result differs for cell (" + - cellCoords[i].X + "," + cellCoords[i].Y + - ")"); - log.println("Expected: " + cellValues[i]); - log.println("Getting: " + - oSheet.getCellByPosition(cellCoords[i].X, - cellCoords[i].Y) - .getValue()); - } - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - log.println("Exception while checking Values " + - e.getMessage()); - res &= false; - } - } - - return res; - } - - /** - * Restores initial component text. - */ - @Override - protected void after() { - disposeEnvironment(); - } -}
\ No newline at end of file |