summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-03-14 22:55:04 +0000
committerJens Carl <j.carl43@gmx.de>2019-03-15 23:54:26 +0100
commit4eff4061814020b319fb3ec5a7ce56fcfa7cf7bf (patch)
tree7b57525a9ac51f9524ca889c320b331854541273 /qadevOOo
parent16cf63a6ff34644e79e00fa2f2d9f35e7ea6b613 (diff)
tdf#45904 Move XTableColumns Java tests to C++
Move XTableColumns Java tests to C++ for ScTableColumnsObj. Change-Id: Iead7ca3d7c07820086f75d86833b7bfc97978751 Reviewed-on: https://gerrit.libreoffice.org/69286 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.ScTableColumnsObj.csv2
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScTableColumnsObj.java123
3 files changed, 0 insertions, 126 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 805ddeca0e38..d839184c72c1 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -973,7 +973,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/mod/_sc/ScStyleObj \
qadevOOo/tests/java/mod/_sc/ScSubTotalDescriptorBase \
qadevOOo/tests/java/mod/_sc/ScTableColumnObj \
- qadevOOo/tests/java/mod/_sc/ScTableColumnsObj \
qadevOOo/tests/java/mod/_sc/ScTableRowObj \
qadevOOo/tests/java/mod/_sc/ScTableSheetObj \
qadevOOo/tests/java/mod/_sc/ScTableSheetsObj \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnsObj.csv
deleted file mode 100644
index 43c4b321bc7d..000000000000
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnsObj.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"ScTableColumnsObj";"com::sun::star::table::XTableColumns";"insertByIndex()"
-"ScTableColumnsObj";"com::sun::star::table::XTableColumns";"removeByIndex()"
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableColumnsObj.java b/qadevOOo/tests/java/mod/_sc/ScTableColumnsObj.java
deleted file mode 100644
index 97fab4bbbea3..000000000000
--- a/qadevOOo/tests/java/mod/_sc/ScTableColumnsObj.java
+++ /dev/null
@@ -1,123 +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.XNameAccess;
-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.table.XCellRange;
-import com.sun.star.table.XColumnRowRange;
-import com.sun.star.table.XTableColumns;
-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.table.TableColumns</code>. <p>
-* Object implements the following interfaces :
-* <ul>
-* <li> <code>com::sun::star::container::XIndexAccess</code></li>
-* <li> <code>com::sun::star::container::XElementAccess</code></li>
-* <li> <code>com::sun::star::container::XNameAccess</code></li>
-* <li> <code>com::sun::star::table::XTableColumns</code></li>
-* </ul>
-* @see com.sun.star.table.TableColumns
-* @see com.sun.star.container.XIndexAccess
-* @see com.sun.star.container.XElementAccess
-* @see com.sun.star.container.XNameAccess
-* @see com.sun.star.table.XTableColumns
-* @see ifc.container._XIndexAccess
-* @see ifc.container._XElementAccess
-* @see ifc.container._XNameAccess
-* @see ifc.table._XTableColumns
-*/
-public class ScTableColumnsObj 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.
- * Retrieves a collection of spreadsheets from the document and takes one of
- * them. Obtains the collection of columns in the range using the interface
- * <code>XColumnRowRange</code>. This collection is the instance of the
- * service <code>com.sun.star.table.TableColumns</code>.
- * @see com.sun.star.table.XColumnRowRange
- * @see com.sun.star.table.TableColumns
- */
- @Override
- protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
-
- XInterface oObj = null;
-
- // creation of the testobject here
- // first we write what we are intend to do to log file
- log.println("creating a test environment");
-
- log.println("getting column");
- XSpreadsheets xSpreadsheets = xSheetDoc.getSheets();
- XNameAccess oNames = UnoRuntime.queryInterface( XNameAccess.class, xSpreadsheets );
- XSpreadsheet xSpreadsheet = (XSpreadsheet) AnyConverter.toObject(
- new Type(XSpreadsheet.class),
- oNames.getByName(oNames.getElementNames()[0]));
-
- XColumnRowRange oColumnRowRange = UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);
- XTableColumns oColumns = oColumnRowRange.getColumns();
- oObj = oColumns;
-
- log.println("creating a new environment for object");
- TestEnvironment tEnv = new TestEnvironment(oObj);
-
- // adding relation for XTableColumns
- tEnv.addObjRelation("XTableColumns.XCellRange",
- UnoRuntime.queryInterface(XCellRange.class, xSpreadsheet));
-
- return tEnv;
- }
-} // finish class ScTableColumnsObj