summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2018-06-14 07:48:34 +0000
committerJens Carl <j.carl43@gmx.de>2018-06-14 18:25:57 +0200
commitcceef188206358fdefaa9582230253b844b54216 (patch)
tree64c2d33993c01c59d52f4932969de416d1d48625 /qadevOOo
parent3a3bf63bfb10e97e045a9b7cf1f357930b668ac2 (diff)
tdf#45904 Move _XFormulaQuery Java tests to C++
Enable tests for ScTableSheetObj and fixes #i86793. Change-Id: Ic9914fd74a70034e4adc7e55203c92935a472f9d Reviewed-on: https://gerrit.libreoffice.org/55782 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv2
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv2
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv2
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangesObj.csv2
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java189
7 files changed, 0 insertions, 200 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 7718aa632156..a7bc5b37b02d 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -568,7 +568,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery \
qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing \
qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \
- qadevOOo/tests/java/ifc/sheet/_XFormulaQuery \
qadevOOo/tests/java/ifc/sheet/_XRangeSelection \
qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \
qadevOOo/tests/java/ifc/style/_CharacterProperties \
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 74d9a7752bb9..2e0517525f23 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
@@ -114,8 +114,6 @@
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesComplex";"CharFontPitchComplex"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesComplex";"CharPostureComplex"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex"
-"ScCellCursorObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()"
-"ScCellCursorObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()"
"ScCellCursorObj";"com::sun::star::util::XIndent";"decrementIndent()"
"ScCellCursorObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScCellCursorObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
index a217fac5191b..aab8c8f92f01 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
@@ -109,8 +109,6 @@
"ScCellObj";"com::sun::star::style::CharacterPropertiesComplex";"CharPostureComplex"
"ScCellObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex"
"ScCellObj";"com::sun::star::text::XTextRangeMover#optional";"moveTextRange()"
-"ScCellObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()"
-"ScCellObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()"
"ScCellObj";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionStarts()"
"ScCellObj";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionEnds()"
"ScCellObj";"com::sun::star::util::XIndent";"decrementIndent()"
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 581e8884dec1..eed12b69bc58 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
@@ -109,8 +109,6 @@
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesComplex";"CharFontPitchComplex"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesComplex";"CharPostureComplex"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex"
-"ScCellRangeObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()"
-"ScCellRangeObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()"
"ScCellRangeObj";"com::sun::star::util::XIndent";"decrementIndent()"
"ScCellRangeObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScCellRangeObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangesObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangesObj.csv
index 94ac66e6be7c..9bd9774410f5 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangesObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangesObj.csv
@@ -113,8 +113,6 @@
"ScCellRangesObj";"com::sun::star::style::CharacterPropertiesComplex";"CharFontPitchComplex"
"ScCellRangesObj";"com::sun::star::style::CharacterPropertiesComplex";"CharPostureComplex"
"ScCellRangesObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex"
-"ScCellRangesObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()"
-"ScCellRangesObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()"
"ScCellRangesObj";"com::sun::star::util::XIndent";"decrementIndent()"
"ScCellRangesObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScCellRangesObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()"
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 cb29417eb43b..59f92107cde8 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -112,8 +112,6 @@
"ScTableSheetObj";"com::sun::star::util::XProtectable";"protect()"
"ScTableSheetObj";"com::sun::star::util::XProtectable";"unprotect()"
"ScTableSheetObj";"com::sun::star::util::XProtectable";"isProtected()"
-"ScTableSheetObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()"
-"ScTableSheetObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()"
"ScTableSheetObj";"com::sun::star::util::XIndent";"decrementIndent()"
"ScTableSheetObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java b/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java
deleted file mode 100644
index b4958937ee2f..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java
+++ /dev/null
@@ -1,189 +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 lib.MultiMethodTest;
-import lib.Status;
-import lib.StatusException;
-
-import com.sun.star.sheet.XFormulaQuery;
-import com.sun.star.sheet.XSheetCellRanges;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XCell;
-import com.sun.star.uno.UnoRuntime;
-
-public class _XFormulaQuery extends MultiMethodTest {
-
- public XFormulaQuery oObj;
-
- protected XSpreadsheet oSheet = null;
- private XCell mxCell;
- private int miQueryThisDependentRange = 1;
- private int miQueryThisPrecedentRange = 1;
- private int[] miExpectedDependentValues;
- private int[] miExpectedPrecedentValues;
-
- @Override
- protected void before() {
- oSheet = (XSpreadsheet)tEnv.getObjRelation("SHEET");
-
- if (oSheet == null) {
- log.println("Object relation oSheet is missing");
- log.println("Trying to query the needed Interface");
- oSheet = UnoRuntime.queryInterface(
- XSpreadsheet.class, tEnv.getTestObject());
-
- if (oSheet == null) {
- throw new StatusException(Status.failed(
- "Object relation oSheet is missing"));
- }
- }
- Object o = tEnv.getObjRelation("MAKEENTRYINCELL");
- if (o != null) {
- mxCell = (XCell)o;
- }
- else {
- try {
- mxCell = oSheet.getCellByPosition(15, 15);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- throw new StatusException(e, Status.failed("Couldn't get initial cell"));
- }
- }
-
- o = tEnv.getObjRelation("RANGEINDICES");
- if (o != null) {
- int[]index = (int[])o;
- miQueryThisDependentRange = index[0];
- miQueryThisPrecedentRange = index[1];
- }
-
- o = tEnv.getObjRelation("EXPECTEDDEPENDENTVALUES");
- if (o != null) {
- miExpectedDependentValues = (int[])o;
- }
- else {
- miExpectedDependentValues = new int[4];
- miExpectedDependentValues[0] = 15;
- miExpectedDependentValues[1] = 15;
- miExpectedDependentValues[2] = 15;
- miExpectedDependentValues[3] = 15;
- }
-
- o = tEnv.getObjRelation("EXPECTEDPRECEDENTVALUES");
- if (o != null) {
- miExpectedPrecedentValues = (int[])o;
- }
- else {
- miExpectedPrecedentValues = new int[4];
- miExpectedPrecedentValues[0] = 0;
- miExpectedPrecedentValues[1] = 0;
- miExpectedPrecedentValues[2] = 15;
- miExpectedPrecedentValues[3] = 15;
- }
- }
-
- public void _queryDependents() {
- boolean res = true;
-
- try {
- mxCell.setFormula("=sum(A1:D1)");
- oSheet.getCellByPosition(0, 0).setValue(1);
- oSheet.getCellByPosition(1, 0).setValue(1);
- oSheet.getCellByPosition(2, 0).setValue(1);
- oSheet.getCellByPosition(3, 0).setValue(1);
-
- log.println(
- "calling oObj.queryDependents(false)");
- XSheetCellRanges getting = oObj.queryDependents(false);
- CellRangeAddress[] range = getting.getRangeAddresses();
-
- res = ((range[miQueryThisDependentRange].StartColumn==miExpectedDependentValues[0]) &&
- (range[miQueryThisDependentRange].EndColumn==miExpectedDependentValues[1]) &&
- (range[miQueryThisDependentRange].StartRow==miExpectedDependentValues[2]) &&
- (range[miQueryThisDependentRange].EndRow==miExpectedDependentValues[3]));
-
- if (!res) {
- log.println("Getting ("
- +(range[miQueryThisDependentRange]).StartColumn+","
- +(range[miQueryThisDependentRange]).EndColumn+","
- +(range[miQueryThisDependentRange]).StartRow+","
- +(range[miQueryThisDependentRange]).EndRow+")");
- log.println("Expected (" + miExpectedDependentValues[0] + "," +
- miExpectedDependentValues[1] + "," +
- miExpectedDependentValues[2] + "," +
- miExpectedDependentValues[3] + ")");
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Couldn't set initial version to cell");
- res = false;
- }
-
- tRes.tested("queryDependents()", res);
- }
-
- public void _queryPrecedents() {
- boolean res = true;
-
- try {
- mxCell.setFormula("=sum(A1:D1)");
- oSheet.getCellByPosition(0, 0).setValue(1);
- oSheet.getCellByPosition(1, 0).setValue(1);
- oSheet.getCellByPosition(2, 0).setValue(1);
- oSheet.getCellByPosition(3, 0).setValue(1);
- oSheet.getCellByPosition(1, 2).setFormula("=A16*2");
-
- log.println(
- "calling oObj.queryPrecedents(false)");
- XSheetCellRanges getting = oObj.queryPrecedents(false);
- CellRangeAddress[] range = getting.getRangeAddresses();
-
- res = ((range[miQueryThisPrecedentRange].StartColumn==miExpectedPrecedentValues[0]) &&
- (range[miQueryThisPrecedentRange].EndColumn==miExpectedPrecedentValues[1]) &&
- (range[miQueryThisPrecedentRange].StartRow==miExpectedPrecedentValues[2]) &&
- (range[miQueryThisPrecedentRange].EndRow==miExpectedPrecedentValues[3]));
-
- if (!res) {
- log.println("Getting ("
- +(range[miQueryThisPrecedentRange]).StartColumn+","
- +(range[miQueryThisPrecedentRange]).EndColumn+","
- +(range[miQueryThisPrecedentRange]).StartRow+","
- +(range[miQueryThisPrecedentRange]).EndRow+")");
- log.println("Expected (" + miExpectedPrecedentValues[0] + "," +
- miExpectedPrecedentValues[1] + "," +
- miExpectedPrecedentValues[2] + "," +
- miExpectedPrecedentValues[3] + ")");
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Couldn't set initial version to cell");
- res = false;
- }
-
- tRes.tested("queryPrecedents()", res);
- }
-
- /**
- * Forces environment recreation.
- */
- @Override
- protected void after() {
- disposeEnvironment();
- }
-
-}