-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
std::list<FeaturePtr>& theExportedParts,
std::list<FeaturePtr>& theReferredParts);
// Collect names of features as a single string
-static std::string namesOfFeatures(const std::list<FeaturePtr>& theFeatures);
+static std::wstring namesOfFeatures(const std::list<FeaturePtr>& theFeatures);
ExchangePlugin_ExportPart::ExchangePlugin_ExportPart()
std::list<FeaturePtr> anExternalLinks, anExportedParts, aReferredParts;
if (!verifyExport(aFeaturesToExport, anExternalLinks, anExportedParts, aReferredParts)) {
if (!anExternalLinks.empty()) {
- std::string aListOfFeatures = namesOfFeatures(anExternalLinks);
+ std::wstring aListOfFeatures = namesOfFeatures(anExternalLinks);
std::string aMessage = "The selected results were created using external references "
"outside of this Part from features %1. "
Events_InfoMessage(getKind(), aMessage).arg(aListOfFeatures).send();
}
if (!aReferredParts.empty()) {
- std::string aListOfParts = namesOfFeatures(aReferredParts);
+ std::wstring aListOfParts = namesOfFeatures(aReferredParts);
std::string aMessage = "The selected results were created using references "
"to the results of Parts: %1. Please, remove these references "
Events_InfoMessage(getKind(), aMessage).arg(aListOfParts).send();
}
if (!anExportedParts.empty()) {
- std::string aListOfParts = namesOfFeatures(anExportedParts);
+ std::wstring aListOfParts = namesOfFeatures(anExportedParts);
std::string aMessage = "The export of Part's result is forbidden (%1).";
Events_InfoMessage(getKind(), aMessage).arg(aListOfParts).send();
std::set<FeaturePtr> aFeaturesToExport;
for (int anIndex = 0, aSize = theSelected->size(); anIndex < aSize; ++anIndex) {
AttributeSelectionPtr aCurrent = theSelected->value(anIndex);
- FeaturePtr aCurrentFeature = ModelAPI_Feature::feature(aCurrent->context());
- if (aCurrentFeature)
- aFeaturesToExport.insert(aCurrentFeature);
+ FeaturePtr aCurFeature = ModelAPI_Feature::feature(aCurrent->context());
+ if (aCurFeature)
+ aFeaturesToExport.insert(aCurFeature);
}
// recursively collect all features used for the selected results
allReferencedFeatures(aFeaturesToExport, aFeaturesToExport);
return theExternalReferences.empty() && theExportedParts.empty() && theReferredParts.empty();
}
-std::string namesOfFeatures(const std::list<FeaturePtr>& theFeatures)
+std::wstring namesOfFeatures(const std::list<FeaturePtr>& theFeatures)
{
- std::ostringstream aListOfFeatures;
+ std::wostringstream aListOfFeatures;
for (std::list<FeaturePtr>::const_iterator anIt = theFeatures.begin();
anIt != theFeatures.end(); ++anIt) {
if (anIt != theFeatures.begin())