X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Filter_i.cxx;h=ec604d7590e1e68044a82d55befaaa6449075f7b;hb=386c76ea033aef391a39dfc3b015ed081ed49fd5;hp=016a2f84bb934df9cd6458cf58a74a55ea232c68;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 016a2f84b..ec604d759 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()<