On Wednesday 27 August 2003 18:26, Michael Hoeller wrote: > Hi Nicolas, > > thanks for the hint. This works as long as you only relpace a string. > But the Format is not covered this way. So if a tag is ^adr1 and marked > as bold so the xml format contains "bold" at the offset of ^adr1, in > the length of ^adr1. This is not want you want when the replaced String > is longer than the tag.. But this is exactly what my suggestion covers: when you replace N chars with M at position P, you need to * update P's format to add M-N to its length * update all formats after P by adding M-N to their starting position (M-N can be negative, no problem). -- David FAURE, faure@kde.org, sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org). _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel