diff options
author | David Walter Seikel | 2016-11-22 16:54:46 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-22 16:54:46 +1000 |
commit | be1f9db781db96b5d2ec45aa889e21daa6a1af36 (patch) | |
tree | 38eb98d0e35531329a993a23b2227475984abc16 /OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |
parent | Alas "make IARs for those that logged on since the last time" failed, 8.2 bro... (diff) | |
download | opensim-SC-be1f9db781db96b5d2ec45aa889e21daa6a1af36.zip opensim-SC-be1f9db781db96b5d2ec45aa889e21daa6a1af36.tar.gz opensim-SC-be1f9db781db96b5d2ec45aa889e21daa6a1af36.tar.bz2 opensim-SC-be1f9db781db96b5d2ec45aa889e21daa6a1af36.tar.xz |
Various random white space clean ups.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 4caa9cb..8f2c146 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
107 | part.LinkNum = linkNum; | 107 | part.LinkNum = linkNum; |
108 | part.TrimPermissions(); | 108 | part.TrimPermissions(); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | while (reader.ReadToNextSibling("Part")); | 111 | while (reader.ReadToNextSibling("Part")); |
112 | } | 112 | } |
113 | 113 | ||
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
156 | { | 156 | { |
157 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); | 157 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); |
158 | } | 158 | } |
159 | 159 | ||
160 | public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) | 160 | public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) |
161 | { | 161 | { |
162 | using (StringWriter sw = new StringWriter()) | 162 | using (StringWriter sw = new StringWriter()) |
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
190 | 190 | ||
191 | if (!noRootElement) | 191 | if (!noRootElement) |
192 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); | 192 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); |
193 | 193 | ||
194 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); | 194 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); |
195 | ToXmlFormat(sceneObject.RootPart, writer); | 195 | ToXmlFormat(sceneObject.RootPart, writer); |
196 | writer.WriteEndElement(); | 196 | writer.WriteEndElement(); |
@@ -212,23 +212,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
212 | 212 | ||
213 | if (doScriptStates) | 213 | if (doScriptStates) |
214 | sceneObject.SaveScriptedState(writer); | 214 | sceneObject.SaveScriptedState(writer); |
215 | 215 | ||
216 | if (!noRootElement) | 216 | if (!noRootElement) |
217 | writer.WriteEndElement(); // SceneObjectGroup | 217 | writer.WriteEndElement(); // SceneObjectGroup |
218 | 218 | ||
219 | // m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); | 219 | // m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); |
220 | } | 220 | } |
221 | 221 | ||
222 | protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) | 222 | protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) |
223 | { | 223 | { |
224 | SOPToXml2(writer, part, new Dictionary<string, object>()); | 224 | SOPToXml2(writer, part, new Dictionary<string, object>()); |
225 | } | 225 | } |
226 | 226 | ||
227 | public static SceneObjectGroup FromXml2Format(string xmlData) | 227 | public static SceneObjectGroup FromXml2Format(string xmlData) |
228 | { | 228 | { |
229 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 229 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |
230 | //int time = System.Environment.TickCount; | 230 | //int time = System.Environment.TickCount; |
231 | 231 | ||
232 | try | 232 | try |
233 | { | 233 | { |
234 | XmlDocument doc = new XmlDocument(); | 234 | XmlDocument doc = new XmlDocument(); |
@@ -278,7 +278,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
278 | // Script state may, or may not, exist. Not having any, is NOT | 278 | // Script state may, or may not, exist. Not having any, is NOT |
279 | // ever a problem. | 279 | // ever a problem. |
280 | sceneObject.LoadScriptState(doc); | 280 | sceneObject.LoadScriptState(doc); |
281 | 281 | ||
282 | return sceneObject; | 282 | return sceneObject; |
283 | } | 283 | } |
284 | catch (Exception e) | 284 | catch (Exception e) |
@@ -307,14 +307,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
307 | } | 307 | } |
308 | } | 308 | } |
309 | 309 | ||
310 | 310 | ||
311 | /// <summary> | 311 | /// <summary> |
312 | /// Modifies a SceneObjectGroup. | 312 | /// Modifies a SceneObjectGroup. |
313 | /// </summary> | 313 | /// </summary> |
314 | /// <param name="sog">The object</param> | 314 | /// <param name="sog">The object</param> |
315 | /// <returns>Whether the object was actually modified</returns> | 315 | /// <returns>Whether the object was actually modified</returns> |
316 | public delegate bool SceneObjectModifier(SceneObjectGroup sog); | 316 | public delegate bool SceneObjectModifier(SceneObjectGroup sog); |
317 | 317 | ||
318 | /// <summary> | 318 | /// <summary> |
319 | /// Modifies an object by deserializing it; applying 'modifier' to each SceneObjectGroup; and reserializing. | 319 | /// Modifies an object by deserializing it; applying 'modifier' to each SceneObjectGroup; and reserializing. |
320 | /// </summary> | 320 | /// </summary> |
@@ -328,7 +328,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
328 | CoalescedSceneObjects coa = null; | 328 | CoalescedSceneObjects coa = null; |
329 | 329 | ||
330 | string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(data)); | 330 | string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(data)); |
331 | 331 | ||
332 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) | 332 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) |
333 | { | 333 | { |
334 | // m_log.DebugFormat("[SERIALIZER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count); | 334 | // m_log.DebugFormat("[SERIALIZER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count); |
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
483 | m_TaskInventoryXmlProcessors.Add("PermsMask", ProcessTIPermsMask); | 483 | m_TaskInventoryXmlProcessors.Add("PermsMask", ProcessTIPermsMask); |
484 | m_TaskInventoryXmlProcessors.Add("Type", ProcessTIType); | 484 | m_TaskInventoryXmlProcessors.Add("Type", ProcessTIType); |
485 | m_TaskInventoryXmlProcessors.Add("OwnerChanged", ProcessTIOwnerChanged); | 485 | m_TaskInventoryXmlProcessors.Add("OwnerChanged", ProcessTIOwnerChanged); |
486 | 486 | ||
487 | #endregion | 487 | #endregion |
488 | 488 | ||
489 | #region ShapeXmlProcessors initialization | 489 | #region ShapeXmlProcessors initialization |
@@ -1139,7 +1139,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1139 | { | 1139 | { |
1140 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); | 1140 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); |
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) | 1143 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) |
1144 | { | 1144 | { |
1145 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); | 1145 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); |
@@ -1372,7 +1372,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1372 | if (sop.MediaUrl != null) | 1372 | if (sop.MediaUrl != null) |
1373 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); | 1373 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); |
1374 | WriteVector(writer, "AttachedPos", sop.AttachedPos); | 1374 | WriteVector(writer, "AttachedPos", sop.AttachedPos); |
1375 | 1375 | ||
1376 | if (sop.DynAttrs.CountNamespaces > 0) | 1376 | if (sop.DynAttrs.CountNamespaces > 0) |
1377 | { | 1377 | { |
1378 | writer.WriteStartElement("DynAttrs"); | 1378 | writer.WriteStartElement("DynAttrs"); |