]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
latests developments debug and porting Python3
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 8 Jul 2019 15:30:29 +0000 (17:30 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 8 Jul 2019 15:30:29 +0000 (17:30 +0200)
18 files changed:
src/HYDROData/HYDROData_Bathymetry.cxx
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Polyline3D.cxx
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_Profile.cxx
src/HYDROData/HYDROData_Region.cxx
src/HYDROData/HYDROData_Stream.cxx
src/HYDROData/HYDROData_StricklerTable.cxx
src/HYDROData/test_HYDROData_PolylineXY.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx
src/HYDROGUI/HYDROGUI_Shape.cxx
src/HYDROGUI/HYDROGUI_ShapeImage.cxx
src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
src/HYDRO_tests/CMakeLists.txt
src/HYDRO_tests/test_HYDROData_DTM.cxx
src/HYDRO_tests/test_HYDROData_PolylineXY.cxx

index d3de1f7617eb0319eb40d654bf6cfecd4edbcb8f..609d0c23bb2179539c402e1f2a9ce7cfdb520b19 100755 (executable)
@@ -155,7 +155,7 @@ HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints(boo
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aCoordsArray ) )
     return aPoints;
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   int q = ( aCoordsArray->Upper() - aCoordsArray->Lower() + 1 ) / 3;
   aPoints.reserve( q );
   for ( int i = aCoordsArray->Lower(), n = aCoordsArray->Upper(); i <= n; )
@@ -186,7 +186,7 @@ HYDROData_QuadtreeNode* HYDROData_Bathymetry::GetQuadtreeNodes() const
         return 0;
 
       int aQuadTreeNumber = 0;
-      Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+      Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
       if ( ! aDocument.IsNull() )
         {
           aQuadTreeNumber = aDocument->GetCountQuadtree();
@@ -273,7 +273,7 @@ vtkPolyData* HYDROData_Bathymetry::GetVtkDelaunay2D() const
         return 0;
 
       int aDelaunayNumber = 0;
-      Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+      Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
       if ( ! aDocument.IsNull() )
         {
           aDelaunayNumber = aDocument->GetCountDelaunay();
@@ -709,7 +709,7 @@ bool HYDROData_Bathymetry::ImportFromFiles( const QStringList& theFileNames )
   }
 
   // Convert from global to local CS
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   HYDROData_Bathymetry::AltitudePoints::iterator anIter = AllPoints.begin(), aLast = AllPoints.end();
   for ( ; anIter!=aLast; ++anIter )
   {
@@ -889,7 +889,7 @@ bool HYDROData_Bathymetry::importFromASCFile( QFile&          theFile,
 
 Handle(HYDROData_PolylineXY) HYDROData_Bathymetry::CreateBoundaryPolyline() const
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   Handle(HYDROData_PolylineXY) aResult = 
     Handle(HYDROData_PolylineXY)::DownCast( aDocument->CreateObject( KIND_POLYLINEXY ) );
 
index 3014494d979d8199dbcbf25505f2137994e394d9..e6a640f6c8b44ea6435bc97998cee6208fe77e36 100755 (executable)
@@ -462,7 +462,7 @@ void HYDROData_CalculationCase::Update()
   RemoveRegions();
   RemoveSplitGroups();
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return;
 
@@ -824,7 +824,7 @@ Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(H
   Changed( Geom_No );
   Changed( Geom_No );
   Changed( Geom_No );
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF );
   if ( aNewRegion.IsNull() )
     return aNewRegion;
@@ -836,7 +836,7 @@ Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(H
 
 bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRegion )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
 
   if ( theRegion.IsNull() )
     return false;
@@ -873,7 +873,7 @@ HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetRegions() const
 
 void HYDROData_CalculationCase::UpdateRegionsOrder()
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return;
 
index 387cd70a7ccb609e44647eaca195b23fbd9e77c8..370c7167137752c146f860961c360ae553bc4d78 100644 (file)
@@ -232,7 +232,7 @@ void HYDROData_Entity::Show()
   if ( !IsHas2dPrs() )
     return;
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return;
 
@@ -263,7 +263,7 @@ int HYDROData_Entity::GetGeomChangeFlag() const
 
 void HYDROData_Entity::Changed( Geometry theChangedGeometry )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if( aDocument.IsNull() )
     return;
 
@@ -335,7 +335,7 @@ HYDROData_Entity::~HYDROData_Entity()
 void HYDROData_Entity::CopyTo( const Handle(HYDROData_Entity)& theDestination,
                                bool isGenerateNewName ) const
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() ) {
     return;
   }
@@ -744,7 +744,7 @@ QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreate
 {
   QStringList aResList;
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return aResList;
 
@@ -876,7 +876,7 @@ void HYDROData_Entity::setPythonObjectColor( QStringList&         theScript,
 void HYDROData_Entity::findPythonReferenceObject( QStringList& theScript,
                                                   QString      defName) const
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return;
 
@@ -893,7 +893,7 @@ void HYDROData_Entity::findPythonReferenceObject( QStringList& theScript,
 void HYDROData_Entity::SetNameInDumpPython(QStringList&  theScript,
                                            QString       theName) const
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return;
 
index 02578fb66ed4cd8e9239f396b61bb084428884de..9d311e760e09792c23a3a37bb6c0b6c435a45868 100644 (file)
@@ -309,7 +309,7 @@ Handle(HYDROData_IAltitudeObject) HYDROData_Object::getChildAltitudeObject() con
 
 void HYDROData_Object::checkAndSetAltitudeObject()
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
 
   ObjectKind anAltitudeObjectType = getAltitudeObjectType();
   //DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType);
index ce4bb667dac514a4833fed2b76e306544cfebd7b..ea6841d824b1d908e549ba391c94f7833b561c48 100644 (file)
@@ -215,7 +215,7 @@ HYDROData_Polyline3D::Polyline3DPoints HYDROData_Polyline3D::GetProfilePoints3D(
 
   if (IsConvertToGlobal)
   {
-    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     for (int i=1;i<=aResPoints.Size();i++)
     {
       gp_XYZ& point = aResPoints.ChangeValue(i);
@@ -349,7 +349,7 @@ Handle(HYDROData_ProfileUZ) HYDROData_Polyline3D::GetChildProfileUZ( const bool
   if ( !theIsCreate || !aProfileUZ.IsNull() )
     return aProfileUZ;
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() )
     return aProfileUZ;
 
index fb8a61ade903ac3fa4618dbb958ed4724848e3d2..1e27572f2e1adeb6326e811a31dd6990cd166604 100644 (file)
@@ -1491,7 +1491,7 @@ HYDROData_PolylineXY::PointsList HYDROData_PolylineXY::GetPoints( const int theS
 
   TColStd_ListIteratorOfListOfReal anIterX( aListX->List() );
   TColStd_ListIteratorOfListOfReal anIterY( aListY->List() );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   for ( ; anIterX.More() && anIterY.More(); anIterX.Next(), anIterY.Next() )
   {
     Point aPoint( anIterX.Value(), anIterY.Value() );
index 059f299a3cd2dbc7a25fec168deeba27d82af49b..cf738b2c929e0b8d03ffd9177af4de4750fb387a 100644 (file)
@@ -227,7 +227,7 @@ void HYDROData_Profile::SetLeftPoint( const gp_XY& theGPoint, bool IsConvertFrom
   if ( aLabel.IsNull() )
     return;
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   gp_XY aLPoint = theGPoint;
   if( IsConvertFromGlobal )
     aDoc->Transform( aLPoint, true );
@@ -262,7 +262,7 @@ bool HYDROData_Profile::GetLeftPoint( gp_XY& thePoint, bool IsConvertToGlobal,
     return CanUseDefault;
   }
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(TDataStd_RealArray) anArray;
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
   {
@@ -282,7 +282,7 @@ void HYDROData_Profile::SetRightPoint( const gp_XY& theGPoint, bool IsConvertFro
 {
   TDF_Label aLabel = myLab.FindChild( DataTag_LastPoint );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   gp_XY aLPoint = theGPoint;
   if( IsConvertFromGlobal )
     aDoc->Transform( aLPoint, true );
@@ -316,7 +316,7 @@ bool HYDROData_Profile::GetRightPoint( gp_XY& thePoint, bool IsConvertToGlobal,
     return CanUseDefault;
   }
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(TDataStd_RealArray) anArray;
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
   {
@@ -407,7 +407,7 @@ void HYDROData_Profile::SetProfilePoints( const ProfilePoints& thePoints, bool I
 
   gp_XY aFirstPoint, aLastPoint;
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(HYDROData_ProfileUZ) aProfileUZ = GetProfileUZ();
   for ( int i = 1, n = thePoints.Length(); i <= n ; ++i )
   {
index 37887cfb774b4c6e66b217d7d9be91ab18cbb57a..c3876616505a5a5dc3c123e92329eff369057a05 100644 (file)
@@ -101,7 +101,7 @@ HYDROData_SequenceOfObjects HYDROData_Region::GetAllReferenceObjects() const
 
 bool HYDROData_Region::AddZone( const Handle(HYDROData_Zone)& theZone )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
 
   if ( theZone.IsNull() )
     return false;
index e75dc36897878f078e09ed44db9b59fc5793e0f1..431e22ae26511b81ca9f270acd67f6317ca80d72 100644 (file)
@@ -1053,7 +1053,7 @@ void HYDROData_Stream::removeParameter( const int& theIndex )
 bool HYDROData_Stream::GenerateBottomPolyline()
 {
   // Get the document
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() ) {
     return false;
   }
@@ -1141,7 +1141,7 @@ bool HYDROData_Stream::SetBottomPolyline( const Handle(HYDROData_Polyline3D)& th
 bool HYDROData_Stream::Interpolate( HYDROData_IProfilesInterpolator* theInterpolator )
 {
   // Get the document
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() ) {
     return false;
   }
@@ -1193,7 +1193,7 @@ void HYDROData_Stream::CopyTo( const Handle(HYDROData_Entity)& theDestination,
                                bool isGenerateNewName ) const
 {
   // Get the document
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() ) {
     return;
   }
index c5e7409bd9de8ea36f43ddaafab7d7a6d1325579..8dda167363bebb7f03c64f4a6071ba8bc4ae56c2 100644 (file)
@@ -256,7 +256,7 @@ QString HYDROData_StricklerTable::GetAttrName() const
 
 bool HYDROData_StricklerTable::SetAttrName( const QString& theAttrName ) const
 {
-  HYDROData_Iterator anIt( HYDROData_Document::Document( myLab ), KIND_STRICKLER_TABLE );
+  HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_STRICKLER_TABLE );
   for( ; anIt.More(); anIt.Next() )
   {
     Handle( HYDROData_StricklerTable ) aTable = 
@@ -335,7 +335,7 @@ void HYDROData_StricklerTable::SetColor( const QString& theType, const QColor& t
   aMap->SetInteger( aType, aColorInt );
 
   // synchronize the color for the same type in other maps
-  HYDROData_Iterator anIt( HYDROData_Document::Document( myLab ), KIND_STRICKLER_TABLE );
+  HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_STRICKLER_TABLE );
   for( ; anIt.More(); anIt.Next() )
   {
     Handle( HYDROData_StricklerTable ) aTable = 
index 99b61069f176803719f92e44a540f220e17fd2ff..98d35c3655319d47b99dff536e5fbd797158b8fb 100644 (file)
@@ -26,7 +26,7 @@
 
 void test_HYDROData_PolylineXY::testPolyline()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline = 
     Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
@@ -56,7 +56,7 @@ void test_HYDROData_PolylineXY::testPolyline()
 
 void test_HYDROData_PolylineXY::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(HYDROData_PolylineXY) aPolyline1 = 
     Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
 
index 7888166a154e4fa55f84f2b97dc2b4e50d9edbe9..e6773b813f8592af9d64c903ed4a3834a531bca7 100644 (file)
@@ -122,7 +122,7 @@ Quantity_Color HYDROGUI_LandCoverMapPrs::GetColor( const QString& theStricklerTy
       return Quantity_Color();
   }
 
-  QColor aColor = HYDROData_Document::Document( myLCMap->Label())->GetAssociatedColor(theStricklerType, myTable);
+  QColor aColor = HYDROData_Document::Document()->GetAssociatedColor(theStricklerType, myTable);
 
   if (aColor.isValid())
     return HYDROData_Tool::toOccColor(aColor);
index 691581602fd92b506ca83efd43cb29ee673a4add..f180a82a913b651cc71dc7244eeec81a52231dbb 100644 (file)
@@ -132,7 +132,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
   // Try to retrieve information from object
   if ( !myObject.IsNull() )
   {
-    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject->Label() );
+    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   
     if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
     {
index 765e75d615d7f9e3751439d8b9386f1b7b672c8f..0c6b9a2baf21c39174dfdcbe9c87cf6c9c2a841a 100644 (file)
@@ -112,7 +112,7 @@ QPolygonF HYDROGUI_ShapeImage::imageContour( const Handle(HYDROData_Image)& theI
                                          << QPointF( anImage.width(), anImage.height() ) << QPointF( 0, anImage.height() );
         aPolygon = aTrsf.map( aPolygon );
 
-        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( theImageObj->Label() );
+        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
         for ( QPolygonF::iterator it = aPolygon.begin(); it != aPolygon.end(); ++it )
         {
             gp_Pnt aPnt( (*it).x(), (*it).y(), 0 );
index ce016a554b6431e2f86fe9023f88072a3810dc6d..66dd4dbfac15dbda111637ee09334ee82844a7fd 100644 (file)
@@ -108,7 +108,7 @@ void HYDROGUI_VTKPrsShape::buildShape()
   // Try to retrieve information from object
   if ( !anObject.IsNull() )
   {
-    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( anObject->Label() );
+    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   
     if ( anObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
     {
index 9b0cd57cabcf3fff88cb0c62ef885524ef1a1586..10b6c87f28d2f87ad2156124eb65286bec11c254 100644 (file)
@@ -78,7 +78,7 @@ IF( ${WIN32} )
   add_definitions( -DWNT -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4 )
 ENDIF()
 
-SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT_DIR}/include )
+SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT}/include )
 SET( CAS_INCLUDES $ENV{CASROOT}/inc )
 SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QT_ROOT_DIR}/include $ENV{QT_ROOT_DIR}/include/QtCore $ENV{QT_ROOT_DIR}/include/QtGui $ENV{QT_ROOT_DIR}/include/QtTest )
 SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
@@ -101,7 +101,7 @@ ELSE()
 ENDIF()
 
 
-link_directories( $ENV{CPPUNIT_ROOT_DIR}/lib )
+link_directories( $ENV{CPPUNIT_ROOT}/lib )
 IF( ${WIN32} )
   IF( CMAKE_BUILD_TYPE MATCHES Debug )
     SET( CPPUNIT_LIBRARIES cppunitd )
index 0cb700a85ba13dfb92a6ef6c8c6fa470a556efac..9cc0ea758876f3975397cf6964ab1f61201ac986 100644 (file)
@@ -672,7 +672,7 @@ void test_HYDROData_DTM::test_classifier_1()
 
 void test_HYDROData_DTM::test_profile_discretization_warnings()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   {
     Handle(HYDROData_Profile) aProfile = 
index cc07bbf7256c2ea5c560d3c21b16ceb21a109213..5120fb092dd2cae49e4a77a6d57595aec2e75b5e 100644 (file)
@@ -626,7 +626,7 @@ void test_HYDROData_PolylineXY::test_import_from_sx()
 
 void test_HYDROData_PolylineXY::test_import_from_sx_options()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/trait_cote_lambert1N.sx";
 
@@ -662,7 +662,7 @@ void test_HYDROData_PolylineXY::test_import_from_sx_options()
 
 void test_HYDROData_PolylineXY::test_polyline_dbf_info_simple()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(HYDROData_PolylineXY) aPolyline = Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
   QStringList dbf_dummy, dbf_out;
   dbf_dummy << "n1" << "n2" << "n3" << "n4";