[EMAIL PROTECTED] wrote: >> So you want to know which part of the object is visible and only access >> the XML representation of this part? Sorry, that's not possible, not >> even theoretically. The visible area of an embedded object can contain >> even only parts of some of its elements, e.g. only the half of a >> rectangle in a drawing object. > > Thanks Matthias, > > When you say "theoretically", what do you mean ? OOo must be aware of > which part it displays and which it does not ? Why is it not possible > to access this information ? What is the unit (int) for the > VisibleArea... values ?
Of course it is possible to get this area, but there is no way to find out from this information which part of the XML content falls into this area and which doesn't. This always needs loading the XML content, rendering it to an output device and crop the output, the same way OOo itself does it. > It may be a little far fetched but if the unit is somehow related to > pixels and screen resolution (as seem to be implied by other attributes > in the settings.xml) there must be a way to compute which string is on > screen and which is not ? I only know the units that our documents use at runtime, I don't know the unit in the XML representation. Should be documented in the file format. The "visible area" is stored inside the object, the container document stores the "Object area" that also contains possible scaling factors. And yes, of course you can calculate which part is visible, but at the end you must implement your own OOo file viewer if you want to do it for any possible part. So let me rephrase my statement: it's impossible to calculate the visibility of an *arbitrary* XML element in the file without rendering the complete document. If you exclude the latter from the possible options I think it's even theoretically impossible. :-) Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
