Remove CreateTextFromNode methods
Background: SmNode have a virtual method called CreateTextFromNode, this method is overwritten in some subclasses. However, the method is somewhat buggy/incomplete, similar functionality have been implemented in the SmNodeToTextVisitor, which should be more complete. So we should remove the CreateTextFromNode methods, and reuse any useful parts, if any, in SmNodeToTextVisitor. Calls to CreateTextFromNode should be replaced with calls to SmNodeToTextVisitor, and this should be tested.
Skills: Building, C++
Deteted "Easyhack" from summary
CreateTextFromNode is used only in mathmlimport AFAICS.
But mathmlimport produces a structurally-wrong tree, which *can* be converted to text via CreateTextFromNode, but SmNodeToTextVisitor works only with "right" trees and fails to produce something sensible from that tree from mathmlimport.
It would be better if mathmlimport could convert mathml->starmath I guess, now it does mathml->fake tree->[CreateTextFromNode]->starmath.
I have interest on it.
On a first look, I saw that SmNodeToTextVisitor is a class constructor, and need an pNode and a OUString rText as argument to be constructed. But SmNode::CreateTextFromNode need only an OUString, and the pNode is created inside the method. Is that a problem?
And, in SmNode::CreateTextFromNode there is a verification for the number of subNodes, and in SmNodeToTextVisitor we have this virification only in Visitor method in according with the node. Then, to replace CreateTextFromNode should I call SmNodeToTextVisitor constructor and then call the Visitor method according to the case?
Ivan: is there still the pb of structurally-wrong tree for mathml import?
Frédéric: thinking you might be interested in this, I put you in cc.
(In reply to comment #4)
> Ivan: is there still the pb of structurally-wrong tree for mathml import?
Most probably yes, but I forgot everything on this topic...
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
I think, that it should be a long time goal to switch from StarMath to MathML. But as long as there exists no direct editing of MathML, it is too early to remove generating StarMath source.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
Missing code pointer, mandatory for easy hacks
oox/source/mathml/import.cxx (mathhtml import)
If there's an assignee, let's put this tracker as ASSIGNED
A polite ping, still working on this bug
(In reply to jani from comment #13)
> A polite ping, still working on this bug
Hmm, Will try to submit a patch soon.
I would like to take this up as my first issue.