From ad1014d43c55f9fbdf7a6a051bf6d3c0e77eef6f Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 30 Oct 2009 12:46:37 +0000 Subject: [PATCH] Bug IPAL21435 - TC5.1.3: incorrect mapping of the object from imported UNV file in the 3D Viewer --- src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx | 1 + src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx | 1 + src/DriverUNV/UNV_Utilities.hxx | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) 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: -- 2.39.2