Hi,

while fixing a problem I stumbled over a subtle problem with the EXPORT_OASIS flag of the filter in xmloff for embedded objects.

The flag EXPORT_OASIS is not set when your filter exports to the OOo XML format. This flag should not be used explicitly in the export code, however in most filters it is, nonetheless. If you use it in the export code, you might have a problem (like I had), otherwise you might stop reading here.


When you write a binary file, the current document is exported as OOo XML flat (!), which is passed to binfilter. The flat-filter has the following problem:

The usual export code in xmloff only creates the OASIS format. To have the OOo XML format, the OASIS format is transformed using the transformer code (xmloff/source/transform). This is controlled by not setting the EXPORT_OASIS flag. In flat format, the EXPORT_OASIS flag is set for embedded objects, because if it wouldn't, the embedded object would be transformed twice, once by the filter code of the embedded object, and then again by the container, because the container transforms the whole stream, including the embedded object. (That's what flat means).

As a consequence, when you have:

1. An embedded object
2. That you export to binary format (or directly to flat OOo XML)
3. and you use something like "if( getExportFlags() & EXPORT_OASIS )" in your export code,

you might get a problem, because although you export to OOo format, the EXPORT_OASIS flag is set.

I admit, this is not a very common case, but it lead to problems in the chart code (the most common embedded object), and may also appear in other situation.

Sorry, for writing such long, confusing stuff here, just wanted to make sure everybody knows about this.

Regards,
-Bjoern

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to