Merge branch 'refs/heads/double-precision-werner'
Conflicts: src/App/Document.cpp src/App/PropertyGeo.cpp src/App/PropertyStandard.cpp src/Base/Reader.cpp src/Base/Reader.h src/Gui/propertyeditor/PropertyItem.cpp src/Mod/Fem/Gui/ViewProviderFemMesh.cpp src/Mod/Inspection/Gui/ViewProviderInspection.cpp src/Mod/Mesh/App/MeshProperties.cpp src/Mod/Part/App/TopoShapeFacePyImp.cpp src/Mod/PartDesign/App/FeatureRevolution.cpp
This commit is contained in:
@@ -653,7 +653,12 @@ void Document::Save (Base::Writer &writer) const
|
||||
<< " FreeCAD Document, see http://www.freecadweb.org for more information..." << endl
|
||||
<< "-->" << endl;
|
||||
|
||||
writer.Stream() << "<Document SchemaVersion=\"5\">" << endl;
|
||||
//writer.Stream() << "<Document SchemaVersion=\"4\">" << endl;
|
||||
writer.Stream() << "<Document SchemaVersion=\"4\" ProgramVersion=\""
|
||||
<< App::Application::Config()["BuildVersionMajor"] << "."
|
||||
<< App::Application::Config()["BuildVersionMinor"] << "R"
|
||||
<< App::Application::Config()["BuildRevision"]
|
||||
<< "\" FileVersion=\"" << writer.getFileVersion() << "\">" << endl;
|
||||
|
||||
PropertyContainer::Save(writer);
|
||||
|
||||
@@ -668,6 +673,16 @@ void Document::Restore(Base::XMLReader &reader)
|
||||
reader.readElement("Document");
|
||||
long scheme = reader.getAttributeAsInteger("SchemaVersion");
|
||||
reader.DocumentSchema = scheme;
|
||||
if (reader.hasAttribute("ProgramVersion")) {
|
||||
reader.ProgramVersion = reader.getAttribute("ProgramVersion");
|
||||
} else {
|
||||
reader.ProgramVersion = "pre-0.14";
|
||||
}
|
||||
if (reader.hasAttribute("FileVersion")) {
|
||||
reader.FileVersion = reader.getAttributeAsUnsigned("FileVersion");
|
||||
} else {
|
||||
reader.FileVersion = 0;
|
||||
}
|
||||
|
||||
// When this document was created the FileName and Label properties
|
||||
// were set to the absolute path or file name, respectively. To save
|
||||
@@ -736,7 +751,11 @@ void Document::exportObjects(const std::vector<App::DocumentObject*>& obj,
|
||||
Base::ZipWriter writer(out);
|
||||
writer.putNextEntry("Document.xml");
|
||||
writer.Stream() << "<?xml version='1.0' encoding='utf-8'?>" << endl;
|
||||
writer.Stream() << "<Document SchemaVersion=\"4\">" << endl;
|
||||
//writer.Stream() << "<Document SchemaVersion=\"4\">" << endl;
|
||||
writer.Stream() << "<Document SchemaVersion=\"4\" ProgramVersion=\""
|
||||
<< App::Application::Config()["BuildVersionMajor"] << "."
|
||||
<< App::Application::Config()["BuildVersionMinor"] << "R"
|
||||
<< App::Application::Config()["BuildRevision"] << "\" FileVersion=\"1\">" << endl;
|
||||
// Add this block to have the same layout as for normal documents
|
||||
writer.Stream() << "<Properties Count=\"0\">" << endl;
|
||||
writer.Stream() << "</Properties>" << endl;
|
||||
@@ -843,6 +862,16 @@ Document::importObjects(Base::XMLReader& reader)
|
||||
reader.readElement("Document");
|
||||
long scheme = reader.getAttributeAsInteger("SchemaVersion");
|
||||
reader.DocumentSchema = scheme;
|
||||
if (reader.hasAttribute("ProgramVersion")) {
|
||||
reader.ProgramVersion = reader.getAttribute("ProgramVersion");
|
||||
} else {
|
||||
reader.ProgramVersion = "pre-0.14";
|
||||
}
|
||||
if (reader.hasAttribute("FileVersion")) {
|
||||
reader.FileVersion = reader.getAttributeAsUnsigned("FileVersion");
|
||||
} else {
|
||||
reader.FileVersion = 0;
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> objs = readObjects(reader);
|
||||
|
||||
@@ -1821,8 +1850,8 @@ std::vector<DocumentObject*> Document::getObjectsOfType(const Base::Type& typeId
|
||||
|
||||
std::vector<DocumentObject*> Document::findObjects(const Base::Type& typeId, const char* objname) const
|
||||
{
|
||||
boost::regex rx(objname);
|
||||
boost::cmatch what;
|
||||
boost::regex rx(objname);
|
||||
boost::cmatch what;
|
||||
std::vector<DocumentObject*> Objects;
|
||||
for (std::vector<DocumentObject*>::const_iterator it = d->objectArray.begin(); it != d->objectArray.end(); ++it) {
|
||||
if ((*it)->getTypeId().isDerivedFrom(typeId)) {
|
||||
|
||||
Reference in New Issue
Block a user