Re: [dev] Print PDF using OpenOffice
Hi, As Andreas already said this is not possible this would need OO to import the PDF which is not possible currently. If you are running Linux you can use can maybe use KWord which has an import filter for PDF files. Tom Rui Lima schrieb: :( that i don't know. But i would like that Isso não sei, mas era porreiro saber! 2007/2/27, Dyego Souza Dantas Leal [EMAIL PROTECTED]: Rui Lima escreveu: please check: http://codesnippets.services.openoffice.org/Writer/Writer.StoreWriterAsPDF.snip 2007/2/27, Dyego Souza Dantas Leal [EMAIL PROTECTED]: Exists way to print a PDF Document using OpenOffice ? using OpenOffice SDK ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No... no export AS PDF PRINT a PDF... the pdf alerady exists... OpenOffice Supports this operation ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: OpenPGP digital signature
Re: [dev] Formats Supported by OpenOffice 2.1
Andreas Schlüns schrieb: Dyego Souza Dantas Leal schrieb: In the Code: XStorable xStorable = (XStorable)UnoRuntime.queryInterface( XStorable.class, xDoc); PropertyValue[] storeProps = new PropertyValue[1]; storeProps[0] = new PropertyValue(); storeProps[0].Name = FilterName; storeProps[0].Value = MS Word 97; xStorable.storeAsURL(storeUrl, storeProps); I can Store the actual document as Ms Word 97... Very Nice... but... where can get the all possibilities of FilterName property ? A list of all actual supported filters can be found here: http://wiki.services.openoffice.org/wiki/Framework/Article/Filter; A question I've always asked myself why the hell are those standard formats not provided by the UNO-API as constants? Something like IExportFormats#MS_WORD_97, if defined in some an IDL I could simply use them without thinking too much about spelling because my favorite IDE would provide auto-expansion for it. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] First release of the PengYou project
Hi Jérémy, I testes the whole system and really looks promising (I'd like to include the whole in our SWT-Application). Might I suggest that you set up a mailing list to ask questions. I saw the webform at your the homepage but a mailing list or newsgroup would be a really great thing to ask questions (e.g. I'm having trouble to get the web-client working) and to give feedback. Another great thing would be if the project could provide its SVN or CVS repository to access the sources and create patches for problems found in the projects. One more thing: The timestamp displayed in my openoffice-plugin always shows 1.1.1970 is this a known bug? Oh and a bugtracker would also be a great idea! Tom Jérémy Bethmont schrieb: I'm proud to announce the first version of the PengYou project: Web site: http://www.pengyou-project.info Community web site: http://dev.pengyou-project.info PengYou is a Document Management System with innovative collaborative functionalities which has an OpenOffice.org extension to edit the documents. You can take a look to the demo video and if you want to give it a try, go to the download page. Demo: http://www.pengyou-project.info/en/demo.php Download: http://www.pengyou-project.info/en/download.php This project is released under the apache software License 2.0. The team has spent a lot of time preparing this release, and I thank them all for the energy and time they gave to this project. I'm the developer of the OpenOffice.org and I also want to thanks all of the people of the list because you help me a lot! As an open source project, don't hesitate to give us your feedbaks, report bugs and contact us if you want to join our team! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] UNO component language....java vs python
Hi, Stephan Bergmann schrieb: ashok _ wrote: Hello there: I need to write a UNO component - I am familiar with Java and Python - I am attracted by the ease and the scripting paradigm of python - but the support in openoffice for Java appears to be better? I have a feeling that the python UNO interface has not been updated in a while. Yes, Java might be better here if you want to play it safe. And with the new Netbeans and Eclipse-Plugins development might be easier. Tom signature.asc Description: OpenPGP digital signature
Re: [dev] Set default posSize for new created Windows
You could add this Snippet to our collection: http://codesnippets.services.openoffice.org/ Tom Christoph Lutz schrieb: Hi Carsten, On 7/14/06, Carsten Driesner [EMAIL PROTECTED] wrote: You can see that the configuration set Factories contains nodes for every appplication module, in the example com.sun.star.frame.StartModule and com.sun.star.text.TextDocument. The property called ooSetupFactoryWindowAttributes stores the left,top position and the width and height in pixel. You can use the configuration API to change these values programmatically. thanks. this works! if you are interested in the solution, just have a look at example code below. I am not sure if the current implementation reads the values for every new window or if it just uses internal values. So it's possible that the values are only read once from the configuration at startup time. Be aware that these values will be overwritten when a user changes the position or size of an application window. it seems that the current implementation reads the attribue for every new window and doesn't use internal values! here the example code: /** * Diese Hilfsmethode liest das Attribut ooSetupFactoryWindowAttributes aus * dem Konfigurationsknoten * /org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument * der OOo-Konfiguration, welches die Standard-FensterAttribute enthält, mit * denen neue Fenster für TextDokumente erzeugt werden. * * @return */ private static String getDefaultWindowAttributes(XComponentContext ctx) { try { Object cp = ctx.getServiceManager().createInstanceWithContext( com.sun.star.configuration.ConfigurationProvider, ctx); // creation arguments: nodepath com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue(); aPathArgument.Name = nodepath; aPathArgument.Value = /org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument; Object[] aArguments = new Object[1]; aArguments[0] = aPathArgument; XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime .queryInterface(XMultiServiceFactory.class, cp); Object ca = xmsf.createInstanceWithArguments( com.sun.star.configuration.ConfigurationUpdateAccess, aArguments); XPropertySet prop = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, ca); return prop .getPropertyValue(ooSetupFactoryWindowAttributes).toString(); } catch (java.lang.Exception e) { } return null; } /** * Diese Hilfsmethode setzt das Attribut ooSetupFactoryWindowAttributes aus * dem Konfigurationsknoten * /org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument * der OOo-Konfiguration auf den neuen Wert value, der (am besten) über * einen vorhergehenden Aufruf von getDefaultWindowAttributes() gewonnen * wird. * * @param value */ private static void setDefaultWindowAttributes(XComponentContext ctx, String value) { try { Object cp = ctx.getServiceManager().createInstanceWithContext( com.sun.star.configuration.ConfigurationProvider, ctx); // creation arguments: nodepath com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue(); aPathArgument.Name = nodepath; aPathArgument.Value = /org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument; Object[] aArguments = new Object[1]; aArguments[0] = aPathArgument; XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime .queryInterface(XMultiServiceFactory.class, cp); Object ca = xmsf.createInstanceWithArguments( com.sun.star.configuration.ConfigurationUpdateAccess, aArguments); XPropertySet prop = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, ca); prop.setPropertyValue(ooSetupFactoryWindowAttributes, value); XChangesBatch committer = (XChangesBatch) UnoRuntime .queryInterface(XChangesBatch.class, ca); committer.commitChanges(); } catch (java.lang.Exception e) { } } regards, Christoph - 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]
Re: [dev] Toolbar button added using Addon not enabled
This question is better answered at dev@api.openoffice.org Tom signature.asc Description: OpenPGP digital signature
Re: [dev] Re: [documentation-dev] creating Excel files
Dave Calkins schrieb: Niklas Nebel wrote: Dave Calkins wrote: I'd like to be able to export to an Excel file from my app which will be running in a shop floor environment on a machine which would not have MS Office or Open Office installed. Why don't you just install OOo and control it using the API? I don't have control over the machines on which our app is running, so the only thing I know for sure is that they'll have our app installed. Also, the machines on the shop floor running our app don't have a need for a full office suite, since they're collecting/generating the data and only want to be able to export to Excel for review later on other machines. Having them install OOo would probably be overkill. Of course, there's the option of including the OOo installation within our app's installation, but that would probably really grow the size of our installer. For similar reasons we wanted to avoid the MS Office automation interfaces. Using them would require having the MS Office SW installed on the machine where our app was running and we couldn't ensure that either. Which is why we're looking for something to let us directly write the binary file format and OOo seemed liked a good possibility. Did you thought about jakarta-POI? Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Re: [documentation-dev] creating Excel files
Do you really need to get xls why not PDF? Do people have to change things afterwards? Tom Dave Calkins schrieb: Tom Schindl wrote: either. Which is why we're looking for something to let us directly write the binary file format and OOo seemed liked a good possibility. Did you thought about jakarta-POI? Thanks for the pointer. I'll definitely take a look at that as well. The downside there is that its Java and we're using C++, so we'd need to do JNI or run a VM process and use RMI or something. Then that also requires including the Java runtime with our installer. Anyway, worth looking into and keeping on the list of possibilities. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: OpenPGP digital signature
[dev] Adding custom Tags into ODF
[repost from before but I have posted with wrong E-Mail-Address] I'm facing the problem that I have to generate complex reports in ODF-Format and chose to use a templating-lib named freemarker. After having inserted freemarker directives the document could not be loaded any more using OpenOffice. The document including the tags looks like the following: table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ ftm:if test=x=1 table:table-row table:style-name=ro1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /ftm:if /table:table Is it possible to teach OpenOffice to accept those custom tags. If the above is not possible is this one? table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ ftm:if test=x=1 / table:table-row table:style-name=ro1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /table:table Thanks Tom signature.asc Description: OpenPGP digital signature
[dev] Adding my own tags into ODF-Format
Hi, I'm in the situation that I have to create complex reports using OpenOffice. I choose to use a templating lib named freemarker (www.freemarker.org) and leave OpenOffice as the designer. The problem is that after I have filled in my freemarker tags I can not open the document any more in OpenOffice because it doesn't match the file format. No my questions is, is it possible to teach OO new Tags? Let's take a small sample from ods: office:document-content ... xmlns:ftm=http://www.freemarker.org/XML; ... table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ ftm:if test=x=1 table:table-row table:style-name=ro1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /ftm:if /table:table /office:document-content ... Is it somehow possible to learn OO to accept this new tag? If the above case is not possible is the next one possible how? table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ ftm:if test=x=1 / !-- EMPTY TAG table:table-row table:style-name=ro1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /table:table Thanks Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Adding my own tags into ODF-Format
Éric Bischoff schrieb: Le Jeudi 29 Juin 2006 09:41, Tom Schindl a écrit : Hi, I'm in the situation that I have to create complex reports using OpenOffice. I choose to use a templating lib named freemarker (www.freemarker.org) and leave OpenOffice as the designer. The problem is that after I have filled in my freemarker tags I can not open the document any more in OpenOffice because it doesn't match the file format. No my questions is, is it possible to teach OO new Tags? I guess it's possible, by modifying the XML schema shipped with OOo. Well i think it's not only a question of validation at least in the first case because where the hell oo should know from that it needs to look below ftm:if test=x=1 to find the table:table-row table:style-name=ro1 another idea might be to use attributes instead of elements. office:document-content ... xmlns:ftm=http://www.freemarker.org/XML; ... table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ table:table-row table:style-name=ro1 ftm:if=x=1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /table:table /office:document-content ... Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Adding my own tags into ODF-Format
Hi Kay, thanks for your reply I think the easiest soltion would use the attribute way described in the last mail I sent. Is it allowed to have custom attributes in ODF? --8-- office:document-content ... xmlns:ftm=http://www.freemarker.org/XML; ... table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ table:table-row table:style-name=ro1 ftm:if=x=1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /table:table /office:document-content ... --8-- And yes ftm is the custom part of the whole story (see the namespace declaration in office:document). Tom Kay Ramme - Sun Germany - Hamburg schrieb: Hi Tom, Tom Schindl wrote: Hi, I'm in the situation that I have to create complex reports using OpenOffice. I choose to use a templating lib named freemarker I would expect it to be a pleasure ;-) (www.freemarker.org) and leave OpenOffice as the designer. The problem is that after I have filled in my freemarker tags I can not open the document any more in OpenOffice because it doesn't match the file format. No my questions is, is it possible to teach OO new Tags? AFAIK, the problem is, that after adding your custom tags, your document is not longer ODF compliant. Basically, OOo does not know anything about your tags and does not know what to do with them. Let's take a small sample from ods: office:document-content ... xmlns:ftm=http://www.freemarker.org/XML; ... table:table table:name=Tabelle1 table:style-name=ta1 table:print=false office:forms form:automatic-focus=false form:apply-design-mode=false/ table:table-column table:style-name=co1 table:default-cell-style-name=Default/ ftm:if test=x=1 table:table-row table:style-name=ro1 table:table-cell office:value-type=string text:pHallo Welt/text:p /table:table-cell /table:table-row /ftm:if /table:table /office:document-content ... Is it somehow possible to learn OO to accept this new tag? If the above case is not possible is the next one possible how? I am not so much an ODF or XML expert, that I could tell which your tag is. Is it the ftm ? However, the only way I can think of tunneling it through (assuming that it is what you want to do) is as content, e.g. as text or values or somesuch. Thanks Tom Do not know if this helped Kay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: OpenPGP digital signature
Re: [dev] Adding my own tags into ODF-Format
Éric Bischoff schrieb: Le Jeudi 29 Juin 2006 16:18, Yeatts, Garnett W. CONTR J9C329 a écrit : Most of the foreign elements and markers are lost when the file is saved. I am also interested in adding some custom attributes or information to ODF files. Is there a recommended way of adding more information to an ODF document using the existing schema that would be persisted through saving in OO? Only for metadata, as far as I know: User-defined metadata is a more generic mechanism which specifies a triplet of name, type, and value. Supporting applications can present these value to the user, making use of the supplied data type. The user-defined metadata can be referenced from within the document through the use of suitable text fields. Custom metadata are arbitrary elements inside office:meta. Since their semantics is not defined in this specification, conforming applications in general cannot process or display this data. Applications should preserve this data when editing the document. I don't know whether that would be enough for you. Probably not, from your table example. Well in my idea it it would be really great if you could do something like this: custom-data.xml 8-- office:custom-data id=custom1 ftm:if test=x=1 / /office:custom-data 8-- content.xml 8-- table:table-row table:style-name=ro1 office:custom-id-ref=custom1 8-- So any element can hold additional data beside the offical ones. Tom signature.asc Description: OpenPGP digital signature
Re: [dev] Adding my own tags into ODF-Format
Niklas Nebel schrieb: Tom Schindl wrote: thanks for your reply I think the easiest soltion would use the attribute way described in the last mail I sent. Is it allowed to have custom attributes in ODF? Do you just want to load the file, ignoring the extra content, or do you need to preserve your markers? Foreign elements and attributes are ignored in most places. In a few places, like style:table-cell-properties in a cell style, foreign attributes are read and preserved. In the case of a cell style, they are then included when the cell is copied or moved, and written again in the cell's style when the file is saved. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yeah I would need to preserve those markers take the following: 1) I design a reports in OOCalc 2) I open the Document in my vi, notepad, ... and add my special tags like e.g. table:table-row table:style-name=ro1 ftm:list=persons as person table:table-cell office:value-type=string text:p${person.givenname}/text:p /table:table-cell table:table-cell office:value-type=string text:p${person.surname}/text:p /table:table-cell /table:table-row In the template engine which is gets passed variable named persons (in Java an Array of Person-Objects) now the template loops over this foreach person and the resulting document (plain ODF-File) with say 3 additional rows holding the person information. (Maybe I one day you this is done directly in OpenOffice with an Extension or something else) = Hey OpenOffice get's a reporting engine with one of the greatest visual report designer people ever saw ;-) 3) I want to change the design of the document e.g. adding a header and footer. I want to open the file add change add the header and footer and my information should have been preserved. From your mail i got the feeling that this is not possible at the moment in OpenOffice. Wouldn't it be a simple to restore this non-odf values e.g. as strings next to the object and insert them back when saving the object (I know this is not so easy but you may get my point :-). Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Adding my own tags into ODF-Format
Niklas Nebel schrieb: Tom Schindl wrote: From your mail i got the feeling that this is not possible at the moment in OpenOffice. Wouldn't it be a simple to restore this non-odf values e.g. as strings next to the object and insert them back when saving the object (I know this is not so easy but you may get my point :-). It's possible, but you need one indirection: The marker is added to an (automatic) cell style, your processing code has to keep track of which cell style contains which marker, and react on a cell with a style with a marker. You don't even have to manually edit the content.xml file. A cell's foreign attributes (from its style) are available in the API property UserDefinedAttributes. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Well ok let's see whether I understood it. You are talking about style.xml: -8- office:automatic-styles -8- or about contex.xml -8- style:style style:name=ce1 style:family=table-cell style:parent-style-name=Default -8- Does this only apply to cell-styles (style:family=table-cell) or also to others like style:family=table-row, ... . Another problem is that the a style could be applied to more than one row, cell, ... but the template directive doesn't, or am i missunderstanding something completely? Tom signature.asc Description: OpenPGP digital signature
Re: [dev] Adding my own tags into ODF-Format
Niklas Nebel schrieb: Tom Schindl wrote: Well ok let's see whether I understood it. You are talking about style.xml: -8- office:automatic-styles -8- or about contex.xml -8- style:style style:name=ce1 style:family=table-cell style:parent-style-name=Default -8- Does this only apply to cell-styles (style:family=table-cell) or also to others like style:family=table-row, ... . Another problem is that the a style could be applied to more than one row, cell, ... but the template directive doesn't, or am i missunderstanding something completely? Cell styles (style:family=table-cell), either user-defined or automatic ones. Row styles don't implement this. These user-defined attributes are included in normal attribute handling: If two cells have the same set of attributes (including user-defined), they'll get the same automatic style. You can just keep track of the markers in styles, and consider a cell marked if its style has a marker. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ok, that doesn't help in my situation because i also need to apply my directives to table-rows and when we start talking about OOWriter it will also miserably fail ;-) Thanks for your help Tom signature.asc Description: OpenPGP digital signature
Re: [dev] Warum OOo
Please note that we discuss in english in this forum. Tom Heinz W. Simoneit schrieb: Hallo @all (Bernhard ?), da war 'mal ein Projekt Warum OOo oder ähnlich angedacht. Ich habe eine Art Startseite in Erinnerung, mit der verschiedene Anwendungsbereiche (Ausbildung, KMU, Non-Profit...) angesprochen werden sollten. Ist das noch aktuell? Kann mir jemand den Link dazu geben? Danke!
Re: [dev] Changing the default Java for OOo from command line
Hi, Well if you are on linux a simple sed command could change the used JDK or am I missing something. This could surely done also on win32 but I have no idea on win32-scripting. The information is stored on my system in: [EMAIL PROTECTED]:~tom/.openoffice/user/config/javasettings_Linux_x86.xml Tom Tobias Krais schrieb: Hi Joachim, selecting a different JRE is only possible through the options dialog. at the moment I am creating a little Debian package. This package only runs with a Java = 1.5. How can I tell the OOo installation via commandline to use a more modern Java than the Default 1.4? which component is the responsible for setting a JRE, so that I can contact that list. Greetings, Tobias - 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]
Re: [dev] Changing the default Java for OOo from command line
Well if I'm not completely mistaken you only need to modify the path to the jre used by openoffice don't you? I have no sed commando available at the moment but because I'm better in perl here's a one liner (this is even cross-platform as it's perl :-) : 8 perl -e '{local $/ = undef; open(IN,$ARGV[0]);$c=IN;close(IN);}$c =~ s/location.+\/location/location$ARGV[1]\/location/;open(OUT,$ARGV[0]);print OUT $c;close(OUT);' $path_to_javasettings_Linux_x86.xml $new_jre% 8 for example: 8 perl -e '{local $/ = undef; open(IN,$ARGV[0]);$c=IN;close(IN);}$c =~ s/location.+\/location/location$ARGV[1]\/location/;open(OUT,$ARGV[0]);print OUT $c;close(OUT);' javasettings_Linux_x86.xml file:///usr/java5/jre 8 As already mentionned if you have to check if this changes within releases but it should work for the current ones. Tom Tobias Krais schrieb: Hi Peter, http://en.wikipedia.org/wiki/Sed I know this littel program, but I don't know how sed can change the JRE for OOo... Greetings, Tobias Well if you are on linux a simple sed command could change the used JDK or am I missing something. This could surely done also on win32 but I have no idea on win32-scripting. The information is stored on my system in: [EMAIL PROTECTED]:~tom/.openoffice/user/config/javasettings_Linux_x86.xml tell me more! I know this file. But what do you mean with the sed command? How is it used? - 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]
Re: [dev] Changing the default Java for OOo from command line
Well I could only second Tobias that if you are adminstrating clients via e.g. an ssh-session it would be great if you would not need to use the GUI to change your clients Java configuration without forwarding your X for example. Tom Joachim Lingner schrieb: Tom Schindl wrote: Hi, Well if you are on linux a simple sed command could change the used JDK or am I missing something. This could surely done also on win32 but I have no idea on win32-scripting. The information is stored on my system in: [EMAIL PROTECTED]:~tom/.openoffice/user/config/javasettings_Linux_x86.xml The javasettings_xyz.xml is an implementation detail and it may change between versions of OOo without notice. By the way the vendorData element contains data which are only useful or necessary for exact that JRE (vendor, version) which is determined by the javaInfo element. It is not specified what exactly has to be contained in that element. However, when a Sun JRE is used then it contains the paths to the JRE installation which have to be put in the LD_LIBRARY_PATH before soffice starts. If this is not done, then VM aborts and kills the office as well. If you modify the file and point to a different JRE and vendorData still contains path to the old JRE then you can be sure that at some point your office behaves strange if not crashes. For more information about how a JRE is selected by OOo you could have a look at: http://udk.openoffice.org/common/man/spec/javavendorextension.sxw Jochen - 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]
Re: [dev] Problem to create a predefined Query
Hi, you should ask this kind of question at dev@api.openoffice.org or users@dba.openoffice.org Tom Stefan Schmid schrieb: Hello! I'm working on this problem for a long time now, but I can't get a solution. Maybe someone can help me. I want to add a new QueryDefinition to the DefenitionContainer. It's an example from the OOo Developer Guide (12.2.2 DataSources - Adding and Editing Predefined Queries) The Method createQuerydefinition() which I'm using is one-to-one from the CodeSamples.java (see code below) The Problem is that the last-but-one command returns null (= the xStore variable is null). When I look at the XQueryDefinitionsSupplier interface at api.openoffice.org there is nothing about a support of XStorable. But there should be one as the example of the DevelopersGuide and CodeSamples.java explains. So how else can I retrieve the XStorable interface and then store the query definition? Besides: I have read in the api reference that XSingleServiceFactory is deprecated and it is recommended to use the XSingleComponentFactory instead. So I alter the method (see code below) with this code: XInterface nQuery =null; try { nQuery = (XInterface) xSingleFac.createInstanceWithContext(xContext); } catch (Exception e) {System.out.println(e);} XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,nQuery); Here the NullPointerException is already thrown at the [nQuery= ..] line. I'm at my wits' end. I have read through the API 100 times but can't find a solution. Greets Stefan Code: public static void main(String[] args) { /* create service factory **/ //get the remote office component context com.sun.star.uno.XComponentContext xContext = null; com.sun.star.lang.XMultiComponentFactory xMCF = null; try { xContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); System.out.println(Connected to a running office ...); //get the Service Factory xMCF = xContext.getServiceManager(); } catch (BootstrapException e) { e.printStackTrace(); } /***/ try { createQuerydefinition(xContext, xMCF); } catch (Exception e) { e.printStackTrace(); } } public static void createQuerydefinition(com.sun.star.uno.XComponentContext xContext, com.sun.star.lang.XMultiComponentFactory xMCF) throws com.sun.star.uno.Exception { XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface( XNameAccess.class, xMCF.createInstanceWithContext(com.sun.star.sdb.DatabaseContext, xContext)); // we use the first datasource XQueryDefinitionsSupplier xQuerySup = (XQueryDefinitionsSupplier) UnoRuntime.queryInterface(XQueryDefinitionsSupplier.class, xNameAccess.getByName( Bibliography )); XNameAccess xQDefs = xQuerySup.getQueryDefinitions(); // create new query definition XSingleServiceFactory xSingleFac = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, xQDefs); XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class,xSingleFac.createInstance()); xProp.setPropertyValue(Command,SELECT * FROM biblio); xProp.setPropertyValue(EscapeProcessing,new Boolean(true)); XNameContainer xCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xQDefs); try { if ( xCont.hasByName(Query1) ) xCont.removeByName(Query1); } catch(com.sun.star.uno.Exception e) {} xCont.insertByName(Query1,xProp); XStorable xStore = (XStorable)UnoRuntime.queryInterface(XStorable.class,xQuerySup); System.out.println(xStore); xStore.store(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Seeking help for Microsoft Excel File Format
Hi, have you considered using jakarta-poi? have you considered using UNO-API and loading your XLS into OO and extract pictures using OO-API? Tom 刘俊峰 schrieb: Hello, I want to import images in some Excel files to a database. I already build a parser to read and analyze records based on the document excelfileformat.pdf. But Chapter 7 Drawing Objects, Escher Layer is unfinished, I can't go on read images. Please can you tell me the format of related Record Contents? Especially these record types: 0x00EB MSODRAWINGGROUP 0x00EC MSODRAWING 0x00ED MSODRAWINGSELECTION Sincerely, Liu Junfeng [EMAIL PROTECTED] 2006-5-23 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Problem inserting textfield
Hi, you should ask this question on dev@api.openoffice.org and if you provide the line failing with the exception it surely helps to find a solution. Tom James White wrote: Hi all, I have being trying to implement the code below (from developers guide p.548) and I constantly run into problems, could anyone suggest a solution or point me in the right direction to fixing the problem? The exception I get varies but is always one of the following: 1. java.lang.NullPointerException 2. com.sun.star.lang.IllegalArgumentException: second parameter invalid XTextDocument td = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class,xDesktop.getCurrentComponent()); XTextCursor tc = td.getText().createTextCursor(); Object bookmark = oobean.getMultiServiceFactory().createInstance ( com.sun.star.text.Bookmark ); XNamed xNamed = (XNamed) UnoRuntime.queryInterface ( XNamed.class, bookmark ); xNamed.setName(MyUniqueBookmarkName); XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface (XTextContent.class, bookmark ); td.getText().insertTextContent ( td.getText().getEnd(), xTextContent, false ); Thanks in advance for your help, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] need some informations
Sad enough there's no perl-binding for UNO there have been effords but I think none of them ever reached the goal. But if you know other languges like e.g.: - Python - Java you can create such PPT-Files using the UNO-API of OpenOffice. For more information take a look into the dev-guide[1]. You can ask questions about the api on [EMAIL PROTECTED] [1] http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html Tom andrei cristina wrote: Hi, I want to make a script (in Perl or something else) that take a csv file and take some informations from it and create some charts in a ppt presentation or in a word file (in batch mode). My problem is that I didn't find a documentation about that. PLease help Thanks you in advance! Best Regards, Cristina __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Help to Start
Hi, it depends on the task you want to fullfill. OpenOffice itself is C/C++ but if you only want to write addons, ... you could choose from multiple languages: - C/C++ - JavaScript - Python - Java - OOBasic - ... Fetch the dev-guide from here (1) and when you have questions about the API please ask them at [EMAIL PROTECTED] Another resource available is the snippet collection (2) demonstrating API-Usage in small samples. Tom (1) http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html (2) http://codesnippets.services.openoffice.org/ Luis Saldivia wrote: Hello I'm interest on start using Free Softw, and i want to know some things, if you can help me i'll be very thanksful. I'm very interested on openoffice, and i want to develope a new software from calc in the future but now i need to know about the language you use, i mean all openoffice is programed in ??? I'm sorry because my english it's not that well, but thanks for the help (can i write to some people about openoffice in spanish?)
Re: [dev] Re: open office drawings
You need to learn the UNO-API (http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html) and if you have questions don't hesitate to ask on [EMAIL PROTECTED] Tom Franco A. Bignone wrote: Hello ! I am new to this list and I would like to ask a question. I have been using the 'drawing' program for some time and I have found it, aside from the lack of some capabilities, very powerful for large and complex drawings. I would like to use it as an automatic system to draw, so my question is is there any possibility to give the program a file with a list of instructions in order to build a drawing ? How much is it difficult to change it in order to do so ? Regards Franco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Using pdf output filters from Java
A good starting point might be here: http://codesnippets.services.openoffice.org/Office/Office.ConvertDocuments.snip Tom Paul Edmondson wrote: Hi, I'm having problems saving documents using the various PDF output filters from a Java servlet and after reading through all the examples and various questions I've become stuck and would like some help or advice from the OOo experts. I can save MS Word and OOo Writer files as HTML but not as PDF. I am using the following environment:- - OpenOffice 2.0.2 - Debian etch (x86_64) - JDK-1.5.0_06 - tomcat 5.5.17 - CLASSPATH (set within $CATALINA_HOME/bin/setclasspath.sh) /usr/lib/ openoffice/program/classes/juh.jar:/usr/lib/openoffice/program/ classes/jurt.jar:/usr/lib/openoffice/program/classes/ridl.jar:/usr/ lib/openoffice/program/classes/unoloader.jar:/usr/lib/openoffice/ program/classes/unoil.jar:/usr/lib/openoffice/program - Using Xvfb The snippet of code that creates the PDF files is as follows. (Most of this is adapted from the ConverterServlet in the examples folder for the SDK together with parts adapted from ooo-cgi):- // Getting an object that will offer a simple way to store a document to a URL. XStorable xstorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, objectDocumentToStore); // List of output filters from ooo-cgi (HTML added for testing other formats.) String[] pdfFormats = {writer_pdf_Export, writer_web_pdf_Export, writer_globaldocument_pdf_Export, calc_pdf_Export, impress_pdf_Export, draw_pdf_Export, math_pdf_Export, HTML (StarWriter)}; // Preparing properties for converting the document propertyvalue = new PropertyValue[1]; for(int i = 0; i pdfFormats.length; i++) { propertyvalue[0] = new PropertyValue(); propertyvalue[0].Name = FilterName; propertyvalue[0].Value = pdfFormats[i]; // Storing and converting the document try { xstorable.storeToURL(filePrefix + convertedFile.toString(), propertyvalue); debugLog.debug(Document saved in this format: + pdfFormats[i]); break; } catch (Exception e) { debugLog.debug(Document not saved in this format: + pdfFormats[i], e); } } XCloseable xcloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xstorable); // Closing the converted document if (xcloseable != null) { xcloseable.close(false); } else { // If Xcloseable is not supported (older versions, // use dispose() for closing the document XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xstorable); xComponent.dispose(); } For every PDF filter type a com.sun.star.task.ErrorCodeIOException is thrown but not when using the HTML (StarWriter) filter. Is there something obvious that I'm missing? Do I need to add any extra jars to the classpath? Thanks in advance for any help or advice. Paul Edmondson. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] java swing application as AddOn
Or simply take a look at this snippet: http://codesnippets.services.openoffice.org/Office/Office.CallingJavaFromOOBasic.snip Tom Tom Schindl wrote: You need to write an OpenOffice-Service take a look into the SDK and Dev-Guide you can retrieve from http://api.openoffice.org. Tom Yves Matthess wrote: Hi All, I want to call a swing application within an office writer. This should realized as a button in the office Toolbar. Can somebody give me anything glue to start immediately? Thanks. Yves Yves Matthess, PhD. Student Johann Wolfgang Goethe-University Medical School Dept. of Gynecology and Obstetrics Theodor-Stern-Kai 7 60590 Frankfurt Phone: +69-6301 4379 Fax: +69-6301 6144 e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] scripted multiplatform .doc to .html conversion
Hi Kirk, No you simply have to discover the right filters which have to be used ;-) A more appropriate place to ask is: - dev@api.openoffice.org - http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html But once more if you plan to use this snippet in a multi-threaded environment like your J2EE-Server you need to serialize access in your application or have to have a pool of OO-Instances and dispatch conversion process to one of them. One more thing, I don't think that you need to have OOo/programm-Directory in your class-path OpenOffice 2 libs should locate the soffice.bin itself but I could be mistaken here. Tom Kirk Israel wrote: Tom, thanks, that is very cool. I was able to get the snippet up and running... Through trial and error I got the correct Jars from my OOo directory I needed to compile against, and then Google indicated I needed to include the OOo/program directory in the classpath. Was there a smarter way I should have know the above? And in terms of expanding on that so that it have .doc as input (right now it seems to only accept .odt) and HTML as output (currently not one of the options listed in the program), are there any gotchas I should know about or is it just about finding some appropriate API documentation and doing the fairly obvious things? This was a great first step, many thanks! -Kirk On 4/19/06, Tom Schindl [EMAIL PROTECTED] wrote: Hi, there's a fully functional codesnippet available which does show how document-conversion can happen. http://codesnippets.services.openoffice.org/Office/Office.ConvertDocuments.snip If you are running this from a J2EE application you need to take into consideration that ***one*** OO-Instance can not deal with multiple request at the same time, so must: - serialize access to OO - create a pool of instances you connect to and serialize access to them Tom Kirk Israel wrote: This project got backburnered but is now coming up again, the concept of integrating OOo's doc to HTML conversion as seamlessly as possible into an exisint J2EE application. My understanding is that OOo must be present (copied to, but not necceaarily installed, baed on Mathias' previous comments. At that point, it should be fairly easy to go through with the UNO libraries...is that about the size of it? Am I missing anything, or are there any resources that might make this easier? Thanks, Kirk
Re: [dev] scripted multiplatform .doc to .html conversion
Hi, there's a fully functional codesnippet available which does show how document-conversion can happen. http://codesnippets.services.openoffice.org/Office/Office.ConvertDocuments.snip If you are running this from a J2EE application you need to take into consideration that ***one*** OO-Instance can not deal with multiple request at the same time, so must: - serialize access to OO - create a pool of instances you connect to and serialize access to them Tom Kirk Israel wrote: This project got backburnered but is now coming up again, the concept of integrating OOo's doc to HTML conversion as seamlessly as possible into an exisint J2EE application. My understanding is that OOo must be present (copied to, but not necceaarily installed, baed on Mathias' previous comments. At that point, it should be fairly easy to go through with the UNO libraries...is that about the size of it? Am I missing anything, or are there any resources that might make this easier? Thanks, Kirk
Re: [dev] Implementing Document Restrictions in Star Office and Open Office
Why not simply creating a Issue and attaching the document and posting the IT-ID ;-) To Mathias Bauer wrote: Hi Valden, Valden Longhurst wrote: After talking with Malte Timmermann from Sun, he mentioned I might want to bring my ideas to this group. Is this the correct group for this idea? Attached is a PDF on how we can use both symmetric and asymmetric encryption--WITHOUT using a Rights Management or Licensing server to enforce business-justified document restrictions. My possible solution involves what is called the digital envelope or cryptolope. Unfortunately the PDF didn't make it because attachments are stripped on the server. Perhaps you have some web space at hand where you can put it and post a link? In case you don't have some you can send me the PDF (please use my Sun e-mail address: [EMAIL PROTECTED]) and I will deposit it somewhere on the OOo pages to give us a start for discussions. Best regards, Mathias
Re: [dev] [Fwd: [users] start openoffice 2.0 as server under windows]
You may have a look at: http://udk.openoffice.org/python/oood/ Tom Karl Pitrich wrote: On Tue, 2006-03-28 at 11:32 +0200, Andreas Höhmann wrote: how many parallel request can oo handle? none (in a stable manner) is it usefull to start more than one openoffice with different listen-ports to scale a OOConvertServer? sure, we use multiple instances, each running as a different user (mandatory) file access between OOo and the converter-app is granted via group membership and setgid. note that if you have to merge multiple documents onto one template, it is far more efficient to used regex on OOo's XML. / Karl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Client Side Code Help
Hi, you are talking about OO-API-Usage so dev@api.openoffice.org might be a better place to ask. Even checkout the Dev-Guide for information about the OpenOffice-UNO-API. http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html Tom Kris Mele wrote: Hello, I was wondering if someone could point me in the right direction with some code I am trying to migrate over from MSWord to OpenOffice? I have posted on the forum, but no one has been able to help as of yet. What I am trying to replicate is creating mailing labels on the user's computer via the Internet. For example, they would like to send a mailing out to their active members. On the client side code with MSWord, I pass a recordset and build each label based upon the layout forced in the code. This is done with vbscript. With vbscript and some code I have been able to find, I can pop the avery 5160 template, but cannot figure out how to populate the labels. Each label needs to be a different person, and there will more than likely be more than one page. If you are interested in the MS version, check out this link: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q285/1/76.aspNoWebContent=1 I really appreciate any help you all might be able to give me. I have been banging my head against the cube forever. Thanks, Kris
Re: [dev] To OpenOffice Developer:
If that's really a bug file it to to issue-zilla. Tom
Re: [dev] First Winner Developer Article Contest!
Somehow your URL has been mangled by your E-Mail Programm: http://www.openoffice.org/editorial/cbosdonnat.html Tom Louis Suarez-Potts wrote: All, Cédric Bosdonnat has been chosen OpenOffice.org's first winner of the monthly Developer Article Contest. Congratulations! Cédric's winning entry related to work begun last summer, for Google's Summer of Code, where he initiated development of an Eclipse plugin for OpenOffice.org. (A brief interview of Cédric can be found at http:// www.openoffice.org/editorial/cbosdonnat.htm.) The Developer Article Contest continues each month, so if you want to try your hand, you have a fresh chance now. Winners receive USD $750 plus invaluable attention and the gratification of helping others. Read our document on the matter for more information and start writing! The next deadline is the end of this month. ** C. Bosdonnat's Winning Article, http:// wiki.services.openoffice.org/wiki/JavaEclipseTuto ** Developer Article Contest, http://wiki.services.openoffice.org/ wiki/OpenOffice.org_Developer_Article_Contest -- Louis Suarez-Potts Community Manager OpenOffice.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] OO report issue
Hi, well first of that's the wrong forum to discuss Base you should ask your question on the dba-subproject. Nevertheless OOs reporting capabilities are very low depending but maybe its sufficient for your needs. Another idea is to look at other java-technologies: - http://jasperreports.sf.net - http://www.eclipse.org/birt are two of those providing you with visual designers and PDF-Output support. Tom Łukasz Bartnik wrote: Dear OO Dev Team, My name is Lukasz Bartnik, I'm a student at Warsaw University of Technology. I'm need to create pdf documents containing data fetched from a database. The query which returns the data has its parameters and everything should be performed in a batch mode. My task is to provide a web page where a user can choose the document to print (by clicking on its title/id). Then the page is reloaded and a link to pdf is returned as a result (or the pdf itself). That's why I'd like to ask You a question: is it possible with OO Base to create a report by running the program from the command line and providing mentioned parameters? Previously I've used fop (from Apache Foundation) but it isn't the right solution. The program itself has some drawbacks (it's a bit slow) and dealing with all those xml can be frustrating. To my disappointment, I wasn't able to find any tutorial on this subject. I'm using OO 2.0.1 on Debian and MySQL 5 (or PostgreSQL). My ReportWizard won't work because of some Java problems (as far as I'm concerned it's an open bug) so I have to do everything manually. I would be very grateful for providing me web addresses with this kind of reporting explained. Yours faithfully, Lukasz Bartnik
Re: [dev] Service,interface and property descriptions for UnoObject on runtime
of but can we move the discussion about this on the [EMAIL PROTECTED] There are much more people reading and dicussing API-Topics than here ;-) Post your code to the [EMAIL PROTECTED] Tom Vincenzo Giuliano wrote: Hi Tom, I have a class java, named Descriptor, which gets a description of services, interfaces, properties and values of UNO_Object on runtime. This class is still improvement (e.g. NullPointer Exception is not handed). However I believe it useful. If you can, you could take a look at this class, what do you think of it? Regards, Vincenzo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Re: Re: Re: TextField (Title,Subject,Comments, etc.)
Hi Vincenzo, I've added the snippet to our collection with some minor tweaks (added links to IDL-Docs, imports, ...). You can find your snippet here: http://codesnippets.services.openoffice.org/Writer/Writer.ReadDocumentProperties.snip Tom
Re: [dev] Need developer guidance or redirection!
I think the dev@api.openoffice.org is more appropriate for this type of question. I'd say that a XKeyListener is what you are looking for but I'm not sure: http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XKeyListener.html http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XWindow.html http://api.openoffice.org/docs/DevelopersGuide/OfficeDev/OfficeDev.xhtml Tom George Vasiliou wrote: Hello! Please forgive my ignorance if this is not the correct question or if this is not the correct forum to address it! I will describe in a few words what I want to do. I need a text editor to write a symbolic language that has many symbols which are combined to produce characters, just like Arabic or Thai characters do. That is I need a keyboard interceptor (to know which key has been tapped and intercept it to a symbol) and a layouting (glyph positioning) mechanism. I have already created a font containing the symbol glyphs and a prototype application in java using custom javax.swing.text.View classes. The problem is that I need a full application, just like OpenOffice Writer, in order to produce real documents, with real and my symbolic text combined. Is there any way I can plug-in the logic of my Keyboard interceptor and my glyph positioning mechanism in OpenOffice? I have started reading the Developer's guide but it is vast(!) and I think it does not give me any clue if what I want to do can be done in OpenOffice. Can anyone answer this question or point me any web link that can help me figure it out myself? Code samples would be much appreciated because as a pure Java developer I have difficulties in starting to understand the OpenOffice programming itself! Many thanks and regards George Vasiliou Athens, Greece - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Re: Re: TextField (Title,Subject,Comments, etc.)
Could you please submit this small piece of code to our snippet collection? http://codesnippets.services.openoffice.org/ http://www.paolo-mantovani.org/ Tom
Re: [dev] Adding menus / menu items at Runtime
Couldn't you package this as an Code-Snippet. Using Paolos Snippet-Creator found here this would take less than a minute ;-) http://www.paolo-mantovani.org/ Tom Carsten Driesner wrote: Tobias Krais wrote: Hi together, since some weeks I'm developing a little OpenOffice connector for a program we develeped (called JUDAS: www.judas.de). At the moment I try to add a menu called JUDAS to the menu bar at runtime. I found how to disable menus at runtime, but not how to add them. You may ask why is it necessary that the menus should be added at runtime. The menus should appear only if OpenOffice was started by JUDAS. If the user starts OpenOffice by itself, the menu should not appear. My question is: is it possible to generate menus at runtime? We are using OOo2. If yes, do you have examples or know where I should start studying? Hi Tobias, I think I answered this question on the mailing list api.openoffice.org several times. I attached two small examples which modifies the menu bar of an application module. If you only want to do temporary changes, please use the transient example. Regards, Carsten REM * BASIC * Sub Main REM *** Adds a item to the File Menu only transient. Means REM *** that this menu item only exists for and during the REM *** lifetime of the current frame. REM *** Initialize strings sMenuBar = private:resource/menubar/menubar sMyPopupMenuCmdId = .uno:PickList sMyCommand = macro:///Standard.Module1.Test() REM *** Retrieve the current frame of my model oModel = ThisComponent if not isNull( oModel ) then REM *** Retrieve frame from current controller oFrame = oModel.getCurrentController().getFrame() REM *** Retrieve the layout manager of my current frame oLayoutManager = oFrame.LayoutManager() REM *** Retrieve the menu bar from the layout manager oMenuBar = oLayoutManager.getElement( sMenuBar ) REM *** Retrieve writable configuration settings from menu bar oMenuBarSettings = oMenuBar.getSettings( true ) REM *** Make our changes only transient. An Add-on should REM *** never change configuration persistently as it can REM *** be deinstalled by a user without any chance to REM *** undo its configuration changes! REM *** Please look for bug #i46194 which prevents using REM *** oMenuBar.Persistent = false!! oMenuBar.Persistent = false REM *** Look for the File popup menu and add our command REM *** We must look if we haven't added our command already! fileMenuIndex = FindPopupMenu( sMyPopupMenuCmdId, oMenuBarSettings ) if fileMenuIndex = 0 then oPopupMenuItem() = oMenuBarSettings.getByIndex(fileMenuIndex) oPopupMenu = GetProperty( ItemDescriptorContainer, oPopupMenuItem() ) if not isNull( oPopupMenu ) then if FindCommand( sMyCommand, oPopupMenu ) = -1 then oMenuItem = CreateMenuItem( sMyCommand, Standard.Module1.Test ) nCount = oPopupMenu.getCount() oPopupMenu.insertByIndex( nCount, oMenuItem ) endif endif else msgbox No file menu found! endif oMenuBar.setSettings( oMenuBarSettings ) endif End Sub Function FindCommand( Command as String, oPopupMenu as Object ) as Integer nCount = oPopupMenu.getCount()-1 for i = 0 to nCount oMenuItem() = oPopupMenu.getByIndex(i) nPropertyCount = ubound(oMenuItem()) for j = 0 to nPropertyCount if oMenuItem(j).Name = CommandURL then if oMenuItem(j).Value = Command then FindCommand = j exit function endif endif next j next i FindCommand = -1 End Function Function FindPopupMenu( Command as String, oMenuBarSettings as Object ) as Integer for i = 0 to oMenuBarSettings.getCount()-1 oPopupMenu() = oMenuBarSettings.getByIndex(i) nPopupMenuCount = ubound(oPopupMenu()) for j = 0 to nPopupMenuCount if oPopupMenu(j).Name = CommandURL then if oPopupMenu(j).Value = Command then FindPopupMenu = j exit function endif endif next j next i FindPopupMenu = -1 End Function Function GetProperty( PropertyName as String, properties() as Variant ) as Variant for j = lbound( properties() ) to ubound( properties() ) oPropertyValue = properties(j) if oPropertyValue.Name = PropertyName then GetProperty = oPropertyValue.Value exit function endif next j GetProperty = null end function Function CreateMenuItem( Command as String, Label as String ) as Variant Dim aMenuItem(2) as new com.sun.star.beans.PropertyValue aMenuItem(0).Name = CommandURL aMenuItem(0).Value = Command aMenuItem(1).Name = Label
Re: [dev] Newbie: com.sun.star.comp.helper.BootstrapException: no office executable found!
No. It's not you have to access the file directly and because its XML you can easily read it using Java ;-). I've just kicked off a opensource-project aiming at this using Java it's in the very very very early stages and I'm concentrating on calc documents at the moment. If you are interested take a look at my companies publicsvn-repository: http://publicsvn.bestsolution.at/repos/java/officefs/trunk/ Tom Tobias Krais wrote: Solli Jürgen, try an ending Semicolon at the accept string: ooffice -accept=socket,host=localhost,port=8100;urp; When you use the simple bootstrap method you don't need to start the office separately. And you don't need an accept string, the simple bootstrap mechanism connects to the office using a named pipe connection. very interesting. You're right. Now I have an other question: is it possible to load an OpenOffice odt file without having a listening OpenOffice? Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] [SOLVED] Re: [dev] Newbie: com.sun.star.comp.helper.BootstrapException: no office executable found!
Well normally ooffice, oowriter, ... are bash-scripts or even perl (on mandrake) starting soffice to popup the appropriate OpenOffice-Application. On Mandrake for example one would have to same problem because: ooffice2.0 does the following: 8 #!/usr/bin/perl -w my $SystemInstallDir = '/usr/lib/ooo-2.0'; ... exec $SystemInstallDir/program/soffice, @ooo_argv 8 which means soffice is not in my path. So the bootstrap can not work by default. Tom Jürgen Schmidt wrote: Tobias Krais wrote: Hi Stephan, Just when I started the sdk Developer Guide for OO2 I experienced problems with the first application. First my system information: I use Debian Linux. My IDE is Eclipse. I installed OpenOffice2 and the OO2 sdk. I use blackdown java 1.4.2.03. , never tried if it works with the blackdown java, but normally the bootstrap mechanism should find a running office instance. working with OO 1.1.4 and the Java UNO Wrapper from .riess it works. But now I tried the samen with sun JDK 5. Nothing changes. unsupported wrapper stuff ;-) What you could try is 1. ensure that office_install/program is in the PATH I tried: -%- [EMAIL PROTECTED]:~$ export PATH=$PATH:/usr/lib/openoffice/program [EMAIL PROTECTED]:~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/openoffice/program [EMAIL PROTECTED]:~$ eclipse searching for compatible vm... testing /usr/lib/jvm/java-gcj...found -%- and then I run the application again: nothing changes 2. call your java class with parameter, like java -Dcom.sun.star.lib.loader.unopath=/opt/OpenOffice.org/program .. OK, I added a classpath variable to the project. Variable Name OFFICE_HOME value /usr/lib/openoffice/program. Then it work. You suggested the solution. mmh, that shouldn't be necessary when you have a normal installation on your system. But i don't know if Debian does anything special. In your first mail you mentioned that you have started your office with ooffice -accept=socket,host=localhost,port=8100;urp Why is it named ooffice? Is that Debian specific? If yes that is probably the problem. The bootstrap mechansim requires some pre-conditions (e.g. soffice must be in the PATH, a symbolic link is sufficient). Please can you test to rename ooffice to soffice and insert a symbolic link ooffice - soffice instead. It would be interesting for me to know if this solves your problem. Juergen Thanks a lot! I hope you won't hear too much from me in future :-) Greetings, Tobias - 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]
Re: [dev] libs for Open Standard Document Format?
Tom Schindl wrote: Hi, I've started writing such a lib. I've started with the OOSpreadsheet format what I'm trying for now is to stay as compatible with POI as possible. If you are interested in this I could post the URL to the subversion repository. Oh. What I've forgotten is that I'm doing this now because I want to use BIRT to generate reports in OO-Format. If someone is interested ;-) Tom Tom CPHennessy wrote: On Sat December 10 2005 19:29, victor sosa wrote: Which libs in java (or c++) for open document standard format do you used? I'm a java developer, and want develop with open document standard format. For example to work with MS format (word, excel, etc) I used jakarta POI- Java API To Access Microsoft Format Files Hi Victor, All OOo fiels are only zipped XML. So you can unzip the file and alter the file very easily. Obviously have a library to make this easier would also be an advantage. Please reply to dev@openoffice.org only - 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]
Re: [dev] Install-Macros on OO2
Helmut Seidel wrote: hello everybody, i've got another question which is of importance for me: i developed several applications (partly commercial - that means password protected) in oo-basic. up to now it is quite difficult to install them on customer computers (partly windows, partly linux) - but still its no problem because the are marketed regionaly and i can do the setup myself. in near future the are sold on a wider basis - so a mechanism to install the macros is needed (i.e. copy the librarys, forms and documents, register the librarys and create startbuttons or menus etc.) is there (or will there be) a possibility to do this in oo2? thanks for your answers helmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you search for pkgchk OO 1.x and unopkg on OO2? Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Install-Macros on OO2
I'll take a look in the dev-guide section where addons are described and other uno-packages. In OO you also have an MenuEntry to install addon-packages, there are makefile/ant examples which create an Addon-Package for you in the SDK you can obtain from api.openoffice.org. We are also discussing an addon-manager which downloads addons from locations on the web. Normally the process of install packages is to create a ZIP-File out of your addon. Take a look e.g. to the snippet creator a link can be found here: http://codesnippets.services.openoffice.org/ For a description of unopkg I'd ask on [EMAIL PROTECTED] Tom Helmut Seidel wrote: hello tom, that may well be(?) - is there anywhere a description/howto of unopkg? thanks helmut Tom Schindl schrieb: Helmut Seidel wrote: hello everybody, i've got another question which is of importance for me: i developed several applications (partly commercial - that means password protected) in oo-basic. up to now it is quite difficult to install them on customer computers (partly windows, partly linux) - but still its no problem because the are marketed regionaly and i can do the setup myself. in near future the are sold on a wider basis - so a mechanism to install the macros is needed (i.e. copy the librarys, forms and documents, register the librarys and create startbuttons or menus etc.) is there (or will there be) a possibility to do this in oo2? thanks for your answers helmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you search for pkgchk OO 1.x and unopkg on OO2? Tom - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] edit toolbar via OOBasic in OO2
Ask at dev@api.openoffice.org where people don't discuss OO development but API things. Tom Helmut Seidel wrote: hello again, i've read that it is possible to edit toolbars and menus in oo2 via the api. has anybody got an example haw to do this? thank you again helmut - 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]
Re: [dev] New Add-On
[...] Have you considered an incubator project http://incubator.openoffice.org/ or submitting your code to the codesnippet project http://codesnippets.services.openoffice.org/ ? Codesnippets is not the right place for such large projects like addons its here to show small programming exercises. Currently we are discussing at the api-list an OO-Extension-Manager to install Addins/Templates/ from a central web-repository. This would be the right place for a project Alex announced. See for more information http://qa.openoffice.org/issues/show_bug.cgi?id=43532 and api-list. Tom If you are interested, email me back. Then, I may send you a rough trial. Have a nice day _ Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. - 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]
Re: [dev] New user of postgresql drivers
Now my first question, I need to add actions to some of the fields, I can see how to do that from the control window but I need more help with the actual 'programming' of the macros. So where can I find documentation on the Macros? http://codesnippets.services.openoffice.org/Database/oobasic.xml If this should really be on the user list rather than the dev list then apologies but as I'm using the very new postgresql drivers and want to know about programming macros dev seemed more likely to be right. users@dba.openoffice.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]