Re: [api-dev] Where did the code snippets go?
huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak <[EMAIL PROTECTED]>: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards Christian Junker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Where did the code snippets go?
same for me, we have to wait on a answer from Tom Schindl who maintain the page. Juergen Christian Junker wrote: huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak <[EMAIL PROTECTED]>: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - 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]
[api-dev] ODF toolkit
Hi, Can somebody tell me when will the ODF Toolkit come out?
[api-dev] How to remove a shape from a Draw Page
Michael, This is a very interesting question and I spent an hour or so and was not able to solve the problem. I am copying the dev mailing list to see if there are any clues there: The problem: Assume a draw document with a single shape selected. I want to delete the single shape. The code shown below obtains a reference to the selected shape from the current controller (because it is selected). So, if I have a reference to a shape that is inserted into a draw page, how can I delete it? I tried oShape.Dispose(), which crashed OOo. I tried oShape.getParent().Remove(oShape), which crashed OOo. Original code: Sub Main Dim oShapeName as String Dim oDoc As Object oDoc = ThisComponent oDocCtrl = oDoc.getCurrentController() ' See what is currently selected. oSelection = oDocCtrl.getSelection() If IsEmpty( oSelection ) Then MsgBox( "Zum Löschen muss eine Grafik makiert sein" ) Exit Sub EndIf If oSelection.getCount() > 1 Then MsgBox( "Bitte nur eine Grafik zum löschen auswählen" ) Exit Sub EndIf oOrigShape = oSelection.getByIndex( 0 ) oShapeName = oOrigShape.getName() print oShapeName REM The Delete Function doesn't work 'oDoc.Remove(oOrigShape) End Sub Nice to hear from you again I am overly busy (nothing new there), but I will take a quick look. Michael Simader wrote: Hi Andrew! How are you? Hope you are find. I think you know me, because you helped me with my macro for inserting a costum shape. It is working great and i updated the macro with a database and i am so proud of it. But now to the problem: If i insert a graphic in the draw document i make a entry in my database, but the problem is, if i delete a shape, i cant remove the database row. So i wrote a macro, where i can select a single shape and get the name of the shape (for deleting the database row), but the problem is, i can't remove the shape from the document. Do you know the methode for removing graphics? Remove a graphic from a Draw document. Did you know that I cover this in my published book? Did you know that the Draw and Impress chapter are available as a free download from the publisher? here is the macro which i want to use for deleting: Sub Main Dim oShapeName as String Dim oDoc As Object oDoc = ThisComponent oDocCtrl = oDoc.getCurrentController() ' See what is currently selected. oSelection = oDocCtrl.getSelection() If IsEmpty( oSelection ) Then MsgBox( "Zum Löschen muss eine Grafik makiert sein" ) Exit Sub EndIf If oSelection.getCount() > 1 Then MsgBox( "Bitte nur eine Grafik zum löschen auswählen" ) Exit Sub EndIf oOrigShape = oSelection.getByIndex( 0 ) oShapeName = oOrigShape.getName() print oShapeName REM The Delete Function doesn't work oDoc.Remove(oOrigShape) End Sub Yeah, I do not expect you to be able to remove a shape this way. best regards! Your Michael _ Sie möchten Teil der Evolution der Kommunikation werden? http://www.communicationevolved.com/de-at/ -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Where did the code snippets go?
I am writing a new chapter for the OOo Authors site (Macro documentation) and I am documenting places to find macros (amongst other things). I assume, therefore, that I can probably include this in the list. Juergen Schmidt wrote: same for me, we have to wait on a answer from Tom Schindl who maintain the page. Juergen Christian Junker wrote: huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak <[EMAIL PROTECTED]>: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to remove a shape from a Draw Page
if i remember well you have to get a reference to the Page and call its remove method. ThePage.remove(TheShape) be sure to test the presence of shape, or ooo will crash. > ___ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Where did the code snippets go?
Hi Andrew, Andrew Douglas Pitonyak wrote: I am writing a new chapter for the OOo Authors site (Macro documentation) and I am documenting places to find macros (amongst other things). I assume, therefore, that I can probably include this in the list. i think so, if there is a serious problem or Tom can't host and maintain the page in the future, we will hopefully find a new home. Juergen Juergen Schmidt wrote: same for me, we have to wait on a answer from Tom Schindl who maintain the page. Juergen Christian Junker wrote: huch, cannot access it either. 2007/4/3, Andrew Douglas Pitonyak <[EMAIL PROTECTED]>: Is it me, or did the code snippets page disappear? http://codesnippets.services.openoffice.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]