Salome HOME
Task #3237: Allow usage of accented characters in ObjectBrowser
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_ImportFeature.cpp
index b2619119eb90d1715c436dfb58ce5982261135eb..278ebf4125a7d7a80e192965b3b7d4338c7c2ca8 100644 (file)
@@ -34,6 +34,8 @@
 #include <GeomAPI_Shape.h>
 #include <GeomAPI_ShapeExplorer.h>
 
+#include <Locale_Convert.h>
+
 #include <ModelAPI_AttributeRefList.h>
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeString.h>
@@ -138,7 +140,7 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
 
   // Pass the results into the model
   std::string anObjectName = GeomAlgoAPI_Tools::File_Tools::name(theFileName);
-  data()->setName(ModelAPI_Tools::toWString(anObjectName));
+  data()->setName(Locale::Convert::toWString(anObjectName));
 
   setResult(createResultBody(aGeomShape));
 }
@@ -162,7 +164,7 @@ void ExchangePlugin_ImportFeature::importXAO(const std::string& theFileName)
   std::string aBodyName = aXaoGeometry->getName();
   if (aBodyName.empty())
     aBodyName = GeomAlgoAPI_Tools::File_Tools::name(theFileName);
-  data()->setName(ModelAPI_Tools::toWString(aBodyName));
+  data()->setName(Locale::Convert::toWString(aBodyName));
 
   ResultBodyPtr aResultBody = createResultBody(aGeomShape);
   setResult(aResultBody);
@@ -188,7 +190,7 @@ void ExchangePlugin_ImportFeature::importXAO(const std::string& theFileName)
 
     // group name
     if (!aXaoGroup->getName().empty())
-      aGroupFeature->data()->setName(ModelAPI_Tools::toWString(aXaoGroup->getName()));
+      aGroupFeature->data()->setName(Locale::Convert::toWString(aXaoGroup->getName()));
 
     // fill selection
     AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
@@ -218,7 +220,7 @@ void ExchangePlugin_ImportFeature::importXAO(const std::string& theFileName)
 
     // group name
     if (!aXaoField->getName().empty())
-      aFieldFeature->data()->setName(ModelAPI_Tools::toWString(aXaoField->getName()));
+      aFieldFeature->data()->setName(Locale::Convert::toWString(aXaoField->getName()));
 
     // fill selection
     AttributeSelectionListPtr aSelectionList = aFieldFeature->selectionList("selected");