diff options
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java index 5035f0dcd138..73ac3b6b76a3 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java +++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java @@ -42,6 +42,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.text.XText; import com.sun.star.text.XTextContent; import com.sun.star.text.XTextCursor; +import com.sun.star.text.XTextRange; import com.sun.star.text.XTextDocument; import com.sun.star.uno.UnoRuntime; @@ -132,6 +133,9 @@ public class SwXDocumentIndex extends TestCase { tEnv.addObjRelation("CONTENT", (XTextContent) UnoRuntime.queryInterface(XTextContent.class,instance)); + oCursor.gotoEnd(false); + tEnv.addObjRelation("RANGE", (XTextRange) + UnoRuntime.queryInterface(XTextRange.class, oCursor)); // relation for XDocumentIndex tEnv.addObjRelation("TextDoc", xTextDoc); diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java index ee00f765ca86..bbdf6dc90c19 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java +++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java @@ -127,15 +127,6 @@ public class SwXDocumentIndexMark extends TestCase { UnoRuntime.queryInterface(XDocumentIndexMark.class, oDIM); try { - xDIM.attach(oText); - //xDIM.setMarkEntry("SwXDocumentIndexMark"); - } catch( com.sun.star.lang.IllegalArgumentException e ) { - log.println("Error: " + e); - e.printStackTrace(log); - throw new StatusException("Couldn't attach IndexMark", e); - } - - try { oText.insertTextContent(oCursor, xDIM, false); } catch (com.sun.star.lang.IllegalArgumentException e) { e.printStackTrace(log); |