Hello,
I execute the following basic macro on a text document:
xFormula = ThisComponent.createInstance("com.sun.star.text.TextEmbeddedObject")
xFormula.setPropertyValue("CLSID", "078B7ABA-54FC-457F-8551-6147e776a997")
xFormula.setPropertyValue("AnchorType", 1)
xTextViewCursor = ThisComponent.getCurrentController().getViewCursor()
xDocumentText = xTextViewCursor.getText()
xModelCursor = xDocumentText.createTextCursorByRange(xTextViewCursor.getEnd())
xDocumentText.insertTextContent(xModelCursor, xFormula, true)
This successfully inserts an empty smath formula in the document.
Now I do this:
1. Delete the formula
2. Undo the deletion
3. Copy the formula
4. Paste the formula
and I get a little box saying "Object1" in red type, but not formula!!!
What am I doing wrong? Needless to say, this behaviour does not occur
when I create the formula through the UI. And I thought I was following
the devguide with my macro code.
Thanks for any ideas!
Jan Rheinländer
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help