X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_IInsertOperations_i.cc;h=e27a6876b0fd5a114ef3f703d58c395d3c9303bb;hb=a878bd540833e8164cec70ce481e9a021cb18e65;hp=c3941407ae7a4cf369e2b33b80091bd213ffe44c;hpb=9e31f81bd01bd5b327b61de1fa28dd1d7ef82ca5;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.cc b/src/GEOM_I/GEOM_IInsertOperations_i.cc index c3941407a..e27a6876b 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.cc +++ b/src/GEOM_I/GEOM_IInsertOperations_i.cc @@ -1,23 +1,24 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 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 +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com #ifdef WNT #pragma warning( disable:4786 ) @@ -34,8 +35,15 @@ #include "GEOM_Engine.hxx" #include "GEOM_Object.hxx" +#include + #include + +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 +#include +#else #include +#endif //============================================================================= /*! @@ -227,9 +235,20 @@ CORBA::Long GEOM_IInsertOperations_i::AddTexture(CORBA::Long theWidth, CORBA::Lo const SALOMEDS::TMPFile& theTexture) { GetOperations()->SetNotDone(); + +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + Handle(TColStd_HArray1OfByte) aTexture; +#else Handle(TDataStd_HArray1OfByte) aTexture; +#endif + if ( theTexture.length() > 0 ) { - aTexture = new TDataStd_HArray1OfByte( 1, theTexture.length() ); +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + aTexture = new TColStd_HArray1OfByte (1, theTexture.length()); +#else + aTexture = new TDataStd_HArray1OfByte (1, theTexture.length()); +#endif + for ( int i = 0; i < theTexture.length(); i++ ) aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] ); } @@ -241,7 +260,12 @@ SALOMEDS::TMPFile* GEOM_IInsertOperations_i::GetTexture(CORBA::Long theID, CORBA::Long& theHeight) { int aWidth, aHeight; - Handle(TDataStd_HArray1OfByte) aTextureImpl = GetOperations()->GetTexture( theID, aWidth, aHeight ); +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + Handle(TColStd_HArray1OfByte) aTextureImpl = +#else + Handle(TDataStd_HArray1OfByte) aTextureImpl = +#endif + GetOperations()->GetTexture(theID, aWidth, aHeight); theWidth = aWidth; theHeight = aHeight; SALOMEDS::TMPFile_var aTexture;