mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0027277: geom/extruded_00/A0: OCAF document is not opened correctly
Reading of attribute TDataStd_ExtStringList from CSFDB format is corrected for null strings: empty value is used. Test bugs caf bug27277 added.
This commit is contained in:
parent
185a35a7ae
commit
12b86472db
@ -40,14 +40,12 @@ struct StdLPersistent_Collection::stringConverter
|
|||||||
const TCollection_ExtendedString& operator()
|
const TCollection_ExtendedString& operator()
|
||||||
(const Handle(StdObjMgt_Persistent)& theValue) const
|
(const Handle(StdObjMgt_Persistent)& theValue) const
|
||||||
{
|
{
|
||||||
Handle(TCollection_HExtendedString) aString = theValue->ExtString();
|
static TCollection_ExtendedString anEmptyString;
|
||||||
if (aString)
|
if (theValue.IsNull())
|
||||||
return aString->String();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
static TCollection_ExtendedString anEmptyString;
|
|
||||||
return anEmptyString;
|
return anEmptyString;
|
||||||
}
|
|
||||||
|
Handle(TCollection_HExtendedString) aString = theValue->ExtString();
|
||||||
|
return aString ? aString->String() : anEmptyString;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
12
tests/bugs/caf/bug27277
Normal file
12
tests/bugs/caf/bug27277
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
puts "==========="
|
||||||
|
puts "0027277: geom/extruded_00/A0: OCAF document is not opened correctly"
|
||||||
|
puts "==========="
|
||||||
|
|
||||||
|
|
||||||
|
Open [locate_data_file bug27277_GEOM.sgd] D
|
||||||
|
|
||||||
|
# check result of reading by number of attributes in dump
|
||||||
|
set dump [XDumpDF D]
|
||||||
|
if { ! [regexp {418 attributes dumped between 418} $dump] } {
|
||||||
|
puts "Error: expected 418 attributes in resulting document"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user