[api-dev] Problem saving RTF file from OpenOffice 3
Hi to all, i found a problem if i try to save a file (open with OpenOffice 3.0) as .rtf, the numeric or dot list are not preserved (In OpenOffice 2.0 i don't have any problems about this). Any suggest for me?? Thanks to all Regards ~~ Dott. Cristian Fonti mailto: crfo...@scmgroup.com c/o Centro Elaborazione Dati (CED) SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] OpenOffice 3.0 and Java 1.5
Hi to all, two years ago, i have created an application client-server to editing rtf file with OpenOffice 2.X calling the client into an applet from Oracle E-Business Suite (Oracle Forms). Now i would upgrade to OpenOffice 3.0 but when i'm trying to load the openoffice jars i obtain this error: Unsupported major minor version 49.0. I supposed that the problem is that the jar in $OpenOffice_Installation_dir/Basis/program/classes e $OpenOffice_Installation_dir/Ure/java are compiled with JDK 1.6. There is a version of OpenOffice 3.0 compiled with JDK 1.5?? Or someone have an idea how to solve this problems?? Thanks to all Regards.
Re: [api-dev] OpenOffice 3.0 and Java 1.5
The pc-clients use the JRE 1.3.1.25 (and unfortunatly it is impossible for our company to upgrade it) and they must launch the applet in which is embedded OpenOffice 3.0 . How can i by-pass the problem? Regards ~~ Dott. Cristian Fonti mailto: crfo...@scmgroup.com c/o Centro Elaborazione Dati (CED) SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ Rony G. Flatscher ha scritto: Hi Cristian, Cristian Fonti wrote: Hi to all, two years ago, i have created an application client-server to editing rtf file with OpenOffice 2.X calling the client into an applet from Oracle E-Business Suite (Oracle Forms). Now i would upgrade to OpenOffice 3.0 but when i'm trying to load the openoffice jars i obtain this error: Unsupported major minor version 49.0. I supposed that the problem is that the jar in $OpenOffice_Installation_dir/Basis/program/classes e $OpenOffice_Installation_dir/Ure/java are compiled with JDK 1.6. There is a version of OpenOffice 3.0 compiled with JDK 1.5?? Or someone have an idea how to solve this problems?? 49.0 is Java 1.5 AFAIK. Probably the client (the forms application) uses an earlier version of Java. You may want to output something like System.out.err(java.version: +System.getProperty(java.version); Or output all properties to see the Java configuration in use. HTH, ---rony - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] DisableEnable commands with Java and OO2.0.3
Hi, to all i try to use the code that are in the Developers Guide to disable and re-enable commands in a OOoBean into a JavaBean. The first time that i open the javabean the commands are disable correctly. Than when i close, they are re-enable correctly. Then the second time that i open the javabean the commands are always disable correctly but when i close for the second time OO crash during the enable method. I have found that the problem is during the commit of the changes XChangesBatch xFlush =(XChangesBatch)UnoRuntime.queryInterface( XChangesBatch.class, xAccess); xFlush.commitChanges(); It crash before the xFlus.commitChanges(); Someone can help me?? ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] c/o Sistemi Informativi - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Problem with OOoBean and disable commands
Hi to all, i have OOoBean (with OO2.0.3) in a javabean, i need to disable some kind of command (like Open,Exit,etc...) i use the code that is in the developers guide also to disable and then re-enable command when the user close OOoBean. All is ok, but if i re-open the Javabean OO crash... i think that the problem is in the enable code... with OfficeBean and OO1.1.4 i don't have this kind of problems... Someone have the same problem?? I use this code: public void enableCommandsURLSet() { // Set the root path for our configuration access com.sun.star.beans.PropertyValue[] lParams = new com.sun.star.beans.PropertyValue[1]; XComponentContext xRemoteContext = null; XMultiComponentFactory xRemoteServiceManager = null; XMultiServiceFactory xConfigProvider = null; //Viene istanziato il percorso all'interno del file XML per la gestione dei comandi disabilitati lParams[0] = new com.sun.star.beans.PropertyValue(); lParams[0].Name = nodepath; lParams[0].Value = /org.openoffice.Office.Commands/Execute/Disabled; try { try { //Connessione ad una istanza di Soffice xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); } catch (BootstrapException e) { e.printStackTrace(); } System.out.println(Riabilitazione dei comandi ...); xRemoteServiceManager = xRemoteContext.getServiceManager(); Object configProvider = xRemoteServiceManager.createInstanceWithContext( com.sun.star.configuration.ConfigurationProvider, xRemoteContext ); xConfigProvider = (com.sun.star.lang.XMultiServiceFactory) UnoRuntime.queryInterface( com.sun.star.lang.XMultiServiceFactory.class, configProvider ); // Create configuration update access to have write access to the // configuration Object xAccess = xConfigProvider.createInstanceWithArguments( com.sun.star.configuration.ConfigurationUpdateAccess, lParams ); com.sun.star.container.XNameAccess xNameAccess = (com.sun.star.container.XNameAccess)UnoRuntime.queryInterface( com.sun.star.container.XNameAccess.class, xAccess ); if ( xNameAccess != null ) { // We need the XNameContainer interface to remove the nodes by name com.sun.star.container.XNameContainer xNameContainer = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface( com.sun.star.container.XNameContainer.class, xAccess ); // Retrieves the names of all Disabled nodes String[] aCommandsSeq = xNameAccess.getElementNames(); for ( int n = 0; n aCommandsSeq.length; n++ ) { try { // remove the node xNameContainer.removeByName( aCommandsSeq[n] ); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.container.NoSuchElementException e ) { } } } // Commit our changes com.sun.star.util.XChangesBatch xFlush = (com.sun.star.util.XChangesBatch)UnoRuntime.queryInterface( com.sun.star.util.XChangesBatch.class, xAccess); xFlush.commitChanges(); } catch ( com.sun.star.uno.Exception e ) { System.out.println( Exception detected! ); System.out.println( e ); } } To bypass the problem, i try to install two versions of the same OO2.0.3, one with the disable command for the OOoBean and one for the normal usage. But if i try to open from windows a document with OpenOffice when the Javabean is already open, the system open it with the soffice version without commands! Thanks to all... ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] c/o Sistemi Informativi - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Backgroung conversion crashes when closing last foreground document
Look the issue that i opened, id: 63270 Best Regard Cristian Mathias Bauer ha scritto: Mathias Bauer wrote: Tobias Krais wrote: Hi Mathias, Ah, maybe the problem is that OOo doesn't close its open windows on File-Exit when a terminate listener throws a VetoException? Well, this would be an unfortunate behavior. Or is it something else? Thats it. Is there a way to let OO close the open window but to stay in memory? If a terminate listener prevents windows from becoming closed: not without changing the source, I'm afraid. I had a quick look into the source: it seems so. I have to think wether this is a bug or not. in case you submit an issue, please tell me, I'll vote for it :-). Would it be a lot of work to change it? I just have to find out why we made it that way. There must have been a reason. :-) Once we find out that there is no problem with changing it it shouldn't be much to do. Seems that we can't find a reason why it needs to be that way. If you think that it should be changed please file an issue for the framework project. Best regards, Mathias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Create an index in a writer document with the link
I understand..don't you know another method that can i use to insert and Index entry or something similar?? Jürgen Schmidt ha scritto: Jürgen Schmidt wrote: Hi Cristian, Cristian Fonti wrote: Sorry, but if you don't use the ContentIndexMark, what kind of Index do you use??? ups, sorry i misunderstand you. Now it is clear what you want. I will try it again. as far as i can remember me it is not possible for index entries. In a content table it is a 1:1 relation between heading and the entry in the content table where you can easily use a link. For index entries it is not necessarily a 1:1 relation - you can have more than one equal index entries and on different pages or even on the same page. Which target should the link have? It would make sense maybe to link the page numbers and this of course makes sense for one entry per page only. Ok you can argue that in the case of two equal index entries on a page the link goes to the first one and it would probably a good default - but it is not implemented. You can submit a feature request and can hope that a lot of people vote for it. I would assume that the priority won't be high without a high number of votes. Sorry Juergen Juergen Jürgen Schmidt ha scritto: Cristian Fonti wrote: First of all thanks.. i try to use the TokenType, but nothing...maybe could be a problem in the code of the Entry?? This is my code: [CODE] mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDocument); XPropertySet xEntry=(XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, mxDocFactory.createInstance(com.sun.star.text.ContentIndexMark)); xEntry.setPropertyValue(AlternativeText,titolo_indice); xEntry.setPropertyValue(Level,new Short ( (short) 1)); XTextContent xEntryContent=(XTextContent) UnoRuntime.queryInterface(XTextContent.class,xEntry); Text.insertTextContent(TextCursor,xEntryContent,false); [/CODE] i have tested your program without the ContentIndexMark and without ... and this is how i create the TOC: [CODE] mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDocument); Object contentIndex=mxDocFactory.createInstance(com.sun.star.text.ContentIndex); XPropertySet xIndex=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, contentIndex); XNamed xNamed=(XNamed)UnoRuntime.queryInterface(XNamed.class,contentIndex); xNamed.setName(INDICE); ... xNamed.setName(), it's not necessary. I run it on a text document where i have inserted several lines (used styles heading1 - heading3) and it works fine for me. I got a content table with hyperlinks to the appropriate heading. Juergen xIndex.setPropertyValue(Level,new Short ( (short) 10)); xIndex.setPropertyValue(CreateFromOutline,new Boolean(true)); xIndex.setPropertyValue(IsProtected,new Boolean(false)); XTextContent xIndexContent=(XTextContent)UnoRuntime.queryInterface(XTextContent.class,xIndex); XDocumentIndex xDocIndex=(XDocumentIndex)UnoRuntime.queryInterface(XDocumentIndex.class,xIndex); xText.insertTextContent(xTextCursor,xIndexContent,false); XIndexReplace levelFormat=(XIndexReplace) UnoRuntime.queryInterface( XIndexReplace.class, xIndex.getPropertyValue(LevelFormat) ); for ( int i=0; ilevelFormat.getCount(); i++ ) { Object oo=levelFormat.getByIndex(i); PropertyValue[][] propertyvalues = new PropertyValue[8][]; PropertyValue[] propertyvaluesentry = new PropertyValue[2]; propertyvalues[0]=propertyvaluesentry; PropertyValue pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenEntryNumber; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[1]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenHyperlinkStart; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[2]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenEntryText; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv
Re: [api-dev] Create an index in a writer document with the link
Thanks, but as you can see in the other post, the problem isn't the ContenIndex, but the Index Entry that i use to insert the index in the text... Stephan Wunderlich ha scritto: Hi Cristian, I see in the developer's guide how create an index in a writer document with the JAVA API. i would add at every page number in the index (or eventually in the title) a hyperlink to the right section.. Someone know how can i do it (in JAVA)?? Thanks to all... given that you have a textdocument with some nice headings inside the following macro should insert a TableOfContents with the first Level HyperLinked ... -- xDoc = ThisComponent xText = xDoc.getText() xTextCursor = xText.createTextCursor xIndex = xDoc.createInstance(com.sun.star.text.ContentIndex) xIndex.createFromOutline=True xText.insertTextContent(xTextCursor, xIndex, false) LFormat = xIndex.LevelFormat.getByIndex(1) elementcount = ubound(LFormat) dim newFormat(elementcount+1) as Variant dim cont(0) as Variant dim aProp as new com.sun.star.beans.PropertyValue aProp.Name=TokenType aProp.Value=TokenHyperlinkStart cont(0) = aProp newFormat(0) = cont() for i=0 to ubound(LFormat) newFormat(i+1)=LFormat(i) next dim cont2(0) as Variant dim aProp2 as new com.sun.star.beans.PropertyValue aProp2.Name=TokenType aProp2.Value=TokenHyperlinkEnd cont2(0) = aProp2 newFormat(ubound(LFormat)+1) = cont2() xIndex.LevelFormat.replaceByIndex(1,newFormat()) xIndex.update xText.removeTextContent(xIndex) -- Hope that helps Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Create an index in a writer document with the link
(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[6]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenPageNumber; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[7]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenHyperlinkEnd; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; levelFormat.replaceByIndex ( i, propertyvalues ); } XPropertySet xIndexProps=(XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,xDocIndex); xIndexProps.setPropertyValue(Title,INDICE_AGG); xDocIndex.update(); [/CODE] Somewhere there is a problem, but i don't know where.. Peter Eberlein ha scritto: Hi, Cristian, Cristian Fonti schrieb: Hi to all, I see in the developer's guide how create an index in a writer document with the JAVA API. i would add at every page number in the index (or eventually in the title) a hyperlink to the right section.. I think you have to use the PropertyValue struct TokenType with its values TokenHyperlinkStart and ~End, as described in the DevGuide. I would like to see a code snippet, when you have finished your examples. Regards Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Create an index in a writer document with the link
Sorry, but if you don't use the ContentIndexMark, what kind of Index do you use??? Jürgen Schmidt ha scritto: Cristian Fonti wrote: First of all thanks.. i try to use the TokenType, but nothing...maybe could be a problem in the code of the Entry?? This is my code: [CODE] mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDocument); XPropertySet xEntry=(XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, mxDocFactory.createInstance(com.sun.star.text.ContentIndexMark)); xEntry.setPropertyValue(AlternativeText,titolo_indice); xEntry.setPropertyValue(Level,new Short ( (short) 1)); XTextContent xEntryContent=(XTextContent) UnoRuntime.queryInterface(XTextContent.class,xEntry); Text.insertTextContent(TextCursor,xEntryContent,false); [/CODE] i have tested your program without the ContentIndexMark and without ... and this is how i create the TOC: [CODE] mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDocument); Object contentIndex=mxDocFactory.createInstance(com.sun.star.text.ContentIndex); XPropertySet xIndex=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, contentIndex); XNamed xNamed=(XNamed)UnoRuntime.queryInterface(XNamed.class,contentIndex); xNamed.setName(INDICE); ... xNamed.setName(), it's not necessary. I run it on a text document where i have inserted several lines (used styles heading1 - heading3) and it works fine for me. I got a content table with hyperlinks to the appropriate heading. Juergen xIndex.setPropertyValue(Level,new Short ( (short) 10)); xIndex.setPropertyValue(CreateFromOutline,new Boolean(true)); xIndex.setPropertyValue(IsProtected,new Boolean(false)); XTextContent xIndexContent=(XTextContent)UnoRuntime.queryInterface(XTextContent.class,xIndex); XDocumentIndex xDocIndex=(XDocumentIndex)UnoRuntime.queryInterface(XDocumentIndex.class,xIndex); xText.insertTextContent(xTextCursor,xIndexContent,false); XIndexReplace levelFormat=(XIndexReplace) UnoRuntime.queryInterface( XIndexReplace.class, xIndex.getPropertyValue(LevelFormat) ); for ( int i=0; ilevelFormat.getCount(); i++ ) { Object oo=levelFormat.getByIndex(i); PropertyValue[][] propertyvalues = new PropertyValue[8][]; PropertyValue[] propertyvaluesentry = new PropertyValue[2]; propertyvalues[0]=propertyvaluesentry; PropertyValue pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenEntryNumber; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[1]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenHyperlinkStart; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[2]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenEntryText; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[2]; propertyvalues[3]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenHyperlinkEnd; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=CharacterStyleName; pv.Value=; propertyvaluesentry[1]=pv; propertyvaluesentry = new PropertyValue[4]; propertyvalues[4]=propertyvaluesentry; pv=new PropertyValue(); pv.Name=TokenType; pv.Value=TokenTabStop; propertyvaluesentry[0]=pv; pv=new PropertyValue(); pv.Name=TabStopRightAligned; pv.Value=Boolean.TRUE; propertyvaluesentry[1]=pv; pv=new PropertyValue(); pv.Name=TabStopFillCharacter; pv.Value=.; propertyvaluesentry[2]=pv; pv=new PropertyValue
[api-dev] Create an index in a writer document with the link
Hi to all, I see in the developer's guide how create an index in a writer document with the JAVA API. i would add at every page number in the index (or eventually in the title) a hyperlink to the right section.. Someone know how can i do it (in JAVA)?? Thanks to all... Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] SDK 2.0
I think there isn't (yet) a version for Windows.. For Windows there is only the URE... Mathias Bauer ha scritto: [EMAIL PROTECTED] wrote: Thanks, Jürgen! The best I could get is http://download.openoffice.org/680/sdk.html, but by means of the search mechanism only ;o) There seems to be no link from the main page. Anyway, the ftp sites don't provide a version for Windows (yet). Or are we supposed to use the linuxIntel version? Did you try to go over api.openoffice.org? On the left side of this page is a link to the SDK and from there you should find the download site where an SDK for the milestone m2 can be found. It's identical with the final version. Best regards, Mathias -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How stable is the Java API ?
Sorry for the idiot question, but how can i call the garbage collection via Java??? Best Regars Cristian Andreas Brker ha scritto: Hello, if we call the Garbage Collection after every API call OpenOffice.org stays longer alive. Is it possible that the API produces too much references ? Best regards Andreas -Original Message- From: Andreas Brker [mailto:[EMAIL PROTECTED]] Sent: Friday, June 17, 2005 3:34 PM To: 'dev@api.openoffice.org' Subject: RE: [api-dev] How stable is the Java API ? Hello Martin, yes - with OpenOffice.org 1.1.4 we have the same problems. Best Regards Andreas -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: Friday, June 17, 2005 3:28 PM To: dev@api.openoffice.org Subject: RE: [api-dev] How stable is the Java API ? Did you experience this in a Version 1.1.x as well? I got similar problems with the C++ API using 1.1.3/1.1.4: After executing a lot of API calls OO crashes (tries to send an error-report). The code-line where the crashe is happening is always different. I could improve the behaviour a little bit by avoiding some code, but it's not gone completely. For example: Since I don't use setString on a XTextRange I got from a XSearchable::findFirst, the crashes seem to appear much less - but I couldn't swear that this is the cause, because the code works 100+ times and then it crashes. That's why I'm still testing. Regards Martin -Original Message- From: Andreas Brker [mailto:[EMAIL PROTECTED]] Sent: Friday, June 17, 2005 3:04 PM To: 'dev@api.openoffice.org' Subject: [api-dev] How stable is the Java API ? Hello, we uses the Java API in order to modify text documents. We execute a lot of calls with the API. After 1000 (sometimes more - sometimes less) calls OpenOffice.org (1.9.104) will crash. How stable is the Java API ? Is it not a good idea in order to execute such a high number of calls. Thanks for any comments in advance. Best Regards Andreas - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Set Image resolution
Hello, meanwhile thanks; I use OpenOffice 1.1.4 and Java, and when i put the image into the document, i want to reduce his size, so, i want to apply a FilterData, can you give me an example of it?? The image are all bmp/jpg or eventually gif. Thanks Cristian Sven Jacobi ha scritto: Hello, The PixelWidth and PixelHeight property in the FilterData sequence allows it to set the number of wanted pixels within the destination graphic, thus means the property is only meaningful if the destination graphic is a pixel format (e.g. bmp, jpeg, png). The LogicalWidth and LogicalHeight property does not influence the destination file size or the number of pixels, instead it makes it possible to set the size of the viewport. Not every file format is supporting the logical size, this might be your problem. To be able to help any further I need more information (OpenOffice.org version, your target format ...) Sven sos wrote: Yes, i tested it also the graphis are exported at ther original size , ther must ne something wrong with the usage of the filterdata Maybe one of the authors of the code snipet: Olivier Samyn Sven Jacobi Michael Hoennig can help us further Fernand At 11:05 1/06/05, you wrote: So, if i want to reduce the dimension (the weight..) of the image in the final document, which properties i must set?? (Setting the height and the width i don't obtain nothing..) sos ha scritto: At 15:52 31/05/05, you wrote: I try to use the example, i must set the pixelwidth and the pixelheight to reduce the resolution?? I supose that resolution is some notation in the header of a graphic file, needed bij some applications , screens and printers, to now how big the graphic must be presented. and the resolution has no influence on the sise of the graphic, only the number of pixels. sos ha scritto: At 16:50 30/05/05, you wrote: Hi to all, i want to insert an image in a Writer Document with the Java Api. After this, how can i reduce the resolution (if i reduce the size of the image, the dimension of the document remain the same..)?? Thanks to all I found a solution for a similar export problem in the OO snipet base http http://codesnippets.services.openoffice.org/Office/Office.GraphicExport.snip://codesnippets.services.openoffice.org/Office/Office.GraphicExport.snip http://codesnippets.services.openoffice.org/Office/Office.GraphicExport.snip so you can using the exportfilters to write the grapchic to some temporay file at the wanted resolution and then import it back to the document. Wondering if we can write to a virtual file on the clipboard ?? -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - 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: [api-dev] Set Image resolution
So, if i want to reduce the dimension (the weight..) of the image in the final document, which properties i must set?? (Setting the height and the width i don't obtain nothing..) sos ha scritto: At 15:52 31/05/05, you wrote: I try to use the example, i must set the pixelwidth and the pixelheight to reduce the resolution?? I supose that "resolution" is some notation in the header of a graphic file, needed bij some applications , screens and printers, to now how "big" the graphic must be presented. and the resolution has no influence on the sise of the graphic, only the number of pixels. sos ha scritto: At 16:50 30/05/05, you wrote: Hi to all, i want to insert an image in a Writer Document with the Java Api. After this, how can i reduce the resolution (if i reduce the size of the image, the dimension of the document remain the same..)?? Thanks to all I found a solution for a similar "export" problem in the OO snipet base http://codesnippets.services.openoffice.org/Office/Office.GraphicExport.snip so you can using the exportfilters to write the grapchic to some temporay file at the wanted resolution and then import it back to the document. Wondering if we can write to a "virtual" file on the clipboard ?? -- ~~~~~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ -- ~~~~~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~
[api-dev] Problem with the table when i save a Writer document in Word
Hi to all, i have this problem: in a Writer document, i create a table, then i rotate the cells of the first row (with the OOo API and Java). If i save the document in Word 97/XP/2000 and i open it, the text in the cells is not rotate... The same problem appear also if i don't use the API Java... Someone has the same problem?? Another thing is that if i change the properties of a cell, all is ok, but if i change the rotation, all the cells under the first (so, all the column) change is text rotation... why??? This append also OOo 1.1.4 and OOo 1.9.79 This is the code that i use to change the properties: XText xCellText=(XText) UnoRuntime.queryInterface(XText.class,xTable.getCellByName(xCellName)); XTextCursor xtc=xCellText.createTextCursor(); XPropertySet xCursorProps=(XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,xtc); xCursorProps.setPropertyValue(CharFontName,Arial); xCursorProps.setPropertyValue(CharHeight,new Float(8.0)); xCursorProps.setPropertyValue(CharWeight,new Float(com.sun.star.awt.FontWeight.BOLD)); xCursorProps.setPropertyValue(CharRotation,new Short(angolo90)); xcell=xTable.getCellByName(xCellName); xPropsCell=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xcell); xPropsCell.setPropertyValue(VertOrient,new Short(com.sun.star.text.VertOrientation.CENTER)); xPropsCell.setPropertyValue(BorderDistance,new Integer(75)); Thanks to all... Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problems with Page Style
I have jet found this properties, i try to use it, but nothing...i create two styles (left and right), but the problem is that, when i create the document, there is always the Standard style... i'm not be able to use two styles... Thanks Andrew Douglas Pitonyak ha scritto: No comment on use in Java, but Cristian Fonti wrote: Hi to all, i have a problem with the Api: I generate a new Writer document, with a Java procedure, with import others documents with the method insertDocumentUrl. Now, i would to use different styles for the header of right and left pages (in the left pages, i would that the text will be left-align, in the right, right-align). I'm able to create a style and manage it, but i don't know how to set the different between right and left pages... If you look at the PageStyle service: http://api.openoffice.org/docs/common/ref/com/sun/star/style/PageStyle.html You will notice that you can set the PageStyleLayout, which determines this... http://api.openoffice.org/docs/common/ref/com/sun/star/style/PageStyleLayout.html Also, look at the TextPageStyle, and notice that there are header and footer objects that you can set. You would typically set the left and right align of the contained text based on a Paragraph style, but you can certainly hard code the values in the text object itself. How can i do it in Java??? Thanks to all Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Page Number
Andrew Douglas Pitonyak ha scritto: Cristian Fonti wrote: Hi to all, i want to insert a page number in a Writer document with Java Api. All is ok when the page number start from 1, but how can i do if i want that the page number start from a variable value??? This is my code to insert a Page Number from 1: Object pn=mxDocFactory.createInstance(com.sun.star.text.TextField.PageNumber); XTextField xTextField = (XTextField) UnoRuntime.queryInterface(XTextField.class,pn); XPropertySet xPropertySetTextField = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class,xTextField); xPropertySetTextField.setPropertyValue(NumberingType,new Short(NumberingType.ARABIC)); xPropertySetTextField.setPropertyValue(SubType,om.sun.star.text.PageNumberType.CURRENT); Thanks to all Cristian The page numbers are not set based on the field that you insert, but rather, the field displays the current page number. If you want to set the page number, you insert a page break and tell it to start with a new page number and style. My free macro document contains examples in a section on inserting page breaks. You need to set two properties in the paragraph. Thanks!! i use this code at the beginning of my document xps.setPropertyValue(PageDescName,new String(Standard)); xps.setPropertyValue(PageNumberOffset,new Short(number)) ... and all is ok!! Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Page size and Page format
Hi to all, what is the property in Java Api to set the Page size(A4,A3...) and the Page Format (Landscape,Portrait)/Allignment in a Writer Document??? I use this code: XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); XNameAccess StyleFamNames = StyleFam.getStyleFamilies(); XNameAccess PageStyles = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,StyleFamNames.getByName(PageStyles)); XStyle xStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class,PageStyles.getByName(Standard)); XPropertySet xPropertySetStyle = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xStyle); i try to use: xPropertySetStyle.setPropertyValue(PrinterPaperTray,com.sun.star.view.PaperOrientation.LANDSCAPE); but nothing... Please someone help me. Thanks Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Probleme with insert image in Text
Hi to all, i try to insert an image in OpenOffice via Java API, but i found that i insert only the link (so if i move the image file in another location, no image appear...), so how can i really insert the image into the document??? The code that i use is: mxDocFactory =(XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); Object gObject = mxDocFactory.createInstance(com.sun.star.text.GraphicObject ); ps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, gObject); ps.setPropertyValue( AnchorType,TextContentAnchorType.AS_CHARACTER); ps.setPropertyValue(GraphicURL, file:///+url); Thanks to all Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Table width
Nothing to do... i try your code but nothing, the table remain into the page margin... (if i use TextFrame all is ok, but it create into the Frame a paragraph break after the table, pratically a blank line after the table, eventually, i can remove it??)... This is my Java code: Object table = xWriterFactory.createInstance(com.sun.star.text.TextTable); XTextContent xTextContentTable = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, table); XPropertySet xTableProps=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,table); xTableProps.setPropertyValue(HoriOrient,new Integer(com.sun.star.text.HoriOrientation.LEFT_AND_WIDTH)); xTableProps.setPropertyValue(LeftMargin,new Integer(-1000)); xTableProps.setPropertyValue(Width,new Integer(18000)); Thanks to all Stephan Wunderlich ha scritto: Hi Cristian, i have a question: there is a way to set the width of a table (i want to exceed the margin of the page)?? I try with the property Width but nothing Thanks to all lets say you have a XTextTable in your document, then atable = thisComponent.TextTables(0) atable.HoriOrient = com.sun.star.text.HoriOrientation.LEFT_AND_WIDTH atable.width=18000 should set the width of it to 18cm Hope that helps Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Table width
I try to set the properties also after that before, but nothing... I have another problems: i want to change the column width values, and i suppose that he only way to change them is use TextColumnSeparator. But,the value that you must insert, what is? is a formula of what?? is the distance from left margin or is the real width of the column?? Thanks to all Stephan Wunderlich ha scritto: Hi Cristian, This is my Java code: Object table = xWriterFactory.createInstance(com.sun.star.text.TextTable); XTextContent xTextContentTable = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, table); XPropertySet xTableProps=(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,table); xTableProps.setPropertyValue(HoriOrient,new Integer(com.sun.star.text.HoriOrientation.LEFT_AND_WIDTH)); xTableProps.setPropertyValue(LeftMargin,new Integer(-1000)); xTableProps.setPropertyValue(Width,new Integer(18000)); Thanks to all mmm ... strange ... the macro aTable = thisComponent.TextTables(0) aTable.HoriOrient = com.sun.star.text.HoriOrientation.LEFT_AND_WIDTH aTable.LeftMargin=-1000 aTable.Width=18000 works like a charm for me. Do you change the properties before you insert the table or after you insert the table ? Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Problem with TableColumnSeparators
Hi to all, i have a problems with the width of the column in a table (with Writer), i use Java, and i found that the only method is TableColumnSeparators. I try it but i don't understand what is the value that must be set... --This is an example of my code with a table (1,4): TableColumnSeparator [] t =(TableColumnSeparator []) xTableProps.getPropertyValue(TableColumnSeparators); t[0].Position = (short)(1430); t[0].IsVisible=true; t[1].Position = (short)(8000); t[1].IsVisible=true; t[2].Position = (short)(1360); t[2].IsVisible=true; xTableProps.setPropertyValue(TableColumnSeparators, t); This code don't run correctly. (I obtain the values after many attempts) The most fun thing is that, if i use a table (1,3) with only 2 separators (deleting the third) the code run correctly. Thanks to all Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Bookmark...
Hi to all, can and eventually how, i select the text between two bookmarks??? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problem with insertDocumentFromURL
Andrew Douglas Pitonyak ha scritto: Cristian Fonti wrote: Andrew Douglas Pitonyak ha scritto: Cristian Fonti wrote: Hi to all, i have a problem using the method insertDocumentFromURL: when i use it to insert some formatted text (font size, font color,etc...) from another document, in the destination file appear at the top of the document 2-3 blank row... the code snipplets is: xTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, xcomponent); xText = xTextDocument.getText(); TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(file:///C:/file1.rtf,loadProps); TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(file:///C:/file2.rtf,loadProps); If i add 3,4,5,6 documents the number of white rows increase... Please someone help me Thanks Cristian Fonti I ran the following test: Dim sURL$ Dim oText Dim oCurs sURL = file:///andrew0/home/andy/film.txt oText = ThisComponent.getText() oCurs = oText.createTextCursor() oCurs.gotoStart(False) oCurs.insertDocumentFromURL(sURL, Array()) The film.txt file, contains NO extra spaces. I did NOT see the problems that you mention. Notice that I did use the 2.0 Beta. I suspect that margins from the RTF file are inserted, but this is ONLY a guess. What happens with your code when you sue text files with NO top or bottom margins? To correct the problem, i have insert TextCursor.gotoEnd(false); after the insertDocumentFromURL Another Question: it's possibile to insert some text (a string) between two documents RTF that i import with insertDocumentFromURL Thanks Cristian Fonti Use something similar to the following: oCursor.getText().insertString(oCursor, text to insert, False) I try, but so the text to insert is append at the end of the document after all the RTF and not between them... The code is like this: [docs is an array of documentURL] for (int i=0;idocs.length;i++) { TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(docs[i],loadProps); TextCursor.gotoEnd(false); TextCursor.getText().insertString(TextCursor,-,false); } Thanks to all... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problem with insertDocumentFromURL
Andrew Douglas Pitonyak ha scritto: Cristian Fonti wrote: Hi to all, i have a problem using the method insertDocumentFromURL: when i use it to insert some formatted text (font size, font color,etc...) from another document, in the destination file appear at the top of the document 2-3 blank row... the code snipplets is: xTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, xcomponent); xText = xTextDocument.getText(); TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(file:///C:/file1.rtf,loadProps); TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(file:///C:/file2.rtf,loadProps); If i add 3,4,5,6 documents the number of white rows increase... Please someone help me Thanks Cristian Fonti I ran the following test: Dim sURL$ Dim oText Dim oCurs sURL = file:///andrew0/home/andy/film.txt oText = ThisComponent.getText() oCurs = oText.createTextCursor() oCurs.gotoStart(False) oCurs.insertDocumentFromURL(sURL, Array()) The film.txt file, contains NO extra spaces. I did NOT see the problems that you mention. Notice that I did use the 2.0 Beta. I suspect that margins from the RTF file are inserted, but this is ONLY a guess. What happens with your code when you sue text files with NO top or bottom margins? To correct the problem, i have insert TextCursor.gotoEnd(false); after the insertDocumentFromURL Another Question: it's possibile to insert some text (a string) between two documents RTF that i import with insertDocumentFromURL Thanks Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] TabStop
Hi, Someone can help me in the implementation of TabStop with Java and the OOo Api?? Thank to all. Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] TabStop...
Sorry for the similar message, but the first was wrong. I use this code to create 2 tabStop: TabStop tb[]=new TabStop[2]; tb[0]=new TabStop(); tb[0].Position=8500; tb[0].Alignment=com.sun.star.style.TabAlign.CENTER; tb[1]=new TabStop(); tb[1].Position=17000; tb[1].Alignment=com.sun.star.style.TabAlign.RIGHT; xCursorProps.setPropertyValue(ParaTabStops,tb); Now, how can i go in the tabstop(like using the key tab) I use this code, but nothing (but no error): XTextCursor xt = (XTextCursor)UnoRuntime.queryInterface(XTextCursor.class,tb[0]); XText xTextheader = (XText) UnoRuntime.queryInterface(XText.class, xPropertySetStyle.getPropertyValue(HeaderText)); xTextheader.insertString(xt, CENTER TEXT IN THE HEADER,false); Thanks to all... Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Search text and insert page break
Hi, Thank for the help, i'm be able to do it, i use findFirst and findNext with TextRange, as you suggest to me! I have only another question: in my program i use to import others documents (file RTF) in a new blank document, insertDocumentFromURL, all is ok, but, in the new document, there are some rows white (i think some paragraph maybe...) My code is: XText xText = null; XTextCursor TextCursor = nll; . xText = xTextDocument.getText(); xText.getStart(); TextCursor=xText.createTextCursor(); xd=(XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor); xd.insertDocumentFromURL(file:///D:/Esempi/provaRTF.rtf,loadProps); Why the system don't import form the TOP of the page?? Andrew Douglas Pitonyak ha scritto: Hi Cristian, I do all of my examples in Basic Sorry! Cristian Fonti wrote: Hi to all, I'm a newbie in Api Open Office programmation with Java. I have a writer document, and i want to search a particular string, when i found it, i want to insert a PAGE BREAK. On my web site, I recently posted a font document that inserts a page break at every other instance that is found. You need to use the latest beta to read the document, but here is also a PDF version. My free macro document has examples of these things as well (there is a link in this email message). How can i do it?? I recommend that first you do it in Basic and then translate it over at least until you become more proficient in the API. So, a simple test in Basic, and then move it over to Java for the complete program. First, create the find descriptor. You can either do a Find All, as I did, or you can iterate through each found instance and use find next. The found object can be used as a text range, which has the ability to set the page break command. You start a new page by setting the paragraph page style. I usually set it to the value that it already has so that I do not change the page style. It is the act of setting the page style that causes a page break. Mi first, and big problem is how to use the objects that the interface com.sun.star.util.XReplaceable returns when i use the method findAll... Please someone help me! Thanks Dott. Cristian Fonti If this is not a sufficient hint, please say so. I would post some small examples, but my wife tells me that it is time to go. -- ~~ Dott. Cristian Fonti mailto: [EMAIL PROTECTED] Centro Elaborazione Dati (CED) - Resp. Web Area SCM Group S.p.a. http://www.scmgroup.com via Emilia, 77 - 47900 Rimini (RN), Italy Tel.: +39 0541 700163 Interno: 2163 ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Search text and insert page break
Hi to all, I'm a newbie in Api Open Office programmation with Java. I have a writer document, and i want to search a particular string, when i found it, i want to insert a PAGE BREAK. How can i do it?? Mi first, and big problem is how to use the objects that the interface com.sun.star.util.XReplaceable returns when i use the method findAll... Please someone help me! Thanks Dott. Cristian Fonti - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]