| View previous topic :: View next topic |
| Author |
Message |
stifler Newbie

Joined: 28 Jan 2009 Posts: 4
|
Posted: Mon Feb 16, 2009 12:31 am Post subject: java insertTextContent() |
|
|
Here is the code
| Code: |
for (int i=0;i<count;i++){
word.gotoEndOfWord(true);
s=word.getString();
word.gotoNextWord(false);
if (s.equals("SHAPE")){
XTextContent xTextContent =(XTextContent)UnoRuntime.queryInterface(XTextContent.class, oGraphic );
linecursor.gotoEndOfSentence(true);//sensing the image
System.out.println(linecursor.getString());
xText.insertTextContent(xTextCursor, xTextContent, true);
XPropertySet xPropSet=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, oGraphic);
File GifFile = new java.io.File("c:/2.gif");
StringBuffer sUrl = new StringBuffer("file://");
sUrl.append(GifFile.getCanonicalPath().replace('\\', '/'));
}
}
xPropSet.setPropertyValue( "AnchorType",TextContentAnchorType.AT_PARAGRAPH );
xPropSet.setPropertyValue( "GraphicURL", sUrl.toString() );
xPropSet.setPropertyValue( "HoriOrientPosition",new Integer( 5500 ) );
xPropSet.setPropertyValue( "VertOrientPosition",new Integer( 4200 ) );
xPropSet.setPropertyValue( "Width", new Integer( 4400 ) );
xPropSet.setPropertyValue( "Height", new Integer(4000 ));
|
error in line
| Code: |
xText.insertTextContent(xTextCursor, xTextContent, true);
|
what kind of error here |
|
| Back to top |
|
 |
stifler Newbie

Joined: 28 Jan 2009 Posts: 4
|
Posted: Mon Feb 16, 2009 10:15 pm Post subject: Re: java insertTextContent() |
|
|
| anybody help |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
Posted: Tue Feb 17, 2009 11:42 am Post subject: Re: java insertTextContent() |
|
|
| stifler wrote: | | anybody help |
How should we help? You post only some part of your code, so it's hard to reproduce your error. You simple tell where the error occurs, but not which error. And you not even tell us your OOo version, OS and Java version... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|