Salome HOME
Bug IPAL21435 - TC5.1.3: incorrect mapping of the object from imported UNV file in...
authorouv <ouv@opencascade.com>
Fri, 30 Oct 2009 12:46:37 +0000 (12:46 +0000)
committerouv <ouv@opencascade.com>
Fri, 30 Oct 2009 12:46:37 +0000 (12:46 +0000)
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/DriverUNV/UNV_Utilities.hxx

index c438fa334639dc62cffd0ff3696250611e8b10b5..c3a682e214b029e584dab94c95f914426548bccb 100644 (file)
@@ -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{
index 7a4da5e92370de5accf86158924f1cf11a6196ac..7b011a9304eb3382241ea98b4ae09da8f361cafc 100644 (file)
@@ -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{
index e53f75d95da120a9dd3cff3c5cb87e9117a0e313..5e9239f82a37bd0f062b84f0f2509d2858e6aa2b 100644 (file)
 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: