Salome HOME
Copyright update 2020
[modules/gui.git] / src / CAF / CAF_Study.cxx
old mode 100755 (executable)
new mode 100644 (file)
index ab35820..183fbf6
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -33,8 +33,7 @@
 
 #include <TDF_Delta.hxx>
 #include <TDF_ListIteratorOfDeltaList.hxx>
-#include <TDocStd_Application.hxx>
-
+#include <TColStd_SequenceOfAsciiString.hxx>
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx>
 
@@ -107,8 +106,10 @@ bool CAF_Study::createDocument( const QString& doc )
   {
     try {
       OCC_CATCH_SIGNALS;
-      TColStd_SequenceOfExtendedString formats;
-      app->stdApp()->Formats( formats );
+      TColStd_SequenceOfAsciiString formats;
+      app->stdApp()->WritingFormats( formats );
+      if ( formats.IsEmpty() )
+        app->stdApp()->ReadingFormats( formats );
       if ( !formats.IsEmpty() )
         app->stdApp()->NewDocument( formats.First(), myStdDoc );
     }