diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-06 08:55:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-12 09:41:28 +0200 |
commit | 0477e6c39b7ce8b7f6560fbf222c19fe4f358dc8 (patch) | |
tree | 218eba20dd23c6a865cf01aa7532bf1261a69bc8 /qadevOOo/tests/java/ifc/text | |
parent | e2e55a7c49079dfd896da6515b98d451e4c8735b (diff) |
java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
Diffstat (limited to 'qadevOOo/tests/java/ifc/text')
19 files changed, 31 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/text/_BaseFrame.java b/qadevOOo/tests/java/ifc/text/_BaseFrame.java index 84287802b07a..0852668b2340 100644 --- a/qadevOOo/tests/java/ifc/text/_BaseFrame.java +++ b/qadevOOo/tests/java/ifc/text/_BaseFrame.java @@ -86,6 +86,7 @@ public class _BaseFrame extends MultiPropertyTest { * Redefined method returns value, that differs from property value. */ protected PropertyTester StringTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if (str1.equals(oldValue)) return str2; diff --git a/qadevOOo/tests/java/ifc/text/_BaseFrameProperties.java b/qadevOOo/tests/java/ifc/text/_BaseFrameProperties.java index b409a502fc73..9b0cf03c8855 100644 --- a/qadevOOo/tests/java/ifc/text/_BaseFrameProperties.java +++ b/qadevOOo/tests/java/ifc/text/_BaseFrameProperties.java @@ -22,6 +22,7 @@ import lib.MultiPropertyTest; public class _BaseFrameProperties extends MultiPropertyTest { protected PropertyTester FrameTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { Object frame = tEnv.getObjRelation("TextFrame"); diff --git a/qadevOOo/tests/java/ifc/text/_BaseIndex.java b/qadevOOo/tests/java/ifc/text/_BaseIndex.java index c0a3863a7383..37fc8e7863cb 100644 --- a/qadevOOo/tests/java/ifc/text/_BaseIndex.java +++ b/qadevOOo/tests/java/ifc/text/_BaseIndex.java @@ -60,6 +60,7 @@ public class _BaseIndex extends MultiPropertyTest { * Redefined method returns object, that contains changed property value. */ protected PropertyTester CustomTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { XTextColumns TC = UnoRuntime.queryInterface( XTextColumns.class, oldValue); @@ -102,6 +103,7 @@ public class _BaseIndex extends MultiPropertyTest { PropertyValue[][] newVal = null; PropertyValue[][] oldVal = null; + @Override protected Object getNewValue(String propName, Object oldValue) { XIndexReplace indProp = UnoRuntime.queryInterface( XIndexReplace.class, oldValue); @@ -138,6 +140,7 @@ public class _BaseIndex extends MultiPropertyTest { return indProp; } + @Override protected void checkResult(String propName, Object oldValue, Object newValue, Object resValue, Exception exception) diff --git a/qadevOOo/tests/java/ifc/text/_CellProperties.java b/qadevOOo/tests/java/ifc/text/_CellProperties.java index 95247a02be42..6cefdad8ac12 100644 --- a/qadevOOo/tests/java/ifc/text/_CellProperties.java +++ b/qadevOOo/tests/java/ifc/text/_CellProperties.java @@ -72,6 +72,7 @@ public class _CellProperties extends MultiPropertyTest { public void _TextSection() { log.println("Testing with custom Property tester") ; testProperty("TextSection", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { return tEnv.getObjRelation("CellProperties.TextSection"); } @@ -87,6 +88,7 @@ public class _CellProperties extends MultiPropertyTest { final Short val2 = new Short( (short) 6 ); log.println("Testing with custom Property tester") ; testProperty("BackColor", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if ( oldValue.equals(val1) ) return val2; @@ -103,6 +105,7 @@ public class _CellProperties extends MultiPropertyTest { public void _BackGraphicURL() { log.println("Testing with custom Property tester") ; testProperty("BackGraphicURL", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if (oldValue.equals(util.utils.getFullTestURL ("space-metal.jpg"))) @@ -120,6 +123,7 @@ public class _CellProperties extends MultiPropertyTest { public void _UserDefinedAttributes() { log.println("Testing with custom property tester"); testProperty("UserDefinedAttributes", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { XNameContainer NC = null; try { diff --git a/qadevOOo/tests/java/ifc/text/_CellRange.java b/qadevOOo/tests/java/ifc/text/_CellRange.java index 19b2b86b2a4b..e98b2f791b72 100644 --- a/qadevOOo/tests/java/ifc/text/_CellRange.java +++ b/qadevOOo/tests/java/ifc/text/_CellRange.java @@ -55,6 +55,7 @@ public class _CellRange extends MultiPropertyTest { final Short val2 = new Short( (short) 6 ); log.println("Testing with custom Property tester") ; testProperty("BackColor", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if ( oldValue.equals(val1) ) return val2; @@ -79,6 +80,7 @@ public class _CellRange extends MultiPropertyTest { public void _BackGraphicURL() { log.println("Testing with custom Property tester") ; testProperty("BackGraphicURL", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if (oldValue.equals(util.utils.getFullTestURL ("space-metal.jpg"))) diff --git a/qadevOOo/tests/java/ifc/text/_MailMerge.java b/qadevOOo/tests/java/ifc/text/_MailMerge.java index 9f03a9a1f96f..b3c0e1fe4367 100644 --- a/qadevOOo/tests/java/ifc/text/_MailMerge.java +++ b/qadevOOo/tests/java/ifc/text/_MailMerge.java @@ -31,6 +31,7 @@ public class _MailMerge extends MultiPropertyTest { * Switches between two valid folders */ protected PropertyTester URLTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if (oldValue.equals(util.utils.getOfficeTemp(tParam.getMSF()))) return util.utils.getFullTestURL(""); else @@ -43,6 +44,7 @@ public class _MailMerge extends MultiPropertyTest { * Switches between two document URLs. */ protected PropertyTester DocumentURLTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { if (oldValue.equals(util.utils.getFullTestURL("MailMerge.sxw"))) return util.utils.getFullTestURL("sForm.sxw"); else @@ -155,6 +157,7 @@ public class _MailMerge extends MultiPropertyTest { /** * Forces environment recreation. */ + @Override protected void after() { disposeEnvironment(); } diff --git a/qadevOOo/tests/java/ifc/text/_TextColumns.java b/qadevOOo/tests/java/ifc/text/_TextColumns.java index a1cafda4f456..b6c9868529e9 100644 --- a/qadevOOo/tests/java/ifc/text/_TextColumns.java +++ b/qadevOOo/tests/java/ifc/text/_TextColumns.java @@ -48,6 +48,7 @@ public class _TextColumns extends MultiPropertyTest { public void _AutomaticDistance() { log.println("Testing with custom Property tester") ; testProperty("AutomaticDistance", new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { XTextColumns xTC = UnoRuntime.queryInterface (XTextColumns.class,tEnv.getTestObject()); diff --git a/qadevOOo/tests/java/ifc/text/_TextFrame.java b/qadevOOo/tests/java/ifc/text/_TextFrame.java index 9220b863021f..c501654f4a40 100644 --- a/qadevOOo/tests/java/ifc/text/_TextFrame.java +++ b/qadevOOo/tests/java/ifc/text/_TextFrame.java @@ -40,6 +40,7 @@ public class _TextFrame extends MultiPropertyTest { * Property tester which switches two shorts. */ protected PropertyTester WModeTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) throws java.lang.IllegalArgumentException { if (oldValue.equals(new Short(com.sun.star.text.WritingMode2.LR_TB))) diff --git a/qadevOOo/tests/java/ifc/text/_TextGraphicObject.java b/qadevOOo/tests/java/ifc/text/_TextGraphicObject.java index 924a64583e53..a9edbaa6a2ef 100644 --- a/qadevOOo/tests/java/ifc/text/_TextGraphicObject.java +++ b/qadevOOo/tests/java/ifc/text/_TextGraphicObject.java @@ -72,6 +72,7 @@ public class _TextGraphicObject extends MultiPropertyTest { * or create a new one if necessary. */ protected PropertyTester PointTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) throws java.lang.IllegalArgumentException { if (utils.isVoid(oldValue)) { diff --git a/qadevOOo/tests/java/ifc/text/_TextSection.java b/qadevOOo/tests/java/ifc/text/_TextSection.java index c4fc53745554..b3e3a34eb265 100644 --- a/qadevOOo/tests/java/ifc/text/_TextSection.java +++ b/qadevOOo/tests/java/ifc/text/_TextSection.java @@ -92,6 +92,7 @@ public class _TextSection extends MultiPropertyTest { */ protected PropertyTester TextColumnsTester = new PropertyTester() { + @Override protected Object getNewValue(String propName, Object oldValue) { XTextColumns TC = null; short val2set = 25; @@ -108,6 +109,7 @@ public class _TextSection extends MultiPropertyTest { return TC; } + @Override protected boolean compare(Object obj1, Object obj2) { short val1 = 0; short val2 = 1; @@ -122,6 +124,7 @@ public class _TextSection extends MultiPropertyTest { return val1 == val2; } + @Override protected String toString(Object obj) { return "XTextColumns: ColumnCount = "+ ((XTextColumns) obj).getColumnCount(); diff --git a/qadevOOo/tests/java/ifc/text/_TextTable.java b/qadevOOo/tests/java/ifc/text/_TextTable.java index 15dd1b6cfdfa..fac44cdb96fc 100644 --- a/qadevOOo/tests/java/ifc/text/_TextTable.java +++ b/qadevOOo/tests/java/ifc/text/_TextTable.java @@ -101,6 +101,7 @@ public class _TextTable extends MultiPropertyTest { /** * Forces environment recreation. */ + @Override protected void after() { disposeEnvironment(); } diff --git a/qadevOOo/tests/java/ifc/text/_XAutoTextGroup.java b/qadevOOo/tests/java/ifc/text/_XAutoTextGroup.java index 623132bf7d4d..b99fab13b103 100644 --- a/qadevOOo/tests/java/ifc/text/_XAutoTextGroup.java +++ b/qadevOOo/tests/java/ifc/text/_XAutoTextGroup.java @@ -74,6 +74,7 @@ public class _XAutoTextGroup extends MultiMethodTest { * * @throws StatusException if the relation is not found. */ + @Override public void before() { str = pref + uniq++ ; String[] names = oObj.getElementNames() ; diff --git a/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java b/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java index d0ed25833390..13bd492edacf 100644 --- a/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java +++ b/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java @@ -69,6 +69,7 @@ public class _XMailMergeBroadcaster extends MultiMethodTest { * [<code>XJob</code>] * @throw StatusException If relations are not found */ + @Override public void before() { NamedValue[] executeArgs = (NamedValue[]) tEnv.getObjRelation("executeArgs") ; if (executeArgs == null) diff --git a/qadevOOo/tests/java/ifc/text/_XTextCursor.java b/qadevOOo/tests/java/ifc/text/_XTextCursor.java index d5c276c06f49..06217abf179c 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextCursor.java +++ b/qadevOOo/tests/java/ifc/text/_XTextCursor.java @@ -52,6 +52,7 @@ public class _XTextCursor extends MultiMethodTest { /** * Stores component's text. */ + @Override public void before() { oObj.gotoStart(false); oObj.gotoEnd(true); @@ -223,6 +224,7 @@ public class _XTextCursor extends MultiMethodTest { * Restores the text of the component to the * state it was before this interafce test. */ + @Override public void after() { oObj.gotoStart(false); oObj.gotoEnd(true); diff --git a/qadevOOo/tests/java/ifc/text/_XTextFieldsSupplier.java b/qadevOOo/tests/java/ifc/text/_XTextFieldsSupplier.java index 60fe3fb4cd52..e26fefdd62d9 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextFieldsSupplier.java +++ b/qadevOOo/tests/java/ifc/text/_XTextFieldsSupplier.java @@ -53,6 +53,7 @@ public class _XTextFieldsSupplier extends MultiMethodTest { * Insert some text fields into a cell on the sheet, so this interface test * makes sense. */ + @Override protected void before() { Object o = tEnv.getObjRelation("XTextFieldsSupplier.MAKEENTRY"); if (o != null && ((Boolean)o).booleanValue()) { @@ -168,6 +169,7 @@ public class _XTextFieldsSupplier extends MultiMethodTest { tRes.tested(method, false); } + @Override protected void after() { if (mDispose) disposeEnvironment(); diff --git a/qadevOOo/tests/java/ifc/text/_XTextRangeCompare.java b/qadevOOo/tests/java/ifc/text/_XTextRangeCompare.java index cc0924156459..8c4bceb6de14 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextRangeCompare.java +++ b/qadevOOo/tests/java/ifc/text/_XTextRangeCompare.java @@ -77,6 +77,7 @@ public class _XTextRangeCompare extends MultiMethodTest { * @throws StatusException If neither 'TEXTDOC' nore 'TEXT' * relation exists. */ + @Override public void before() { nameStr = this.getClass().getName(); diff --git a/qadevOOo/tests/java/ifc/text/_XTextTable.java b/qadevOOo/tests/java/ifc/text/_XTextTable.java index 089e2e7943b0..93ac5a9d95f7 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextTable.java +++ b/qadevOOo/tests/java/ifc/text/_XTextTable.java @@ -53,6 +53,7 @@ public class _XTextTable extends MultiMethodTest { String cellNamesList[] = null ; + @Override protected void before() { Integer num_row = (Integer)tEnv.getObjRelation("NROW"); if (num_row == null) { diff --git a/qadevOOo/tests/java/ifc/text/_XTextTableCursor.java b/qadevOOo/tests/java/ifc/text/_XTextTableCursor.java index a136d1df8355..4bbea70463db 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextTableCursor.java +++ b/qadevOOo/tests/java/ifc/text/_XTextTableCursor.java @@ -276,6 +276,7 @@ public class _XTextTableCursor extends MultiMethodTest { /** * Forces object environment recreation. */ + @Override public void after() { disposeEnvironment() ; } diff --git a/qadevOOo/tests/java/ifc/text/_XWordCursor.java b/qadevOOo/tests/java/ifc/text/_XWordCursor.java index a2506b674d5f..47474472af1e 100644 --- a/qadevOOo/tests/java/ifc/text/_XWordCursor.java +++ b/qadevOOo/tests/java/ifc/text/_XWordCursor.java @@ -43,6 +43,7 @@ public class _XWordCursor extends MultiMethodTest { /** * Moves the cursor to start of the text. */ + @Override public void before() { oObj.gotoStart(false); } |