mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0028691: Storage of Ocaf documents in XML file format in old document version
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <XmlObjMgt_Document.hxx>
|
||||
#include <XmlObjMgt_DOMString.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
#include <XmlLDrivers.hxx>
|
||||
|
||||
IMPLEMENT_DOMSTRING (TagString, "tag")
|
||||
IMPLEMENT_DOMSTRING (LabelString, "label")
|
||||
@@ -99,7 +100,16 @@ Standard_Integer XmlMDF::WriteSubTree
|
||||
|
||||
// Create DOM data item
|
||||
XmlObjMgt_Persistent pAtt;
|
||||
pAtt.CreateElement (aLabElem, aDriver->TypeName().ToCString(), anId);
|
||||
// In the document version 8 the attribute TPrsStd_AISPresentation
|
||||
// was replaced by TDataXtd_Presentation. Therefore, for old versions
|
||||
// we write old name of the attribute (TPrsStd_AISPresentation).
|
||||
Standard_CString typeName = aDriver->TypeName().ToCString();
|
||||
if (XmlLDrivers::StorageVersion() < 8 &&
|
||||
strcmp(typeName, "TDataXtd_Presentation") == 0)
|
||||
{
|
||||
typeName = "TPrsStd_AISPresentation";
|
||||
}
|
||||
pAtt.CreateElement (aLabElem, typeName, anId);
|
||||
|
||||
// Paste
|
||||
aDriver -> Paste (tAtt, pAtt, theRelocTable);
|
||||
|
Reference in New Issue
Block a user