diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-12-10 16:04:52 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-12-10 16:04:52 +0000 |
commit | bf412ecb474cb4a264680e71c08326f783d385c0 (patch) | |
tree | 8009e4ed169cc490dd9a97382a04cd4bb852c408 | |
parent | f969a8d032452e31aa9e5d3bc55862fdcfc3e5cb (diff) |
INTEGRATION: CWS qadev20 (1.4.82); FILE MERGED
2004/11/25 11:52:13 cn 1.4.82.1: #i36094# object relation xTextFrame added
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java index 9374b820b93d..af572abfacfc 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java @@ -2,9 +2,9 @@ * * $RCSfile: SwXTextGraphicObject.java,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change:$Date: 2004-01-05 20:20:23 $ + * last change:$Date: 2004-12-10 17:04:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,6 +139,7 @@ public class SwXTextGraphicObject extends TestCase { XInterface oObj = null; Object oGObject = null; + Object xTextFrame = null; SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); Object instance = null; @@ -148,6 +149,7 @@ public class SwXTextGraphicObject extends TestCase { (xTextDoc,"com.sun.star.text.GraphicObject"); instance = SOF.createInstance (xTextDoc,"com.sun.star.text.GraphicObject"); + xTextFrame = SOF.createTextFrame(xTextDoc, 500, 500); } catch (Exception ex) { log.println("Couldn't create instance"); @@ -162,6 +164,18 @@ public class SwXTextGraphicObject extends TestCase { XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,oObj); + log.println("inserting Frame"); + try{ + XTextContent Framecontent = (XTextContent) UnoRuntime.queryInterface( + XTextContent.class, xTextFrame); + the_text.insertTextContent(the_cursor, Framecontent, true); + } catch (Exception e) { + System.out.println("Couldn't insert text frame"); + e.printStackTrace(); + throw new StatusException("Couldn't insert text frame", e ); + } + + log.println( "inserting graphic" ); try { the_text.insertTextContent(the_cursor,the_content,true); @@ -216,6 +230,9 @@ public class SwXTextGraphicObject extends TestCase { UnoRuntime.queryInterface(XTextContent.class,instance)); tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor()); + //object relation for text.BaseFrameProperties + tEnv.addObjRelation("TextFrame", xTextFrame); + return tEnv; } // finish method getTestEnvironment |