Re: [api-dev] Code-Highlighting in Basic IDE
Hi @ariel: If you can provide this code to me, I can save a lot of time. After going through the code yesterday this was also my idea: creating the styles if the are not existing - or import them from a "masterdocument". But if you have code to create them - fine, that should save time. very interresting feature would it be possible to adapt to other languages (java, c++, python (i have already one for thsi) What about packaging as an extension ? Laurent -- Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org - http://www.indesko.com Nuxeo Enterprise Content Management >> http://www.nuxeo.com - http://www.nuxeo.org Livre "Programmation OpenOffice.org", Eyrolles 2004-2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
Hey Ariel, hey Andrew, Ariel Constenla-Haile schrieb: > Andrew Douglas Pitonyak escribió: [..] >> I should check to see if I have the latest copy in my macro document >> I know that at one point I speed it up a lot. My copy is dated 2007/04/04 but I can get the newest one from your Homepage ;-) > I remember there were a little issues: I added > > to FMT_InitSpecialCharArrays() # @ ! ^ % _ > to FMT_InitTokensBasic(sTokens()) "line", "line input" > > they were not properly formatted OK, thanks for this hint. >> If you desire the latest copy as a library email me and let me know. sure - I would appreciate :-) > Please let us ALL know!!! > > I've been using your code for a long time, and (as usual) it's great (I > just thought about translating it into Java, and adding some code to > create the styles at runtime - if checking first tells that they do not > exists in the document) @ariel: If you can provide this code to me, I can save a lot of time. After going through the code yesterday this was also my idea: creating the styles if the are not existing - or import them from a "masterdocument". But if you have code to create them - fine, that should save time. Thanks in advance Thomas -- ## Marketing deutschsprachiges Projekt ## http://de.openoffice.org - www.openoffice.org ## Vorstand OpenOffice.org Deutschland e.V. ## Mitglieder willkommen: www.OOoDeV.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
Andrew Douglas Pitonyak escribió: Thomas Krumbein wrote: Hi Ariel, hi Malte, thank you for the information. Ariel Constenla-Haile schrieb: [..] See Andrew Pitonyak's Macro Document at http://www.pitonyak.org/AndrewMacro.odt chap. 9 "Formatting macros" containg macros to format Basic code just like the IDE does. OK, this is a fine start - and helps me really. Best regards Thomas My code relies on certain paragraph styles identifying the code and then uses character styles to format the different portions. If you highlight an entire formatted Calc Macro, you will have all of the required character styles. I should check to see if I have the latest copy in my macro document I know that at one point I speed it up a lot. I remember there were a little issues: I added to FMT_InitSpecialCharArrays() # @ ! ^ % _ to FMT_InitTokensBasic(sTokens()) "line", "line input" they were not properly formatted If you desire the latest copy as a library email me and let me know. Please let us ALL know!!! I've been using your code for a long time, and (as usual) it's great (I just thought about translating it into Java, and adding some code to create the styles at runtime - if checking first tells that they do not exists in the document) Bye Ariel. -- Ariel Constenla-Haile La Plata, Argentina [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.arielconstenlahaile.com.ar/ooo/ "Aus der Kriegsschule des Lebens - Was mich nicht umbringt, macht mich härter." Nietzsche Götzendämmerung, Sprüche und Pfeile, 8. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
Thomas Krumbein wrote: Hi Ariel, hi Malte, thank you for the information. Ariel Constenla-Haile schrieb: [..] See Andrew Pitonyak's Macro Document at http://www.pitonyak.org/AndrewMacro.odt chap. 9 "Formatting macros" containg macros to format Basic code just like the IDE does. OK, this is a fine start - and helps me really. Best regards Thomas My code relies on certain paragraph styles identifying the code and then uses character styles to format the different portions. If you highlight an entire formatted Calc Macro, you will have all of the required character styles. I should check to see if I have the latest copy in my macro document I know that at one point I speed it up a lot. If you desire the latest copy as a library email me and let me know. -- 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] Bug in displaying Icons on transient menu items?
Tobias Krais wrote: Hi Carsten, One can think that this is a bug but the current implementation distinguishes between the same command with different arguments. We did this because one can think of the following scenario: .uno:Clipboard?command=copy .uno:Clipboard?command=cut .uno:Clipboard?command=paste Hmm. Sounds reasonable. But there is a problem: I pass a userid as an argument. This userid changes for thousands of users, that means I'll NEVER be able to have an icon - that is extremely bad for me, because we use the icon within the toolbar. If someone wants to have different icons for the scenario you describe above, they could implement an own protocol handler for the icon and dispatch the needed CommandURL within - thus having all you need. Hi Tobias, At the moment, my toolbar shows three letters instead of a picture, only because I want to pass the userID. Is there a different way to pass this argument, so that I can have an icon in the toolbar? There is currently no other way than to extend the current implementation. A solution, which is not acceptable, would be to register the same icon for all different commands (e.g. .Judas:PrintTrays?userID=1000, .Judas:PrintTrays?userID=1001, ... ) Or any comments on changing the current implementation? There is another problem with an implementation which supports your scenario. Every command with arguments would also need to check that an image is associated with its base command. As we already have three layers (document, module, general) where images can reside this would need three additional requests. - complete command URL for document icons - complete command URL for module icons - complete command URL for general icons - base command URL for document icons - base command URL for module icons - base command URL for general icons I am not sure if this is acceptable as OpenOffice.org already spends some time at startup to process all icon requests. I will check if I can extend the image search process to also support your scenario without degrading performance too much. Regards, Carsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
Hi Ariel, hi Malte, thank you for the information. Ariel Constenla-Haile schrieb: [..] > See Andrew Pitonyak's Macro Document at > http://www.pitonyak.org/AndrewMacro.odt > > chap. 9 "Formatting macros" containg macros to format Basic code just > like the IDE does. OK, this is a fine start - and helps me really. Best regards Thomas -- ## Marketing deutschsprachiges Projekt ## http://de.openoffice.org - www.openoffice.org ## Vorstand OpenOffice.org Deutschland e.V. ## Mitglieder willkommen: www.OOoDeV.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
Hi Thomas, Thomas Krumbein escribió: Hey, I am working on an extention for easy code-dokumentation. Therefor I want to import code (from basic-bibliotheks) to a writer document - adding some spezial informations like line-numbers and so on. OK, technical no problem, but inside the Basic-IDE we have nice code-highlighting which I would like to add. There should be some code inside OOo, which identifies keywords, strings, comments and so on. Is it possible to use this code-fragments from UNO? There is no API for that, just native C++ code. Can somebody give me some hints, where I can find some more informations - or some code-snipplets? See Andrew Pitonyak's Macro Document at http://www.pitonyak.org/AndrewMacro.odt chap. 9 "Formatting macros" containg macros to format Basic code just like the IDE does. Bye and luck Ariel -- Ariel Constenla-Haile La Plata, Argentina [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.arielconstenlahaile.com.ar/ooo/ "Aus der Kriegsschule des Lebens - Was mich nicht umbringt, macht mich härter." Nietzsche Götzendämmerung, Sprüche und Pfeile, 8. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Code-Highlighting in Basic IDE
See class SyntaxHighlighter in basic/inc/basic/hilight.hxx. I don't believe there is some UNO API. Malte. Thomas Krumbein wrote, On 10/30/07 11:47: > Hey, > > I am working on an extention for easy code-dokumentation. Therefor I > want to import code (from basic-bibliotheks) to a writer document - > adding some spezial informations like line-numbers and so on. > OK, technical no problem, but inside the Basic-IDE we have nice > code-highlighting which I would like to add. > > There should be some code inside OOo, which identifies keywords, > strings, comments and so on. Is it possible to use this code-fragments > from UNO? > > Can somebody give me some hints, where I can find some more informations > - or some code-snipplets? > > Thanks in advance > > Thomas > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Code-Highlighting in Basic IDE
Hey, I am working on an extention for easy code-dokumentation. Therefor I want to import code (from basic-bibliotheks) to a writer document - adding some spezial informations like line-numbers and so on. OK, technical no problem, but inside the Basic-IDE we have nice code-highlighting which I would like to add. There should be some code inside OOo, which identifies keywords, strings, comments and so on. Is it possible to use this code-fragments from UNO? Can somebody give me some hints, where I can find some more informations - or some code-snipplets? Thanks in advance Thomas -- ## Marketing deutschsprachiges Projekt ## http://de.openoffice.org - www.openoffice.org ## Vorstand OpenOffice.org Deutschland e.V. ## Mitglieder willkommen: www.OOoDeV.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]