tdf#45904 Remove old SwXTextTable Java test

Change-Id: I3670d01229a8f44691ac971196a6b0b929649896
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163248
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
This commit is contained in:
Luv Sharma 2024-02-12 18:37:01 +05:30 committed by Taichi Haradaguchi
parent 947e472a41
commit 9241b739c7
5 changed files with 0 additions and 298 deletions

View file

@ -1128,7 +1128,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/mod/_sw/SwXTextRanges \
qadevOOo/tests/java/mod/_sw/SwXTextSearch \
qadevOOo/tests/java/mod/_sw/SwXTextSection \
qadevOOo/tests/java/mod/_sw/SwXTextTable \
qadevOOo/tests/java/mod/_sw/SwXTextTableCursor \
qadevOOo/tests/java/mod/_sw/SwXTextTableRow \
qadevOOo/tests/java/mod/_sw/SwXTextView \

View file

@ -1,58 +0,0 @@
"SwXTextTable";"com::sun::star::lang::XComponent";"dispose()"
"SwXTextTable";"com::sun::star::lang::XComponent";"addEventListener()"
"SwXTextTable";"com::sun::star::lang::XComponent";"removeEventListener()"
"SwXTextTable";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
"SwXTextTable";"com::sun::star::chart::XChartData";"removeChartDataChangeEventListener()"
"SwXTextTable";"com::sun::star::chart::XChartData";"getNotANumber()"
"SwXTextTable";"com::sun::star::chart::XChartData";"isNotANumber()"
"SwXTextTable";"com::sun::star::text::TextContent";"AnchorType#optional"
"SwXTextTable";"com::sun::star::text::TextContent";"AnchorTypes#optional"
"SwXTextTable";"com::sun::star::text::TextContent";"TextWrap#optional"
"SwXTextTable";"com::sun::star::table::XAutoFormattable";"autoFormat()"
"SwXTextTable";"com::sun::star::text::XTextTable";"initialize()"
"SwXTextTable";"com::sun::star::text::XTextTable";"getRows()"
"SwXTextTable";"com::sun::star::text::XTextTable";"getColumns()"
"SwXTextTable";"com::sun::star::text::XTextTable";"getCellByName()"
"SwXTextTable";"com::sun::star::text::XTextTable";"getCellNames()"
"SwXTextTable";"com::sun::star::text::XTextTable";"createCursorByCellName()"
"SwXTextTable";"com::sun::star::table::XCellRange";"getCellByPosition()"
"SwXTextTable";"com::sun::star::table::XCellRange";"getCellRangeByPosition()"
"SwXTextTable";"com::sun::star::table::XCellRange";"getCellRangeByName()"
"SwXTextTable";"com::sun::star::text::TextTable";"BreakType"
"SwXTextTable";"com::sun::star::text::TextTable";"LeftMargin"
"SwXTextTable";"com::sun::star::text::TextTable";"RightMargin"
"SwXTextTable";"com::sun::star::text::TextTable";"HoriOrient"
"SwXTextTable";"com::sun::star::text::TextTable";"KeepTogether"
"SwXTextTable";"com::sun::star::text::TextTable";"Split"
"SwXTextTable";"com::sun::star::text::TextTable";"PageNumberOffset"
"SwXTextTable";"com::sun::star::text::TextTable";"PageDescName"
"SwXTextTable";"com::sun::star::text::TextTable";"RelativeWidth"
"SwXTextTable";"com::sun::star::text::TextTable";"IsWidthRelative"
"SwXTextTable";"com::sun::star::text::TextTable";"RepeatHeadline"
"SwXTextTable";"com::sun::star::text::TextTable";"ShadowFormat"
"SwXTextTable";"com::sun::star::text::TextTable";"TopMargin"
"SwXTextTable";"com::sun::star::text::TextTable";"BottomMargin"
"SwXTextTable";"com::sun::star::text::TextTable";"BackTransparent"
"SwXTextTable";"com::sun::star::text::TextTable";"Width"
"SwXTextTable";"com::sun::star::text::TextTable";"ChartRowAsLabel"
"SwXTextTable";"com::sun::star::text::TextTable";"ChartColumnAsLabel"
"SwXTextTable";"com::sun::star::text::TextTable";"TableBorder"
"SwXTextTable";"com::sun::star::text::TextTable";"TableColumnSeparators"
"SwXTextTable";"com::sun::star::text::TextTable";"TableColumnRelativeSum"
"SwXTextTable";"com::sun::star::text::TextTable";"BackColor"
"SwXTextTable";"com::sun::star::text::TextTable";"BackGraphic"
"SwXTextTable";"com::sun::star::text::TextTable";"BackGraphicLocation"
"SwXTextTable";"com::sun::star::container::XNamed";"getName()"
"SwXTextTable";"com::sun::star::container::XNamed";"setName()"
"SwXTextTable";"com::sun::star::sheet::XCellRangeData#optional";"getDataArray()"
"SwXTextTable";"com::sun::star::sheet::XCellRangeData#optional";"setDataArray()"
"SwXTextTable";"com::sun::star::text::XTextContent";"attach()"
"SwXTextTable";"com::sun::star::text::XTextContent";"getAnchor()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"getData()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"setData()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"getRowDescriptions()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"setRowDescriptions()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"getColumnDescriptions()"
"SwXTextTable";"com::sun::star::chart::XChartDataArray";"setColumnDescriptions()"
"SwXTextTable";"com::sun::star::util::XSortable";"createSortDescriptor()"
"SwXTextTable";"com::sun::star::util::XSortable";"sort()"
1 SwXTextTable com::sun::star::lang::XComponent dispose()
2 SwXTextTable com::sun::star::lang::XComponent addEventListener()
3 SwXTextTable com::sun::star::lang::XComponent removeEventListener()
4 SwXTextTable com::sun::star::chart::XChartData addChartDataChangeEventListener()
5 SwXTextTable com::sun::star::chart::XChartData removeChartDataChangeEventListener()
6 SwXTextTable com::sun::star::chart::XChartData getNotANumber()
7 SwXTextTable com::sun::star::chart::XChartData isNotANumber()
8 SwXTextTable com::sun::star::text::TextContent AnchorType#optional
9 SwXTextTable com::sun::star::text::TextContent AnchorTypes#optional
10 SwXTextTable com::sun::star::text::TextContent TextWrap#optional
11 SwXTextTable com::sun::star::table::XAutoFormattable autoFormat()
12 SwXTextTable com::sun::star::text::XTextTable initialize()
13 SwXTextTable com::sun::star::text::XTextTable getRows()
14 SwXTextTable com::sun::star::text::XTextTable getColumns()
15 SwXTextTable com::sun::star::text::XTextTable getCellByName()
16 SwXTextTable com::sun::star::text::XTextTable getCellNames()
17 SwXTextTable com::sun::star::text::XTextTable createCursorByCellName()
18 SwXTextTable com::sun::star::table::XCellRange getCellByPosition()
19 SwXTextTable com::sun::star::table::XCellRange getCellRangeByPosition()
20 SwXTextTable com::sun::star::table::XCellRange getCellRangeByName()
21 SwXTextTable com::sun::star::text::TextTable BreakType
22 SwXTextTable com::sun::star::text::TextTable LeftMargin
23 SwXTextTable com::sun::star::text::TextTable RightMargin
24 SwXTextTable com::sun::star::text::TextTable HoriOrient
25 SwXTextTable com::sun::star::text::TextTable KeepTogether
26 SwXTextTable com::sun::star::text::TextTable Split
27 SwXTextTable com::sun::star::text::TextTable PageNumberOffset
28 SwXTextTable com::sun::star::text::TextTable PageDescName
29 SwXTextTable com::sun::star::text::TextTable RelativeWidth
30 SwXTextTable com::sun::star::text::TextTable IsWidthRelative
31 SwXTextTable com::sun::star::text::TextTable RepeatHeadline
32 SwXTextTable com::sun::star::text::TextTable ShadowFormat
33 SwXTextTable com::sun::star::text::TextTable TopMargin
34 SwXTextTable com::sun::star::text::TextTable BottomMargin
35 SwXTextTable com::sun::star::text::TextTable BackTransparent
36 SwXTextTable com::sun::star::text::TextTable Width
37 SwXTextTable com::sun::star::text::TextTable ChartRowAsLabel
38 SwXTextTable com::sun::star::text::TextTable ChartColumnAsLabel
39 SwXTextTable com::sun::star::text::TextTable TableBorder
40 SwXTextTable com::sun::star::text::TextTable TableColumnSeparators
41 SwXTextTable com::sun::star::text::TextTable TableColumnRelativeSum
42 SwXTextTable com::sun::star::text::TextTable BackColor
43 SwXTextTable com::sun::star::text::TextTable BackGraphic
44 SwXTextTable com::sun::star::text::TextTable BackGraphicLocation
45 SwXTextTable com::sun::star::container::XNamed getName()
46 SwXTextTable com::sun::star::container::XNamed setName()
47 SwXTextTable com::sun::star::sheet::XCellRangeData#optional getDataArray()
48 SwXTextTable com::sun::star::sheet::XCellRangeData#optional setDataArray()
49 SwXTextTable com::sun::star::text::XTextContent attach()
50 SwXTextTable com::sun::star::text::XTextContent getAnchor()
51 SwXTextTable com::sun::star::chart::XChartDataArray getData()
52 SwXTextTable com::sun::star::chart::XChartDataArray setData()
53 SwXTextTable com::sun::star::chart::XChartDataArray getRowDescriptions()
54 SwXTextTable com::sun::star::chart::XChartDataArray setRowDescriptions()
55 SwXTextTable com::sun::star::chart::XChartDataArray getColumnDescriptions()
56 SwXTextTable com::sun::star::chart::XChartDataArray setColumnDescriptions()
57 SwXTextTable com::sun::star::util::XSortable createSortDescriptor()
58 SwXTextTable com::sun::star::util::XSortable sort()

