Hi Tom,
Thanks for the links. Unfortunately, the problem couldn't be solved by
referring the four snippets. The one "InsertGfx.snip" does talks about
inserting embedded image, but it will converts the original graphics in
Writer from "com.sun.star.text.GraphicObject" to
""com.sun.star.drawing.GraphicObjectShape" while I would like to retain
the graphics’ type to be "com.sun.star.text.GraphicObject". :(
Do you or others have any idea what else I can do?
Thanks for any help in advance!
Best Regards,
MuiFull
Tom Schindl wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maybe these help you:
http://codesnippets.services.openoffice.org/Calc/Calc.InsertGfx.snip
http://codesnippets.services.openoffice.org/Writer/Writer.ExtractGfx.snip
http://codesnippets.services.openoffice.org/Office/Office.GraphicExport.snip
http://codesnippets.services.openoffice.org/Writer/Writer.EnumerateContent.snip
Tom
MuiFull Tam schrieb:
Hi all,
I would like to insert embedded graphics into Writer. By using the API,
I could successfully insert graphics which are linked to image files. I
realize that there is a "Link" menu under the Edit menu which displays a
dialog box and allow the removal of links. I suppose this option fits my
need perfectly and I started finding ways to achieve what the Links
dialog box does.
I tried record my actions as macro, the following code display the Edit
Links dialog box. But I do not want to have user intervention during the
link removal process, so I tried finding other ways...
dispatcher.executeDispatch(document, ".uno:LinkDialog", "", 0, Array())
Then, I found the interface XLinkageSupport, which I thought it might be
helpful as it offers the breakLink() method. However, I could not figure
out what objects should be used for querying the XLinkageSupport
interface. I have tried querying both the text document (XTextDocument)
and the graphic (XTextContent) but both return null.
Is there any possibility to do what I am attempting to do? If
XLinkageSupport does work for my need, could anyone please explain
briefly how to use the XLinkageSupport interface?
Thanks for any help in advance!
Best Regards,
MuiFull
PS. I browsed through the forum and knew that embedded graphics could be
created through the use of dispatch interface, but this is not the best
solution for my case. This is because I need to have an accurate
positioning for graphics, and by using dispatch, I need to obtain
references of the created graphics in further, and to do the positioning
through normal API. Performance issue is then a big concern...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC8IGxkVPeOFLgZFIRAjD6AJwMbOrp2Bh3Nzam/49Iu6h5V6ZHtQCgrZ5S
dA9YbgHh876OE+kIjxEMlVc=
=aICD
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]