diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-11-13 08:52:52 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2017-11-13 19:43:59 +0100 |
commit | 1c52e61fdc48971387254d5c135e613fa42f9df8 (patch) | |
tree | cb5607a6f5d434bb8675e2dc24f8071c4597ecab /qadevOOo | |
parent | Resurrect still relevant part of external/harfbuzz/ubsan.patch (diff) | |
download | core-1c52e61fdc48971387254d5c135e613fa42f9df8.tar.gz core-1c52e61fdc48971387254d5c135e613fa42f9df8.zip |
tdf#45904 Move _XLabelRange Java tests to C++
Change-Id: I707631718c30d4503ae675f3679038705371f969
Reviewed-on: https://gerrit.libreoffice.org/44672
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Tested-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 2 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScLabelRangeObj.csv | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/sheet/_XLabelRange.java | 100 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScLabelRangeObj.java | 118 |
4 files changed, 0 insertions, 224 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 26988d28dc64..24db4d9f20a8 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -605,7 +605,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sheet/_XFormulaQuery \ qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions \ qadevOOo/tests/java/ifc/sheet/_XHeaderFooterContent \ - qadevOOo/tests/java/ifc/sheet/_XLabelRange \ qadevOOo/tests/java/ifc/sheet/_XMultipleOperation \ qadevOOo/tests/java/ifc/sheet/_XRangeSelection \ qadevOOo/tests/java/ifc/sheet/_XRecentFunctions \ @@ -1076,7 +1075,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableConditionalEntryEnumeration \ qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableRowsEnumeration \ qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TextFieldEnumeration \ - qadevOOo/tests/java/mod/_sc/ScLabelRangeObj \ qadevOOo/tests/java/mod/_sc/ScLabelRangesObj \ qadevOOo/tests/java/mod/_sc/ScModelObj \ qadevOOo/tests/java/mod/_sc/ScNamedRangeObj \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScLabelRangeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScLabelRangeObj.csv deleted file mode 100644 index 19a9abea5c54..000000000000 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScLabelRangeObj.csv +++ /dev/null @@ -1,4 +0,0 @@ -"ScLabelRangeObj";"com::sun::star::sheet::XLabelRange";"getLabelArea()" -"ScLabelRangeObj";"com::sun::star::sheet::XLabelRange";"setLabelArea()" -"ScLabelRangeObj";"com::sun::star::sheet::XLabelRange";"getDataArea()" -"ScLabelRangeObj";"com::sun::star::sheet::XLabelRange";"setDataArea()" diff --git a/qadevOOo/tests/java/ifc/sheet/_XLabelRange.java b/qadevOOo/tests/java/ifc/sheet/_XLabelRange.java deleted file mode 100644 index 84da96145364..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XLabelRange.java +++ /dev/null @@ -1,100 +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 util.ValueComparer; - -import com.sun.star.sheet.XLabelRange; -import com.sun.star.table.CellRangeAddress; - -/** -* Testing <code>com.sun.star.sheet.XLabelRange</code> -* interface methods : -* <ul> -* <li><code> getLabelArea()</code></li> -* <li><code> setLabelArea()</code></li> -* <li><code> getDataArea()</code></li> -* <li><code> setDataArea()</code></li> -* </ul> <p> -* @see com.sun.star.sheet.XLabelRange -*/ -public class _XLabelRange extends MultiMethodTest { - - public XLabelRange oObj = null; - public CellRangeAddress setDAddress = null; - public CellRangeAddress setLAddress = null; - - /** - * Test creates and stores <code>CellRangeAddress</code>, calls the method. - * <p>Has <b> OK </b> status if the method successfully returns. <p> - * @see com.sun.star.table.CellRangeAddress - */ - public void _setDataArea() { - int nr = Thread.activeCount(); - setDAddress = new CellRangeAddress((short)1, nr, 1, nr, 8); - oObj.setDataArea(setDAddress); - tRes.tested("setDataArea()", true); - } - - /** - * Test creates and stores <code>CellRangeAddress</code>, calls the method. - * <p>Has <b> OK </b> status if the method successfully returns. <p> - * @see com.sun.star.table.CellRangeAddress - */ - public void _setLabelArea() { - int nr = Thread.activeCount(); - setLAddress = new CellRangeAddress((short)1, nr, 0, nr, 0); - oObj.setLabelArea(setLAddress); - tRes.tested("setLabelArea()", true); - } - - /** - * Test calls the method and compares returned value with value that was set. - * <p>Has <b> OK </b> status if values are equal. <p> - * The following method tests are to be completed successfully before : - * <ul> - * <li> <code> setDataArea() </code> : to have address of the cell range for - * which the labels are valid</li> - * </ul> - */ - public void _getDataArea() { - requiredMethod("setDataArea()"); - CellRangeAddress gA = oObj.getDataArea(); - tRes.tested("getDataArea()", ValueComparer.equalValue(gA, setDAddress)); - } - - /** - * Test calls the method and compares returned value with value set before. - * <p>Has <b> OK </b> status if values are equal. <p> - * The following method tests are to be completed successfully before : - * <ul> - * <li> <code> setLabelArea() </code>: to have the cell range that contains - * the labels</li> - * </ul> - */ - public void _getLabelArea() { - requiredMethod("setLabelArea()"); - CellRangeAddress gA1 = oObj.getLabelArea(); - tRes.tested("getLabelArea()", - ValueComparer.equalValue(gA1, setLAddress)); - } -} // finish class _XLabelRange - - diff --git a/qadevOOo/tests/java/mod/_sc/ScLabelRangeObj.java b/qadevOOo/tests/java/mod/_sc/ScLabelRangeObj.java deleted file mode 100644 index df585350d548..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScLabelRangeObj.java +++ /dev/null @@ -1,118 +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 mod._sc; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.SOfficeFactory; - -import com.sun.star.beans.XPropertySet; -import com.sun.star.lang.XComponent; -import com.sun.star.sheet.XLabelRange; -import com.sun.star.sheet.XLabelRanges; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.table.CellRangeAddress; -import com.sun.star.uno.AnyConverter; -import com.sun.star.uno.Type; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -/** -* Test for object which is represented by service -* <code>com.sun.star.sheet.LabelRange</code>. <p> -* Object implements the following interfaces : -* <ul> -* <li> <code>com::sun::star::sheet::XLabelRange</code></li> -* </ul> -* @see com.sun.star.sheet.LabelRange -* @see com.sun.star.sheet.XLabelRange -* @see ifc.sheet._XLabelRange -*/ -public class ScLabelRangeObj extends TestCase { - private XSpreadsheetDocument xSheetDoc = null; - - /** - * Creates Spreadsheet document. - */ - @Override - protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception { - // get a soffice factory object - SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); - log.println( "creating a sheetdocument" ); - xSheetDoc = SOF.createCalcDoc(null); - } - - /** - * Disposes Spreadsheet document. - */ - @Override - protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xSheetDoc " ); - XComponent oComp = UnoRuntime.queryInterface (XComponent.class, xSheetDoc) ; - util.DesktopTools.closeDoc(oComp); - } - - /** - * Creating a TestEnvironment for the interfaces to be tested. - * Obtains the value of the property <code>'ColumnLabelRanges'</code> - * from the document. The property value is the collection of label ranges. - * Adds new label range to the collection using the interface - * <code>XLabelRanges</code> that was queried from the property value. - * Retrieved from the collection the label range with index 0. - * The retrieved label range is the instance of the service - * <code>com.sun.star.sheet.LabelRange</code>. - * @see com.sun.star.sheet.LabelRange - * @see com.sun.star.sheet.XLabelRanges - */ - @Override - protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception { - - XInterface oObj = null; - - // creation of testobject here - // first we write what we are intend to do to log file - log.println( "Creating a test environment" ); - - log.println("Getting test object ") ; - XPropertySet docProps = UnoRuntime.queryInterface(XPropertySet.class, xSheetDoc); - Object ranges = docProps.getPropertyValue("ColumnLabelRanges"); - XLabelRanges lRanges = UnoRuntime.queryInterface(XLabelRanges.class, ranges); - - log.println("Adding at least one element for ElementAccess interface"); - CellRangeAddress aRange2 = new CellRangeAddress((short)0, 0, 1, 0, 6); - CellRangeAddress aRange1 = new CellRangeAddress((short)0, 0, 0, 0, 1); - lRanges.addNew(aRange1, aRange2); - - oObj = (XLabelRange) AnyConverter.toObject( - new Type(XLabelRange.class),lRanges.getByIndex(0)); - - log.println("creating a new environment for object"); - TestEnvironment tEnv = new TestEnvironment(oObj); - - log.println("testing..."); - - return tEnv; - - } // finish method getTestEnvironment - -} // finish class ScLabelRangeObj - |