summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-03-28 21:24:35 +0000
committerJens Carl <j.carl43@gmx.de>2019-03-29 00:45:46 +0100
commitb99ea0ff33b78ba76d1ae436895efac490252e0f (patch)
tree8c70d44e5de2e211a0efa58be46d323b98dd7afc /qadevOOo
parentedcbe8c4e02a67c74ec6f85f28899431dbfa0765 (diff)
tdf#45904 Move XShapes Java tests to C++
Move XShapes Java tests to C++ for ScDrawPageObj. Change-Id: I1b65e8ad685c3d387a5023e8e8e9b9e06627af11 Reviewed-on: https://gerrit.libreoffice.org/69904 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.ScDrawPageObj.csv2
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java130
3 files changed, 0 insertions, 133 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 4bc4edde3ba3..3cb59e2c61de 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -961,7 +961,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj \
qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj \
qadevOOo/tests/java/mod/_sc/ScDocumentConfiguration \
- qadevOOo/tests/java/mod/_sc/ScDrawPageObj \
qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj \
qadevOOo/tests/java/mod/_sc/ScHeaderFieldsObj \
qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextCursor \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv
deleted file mode 100644
index b39d7b6062be..000000000000
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"ScDrawPageObj";"com::sun::star::drawing::XShapes";"add()"
-"ScDrawPageObj";"com::sun::star::drawing::XShapes";"remove()"
diff --git a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java b/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java
deleted file mode 100644
index 0619ca7533c4..000000000000
--- a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java
+++ /dev/null
@@ -1,130 +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.DrawTools;
-import util.InstCreator;
-import util.SOfficeFactory;
-import util.ShapeDsc;
-
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.drawing.XShape;
-import com.sun.star.lang.XComponent;
-import com.sun.star.sheet.XSpreadsheetDocument;
-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 ScDrawPageObj extends TestCase {
-
- private XSpreadsheetDocument xDoc = null;
-
- /**
- * Creates a new Draw 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" );
- xDoc = SOF.createCalcDoc(null);
- }
-
- /**
- * Disposes the Draw document created before
- */
- @Override
- protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xSheetDoc " );
- XComponent xComp = UnoRuntime.queryInterface(XComponent.class, xDoc);
- util.DesktopTools.closeDoc(xComp);
- }
-
-
- /**
- * Creating a TestEnvironment for the interfaces to be tested.
- * From the Calc document created a collection of its draw
- * pages is obtained. Two new pages are inserted. And one
- * page is obtained as a testing component. A shape is added
- * to this page. <p>
- *
- * Object relations created :
- * <ul>
- * <li> <code>'DrawPage'</code> for
- * {@link ifc.drawing._XShapeGrouper} :
- * the draw page tested. </li>
- * <li> <code>'Shape'</code> for
- * {@link ifc.drawing._XShapes} :
- * the creator which can create instances of
- * <code>com.sun.star.drawing.Line</code> service </li>
- * </ul>
- */
- @Override
- protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception {
-
- XInterface oObj = null;
- XShape oShape = null ;
- XDrawPages oDP = null;
-
- XComponent xComp = UnoRuntime.queryInterface(XComponent.class, xDoc);
-
- // 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 Drawpages" );
- XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class,xDoc);
- oDP = oDPS.getDrawPages();
- oDP.insertNewByIndex(1);
- oDP.insertNewByIndex(2);
- oObj = (XDrawPage) AnyConverter.toObject(
- new Type(XDrawPage.class),oDP.getByIndex(0));
-
- SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF());
-
- oShape = SOF.createShape(xComp,5000,3500,7500,5000,"Rectangle");
- DrawTools.getShapes((XDrawPage) oObj).add(oShape);
- XShape oShape1 = SOF.createShape(xComp,
- 5000,5500,5000,5000,"Rectangle");
- DrawTools.getShapes((XDrawPage) oObj).add(oShape1);
-
- // create test environment here
- TestEnvironment tEnv = new TestEnvironment( oObj );
-
- // relation for XShapes interface
- ShapeDsc sDsc = new ShapeDsc(5000,3500,7500,10000,"Line");
- tEnv.addObjRelation("Shape", new InstCreator(xDoc, sDsc)) ;
-
- log.println("ImplementationName: "+util.utils.getImplName(oObj));
-
- // adding relation for XShapeGrouper
- tEnv.addObjRelation("DrawPage", oObj);
-
- return tEnv;
- } // finish method getTestEnvironment
-
-}
-