[dev] Re: Digest for list dev@openoffice.org
Hello Thibault, > > I don't succeed reproduce your problem nor with OOo 3.3.0, neither with > > LibreOffice 3.4.5. you are right, it only occurs when the extension I am working on is loaded... So at least that gives me some sort of an idea. I suppose I will have to throw out parts of the extension until the problem disappears. Thanks anyway! Jan -- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help
[dev] Re: XTextContent problem
Hi, I don't succeed reproduce your problem nor with OOo 3.3.0, neither with LibreOffice 3.4.5. Are you able to reproduce the problem on request ? Are you doing something special when you delete the formula ? Which version of OOo are you using ? Regards Thibault. - Mail original - De: "Jan" À: "dev" Envoyé: Vendredi 24 Février 2012 12:24:52 Objet: [dev] XTextContent problem 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 dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help -- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help
[dev] XTextContent problem
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 dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help