aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2017-07-13 04:14:33 +0100
committerUbitUmarov2017-07-13 04:14:33 +0100
commitbd249bdf5b175ee6d84588a777444f2b89d7df1e (patch)
treefc197ccc9aac6d0285ae3d0c8c9e8cf1914dc9fe /OpenSim
parentfix wrong test (diff)
downloadopensim-SC-bd249bdf5b175ee6d84588a777444f2b89d7df1e.zip
opensim-SC-bd249bdf5b175ee6d84588a777444f2b89d7df1e.tar.gz
opensim-SC-bd249bdf5b175ee6d84588a777444f2b89d7df1e.tar.bz2
opensim-SC-bd249bdf5b175ee6d84588a777444f2b89d7df1e.tar.xz
replace the wrong libOMV user modifiable Utils.EnUSCulture by our own no User modifiable Culture.FormatProvider, and also for internal coerence. We do use the libomv on other code paths, so that must be fixed
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Capabilities/LLSD.cs2
-rw-r--r--OpenSim/Framework/PhysicsInertia.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPVehicle.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs70
5 files changed, 58 insertions, 58 deletions
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs
index c59cede..8f3cab7 100644
--- a/OpenSim/Capabilities/LLSD.cs
+++ b/OpenSim/Capabilities/LLSD.cs
@@ -566,7 +566,7 @@ namespace OpenSim.Framework.Capabilities
566 endPos = FindEnd(llsd, 1); 566 endPos = FindEnd(llsd, 1);
567 567
568 if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float, 568 if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float,
569 Utils.EnUsCulture.NumberFormat, out value)) 569 Culture.FormatProvider.NumberFormat, out value))
570 return value; 570 return value;
571 else 571 else
572 throw new LLSDParseException("Failed to parse double value type"); 572 throw new LLSDParseException("Failed to parse double value type");
diff --git a/OpenSim/Framework/PhysicsInertia.cs b/OpenSim/Framework/PhysicsInertia.cs
index af70634..6e15791 100644
--- a/OpenSim/Framework/PhysicsInertia.cs
+++ b/OpenSim/Framework/PhysicsInertia.cs
@@ -64,25 +64,25 @@ namespace OpenSim.Framework
64 64
65 private void XWfloat(string name, float f) 65 private void XWfloat(string name, float f)
66 { 66 {
67 writer.WriteElementString(name, f.ToString(Utils.EnUsCulture)); 67 writer.WriteElementString(name, f.ToString(Culture.FormatProvider));
68 } 68 }
69 69
70 private void XWVector(string name, Vector3 vec) 70 private void XWVector(string name, Vector3 vec)
71 { 71 {
72 writer.WriteStartElement(name); 72 writer.WriteStartElement(name);
73 writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); 73 writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider));
74 writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); 74 writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider));
75 writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); 75 writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider));
76 writer.WriteEndElement(); 76 writer.WriteEndElement();
77 } 77 }
78 78
79 private void XWVector4(string name, Vector4 quat) 79 private void XWVector4(string name, Vector4 quat)
80 { 80 {
81 writer.WriteStartElement(name); 81 writer.WriteStartElement(name);
82 writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); 82 writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider));
83 writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); 83 writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider));
84 writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); 84 writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider));
85 writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); 85 writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider));
86 writer.WriteEndElement(); 86 writer.WriteEndElement();
87 } 87 }
88 88
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
index 8d11331..351eda3 100644
--- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
@@ -425,25 +425,25 @@ namespace OpenSim.Region.Framework.Scenes
425 425
426 private void XWfloat(string name, float f) 426 private void XWfloat(string name, float f)
427 { 427 {
428 writer.WriteElementString(name, f.ToString(Utils.EnUsCulture)); 428 writer.WriteElementString(name, f.ToString(Culture.FormatProvider));
429 } 429 }
430 430
431 private void XWVector(string name, Vector3 vec) 431 private void XWVector(string name, Vector3 vec)
432 { 432 {
433 writer.WriteStartElement(name); 433 writer.WriteStartElement(name);
434 writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); 434 writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider));
435 writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); 435 writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider));
436 writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); 436 writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider));
437 writer.WriteEndElement(); 437 writer.WriteEndElement();
438 } 438 }
439 439
440 private void XWQuat(string name, Quaternion quat) 440 private void XWQuat(string name, Quaternion quat)
441 { 441 {
442 writer.WriteStartElement(name); 442 writer.WriteStartElement(name);
443 writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); 443 writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider));
444 writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); 444 writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider));
445 writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); 445 writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider));
446 writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); 446 writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider));
447 writer.WriteEndElement(); 447 writer.WriteEndElement();
448 } 448 }
449 449
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index d151002..41f3ef4 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -86,9 +86,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
86 86
87 writer.WriteStartElement("CoalescedObject"); 87 writer.WriteStartElement("CoalescedObject");
88 88
89 writer.WriteAttributeString("x", size.X.ToString(Utils.EnUsCulture)); 89 writer.WriteAttributeString("x", size.X.ToString(Culture.FormatProvider));
90 writer.WriteAttributeString("y", size.Y.ToString(Utils.EnUsCulture)); 90 writer.WriteAttributeString("y", size.Y.ToString(Culture.FormatProvider));
91 writer.WriteAttributeString("z", size.Z.ToString(Utils.EnUsCulture)); 91 writer.WriteAttributeString("z", size.Z.ToString(Culture.FormatProvider));
92 92
93 // Embed the offsets into the group XML 93 // Embed the offsets into the group XML
94 for (int i = 0; i < coaObjects.Count; i++) 94 for (int i = 0; i < coaObjects.Count; i++)
@@ -100,9 +100,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
100// i, obj.Name); 100// i, obj.Name);
101 101
102 writer.WriteStartElement("SceneObjectGroup"); 102 writer.WriteStartElement("SceneObjectGroup");
103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString(Utils.EnUsCulture)); 103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString(Culture.FormatProvider));
104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString(Utils.EnUsCulture)); 104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString(Culture.FormatProvider));
105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString(Utils.EnUsCulture)); 105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString(Culture.FormatProvider));
106 106
107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); 107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates);
108 108
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 4ca4434..3d867a4 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1460,10 +1460,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1460 writer.WriteElementString("Description", sop.Description); 1460 writer.WriteElementString("Description", sop.Description);
1461 1461
1462 writer.WriteStartElement("Color"); 1462 writer.WriteStartElement("Color");
1463 writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture)); 1463 writer.WriteElementString("R", sop.Color.R.ToString(Culture.FormatProvider));
1464 writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture)); 1464 writer.WriteElementString("G", sop.Color.G.ToString(Culture.FormatProvider));
1465 writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture)); 1465 writer.WriteElementString("B", sop.Color.B.ToString(Culture.FormatProvider));
1466 writer.WriteElementString("A", sop.Color.A.ToString(Utils.EnUsCulture)); 1466 writer.WriteElementString("A", sop.Color.A.ToString(Culture.FormatProvider));
1467 writer.WriteEndElement(); 1467 writer.WriteEndElement();
1468 1468
1469 writer.WriteElementString("Text", sop.Text); 1469 writer.WriteElementString("Text", sop.Text);
@@ -1506,7 +1506,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1506 writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); 1506 writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString());
1507 WriteFlags(writer, "Flags", sop.Flags.ToString(), options); 1507 WriteFlags(writer, "Flags", sop.Flags.ToString(), options);
1508 WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); 1508 WriteUUID(writer, "CollisionSound", sop.CollisionSound, options);
1509 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString(Utils.EnUsCulture)); 1509 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString(Culture.FormatProvider));
1510 if (sop.MediaUrl != null) 1510 if (sop.MediaUrl != null)
1511 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1511 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1512 WriteVector(writer, "AttachedPos", sop.AttachedPos); 1512 WriteVector(writer, "AttachedPos", sop.AttachedPos);
@@ -1526,7 +1526,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1526 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); 1526 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
1527 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); 1527 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
1528 1528
1529 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString(Utils.EnUsCulture)); 1529 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString(Culture.FormatProvider));
1530 1530
1531 WriteVector(writer, "Force", sop.Force); 1531 WriteVector(writer, "Force", sop.Force);
1532 WriteVector(writer, "Torque", sop.Torque); 1532 WriteVector(writer, "Torque", sop.Torque);
@@ -1543,22 +1543,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1543 writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower()); 1543 writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower());
1544 writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); 1544 writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());
1545 if (sop.Density != 1000.0f) 1545 if (sop.Density != 1000.0f)
1546 writer.WriteElementString("Density", sop.Density.ToString(Utils.EnUsCulture)); 1546 writer.WriteElementString("Density", sop.Density.ToString(Culture.FormatProvider));
1547 if (sop.Friction != 0.6f) 1547 if (sop.Friction != 0.6f)
1548 writer.WriteElementString("Friction", sop.Friction.ToString(Utils.EnUsCulture)); 1548 writer.WriteElementString("Friction", sop.Friction.ToString(Culture.FormatProvider));
1549 if (sop.Restitution != 0.5f) 1549 if (sop.Restitution != 0.5f)
1550 writer.WriteElementString("Bounce", sop.Restitution.ToString(Utils.EnUsCulture)); 1550 writer.WriteElementString("Bounce", sop.Restitution.ToString(Culture.FormatProvider));
1551 if (sop.GravityModifier != 1.0f) 1551 if (sop.GravityModifier != 1.0f)
1552 writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString(Utils.EnUsCulture)); 1552 writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString(Culture.FormatProvider));
1553 WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); 1553 WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset());
1554 WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); 1554 WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset());
1555 1555
1556 // if (sop.Sound != UUID.Zero) force it till sop crossing does clear it on child prim 1556 // if (sop.Sound != UUID.Zero) force it till sop crossing does clear it on child prim
1557 { 1557 {
1558 WriteUUID(writer, "SoundID", sop.Sound, options); 1558 WriteUUID(writer, "SoundID", sop.Sound, options);
1559 writer.WriteElementString("SoundGain", sop.SoundGain.ToString(Utils.EnUsCulture)); 1559 writer.WriteElementString("SoundGain", sop.SoundGain.ToString(Culture.FormatProvider));
1560 writer.WriteElementString("SoundFlags", sop.SoundFlags.ToString().ToLower()); 1560 writer.WriteElementString("SoundFlags", sop.SoundFlags.ToString().ToLower());
1561 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString(Utils.EnUsCulture)); 1561 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString(Culture.FormatProvider));
1562 } 1562 }
1563 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); 1563 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower());
1564 1564
@@ -1578,19 +1578,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1578 static void WriteVector(XmlTextWriter writer, string name, Vector3 vec) 1578 static void WriteVector(XmlTextWriter writer, string name, Vector3 vec)
1579 { 1579 {
1580 writer.WriteStartElement(name); 1580 writer.WriteStartElement(name);
1581 writer.WriteElementString("X", vec.X.ToString(Utils.EnUsCulture)); 1581 writer.WriteElementString("X", vec.X.ToString(Culture.FormatProvider));
1582 writer.WriteElementString("Y", vec.Y.ToString(Utils.EnUsCulture)); 1582 writer.WriteElementString("Y", vec.Y.ToString(Culture.FormatProvider));
1583 writer.WriteElementString("Z", vec.Z.ToString(Utils.EnUsCulture)); 1583 writer.WriteElementString("Z", vec.Z.ToString(Culture.FormatProvider));
1584 writer.WriteEndElement(); 1584 writer.WriteEndElement();
1585 } 1585 }
1586 1586
1587 static void WriteQuaternion(XmlTextWriter writer, string name, Quaternion quat) 1587 static void WriteQuaternion(XmlTextWriter writer, string name, Quaternion quat)
1588 { 1588 {
1589 writer.WriteStartElement(name); 1589 writer.WriteStartElement(name);
1590 writer.WriteElementString("X", quat.X.ToString(Utils.EnUsCulture)); 1590 writer.WriteElementString("X", quat.X.ToString(Culture.FormatProvider));
1591 writer.WriteElementString("Y", quat.Y.ToString(Utils.EnUsCulture)); 1591 writer.WriteElementString("Y", quat.Y.ToString(Culture.FormatProvider));
1592 writer.WriteElementString("Z", quat.Z.ToString(Utils.EnUsCulture)); 1592 writer.WriteElementString("Z", quat.Z.ToString(Culture.FormatProvider));
1593 writer.WriteElementString("W", quat.W.ToString(Utils.EnUsCulture)); 1593 writer.WriteElementString("W", quat.W.ToString(Culture.FormatProvider));
1594 writer.WriteEndElement(); 1594 writer.WriteEndElement();
1595 } 1595 }
1596 1596
@@ -1732,22 +1732,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1732 // Don't serialize SculptData. It's just a copy of the asset, which can be loaded separately using 'SculptTexture'. 1732 // Don't serialize SculptData. It's just a copy of the asset, which can be loaded separately using 'SculptTexture'.
1733 1733
1734 writer.WriteElementString("FlexiSoftness", shp.FlexiSoftness.ToString()); 1734 writer.WriteElementString("FlexiSoftness", shp.FlexiSoftness.ToString());
1735 writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString(Utils.EnUsCulture)); 1735 writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString(Culture.FormatProvider));
1736 writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString(Utils.EnUsCulture)); 1736 writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString(Culture.FormatProvider));
1737 writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString(Utils.EnUsCulture)); 1737 writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString(Culture.FormatProvider));
1738 writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString(Utils.EnUsCulture)); 1738 writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString(Culture.FormatProvider));
1739 writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString(Utils.EnUsCulture)); 1739 writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString(Culture.FormatProvider));
1740 writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString(Utils.EnUsCulture)); 1740 writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString(Culture.FormatProvider));
1741 writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString(Utils.EnUsCulture)); 1741 writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString(Culture.FormatProvider));
1742 1742
1743 writer.WriteElementString("LightColorR", shp.LightColorR.ToString(Utils.EnUsCulture)); 1743 writer.WriteElementString("LightColorR", shp.LightColorR.ToString(Culture.FormatProvider));
1744 writer.WriteElementString("LightColorG", shp.LightColorG.ToString(Utils.EnUsCulture)); 1744 writer.WriteElementString("LightColorG", shp.LightColorG.ToString(Culture.FormatProvider));
1745 writer.WriteElementString("LightColorB", shp.LightColorB.ToString(Utils.EnUsCulture)); 1745 writer.WriteElementString("LightColorB", shp.LightColorB.ToString(Culture.FormatProvider));
1746 writer.WriteElementString("LightColorA", shp.LightColorA.ToString(Utils.EnUsCulture)); 1746 writer.WriteElementString("LightColorA", shp.LightColorA.ToString(Culture.FormatProvider));
1747 writer.WriteElementString("LightRadius", shp.LightRadius.ToString(Utils.EnUsCulture)); 1747 writer.WriteElementString("LightRadius", shp.LightRadius.ToString(Culture.FormatProvider));
1748 writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString(Utils.EnUsCulture)); 1748 writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString(Culture.FormatProvider));
1749 writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString(Utils.EnUsCulture)); 1749 writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString(Culture.FormatProvider));
1750 writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString(Utils.EnUsCulture)); 1750 writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString(Culture.FormatProvider));
1751 1751
1752 writer.WriteElementString("FlexiEntry", shp.FlexiEntry.ToString().ToLower()); 1752 writer.WriteElementString("FlexiEntry", shp.FlexiEntry.ToString().ToLower());
1753 writer.WriteElementString("LightEntry", shp.LightEntry.ToString().ToLower()); 1753 writer.WriteElementString("LightEntry", shp.LightEntry.ToString().ToLower());