diff options
author | Jens Carl <j.carl43@gmx.de> | 2018-11-20 07:22:27 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-11-20 10:18:46 +0100 |
commit | dc0616cda97c5039ae6b46ded001b51c6f9de498 (patch) | |
tree | 2e24a52f34d686d044c0f48bca57e4acd07e2a32 /qadevOOo | |
parent | 511c2d6b28f2f8a3f81558a551e8a5c04034ea74 (diff) |
tdf#45904 Move XEnumeration Java tests to C++
Move XEnumeration Java test to C++
for ScIndexEnumeration_SubTotalFieldsEnumeration.
Change-Id: Ibe2b283e99230c5e517eb80858ff31459f2c9844
Reviewed-on: https://gerrit.libreoffice.org/63627
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
3 files changed, 0 insertions, 110 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index b443935bd60e..58ede4e8b815 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -993,7 +993,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextCursor \ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextObj \ qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration \ - qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_SubTotalFieldsEnumeration \ qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration \ qadevOOo/tests/java/mod/_sc/ScLabelRangesObj \ qadevOOo/tests/java/mod/_sc/ScModelObj \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScIndexEnumeration_SubTotalFieldsEnumeration.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScIndexEnumeration_SubTotalFieldsEnumeration.csv deleted file mode 100644 index 1cba00a04945..000000000000 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScIndexEnumeration_SubTotalFieldsEnumeration.csv +++ /dev/null @@ -1,2 +0,0 @@ -"ScIndexEnumeration_SubTotalFieldsEnumeration";"com::sun::star::container::XEnumeration";"hasMoreElements()" -"ScIndexEnumeration_SubTotalFieldsEnumeration";"com::sun::star::container::XEnumeration";"nextElement()" diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_SubTotalFieldsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_SubTotalFieldsEnumeration.java deleted file mode 100644 index 0854b11989f7..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_SubTotalFieldsEnumeration.java +++ /dev/null @@ -1,107 +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.container.XEnumerationAccess; -import com.sun.star.container.XIndexAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.sheet.GeneralFunction; -import com.sun.star.sheet.SubTotalColumn; -import com.sun.star.sheet.XSpreadsheet; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.sheet.XSpreadsheets; -import com.sun.star.sheet.XSubTotalCalculatable; -import com.sun.star.sheet.XSubTotalDescriptor; -import com.sun.star.uno.AnyConverter; -import com.sun.star.uno.Type; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -public class ScIndexEnumeration_SubTotalFieldsEnumeration extends TestCase { - private XSpreadsheetDocument xSpreadsheetDoc; - - /** - * Creates Spreadsheet document. - */ - @Override - public void initialize( TestParameters Param, PrintWriter log ) throws Exception { - // get a soffice factory object - SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); - log.println("creating a spreadsheetdocument"); - 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); - } - - @Override - protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception { - - 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)); - - XSubTotalCalculatable xSTC = UnoRuntime.queryInterface(XSubTotalCalculatable.class, oSheet); - - XSubTotalDescriptor xSTD = xSTC.createSubTotalDescriptor(true); - - SubTotalColumn[] columns = new SubTotalColumn[1]; - SubTotalColumn column = new SubTotalColumn(); - column.Column = 5; - column.Function = GeneralFunction.SUM; - columns[0] = column; - xSTD.addNew(columns, 1); - - XIndexAccess oDescIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSTD); - - XInterface oObj = null; - - XEnumerationAccess ea = UnoRuntime.queryInterface(XEnumerationAccess.class,oDescIndex); - - oObj = ea.createEnumeration(); - - log.println("ImplementationName: "+util.utils.getImplName(oObj)); - // creating test environment - TestEnvironment tEnv = new TestEnvironment( oObj ); - - tEnv.addObjRelation("ENUM",ea); - - return tEnv; - - } // finish method getTestEnvironment -} |