framework/qa/complex/api_internal/api.lst                           |    2 
 qadevOOo/Jar_OOoRunner.mk                                           |    2 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexes.csv  |    7 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv |    2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java                 |  108 
------
 qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java                |  156 
----------
 sw/qa/unoapi/sw_1.sce                                               |    1 
 sw/qa/unoapi/sw_2.sce                                               |    1 
 8 files changed, 279 deletions(-)

New commits:
commit 3b2d95ab67456c7d7b5e51ffcb664702c6c4d71b
Author:     anfanite396 <dipamt1...@gmail.com>
AuthorDate: Thu Aug 24 14:39:46 2023 +0530
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Aug 25 08:29:41 2023 +0200

    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 <qui...@gmail.com>

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 643db28208ef..080b808d825b 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -142,7 +142,6 @@ job203=sw.SwXBodyText
 job206=sw.SwXCell
 job208=sw.SwXDocumentIndexMark
 job209=sw.SwXEndnoteProperties
-job210=sw.SwXFieldEnumeration
 job211=sw.SwXFieldMaster
 job212=sw.SwXFootnote
 job213=sw.SwXFootnoteProperties
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
-
diff --git a/sw/qa/unoapi/sw_2.sce b/sw/qa/unoapi/sw_2.sce
index 291b98fe755a..047870b5ef98 100644
--- a/sw/qa/unoapi/sw_2.sce
+++ b/sw/qa/unoapi/sw_2.sce
@@ -18,7 +18,6 @@
 
 -o sw.SwXDrawPage
 -o sw.SwXEndnoteProperties
--o sw.SwXFieldEnumeration
 -o sw.SwXFieldMaster
 -o sw.SwXFootnote
 -o sw.SwXFootnoteProperties
commit e346c663e8ae835e9b1a618d7a5781bc1da9004e
Author:     anfanite396 <dipamt1...@gmail.com>
AuthorDate: Thu Aug 24 14:35:43 2023 +0530
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Aug 25 08:29:26 2023 +0200

    tdf#45904: Remove old SwXDocumentIndexes Java test
    
    Change-Id: I93556b3c56887b424dd8720d752986563a0fa807
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156032
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index e24f9f945c86..643db28208ef 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -140,7 +140,6 @@ job201=sw.SwAccessibleTextFrameView
 job202=sw.SwAccessibleTextGraphicObject
 job203=sw.SwXBodyText
 job206=sw.SwXCell
-job207=sw.SwXDocumentIndexes
 job208=sw.SwXDocumentIndexMark
 job209=sw.SwXEndnoteProperties
 job210=sw.SwXFieldEnumeration
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 37c36f18c0f1..ebd98b2dd049 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1095,7 +1095,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/tests/java/mod/_sw/SwXCell \
     qadevOOo/tests/java/mod/_sw/SwXCellRange \
     qadevOOo/tests/java/mod/_sw/SwXChapterNumbering \
-    qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes \
     qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark \
     qadevOOo/tests/java/mod/_sw/SwXDrawPage \
     qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexes.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexes.csv
deleted file mode 100644
index 84f323698cdb..000000000000
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexes.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXDocumentIndexes";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXDocumentIndexes";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXDocumentIndexes";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXDocumentIndexes";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXDocumentIndexes";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXDocumentIndexes";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXDocumentIndexes";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java 
b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
deleted file mode 100644
index 06459e4d7148..000000000000
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
+++ /dev/null
@@ -1,108 +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.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.text.XDocumentIndexesSupplier;
-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.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-
-/**
- * Test for the object, which is represented by collection of document indexes.
- * Object implements the following interfaces:
- * <ul>
- *  <li> <code>com::sun::star::container::XNameAccess</code></li>
- *  <li> <code>com::sun::star::container::XIndexAccess</code></li>
- *  <li> <code>com::sun::star::container::XElementAccess</code></li>
- * </ul> <p>
- * This object test <b> is NOT </b> designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNameAccess
- * @see com.sun.star.container.XIndexAccess
- * @see com.sun.star.container.XElementAccess
- * @see ifc.container._XNameAccess
- * @see ifc.container._XIndexAccess
- * @see ifc.container._XElementAccess
- */
-public class SwXDocumentIndexes 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.
-    * Creates an instance of the service
-    * <code>com.sun.star.text.ContentIndex</code>, then created content index 
is
-    * inserted to the text document, and finally all document indexes are 
gotten
-    * from a text document using <code>XDocumentIndexesSupplier</code> 
interface.
-    */
-    @Override
-    public TestEnvironment createTestEnvironment(
-            TestParameters tParam, PrintWriter log ) throws Exception {
-        XInterface oObj = null;
-        SOfficeFactory.getFactory( tParam.getMSF() );
-
-        log.println( "creating a test environment" );
-        XTextContent xTC = 
SOfficeFactory.createIndex(xTextDoc,"com.sun.star.text.ContentIndex");
-
-        XText oText = xTextDoc.getText();
-        XTextCursor oCursor = oText.createTextCursor();
-
-        log.println("inserting the Index into text document");
-        oText.insertTextContent(oCursor, xTC, false);
-
-        XDocumentIndexesSupplier xDocInd = 
UnoRuntime.queryInterface(XDocumentIndexesSupplier.class,xTextDoc);
-
-        oObj = xDocInd.getDocumentIndexes();
-        TestEnvironment tEnv = new TestEnvironment(oObj);
-        return tEnv;
-
-    } // finish method getTestEnvironment
-
-}    // finish class SwXDocumentIndexes
-
diff --git a/sw/qa/unoapi/sw_1.sce b/sw/qa/unoapi/sw_1.sce
index 8d26bee21e7f..9ffa541f2f4b 100644
--- a/sw/qa/unoapi/sw_1.sce
+++ b/sw/qa/unoapi/sw_1.sce
@@ -41,4 +41,3 @@
 -o sw.SwXCellRange
 -o sw.SwXChapterNumbering
 -o sw.SwXDocumentIndexMark
--o sw.SwXDocumentIndexes

Reply via email to