Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / graphics / src / cpp / configgraphicvariable.cpp
index 7e984ea..a574ab8 100644 (file)
 ** \{
 */
 
-std::wstring ConfigGraphicVariable::m_wstFPF;
+std::string ConfigGraphicVariable::m_stFPF;
 
-void ConfigGraphicVariable::setFPF(const std::wstring& _wstFPF)
+void ConfigGraphicVariable::setFPF(const std::string& _stFPF)
 {
-    m_wstFPF = _wstFPF;
+    m_stFPF = _stFPF;
 }
 
-std::wstring ConfigGraphicVariable::getFPF()
+std::string ConfigGraphicVariable::getFPF()
 {
-    return m_wstFPF;
+    return m_stFPF;
 }
 
 /*
@@ -41,55 +41,55 @@ std::wstring ConfigGraphicVariable::getFPF()
 ** \{
 */
 
-std::map<std::wstring, int> ConfigGraphicVariable::m_mapProperties;
+std::map<std::string, int> ConfigGraphicVariable::m_mapProperties;
 
 void ConfigGraphicVariable::fillProperties()
 {
     if (m_mapProperties.empty())
     {
-        m_mapProperties[std::wstring(L"alufunction")]   = 1;
-        m_mapProperties[std::wstring(L"auto clear")]    = 2;
-        m_mapProperties[std::wstring(L"background")]    = 3;
-        m_mapProperties[std::wstring(L"clipoff")]       = 4;
-        m_mapProperties[std::wstring(L"clipping")]      = 5;
-        m_mapProperties[std::wstring(L"clipgrf")]       = 6;
-        m_mapProperties[std::wstring(L"color")]         = 7;
-        m_mapProperties[std::wstring(L"colormap")]      = 8;
-        m_mapProperties[std::wstring(L"dashes")]        = 9;
-        m_mapProperties[std::wstring(L"default")]       = 10;
-        m_mapProperties[std::wstring(L"figure")]        = 11;
-        m_mapProperties[std::wstring(L"font")]          = 12;
-        m_mapProperties[std::wstring(L"font size")]     = 13;
-        m_mapProperties[std::wstring(L"foreground")]    = 14;
-        m_mapProperties[std::wstring(L"fpf")]           = 15;
-        m_mapProperties[std::wstring(L"hidden3d")]      = 16;
-        m_mapProperties[std::wstring(L"lastpattern")]   = 17;
-        m_mapProperties[std::wstring(L"line mode")]     = 18;
-        m_mapProperties[std::wstring(L"line style")]    = 19;
-        m_mapProperties[std::wstring(L"mark")]          = 20;
-        m_mapProperties[std::wstring(L"mark size")]     = 21;
-        m_mapProperties[std::wstring(L"old_style")]     = 22;
-        m_mapProperties[std::wstring(L"pattern")]       = 23;
-        m_mapProperties[std::wstring(L"pixmap")]        = 24;
-        m_mapProperties[std::wstring(L"thickness")]     = 25;
-        m_mapProperties[std::wstring(L"use color")]     = 26;
-        m_mapProperties[std::wstring(L"viewport")]      = 27;
-        m_mapProperties[std::wstring(L"wdim")]          = 28;
-        m_mapProperties[std::wstring(L"white")]         = 29;
-        m_mapProperties[std::wstring(L"window")]        = 30;
-        m_mapProperties[std::wstring(L"wpdim")]         = 31;
-        m_mapProperties[std::wstring(L"wpos")]          = 32;
-        m_mapProperties[std::wstring(L"wresize")]       = 33;
-        //        m_mapProperties[std::wstring(L" ")]             = 34; /* added */
+        m_mapProperties["alufunction"]   = 1;
+        m_mapProperties["auto clear"]    = 2;
+        m_mapProperties["background"]    = 3;
+        m_mapProperties["clipoff"]       = 4;
+        m_mapProperties["clipping"]      = 5;
+        m_mapProperties["clipgrf"]       = 6;
+        m_mapProperties["color"]         = 7;
+        m_mapProperties["colormap"]      = 8;
+        m_mapProperties["dashes"]        = 9;
+        m_mapProperties["default"]       = 10;
+        m_mapProperties["figure"]        = 11;
+        m_mapProperties["font"]          = 12;
+        m_mapProperties["font size"]     = 13;
+        m_mapProperties["foreground"]    = 14;
+        m_mapProperties["fpf"]           = 15;
+        m_mapProperties["hidden3d"]      = 16;
+        m_mapProperties["lastpattern"]   = 17;
+        m_mapProperties["line mode"]     = 18;
+        m_mapProperties["line style"]    = 19;
+        m_mapProperties["mark"]          = 20;
+        m_mapProperties["mark size"]     = 21;
+        m_mapProperties["old_style"]     = 22;
+        m_mapProperties["pattern"]       = 23;
+        m_mapProperties["pixmap"]        = 24;
+        m_mapProperties["thickness"]     = 25;
+        m_mapProperties["use color"]     = 26;
+        m_mapProperties["viewport"]      = 27;
+        m_mapProperties["wdim"]          = 28;
+        m_mapProperties["white"]         = 29;
+        m_mapProperties["window"]        = 30;
+        m_mapProperties["wpdim"]         = 31;
+        m_mapProperties["wpos"]          = 32;
+        m_mapProperties["wresize"]       = 33;
+//        m_mapProperties[std::wstring(L" "]             = 34; /* added */
     }
 }
 
-int ConfigGraphicVariable::getPropertyValue(wchar_t* _wcsKey)
+int ConfigGraphicVariable::getPropertyValue(const char* _key)
 {
     fillProperties();
-    std::map<std::wstring, int>::iterator it;
-    it = m_mapProperties.find(_wcsKey);
-    if (it != m_mapProperties.end())
+    std::map<std::string, int>::iterator it;
+    it = m_mapProperties.find(_key);
+    if(it != m_mapProperties.end())
     {
         return it->second;
     }
@@ -97,10 +97,10 @@ int ConfigGraphicVariable::getPropertyValue(wchar_t* _wcsKey)
     return 0;
 }
 
-bool ConfigGraphicVariable::bPropertyFound(wchar_t* _wcsKey)
+bool ConfigGraphicVariable::bPropertyFound(const char* _key)
 {
     fillProperties();
-    if (m_mapProperties.find(_wcsKey) != m_mapProperties.end())
+    if(m_mapProperties.find(_key) != m_mapProperties.end())
     {
         return true;
     }