diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-29 07:32:51 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-29 07:33:48 (GMT) |
commit | a8f57139d663a176af87d7bc71dd85c62f6274cf (patch) | |
tree | e1c4def39b63d64e6f4ad7baefceae0f154789ce /Swiften/Parser | |
parent | dc04410eb678b8db257dc04b04662f974f6b3b83 (diff) | |
download | swift-contrib-a8f57139d663a176af87d7bc71dd85c62f6274cf.zip swift-contrib-a8f57139d663a176af87d7bc71dd85c62f6274cf.tar.bz2 |
Improved handling of IDs
Added ID parsing to every element and added function to get prefixes from
session to be able to distinguish elements between clients
Diffstat (limited to 'Swiften/Parser')
-rw-r--r-- | Swiften/Parser/PayloadParsers/WhiteboardParser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp index 0477988..0f2734c 100644 --- a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp +++ b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp @@ -48,7 +48,7 @@ namespace Swift { } catch (boost::bad_lexical_cast&) { } whiteboardElement->setPenWidth(penWidth); - + whiteboardElement->setID(attributes.getAttributeValue("id").get_value_or("")); getPayloadInternal()->setElement(whiteboardElement); } else if (element == "path") { WhiteboardFreehandPathElement::ref whiteboardElement = boost::make_shared<WhiteboardFreehandPathElement>(); @@ -96,7 +96,7 @@ namespace Swift { Color color(attributes.getAttributeValue("stroke").get_value_or("#000000")); color.setAlpha(opacityToAlpha(attributes.getAttributeValue("opacity").get_value_or("1"))); whiteboardElement->setColor(color); - + whiteboardElement->setID(attributes.getAttributeValue("id").get_value_or("")); getPayloadInternal()->setElement(whiteboardElement); } else if (element == "rect") { int x = 0; @@ -126,7 +126,7 @@ namespace Swift { brushColor.setAlpha(opacityToAlpha(attributes.getAttributeValue("fill-opacity").get_value_or("1"))); whiteboardElement->setPenColor(penColor); whiteboardElement->setBrushColor(brushColor); - + whiteboardElement->setID(attributes.getAttributeValue("id").get_value_or("")); getPayloadInternal()->setElement(whiteboardElement); } else if (element == "polygon") { WhiteboardPolygonElement::ref whiteboardElement = boost::make_shared<WhiteboardPolygonElement>(); @@ -188,7 +188,7 @@ namespace Swift { } catch (boost::bad_lexical_cast&) { } whiteboardElement->setSize(fontSize); - + whiteboardElement->setID(attributes.getAttributeValue("id").get_value_or("")); getPayloadInternal()->setElement(whiteboardElement); } else if (element == "ellipse") { int cx = 0; @@ -218,7 +218,7 @@ namespace Swift { brushColor.setAlpha(opacityToAlpha(attributes.getAttributeValue("fill-opacity").get_value_or("1"))); whiteboardElement->setPenColor(penColor); whiteboardElement->setBrushColor(brushColor); - + whiteboardElement->setID(attributes.getAttributeValue("id").get_value_or("")); getPayloadInternal()->setElement(whiteboardElement); } } |