From: ouv Date: Fri, 30 Oct 2009 12:46:37 +0000 (+0000) Subject: Bug IPAL21435 - TC5.1.3: incorrect mapping of the object from imported UNV file in... X-Git-Tag: RELIQUAT_5x_30102009~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad1014d43c55f9fbdf7a6a051bf6d3c0e77eef6f;p=modules%2Fsmesh.git Bug IPAL21435 - TC5.1.3: incorrect mapping of the object from imported UNV file in the 3D Viewer --- diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx index c438fa334..c3a682e21 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx @@ -49,6 +49,7 @@ DriverUNV_R_SMDS_Mesh::~DriverUNV_R_SMDS_Mesh() Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() { + UNV::Localizer loc; Status aResult = DRS_OK; std::ifstream in_stream(myFile.c_str()); try{ diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx index 7a4da5e92..7b011a930 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx @@ -57,6 +57,7 @@ namespace{ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform() { + UNV::Localizer loc; Status aResult = DRS_OK; std::ofstream out_stream(myFile.c_str()); try{ diff --git a/src/DriverUNV/UNV_Utilities.hxx b/src/DriverUNV/UNV_Utilities.hxx index e53f75d95..5e9239f82 100644 --- a/src/DriverUNV/UNV_Utilities.hxx +++ b/src/DriverUNV/UNV_Utilities.hxx @@ -35,6 +35,22 @@ namespace UNV{ using namespace std; + class MESHDRIVERUNV_EXPORT Localizer + { + public: + Localizer() + { + myCurLocale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + } + ~Localizer() + { + setlocale(LC_NUMERIC, myCurLocale.c_str()); + } + private: + std::string myCurLocale; + }; + class MESHDRIVERUNV_EXPORT PrefixPrinter{ static int myCounter; public: