Salome HOME
first part of the porting on OCCT 7.0
[modules/hydro.git] / src / HYDROData / HYDROData_Document.cxx
index 653ddb8e2dd0686962afd0c40b8858d3f85cd8e1..56c6590f3c34cdaaf8d73e40155d52ae452cad72 100644 (file)
@@ -37,7 +37,6 @@
 #include <QTextStream>
 #include <QColor>
 
-IMPLEMENT_STANDARD_HANDLE(HYDROData_Document,MMgt_TShared)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared)
 
 #define PYTHON_DOC_NAME "hydro_doc"
@@ -54,8 +53,8 @@ static const gp_Pnt2d DEFAULT_LOCAL_CS( 0, 0 );
 
 using namespace std;
 
-typedef QMap<Standard_Integer,Handle_HYDROData_Entity> MapOfOrdered;
-typedef QMap<QString,Handle_HYDROData_Entity> MapOfUnordered;
+typedef QMap<Standard_Integer, Handle(HYDROData_Entity)> MapOfOrdered;
+typedef QMap<QString, Handle(HYDROData_Entity)> MapOfUnordered;
 
 Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID)
 {
@@ -253,7 +252,7 @@ bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
 
   // Dump the local CS data to Python 
   UpdateLCSFields();
-  QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY );
+  QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX, 0, 'f', 3 ).arg( myLY, 0, 'f', 3 );
   if( theIsMultiFile )
     aLCS.prepend( "  " );
   HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS );
@@ -322,12 +321,12 @@ QStringList HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
     aResScript << QString( "import salome" );
     aResScript << QString( "" );
     aResScript << QString( "def RebuildData( theStudy ):" );
-    aResScript << QString( "  %1 = HYDROData_Document.Document( theStudy._get_StudyId() );" ).arg( aDocName );
+    aResScript << QString( "  %1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName );
   }
   else
   {
     aResScript << QString( "" );
-    aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() );" ).arg( aDocName );
+    aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName );
   }
 
   return aResScript;
@@ -483,7 +482,7 @@ void HYDROData_Document::SetObjectsLayerOrder( const HYDROData_SequenceOfObjects
   }
 }
 
-void HYDROData_Document::Show( const Handle_HYDROData_Entity& theObject )
+void HYDROData_Document::Show( const Handle(HYDROData_Entity)& theObject )
 {
   HYDROData_SequenceOfObjects anOrder;
   anOrder.Append( theObject );