summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
index 34fd149..4743089 100644
--- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
@@ -28,9 +28,9 @@ namespace Swift {
try {
- element->setAttribute("x1", boost::lexical_cast<std::string>(line.x1()));
- element->setAttribute("y1", boost::lexical_cast<std::string>(line.y1()));
- element->setAttribute("x2", boost::lexical_cast<std::string>(line.x2()));
- element->setAttribute("y2", boost::lexical_cast<std::string>(line.y2()));
+ element->setAttribute("x1", std::to_string(line.x1()));
+ element->setAttribute("y1", std::to_string(line.y1()));
+ element->setAttribute("x2", std::to_string(line.x2()));
+ element->setAttribute("y2", std::to_string(line.y2()));
element->setAttribute("id", line.getID());
element->setAttribute("stroke", line.getColor().toHex());
- element->setAttribute("stroke-width", boost::lexical_cast<std::string>(line.getPenWidth()));
+ element->setAttribute("stroke-width", std::to_string(line.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(line.getColor().getAlpha()));
@@ -45,3 +45,3 @@ namespace Swift {
try {
- element->setAttribute("stroke-width", boost::lexical_cast<std::string>(path.getPenWidth()));
+ element->setAttribute("stroke-width", std::to_string(path.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(path.getColor().getAlpha()));
@@ -50,5 +50,5 @@ namespace Swift {
std::vector<std::pair<int, int> >::const_iterator it = path.getPoints().begin();
- pathData = "M"+boost::lexical_cast<std::string>(it->first)+" "+boost::lexical_cast<std::string>(it->second)+"L";
+ pathData = "M"+std::to_string(it->first)+" "+std::to_string(it->second)+"L";
for (; it != path.getPoints().end(); ++it) {
- pathData += boost::lexical_cast<std::string>(it->first)+" "+boost::lexical_cast<std::string>(it->second)+" ";
+ pathData += std::to_string(it->first)+" "+std::to_string(it->second)+" ";
}
@@ -63,6 +63,6 @@ namespace Swift {
try {
- element->setAttribute("x", boost::lexical_cast<std::string>(rect.getX()));
- element->setAttribute("y", boost::lexical_cast<std::string>(rect.getY()));
- element->setAttribute("width", boost::lexical_cast<std::string>(rect.getWidth()));
- element->setAttribute("height", boost::lexical_cast<std::string>(rect.getHeight()));
+ element->setAttribute("x", std::to_string(rect.getX()));
+ element->setAttribute("y", std::to_string(rect.getY()));
+ element->setAttribute("width", std::to_string(rect.getWidth()));
+ element->setAttribute("height", std::to_string(rect.getHeight()));
element->setAttribute("id", rect.getID());
@@ -70,3 +70,3 @@ namespace Swift {
element->setAttribute("fill", rect.getBrushColor().toHex());;
- element->setAttribute("stroke-width", boost::lexical_cast<std::string>(rect.getPenWidth()));
+ element->setAttribute("stroke-width", std::to_string(rect.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(rect.getPenColor().getAlpha()));
@@ -83,3 +83,3 @@ namespace Swift {
element->setAttribute("fill", polygon.getBrushColor().toHex());;
- element->setAttribute("stroke-width", boost::lexical_cast<std::string>(polygon.getPenWidth()));
+ element->setAttribute("stroke-width", std::to_string(polygon.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(polygon.getPenColor().getAlpha()));
@@ -89,3 +89,3 @@ namespace Swift {
for (; it != polygon.getPoints().end(); ++it) {
- points += boost::lexical_cast<std::string>(it->first)+","+boost::lexical_cast<std::string>(it->second)+" ";
+ points += std::to_string(it->first)+","+std::to_string(it->second)+" ";
}
@@ -99,5 +99,5 @@ namespace Swift {
try {
- element->setAttribute("x", boost::lexical_cast<std::string>(text.getX()));
- element->setAttribute("y", boost::lexical_cast<std::string>(text.getY()));
- element->setAttribute("font-size", boost::lexical_cast<std::string>(text.getSize()));
+ element->setAttribute("x", std::to_string(text.getX()));
+ element->setAttribute("y", std::to_string(text.getY()));
+ element->setAttribute("font-size", std::to_string(text.getSize()));
element->setAttribute("id", text.getID());
@@ -113,6 +113,6 @@ namespace Swift {
try {
- element->setAttribute("cx", boost::lexical_cast<std::string>(ellipse.getCX()));
- element->setAttribute("cy", boost::lexical_cast<std::string>(ellipse.getCY()));
- element->setAttribute("rx", boost::lexical_cast<std::string>(ellipse.getRX()));
- element->setAttribute("ry", boost::lexical_cast<std::string>(ellipse.getRY()));
+ element->setAttribute("cx", std::to_string(ellipse.getCX()));
+ element->setAttribute("cy", std::to_string(ellipse.getCY()));
+ element->setAttribute("rx", std::to_string(ellipse.getRX()));
+ element->setAttribute("ry", std::to_string(ellipse.getRY()));
element->setAttribute("id", ellipse.getID());
@@ -120,3 +120,3 @@ namespace Swift {
element->setAttribute("fill", ellipse.getBrushColor().toHex());;
- element->setAttribute("stroke-width", boost::lexical_cast<std::string>(ellipse.getPenWidth()));
+ element->setAttribute("stroke-width", std::to_string(ellipse.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(ellipse.getPenColor().getAlpha()));
@@ -136,3 +136,3 @@ namespace Swift {
} else {
- return "."+boost::lexical_cast<std::string>(opacity);
+ return "."+std::to_string(opacity);
}
@@ -150,3 +150,3 @@ namespace Swift {
operationNode->setAttribute("type", "insert");
- operationNode->setAttribute("pos", boost::lexical_cast<std::string>(insertOp->getPos()));
+ operationNode->setAttribute("pos", std::to_string(insertOp->getPos()));
operationNode->setAttribute("id", insertOp->getID());
@@ -162,6 +162,6 @@ namespace Swift {
operationNode->setAttribute("type", "update");
- operationNode->setAttribute("pos", boost::lexical_cast<std::string>(updateOp->getPos()));
+ operationNode->setAttribute("pos", std::to_string(updateOp->getPos()));
operationNode->setAttribute("id", updateOp->getID());
operationNode->setAttribute("parentid", updateOp->getParentID());
- operationNode->setAttribute("newpos", boost::lexical_cast<std::string>(updateOp->getNewPos()));
+ operationNode->setAttribute("newpos", std::to_string(updateOp->getNewPos()));
} catch (boost::bad_lexical_cast&) {
@@ -177,3 +177,3 @@ namespace Swift {
operationNode->setAttribute("type", "delete");
- operationNode->setAttribute("pos", boost::lexical_cast<std::string>(deleteOp->getPos()));
+ operationNode->setAttribute("pos", std::to_string(deleteOp->getPos()));
operationNode->setAttribute("id", deleteOp->getID());