summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authoranfanite396 <dipamt1729@gmail.com>2023-08-24 14:39:46 +0530
committerTomaž Vajngerl <quikee@gmail.com>2023-08-25 08:29:41 +0200
commit3b2d95ab67456c7d7b5e51ffcb664702c6c4d71b (patch)
tree9fcc83e2e54685e57336d08cffc64a1dbb8cc5b2 /qadevOOo
parente346c663e8ae835e9b1a618d7a5781bc1da9004e (diff)
tdf#45904: Remove old SwXFieldEnumeration Java test
Change-Id: I5bbefc7c1c5ac9ebd88669ac328bba28183b76ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156033 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java156
3 files changed, 0 insertions, 159 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index ebd98b2dd049..a11c799ab852 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1098,7 +1098,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark \
qadevOOo/tests/java/mod/_sw/SwXDrawPage \
qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties \
- qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration \
qadevOOo/tests/java/mod/_sw/SwXFieldMaster \
qadevOOo/tests/java/mod/_sw/SwXFootnote \
qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv
deleted file mode 100644
index 9b2391fc092b..000000000000
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"SwXFieldEnumeration";"com::sun::star::container::XEnumeration";"hasMoreElements()"
-"SwXFieldEnumeration";"com::sun::star::container::XEnumeration";"nextElement()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java b/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
deleted file mode 100644
index dcfbf1c2f81e..000000000000
--- a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
+++ /dev/null
@@ -1,156 +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._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XDependentTextField;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextFieldsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-
-/**
- * Object implements the following interfaces :
- * <ul>
- * <li> <code>com::sun::star::container::XEnumeration</code></li>
- * </ul> <p>
- * This object test <b> is NOT </b> designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XEnumeration
- * @see ifc.container._XEnumeration
- */
-public class SwXFieldEnumeration extends TestCase {
- XTextDocument xTextDoc;
-
- /**
- * Creates text document.
- */
- @Override
- protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception {
- SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
- log.println( "creating a textdocument" );
- xTextDoc = SOF.createTextDoc( null );
- }
-
- /**
- * Disposes text document.
- */
- @Override
- protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xTextDoc " );
- util.DesktopTools.closeDoc(xTextDoc);
- }
-
- /**
- * Creating a TestEnvironment for the interfaces to be tested. FieldMaster
- * object is created and attached to Bibliography database. After setting
- * properties of created FieldMaster object, it is attached to the TextField
- * object. Then TextField is inserted as TextContent to the text document.
- * At the end, TextFields of text document are obtained and
- * enumeration of these fields is created.<br>
- * Creates instances of the services:
- * <code>com.sun.star.text.FieldMaster.Database</code>,
- * <code>com.sun.star.text.TextField.Database</code>.<br>
- * Object relations created :
- * <ul>
- * <li> <code>'ENUM'</code> for
- * {@link ifc.container._XEnumeration} : text fields</li>
- * </ul>
- */
- @Override
- public TestEnvironment createTestEnvironment(
- TestParameters tParam, PrintWriter log ) throws StatusException {
- XInterface oObj = null;
- Object FieldMaster = null;
- XPropertySet PFieldMaster = null;
- XDependentTextField xTF = null;
- XEnumerationAccess xFEA = null;
- XText the_Text;
- XTextCursor the_Cursor;
- XTextContent the_Field;
-
- log.println( "creating a test environment" );
- XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );
-
- try {
- FieldMaster = oDocMSF.createInstance
- ( "com.sun.star.text.FieldMaster.Database" );
- PFieldMaster = UnoRuntime.queryInterface
- (XPropertySet.class,FieldMaster);
- oObj = (XInterface)
- oDocMSF.createInstance("com.sun.star.text.TextField.Database");
- xTF = UnoRuntime.queryInterface(XDependentTextField.class,oObj);
- } catch ( com.sun.star.uno.Exception e ) {
- e.printStackTrace(log);
- }
-
- try {
- PFieldMaster.setPropertyValue("DataBaseName","Bibliography");
- PFieldMaster.setPropertyValue("DataTableName","biblio");
- PFieldMaster.setPropertyValue("DataColumnName","Address");
- } catch ( com.sun.star.lang.WrappedTargetException e ) {
- log.println("Error: can't set PropertyValue to a FieldMaster");
- e.printStackTrace(log);
- } catch ( com.sun.star.lang.IllegalArgumentException e ) {
- log.println("Error: can't set PropertyValue to a FieldMaster");
- e.printStackTrace(log);
- } catch ( com.sun.star.beans.UnknownPropertyException e ) {
- log.println("Error: can't set PropertyValue to a FieldMaster");
- e.printStackTrace(log);
- } catch ( com.sun.star.beans.PropertyVetoException e ) {
- log.println("Error: can't set PropertyValue to a FieldMaster");
- e.printStackTrace(log);
- }
-
- the_Text = xTextDoc.getText();
- the_Cursor = the_Text.createTextCursor();
- the_Field = UnoRuntime.queryInterface(XTextContent.class, oObj);
-
- xTF.attachTextFieldMaster(PFieldMaster);
- the_Text.insertTextContent(the_Cursor,the_Field,false);
-
- // create testobject here
- XTextFieldsSupplier oTFS = UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
- xFEA = oTFS.getTextFields();
- oObj = oTFS.getTextFields().createEnumeration();
-
- log.println( "creating a new environment for FieldEnumeration object" );
- TestEnvironment tEnv = new TestEnvironment( oObj );
-
- tEnv.addObjRelation("ENUM", xFEA);
-
- return tEnv;
- } // finish method getTestEnvironment
-
-} // finish class SwXFieldEnumeration
-