]> OCCT Git - occt.git/commitdiff
0031884: Data Exchange - NULL de-reference within STEPCAFControl_Reader::SetSourceCod...
authorkgv <kgv@opencascade.com>
Tue, 27 Oct 2020 08:41:12 +0000 (11:41 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 28 Oct 2020 19:19:23 +0000 (22:19 +0300)
Removed methods with unclear usage rules.

src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Reader.hxx

index 029d9f4d0d9531ef2c68bf9046b210061beb8cd6..2772edc2d6ef91ebff737ba066f32eb0b679244e 100644 (file)
@@ -384,7 +384,7 @@ TCollection_ExtendedString STEPCAFControl_Reader::convertName (const TCollection
   // If source code page is not a NoConversion
   // the string is treated as having UTF-8 coding,
   // else each character is copied to ExtCharacter.
-  return TCollection_ExtendedString (theName, SourceCodePage() != Resource_FormatType_NoConversion);
+  return TCollection_ExtendedString (theName, myReader.StepModel()->SourceCodePage() != Resource_FormatType_NoConversion);
 }
 
 //=======================================================================
@@ -4783,26 +4783,6 @@ Standard_Boolean STEPCAFControl_Reader::GetNameMode() const
   return myNameMode;
 }
 
-//=======================================================================
-//function : SourceCodePage
-//purpose  : 
-//=======================================================================
-
-Resource_FormatType STEPCAFControl_Reader::SourceCodePage() const
-{
-  return myReader.StepModel()->SourceCodePage();
-}
-
-//=======================================================================
-//function : SetSourceCodePage
-//purpose  : 
-//=======================================================================
-
-void STEPCAFControl_Reader::SetSourceCodePage(Resource_FormatType theCode)
-{
-  myReader.StepModel()->SetSourceCodePage(theCode);
-}
-
 //=======================================================================
 //function : SetLayerMode
 //purpose  : 
index 8bddd9602eae58cb5c454adb35b39d0caf696781..2aa4d23f38a30e7e21e418b50b2e527e44e58b5a 100644 (file)
@@ -141,13 +141,6 @@ public:
   
   Standard_EXPORT Standard_Boolean GetNameMode() const;
 
-  //! Return the encoding of STEP file for converting names into UNICODE.
-  //! Initialized from "read.step.codepage" variable by constructor, which is Resource_UTF8 by default.
-  Standard_EXPORT Resource_FormatType SourceCodePage() const;
-
-  //! Return the encoding of STEP file for converting names into UNICODE.
-  Standard_EXPORT void SetSourceCodePage (Resource_FormatType theCode);
-
   //! Set LayerMode for indicate read Layers or not.
   Standard_EXPORT void SetLayerMode (const Standard_Boolean layermode);