Files
odfstudio/sw/qa/extras/ooxmlimport/data/tdf170236.docx
T
Dmitry Kulikov 23b745e20d tdf#170236 sw: import comment anchored inside a math formula
A Word comment whose w:commentReference sits inside <m:oMath> was lost on
DOCX import: OOXMLFastContextHandlerLinear/Math buffers every child of the
formula and never routes commentReference to handleComment, so comments.xml
was never resolved and no annotation was created.

Intercept w:commentReference in OOXMLFastContextHandlerLinear: collect its
id and resolve it via the existing resolveComment() path once the formula
object has been emitted (in OOXMLFastContextHandlerMath::process). The tag
is never buffered into the formula, so the Starmath buffer stays balanced
and formula import is unaffected.

Signed-off-by: Dmitry Kulikov <dkul@altlinux.org>
Change-Id: I9b0dccc79d5a7da9294b18f0cb58776a2bd8b553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207888
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-10-08 02:37:31 +02:00

19 KiB