From 49bc3e4a264dde39d9471b2205690086dd8ed588 Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 26 Oct 2009 10:41:22 +0000 Subject: [PATCH] Bug IPAL21432 - TC5.1.3 Load script doesn't work with Notebook in scenario PROD-009. --- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 373058472..ccde0d3ef 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -48,6 +48,23 @@ using namespace std; #define VARIABLE_SEPARATOR ':' #define OPERATION_SEPARATOR '|' +// auxilary class intended to fix problems with locales +class Localizer +{ +public: + Localizer() + { + myCurLocale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + } + ~Localizer() + { + setlocale(LC_NUMERIC, myCurLocale.c_str()); + } +private: + std::string myCurLocale; +}; + //============================================================================ /*! Function : SALOMEDSImpl_Study * Purpose : SALOMEDSImpl_Study constructor @@ -904,6 +921,8 @@ string SALOMEDSImpl_Study::_GetStudyVariablesScript() if(myNoteBookVars.empty()) return dump; + + Localizer loc; dump += "####################################################\n"; dump += "## Begin of NoteBook variables section ##\n"; -- 2.39.2