sw: DOCX export: *really* fix non-well-formed XML with hyperlink/ruby
Turns out that 84ea33ef did not actually fix the problem; it was merely good enough to fool the asserts in FastSaxSerializer that were not yet adapted to the funky maMarkStack. The problem is that the StartRuby()/EndRuby() call StartRun()/EndRun() and that really messes up the mark stack. Prevent that by first ending the run before starting new one in StartRuby(), and then starting a new run after ending the ruby-base one in EndRuby(). The hints handled in SwWW8AttrIter::OutAttrWithRange() are sorted in the right way for this to work (i.e. the EndRuby() will be the last call for any given position). This apparently causes an additional <w:r/> empty element to be written, not sure if that causes any issues but at least the output is well-formed for fdo82849-1.odt. Change-Id: I28ffd029246310ff0e405b0674aef8e724700d4d
Showing
Please
register
or
sign in
to comment