Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_ExportFeature.cpp
index 29fcfe43b07dabe5a0585f8e0a5f93e055a4f3f2..d898a08e5dd8895c829986908eed8143629eae56 100644 (file)
@@ -41,6 +41,8 @@
 #include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_Trsf.h>
 
+#include <Locale_Convert.h>
+
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeStringArray.h>
@@ -393,7 +395,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
   if (aGeometryName.empty() && aResults.size() == 1) {
     // get the name from the first result
     ResultPtr aResultBody = *aResults.begin();
-    aGeometryName = aResultBody->data()->name();
+    aGeometryName = Locale::Convert::toString(aResultBody->data()->name());
   }
 
   aXao.getGeometry()->setName(aGeometryName);
@@ -428,7 +430,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       XAO::Dimension aGroupDimension = XAO::XaoUtils::stringToDimension(aDimensionString);
 
       XAO::Group* aXaoGroup = aXao.addGroup(aGroupDimension,
-                                            aResultGroup->data()->name());
+        Locale::Convert::toString(aResultGroup->data()->name()));
 
       try {
         GeomAPI_ShapeExplorer aGroupResExplorer(aResultGroup->shape(), aSelType);
@@ -447,7 +449,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       } catch (XAO::XAO_Exception& e) {
         // LCOV_EXCL_START
         std::string msg = "An error occurred while exporting group " +
-          aResultGroup->data()->name();
+          Locale::Convert::toString(aResultGroup->data()->name());
         msg += ".\n";
         msg += e.what();
         msg += "\n";
@@ -484,7 +486,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       XAO::Type aFieldType = XAO::XaoUtils::stringToFieldType(aTypeString);
 
       XAO::Field* aXaoField = aXao.addField(aFieldType, aFieldDimension, aTables->columns(),
-                                            aResultField->data()->name());
+        Locale::Convert::toString(aResultField->data()->name()));
 
 
       try {
@@ -545,7 +547,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       } catch (XAO::XAO_Exception& e) {
         // LCOV_EXCL_START
         std::string msg = "An error occurred while exporting field " +
-          aResultField->data()->name();
+          Locale::Convert::toString(aResultField->data()->name());
         msg += ".\n";
         msg += e.what();
         msg += "\n";