Closed dg0yt closed 9 years ago
puzzlepaint posted on Sourceforge:
In current master, there is now a unit test which checks for every file format which supports import and export if maps stay the same when saved in this format and loaded again. The test is not 100% complete (for undo steps, currently only the number of steps is checked), but this will still be useful to test the XML format.
I also changed the importer / exporter interfaces a bit:
The current Mapper XML format implementation is based on QDomDocument and friends. "The QDom classes have a few issues of nonconformance with the XML specifications" (Qt 4.8 doc), and are in the deprecated Qt XML module in Qt 5. Mapper XML format shall be reimplemented with QXmlStreamReader and QXmlStreamWriter.
A preliminary implementation is now in master. It does not yet export/import all map features, but colors, symbols and objects are complete. This is for first experiments. The format may still receive some incompatible changes.
Enable the format with Mapper_XML_FORMAT=1 when running CMake.
The implementation is completed, and the XML file format is no longer marked as lossy. Open issues:
Some minor TODOs have been marked in the source code.
puzzlepaint posted on Sourceforge:
I did some more manual tests now. Still to investigate: the position of a georeferenced template in my test files is slightly off when loaded from XML. Opening the georef dialog and clicking ok moves it into its correct position (half a meter away or so).
Regarding the format / implementation:
puzzlepaint posted on Sourceforge:
Finished with manual checking now. The reason for the georeferenced template being off was that some digits were rounded off in the georeferencing settings because the default output precision of QString::number() is not high enough.
The two questions from the above comment are still open.
puzzlepaint posted on Sourceforge:
Okay, I changed both. You're right, it's better not to trust the information in the file. However I think that the chance of very high numbers caused by programming errors is much higher than the chance of a maliciously crafted orienteering map ;-)
Feature stabilizing. Received some fixes after 0.4.0. Closing feature request.
Somebody posted on Sourceforge:
(Moved to #182 - Kai.)
dg0yt reported on Sourceforge [tickets:#97]:
Mapper shall have an XML file format.
There already is an XML file format implementation in Mapper but it is outdated. That is why it is disabled by default. (It can be enable with setting Mapper_XML_FORMAT=1 in CMake.)