Improvement of SmNodeToTextVisitor Background: When editing is carried out visually the node tree that represents a formula in memory is modified directly, the SmNodeToTextVisitor generates the command text for the formula, which is used to update the command text box in the bottom of the window. Without this visitor combination of visual and old-school command editing wouldn't be possible. The current implementation of SmNodeToTextVisitor inserts a lot of unnecessary brackets in the generated command text, to ensure that the structure is correct. Removing too many of them would create problems, and there are obscure cases where some extra brackets are needed and cases where no brackets are needed at all. Any improvement of this visitor would be very welcome. Note: The best format documentation is parser.cxx and nodes documentation is in nodes.hxx, but this task is probably easier to solve through trial and error. Some specific things: Reduce the amount of whitespace, find some reasonable policy for whitespace usage. Use ^, _, from and to instead of rsup, rsub, csub and csup, depending on context (See this post). Skills: Building, C++
See also http://lists.freedesktop.org/archives/libreoffice/2010-December/005281.html
Deteted "Easyhack" from summary
Ivan Timofeev committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=44a3a345ac2b9901122a9eac70538ef04417bbd4 fdo#38887: SmNodeToTextVisitor: use ^ and _ instead of rsup and rsub
Ivan Timofeev committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=80de3c0fe6b191f6d528ae1142737e2561b12ccd fdo#38887: SmNodeToTextVisitor: use from and to instead of csub and csup
Ivan Timofeev committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cb4c69121a7ca4db4748a78a16d87aaadb3aa9fa fdo#38887: SmNodeToTextVisitor: use braces for nested scripts
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
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp) [NinjaEdit]
Is there still work to do here? If so, who is the mentor?
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Fixed at least with Version: 5.1.0.3. Maybe since Ivan's commits. Thanks Ivan!