Fix for new imports : no restriction on the length of the FORMAT string (ILMAB project)

This commit is contained in:
ngo 2012-11-28 15:00:04 +00:00
parent 8180539548
commit 62f6ab7368

View File

@ -218,7 +218,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import
if (aFunction->GetDriverGUID() != GEOMImpl_ImportDriver::GetID()) return result; if (aFunction->GetDriverGUID() != GEOMImpl_ImportDriver::GetID()) return result;
Handle(TCollection_HAsciiString) aHLibName; Handle(TCollection_HAsciiString) aHLibName;
if (!IsSupported(Standard_True, theFormatName.SubString(1,4), aHLibName)) { if (!IsSupported(Standard_True, theFormatName/*.SubString(1,4)*/, aHLibName)) {
return result; return result;
} }
TCollection_AsciiString aLibName = aHLibName->String(); TCollection_AsciiString aLibName = aHLibName->String();
@ -289,7 +289,7 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue; if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
Handle(TCollection_HAsciiString) aHLibName; Handle(TCollection_HAsciiString) aHLibName;
if (!IsSupported(Standard_True, theFormatName.SubString(1,4), aHLibName)) { if (!IsSupported(Standard_True, theFormatName/*.SubString(1,4)*/, aHLibName)) {
return aValue; return aValue;
} }
TCollection_AsciiString aLibName = aHLibName->String(); TCollection_AsciiString aLibName = aHLibName->String();