View file

@ -1,235 +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 util.ValueComparer;
import com.sun.star.beans.XPropertySet;
import com.sun.star.table.XCell;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XTextTable;
import com.sun.star.uno.UnoRuntime;
/**
* this class tests the implementation of listed interfaces
* @see com.sun.star.beans.XPropertySet
* @see com.sun.star.container.XNamed
* @see com.sun.star.lang.XComponent
* @see com.sun.star.text.TextContent
* @see com.sun.star.text.XTextContent
* @see com.sun.star.text.XTextTable
*/
public class SwXTextTable extends TestCase {
SOfficeFactory SOF;
XTextDocument xTextDoc;
@Override
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
SOF = SOfficeFactory.getFactory( tParam.getMSF());
log.println("creating a textdocument");
xTextDoc = SOF.createTextDoc(null);
}
@Override
protected void cleanup(TestParameters tParam, PrintWriter log) {
log.println(" disposing xTextDoc ");
util.DesktopTools.closeDoc(xTextDoc);
}
/**
this method creates the testenvironment
@param tParam TestParameters class which contains additional
test parameters
@param log PrintWriter class to log the test state and result
@return TestEnvironment class
@see TestParameters
@see PrintWriter
*/
@Override
protected TestEnvironment createTestEnvironment(TestParameters tParam,
PrintWriter log) {
// creation of testobject here
XTextTable oObj = null;
TestEnvironment tEnv = null;
Object instance = null;
oObj = SOfficeFactory.createTextTable(xTextDoc);
instance = SOfficeFactory.createTextTable(xTextDoc);
int nRow = 6;
int nCol = 2;
oObj.initialize(nRow, nCol);
log.println("Creating instance...");
tEnv = new TestEnvironment(oObj);
if (SOfficeFactory.getTableCollection(xTextDoc).getCount() == 0) {
SOfficeFactory.insertTextContent(xTextDoc, oObj);
}
XPropertySet props = UnoRuntime.queryInterface(
XPropertySet.class, oObj);
try {
props.setPropertyValue("ChartRowAsLabel", Boolean.TRUE);
props.setPropertyValue("ChartColumnAsLabel", Boolean.TRUE);
} catch (Exception e) {
e.printStackTrace(log);
}
//Adding relation for util.XTextTable
tEnv.addObjRelation("NROW", Integer.valueOf(nRow));
tEnv.addObjRelation("NCOL", Integer.valueOf(nCol));
//Adding ObjRelation for XCellRangeData
Object[][] newData = new Object[6][];
Object[] line = new Object[2];
line[0] = Double.valueOf(1.5);
line[1] = Double.valueOf(2.5);
newData[0] = line;
newData[1] = line;
newData[2] = line;
newData[3] = line;
newData[4] = line;
newData[5] = line;
tEnv.addObjRelation("NewData", newData);
//Adding relation for util.XSortable
final PrintWriter finalLog = log;
final XTextTable oTable = oObj;
tEnv.addObjRelation("SORTCHECKER",
new ifc.util._XSortable.XSortChecker() {
PrintWriter out = finalLog;
public void setPrintWriter(PrintWriter log) {
out = log;
}
public void prepareToSort() {
oTable.getCellByName("A1").setValue(4);
XTextRange textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A2"));
textRange.setString("b");
oTable.getCellByName("A3").setValue(3);
textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A4"));
textRange.setString("a");
oTable.getCellByName("A5").setValue(23);
textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A6"));
textRange.setString("ab");
}
public boolean checkSort(boolean isSortNumbering,
boolean isSortAscending) {
out.println("Sort checking...");
boolean res = false;
String[] value = new String[6];
for (int i = 0; i < 6; i++) {
XCell cell = oTable.getCellByName("A" + (i + 1));
XTextRange textRange = UnoRuntime.queryInterface(
XTextRange.class, cell);
value[i] = textRange.getString();
}
if (isSortNumbering) {
if (isSortAscending) {
String[] rightVal = { "3", "4", "23" };
String[] vals = { value[3], value[4], value[5] };
res = ValueComparer.equalValue(vals, rightVal);
if (!res) {
out.println("Expected: 3, 4, 23");
out.println("Getting: " + value[3] + ", " +
value[4] + ", " + value[5]);
}
} else {
String[] rightVal = { "23", "4", "3" };
String[] vals = { value[0], value[1], value[2] };
res = ValueComparer.equalValue(vals, rightVal);
if (!res) {
out.println("Expected: 23, 4, 3");
out.println("Getting: " + value[1] + ", " +
value[2] + ", " + value[3]);
}
}
} else {
if (isSortAscending) {
String[] rightVal = { "23", "3", "4", "a", "ab", "b" };
res = ValueComparer.equalValue(value, rightVal);
if (!res) {
out.println("Expected: 23, 3, 4, a, ab, b");
out.println("Getting: " + value[0] + ", " +
value[1] + ", " + value[2] +
", " + value[3] + ", " +
value[4] + ", " + value[5]);
}
} else {
String[] rightVal = { "b", "ab", "a", "4", "3", "23" };
res = ValueComparer.equalValue(value, rightVal);
if (!res) {
out.println("Expected: b, ab, a, 4, 3, 23");
out.println("Getting: " + value[0] + ", " +
value[1] + ", " + value[2] +
", " + value[3] + ", " +
value[4] + ", " + value[5]);
}
}
}
if (res) {
out.println("Sorted correctly");
} else {
out.println("Sorted incorrectly");
}
return res;
}
});
tEnv.addObjRelation("CONTENT",
UnoRuntime.queryInterface(
XTextContent.class, instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
}
} // finish class SwXTextTable

View file

@ -137,9 +137,6 @@ sw.SwAccessibleTextGraphicObject::com::sun::star::accessibility::XAccessibleImag
### i88262 ###
sw.SwXTextFrame::com::sun::star::text::BaseFrameProperties
### i88374 ###
sw.SwXTextTable::com::sun::star::table::XAutoFormattable
### i88310 ###
sw.SwAccessibleTextGraphicObject::com::sun::star::accessibility::XAccessibleComponent

View file

@ -15,7 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-o sw.SwXTextTable
-o sw.SwXTextTableCursor
-o sw.SwXTextTableRow
#i85580 -o sw.SwXTextView