diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-01-25 00:41:35 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-01-25 04:17:29 +0100 |
commit | dd0155967e0b679b7df3907fcb12e8cbd82cdefb (patch) | |
tree | 2308d5df1d7a86e3a9aa3d734c5ef134ea526877 /qadevOOo | |
parent | 017f846efa9b31cb692ad0c477b8e3607f297181 (diff) |
tdf#45904 Move XPropertySet Java tests to C++
Move XPropertySet Java tests to C++ for ScTableValidationObj.
Change-Id: If058f40ff73203d2705bf9841d0496d52ff93ed8
Reviewed-on: https://gerrit.libreoffice.org/66890
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableValidationObj.csv | 7 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScTableValidationObj.java | 118 |
3 files changed, 0 insertions, 126 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 8a8374069326..71887651aa48 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -992,7 +992,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScTableRowObj \ qadevOOo/tests/java/mod/_sc/ScTableSheetObj \ qadevOOo/tests/java/mod/_sc/ScTableSheetsObj \ - qadevOOo/tests/java/mod/_sc/ScTableValidationObj \ qadevOOo/tests/java/mod/_sc/ScTabViewObj \ qadevOOo/tests/java/mod/_sc/ScViewPaneObj \ qadevOOo/tests/java/mod/_sc/XMLContentExporter \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableValidationObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableValidationObj.csv deleted file mode 100644 index 743fb8ef8851..000000000000 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableValidationObj.csv +++ /dev/null @@ -1,7 +0,0 @@ -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"setPropertyValue()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"getPropertyValue()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"addPropertyChangeListener()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()" -"ScTableValidationObj";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()" diff --git a/qadevOOo/tests/java/mod/_sc/ScTableValidationObj.java b/qadevOOo/tests/java/mod/_sc/ScTableValidationObj.java deleted file mode 100644 index ce1a84e2b394..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScTableValidationObj.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.container.XIndexAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.sheet.XSpreadsheet; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.sheet.XSpreadsheets; -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.TableValidation</code>. <p> -* Object implements the following interfaces : -* <ul> -* <li> <code>com::sun::star::sheet::TableValidation</code></li> -* <li> <code>com::sun::star::beans::XPropertySet</code></li> -* <li> <code>com::sun::star::sheet::XSheetCondition</code></li> -* </ul> -* @see com.sun.star.sheet.TableValidation -* @see com.sun.star.beans.XPropertySet -* @see com.sun.star.sheet.XSheetCondition -* @see ifc.sheet._TableValidation -* @see ifc.beans._XPropertySet -* @see ifc.sheet._XSheetCondition -*/ -public class ScTableValidationObj extends TestCase { - private XSpreadsheetDocument xSpreadsheetDoc = 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" ); - xSpreadsheetDoc = SOF.createCalcDoc(null); - } - - /** - * Disposes Spreadsheet document. - */ - @Override - protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xSheetDoc " ); - XComponent oComp = UnoRuntime.queryInterface (XComponent.class, xSpreadsheetDoc) ; - util.DesktopTools.closeDoc(oComp); - } - - /** - * Creating a TestEnvironment for the interfaces to be tested. - * Retrieves a collection of spreadsheets from the document and takes one of - * them. Fills some cell in the spreadsheet. Obtains the property - * <code>'Validation'</code> of the spreadsheet. The value of the property - * is the instance of the service <code>com.sun.star.sheet.TableValidation</code>. - * @see com.sun.star.sheet.TableValidation - */ - @Override - protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception { - - XInterface oObj = null; - - log.println("getting sheets"); - XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets(); - - log.println("getting a sheet"); - XSpreadsheet oSheet = null; - XIndexAccess oIndexAccess = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); - oSheet = (XSpreadsheet) AnyConverter.toObject( - new Type(XSpreadsheet.class),oIndexAccess.getByIndex(0)); - - log.println("filling some cells"); - oSheet.getCellByPosition(5, 5).setValue(15); - oSheet.getCellByPosition(1, 4).setValue(10); - oSheet.getCellByPosition(2, 0).setValue(-5.15); - - XPropertySet Props = null; - - Props = UnoRuntime.queryInterface(XPropertySet.class, oSheet); - oObj = (XInterface) AnyConverter.toObject( - new Type(XInterface.class),Props.getPropertyValue("Validation")); - - log.println("creating a new environment for object"); - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - } // finish method getTestEnvironment -} // finish class ScTableValidationObj - |