Hello again,
Sorry, forgot something.
3. Some of the subs & sups seemed to need extra brackets when used
with
an operator node (for example int or sum).
4. Matrices with blank elements seem to cause problems so I added more
brackets (supposed to be removing them :( ).
Also, I've made the code used to find these into cppunit tests. I took
all the formula commands from:
http://wiki.services.openoffice.org/wiki/Template:Math_commands_reference
This page is licensed with the Creative Common Attribution 3.0 license
(CC-BY), so I put a note in the code with all the contributors names
(Hopefully that covers it).
What the code does is parses the formula command, runs the
NodeToTextVisitor on it, then parses it again, then visits again.
It occurred to me that the NodeToTextVisitor should output the same text
both times.
It was quite fun writing this and learning about the different string
types that are used and working out how to do this without putting
printf all over the place.
I didn't see any of the other tests doing like this with the
assertion_traits template and CPPUNIT_ASSERT_EQUAL_MESSAGE, so I hope I
haven't gone too far.
Regards,
Luke
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.