https://bz.apache.org/ooo/show_bug.cgi?id=126768

--- Comment #15 from Arrigo Marchiori <[email protected]> ---
The <draw:frame> tag represents a SwXFrame object. It is decoded in module
xmloff by means of a XMLTextFrameContext object. It can contain several XML
tags.

The culprit tag in the attached example is indicated in comment #6 and contains
two <draw:image> elements, plus the <svg:title> and <svg:desc> tags that are
triggering this issue.

The <svg:title> and <svg:desc> tags are explicitly applied by method
XMLTextFrameContext::EndElement, after finding a ``winner'' image and setting
the frame's name to it.

The other properties are not applied to the same winner, but rather to the last
parsed image.
Or maybe to the first, it is not important; it is important that is not
necessarily the winner.

Application of properties in the attached document fails, because of the
first/last SwXFrame's "FrmFmt".
I am not 100% sure of what that name means, but it is clear from the SwXFrame
code, that properties are only applicable if the frame's attribute
SwModify::pRegisteredIn is an instance of class FrmFmt.
This seems to only happen on the ``winner'' object, not on the first (or last)
parsed element: the latter has its SwModify::pRegisteredIn set to an instance
of class SwPageDesc instead of FrmFmt.

I am working on a pull request that calls XMLTextFrameContext_Impl::SetTitle()
and XMLTextFrameContext_Impl::SetDesc() on the ``winner'' elements.

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to