X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Tools.cpp;h=fe22b3a8b04429b2b0e5bf4a75245ccdb1dc6b44;hb=f14192492e36f4febc93b2ad7ab7f866cbbdf71b;hp=874d05e8ef46e92ec58231e2e048102cca14220c;hpb=c68483238115b437c5e0b37de859fd8ca9676000;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Tools.cpp b/src/SketchPlugin/SketchPlugin_Tools.cpp index 874d05e8e..fe22b3a8b 100644 --- a/src/SketchPlugin/SketchPlugin_Tools.cpp +++ b/src/SketchPlugin/SketchPlugin_Tools.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -260,7 +261,8 @@ private: std::set aCoincToRes = SketchPlugin_Tools::findCoincidentConstraints(theFeature->lastResult()); aCoincidences.insert(aCoincToRes.begin(), aCoincToRes.end()); - } std::set::const_iterator aCIt = aCoincidences.begin(); + } + std::set::const_iterator aCIt = aCoincidences.begin(); for (; aCIt != aCoincidences.end(); ++aCIt) { if (theCoincidences.find(*aCIt) != theCoincidences.end()) @@ -525,7 +527,8 @@ void createAuxiliaryPointOnEllipse(const FeaturePtr& theEllipseFeature, aCoord->setValue(anElPoint->x(), anElPoint->y()); aPointFeature->execute(); - std::string aName = theEllipseFeature->name() + "_" + theEllipsePoint; + std::wstring aName = theEllipseFeature->name() + L"_" + + ModelAPI_Tools::toWString(theEllipsePoint); aPointFeature->data()->setName(aName); aPointFeature->lastResult()->data()->setName(aName); @@ -558,8 +561,8 @@ void createAuxiliaryAxisOfEllipse(const FeaturePtr& theEllipseFeature, aLineEnd->setValue(aEndPoint->x(), aEndPoint->y()); aLineFeature->execute(); - std::string aName = theEllipseFeature->name() + "_" + - (theStartPoint == SketchPlugin_Ellipse::MAJOR_AXIS_START_ID() ? "major_axis" : "minor_axis"); + std::wstring aName = theEllipseFeature->name() + L"_" + + (theStartPoint == SketchPlugin_Ellipse::MAJOR_AXIS_START_ID() ? L"major_axis" : L"minor_axis"); aLineFeature->data()->setName(aName); aLineFeature->lastResult()->data()->setName(aName); @@ -626,13 +629,13 @@ void setDimensionColor(const AISObjectPtr& theDimPrs) theDimPrs->setColor(aColor[0], aColor[1], aColor[2]); } -void replaceInName(ObjectPtr theObject, const std::string& theSource, const std::string& theDest) +void replaceInName(ObjectPtr theObject, const std::wstring& theSource, const std::wstring& theDest) { - std::string aName = theObject->data()->name(); + std::wstring aName = theObject->data()->name(); size_t aPos = aName.find(theSource); if (aPos != std::string::npos) { - std::string aNewName = aName.substr(0, aPos) + theDest - + aName.substr(aPos + theSource.size()); + std::wstring aNewName = aName.substr(0, aPos) + theDest + + aName.substr(aPos + theSource.size()); theObject->data()->setName(aNewName); } }