-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <Standard_Stream.hxx>
#include <GEOMImpl_IInsertOperations.hxx>
//=============================================================================
void GEOMImpl_IInsertOperations::Export
(const Handle(GEOM_Object) theOriginal,
- const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString& theFormatName)
+ const TCollection_AsciiString& theFileName,
+ const TCollection_AsciiString& theFormatName)
{
SetErrorCode(KO);
//=============================================================================
Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import
(const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString& theFormatName)
+ const TCollection_AsciiString& theFormatName)
{
SetErrorCode(KO);
//=============================================================================
Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators
(Handle(TColStd_HSequenceOfAsciiString)& theFormats,
- Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
+ Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
{
if (theFormats.IsNull())
theFormats = new TColStd_HSequenceOfAsciiString;
int aLenFormats = theFormats->Length();
bool isFound = false;
for(int aInd=1;aInd<=aLenFormats;aInd++){
- if( theFormats->Value(aInd) == aToken){
- isFound = true;
- break;
- }
+ if( theFormats->Value(aInd) == aToken){
+ isFound = true;
+ break;
+ }
}
if(!isFound)
- theFormats->Append(aToken);
+ theFormats->Append(aToken);
}
}
if (myResMgr->Find(aKey.ToCString()))
aPattern = myResMgr->Value(aKey.ToCString());
else if(myResMgrUser->Find(aKey.ToCString()))
- aPattern = myResMgrUser->Value(aKey.ToCString());
+ aPattern = myResMgrUser->Value(aKey.ToCString());
else {
aPattern = theFormats->Value(j);
aPattern += " Files ( *.* )";
//=============================================================================
Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators
(Handle(TColStd_HSequenceOfAsciiString)& theFormats,
- Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
+ Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
{
if (theFormats.IsNull())
theFormats = new TColStd_HSequenceOfAsciiString;
int aLenFormats = theFormats->Length();
bool isFound = false;
for(int aInd=1;aInd<=aLenFormats;aInd++){
- if( theFormats->Value(aInd) == aToken){
- isFound = true;
- break;
- }
+ if( theFormats->Value(aInd) == aToken){
+ isFound = true;
+ break;
+ }
}
if(!isFound)
- theFormats->Append(aToken);
+ theFormats->Append(aToken);
}
}
if (myResMgr->Find(aKey.ToCString()))
aPattern = myResMgr->Value(aKey.ToCString());
else if (myResMgrUser->Find(aKey.ToCString()))
- aPattern = myResMgrUser->Value(aKey.ToCString());
+ aPattern = myResMgrUser->Value(aKey.ToCString());
else {
aPattern = theFormats->Value(j);
aPattern += " Files ( *.* )";
}
return ( myResMgr->Find("Import") || myResMgr->Find("Export") ||
- myResMgrUser->Find("Import") || myResMgrUser->Find("Export"));
+ myResMgrUser->Find("Import") || myResMgrUser->Find("Export"));
}
int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTextureFile)
for (int i = 0; i < lenline/8; i++) {
unsigned char byte = 0;
for (int j = 0; j < 8; j++)
- byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
+ byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
bytedata.push_back(byte);
}
for (int i = lenline/8; i < lenbytes; i++)
}
int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
- const Handle(TDataStd_HArray1OfByte)& theTexture)
+ const Handle(TDataStd_HArray1OfByte)& theTexture)
{
SetErrorCode(KO);
int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
}
Handle(TDataStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theTextureId,
- int& theWidth, int& theHeight)
+ int& theWidth, int& theHeight)
{
SetErrorCode(KO);