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.
-- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
