[Libreoffice-bugs] [Bug 132320] New: writerfilter/source/ooxml/factoryimpl_ns.py:402: undefined name 'defineNode'
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 22 09:08:33 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=132320
Bug ID: 132320
Summary: writerfilter/source/ooxml/factoryimpl_ns.py:402:
undefined name 'defineNode'
Product: LibreOffice
Version: 7.0.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: xiscofauli at libreoffice.org
This is a follow-up of bug 132293 comment 4:
When considering the method:
398 def charactersActionForValues(nsNode, refNode):
399 ret = []
400
401 refName = refNode.getAttribute("name")
402 for defineNode in [i for i in
getChildrenByName(getChildByName(nsNode, "grammar"), "define") if
defineNode.getAttribute("name") == refName]:
403 ret.append(" {")
404 ret.append(" // %s" % defineNode.getAttribute("name"))
405 for dataNode in getChildrenByName(defineNode, "data"):
406 if dataNode.getAttribute("type") == "int":
407 ret.append(" OOXMLValue::Pointer_t pValue(new
OOXMLIntegerValue(sText));")
408 ret.append(" pValueHandler->setValue(pValue);")
409 ret.append(" }")
410
411 return ret
(see
https://opengrok.libreoffice.org/xref/core/writerfilter/source/ooxml/factoryimpl_ns.py?r=c4fa6efa#398)
since line 402 is wrong, it's quite possible we never enter the loop so the
expected code to generate may never be generated.
It might be a source of bugs. I insist to tell "it might" since I must
recognize I don't really know if it's the case or not.
Remark: I'm not sure too that generating C++ code from Python, Perl whatever is
a good thing since it's less easy to debug/maintain. IMHO, this part should be
converted in C++ but that's another story.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200422/f8c05f49/attachment.htm>
More information about the Libreoffice-bugs
mailing list