X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Filter_i.cxx;h=d26f37dd7de962d44fe298b6af5b64b25f3c8ac8;hp=016a2f84bb934df9cd6458cf58a74a55ea232c68;hb=e77162f42f48f74cad0c7ef06906b58378671d8a;hpb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115 diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 016a2f84b..d26f37dd7 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -40,6 +40,8 @@ #include #include +#include + #include #include #include @@ -3913,6 +3915,7 @@ CORBA::Boolean FilterLibrary_i::Save() if ( myFileName == 0 || strlen( myFileName ) == 0 ) return false; +#if OCC_VERSION_MAJOR < 7 FILE* aOutFile = fopen( myFileName, "wt" ); if ( !aOutFile ) return false; @@ -3921,6 +3924,17 @@ CORBA::Boolean FilterLibrary_i::Save() aWriter.SetIndentation( 2 ); aWriter << myDoc; fclose( aOutFile ); +#else + std::filebuf fb; + fb.open( myFileName, std::ios::out ); + + Standard_OStream os( &fb ); + + LDOM_XmlWriter aWriter; + aWriter.SetIndentation( 2 ); + aWriter.Write( os, myDoc ); + fb.close(); +#endif TPythonDump()<