mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0029443: It is not possible to store an ExtStringArray Ocaf attribute to any previous version in XML file format
This commit is contained in:
parent
00dfcc765a
commit
93445088d8
@ -24,6 +24,7 @@
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <XmlObjMgt_Document.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
#include <XmlLDrivers.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_ExtStringArrayDriver,XmlMDF_ADriver)
|
||||
IMPLEMENT_DOMSTRING (FirstIndexString, "first")
|
||||
@ -238,9 +239,14 @@ void XmlMDataStd_ExtStringArrayDriver::Paste (const Handle(TDF_Attribute)& theSo
|
||||
|
||||
// Find a separator.
|
||||
Standard_Boolean found(Standard_True);
|
||||
// This improvement was defined in the version 8.
|
||||
// So, if the user wants to save the document under the 7th or earlier versions,
|
||||
// don't apply this improvement.
|
||||
Standard_Character c = '-';
|
||||
if (XmlLDrivers::StorageVersion() > 7)
|
||||
{
|
||||
// Preferrable symbols for the separator: - _ . : ^ ~
|
||||
// Don't use a space as a separator: XML low-level parser sometimes "eats" it.
|
||||
Standard_Character c = '-';
|
||||
static Standard_Character aPreferable[] = "-_.:^~";
|
||||
for (i = 0; found && aPreferable[i]; i++)
|
||||
{
|
||||
@ -271,6 +277,7 @@ void XmlMDataStd_ExtStringArrayDriver::Paste (const Handle(TDF_Attribute)& theSo
|
||||
}
|
||||
}
|
||||
}
|
||||
}// check doc version
|
||||
|
||||
if (found)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user