aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llxml
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llxml
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llxml')
-rw-r--r--linden/indra/llxml/llcontrol.cpp35
-rw-r--r--linden/indra/llxml/llxml_vc8.vcproj558
-rw-r--r--linden/indra/llxml/llxml_vc9.vcproj560
-rw-r--r--linden/indra/llxml/llxmlnode.cpp107
4 files changed, 623 insertions, 637 deletions
diff --git a/linden/indra/llxml/llcontrol.cpp b/linden/indra/llxml/llcontrol.cpp
index d185987..5504a10 100644
--- a/linden/indra/llxml/llcontrol.cpp
+++ b/linden/indra/llxml/llcontrol.cpp
@@ -69,8 +69,6 @@ std::set<LLControlBase*> LLControlBase::mChangedControls;
69 69
70const S32 CURRENT_VERSION = 101; 70const S32 CURRENT_VERSION = 101;
71 71
72BOOL control_insert_before( LLControlBase* first, LLControlBase* second );
73
74BOOL LLControl::llsd_compare(const LLSD& a, const LLSD & b) 72BOOL LLControl::llsd_compare(const LLSD& a, const LLSD & b)
75{ 73{
76 switch (mType) 74 switch (mType)
@@ -1033,6 +1031,13 @@ U32 LLControlGroup::loadFromFile(const LLString& filename, BOOL require_declarat
1033 return validitems; 1031 return validitems;
1034} 1032}
1035 1033
1034struct compare_controls
1035{
1036 bool operator() (const LLControlBase* const a, const LLControlBase* const b) const
1037 {
1038 return a->getName() < b->getName();
1039 }
1040};
1036 1041
1037U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only) 1042U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only)
1038{ 1043{
@@ -1042,13 +1047,14 @@ U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only)
1042 1047
1043 // place the objects in a temporary container that enforces a sort 1048 // place the objects in a temporary container that enforces a sort
1044 // order to ease manual editing of the file 1049 // order to ease manual editing of the file
1045 LLLinkedList< LLControlBase > controls; 1050
1046 controls.setInsertBefore( &control_insert_before ); 1051 typedef std::set< LLControlBase*, compare_controls > control_list_t;
1047 LLString name; 1052 control_list_t controls;
1053
1048 for (ctrl_name_table_t::iterator iter = mNameTable.begin(); 1054 for (ctrl_name_table_t::iterator iter = mNameTable.begin();
1049 iter != mNameTable.end(); iter++) 1055 iter != mNameTable.end(); iter++)
1050 { 1056 {
1051 name = iter->first; 1057 LLString name = iter->first;
1052 if (name.empty()) 1058 if (name.empty())
1053 { 1059 {
1054 CONTROL_ERRS << "Control with no name found!!!" << llendl; 1060 CONTROL_ERRS << "Control with no name found!!!" << llendl;
@@ -1065,7 +1071,7 @@ U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only)
1065 { 1071 {
1066 if (!(nondefault_only && (control->mIsDefault))) 1072 if (!(nondefault_only && (control->mIsDefault)))
1067 { 1073 {
1068 controls.addDataSorted( control ); 1074 controls.insert( control );
1069 } 1075 }
1070 else 1076 else
1071 { 1077 {
@@ -1088,12 +1094,12 @@ U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only)
1088 // Write file version 1094 // Write file version
1089 file << "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n"; 1095 file << "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
1090 file << "<settings version = \"" << CURRENT_VERSION << "\">\n"; 1096 file << "<settings version = \"" << CURRENT_VERSION << "\">\n";
1091 for( LLControlBase* control = controls.getFirstData(); 1097 for (control_list_t::iterator iter = controls.begin();
1092 control != NULL; 1098 iter != controls.end(); ++iter)
1093 control = controls.getNextData() )
1094 { 1099 {
1100 LLControlBase* control = *iter;
1095 file << "\t<!--" << control->comment() << "-->" << ENDL; 1101 file << "\t<!--" << control->comment() << "-->" << ENDL;
1096 name = control->name(); 1102 LLString name = control->getName();
1097 switch (control->type()) 1103 switch (control->type())
1098 { 1104 {
1099 case TYPE_U32: 1105 case TYPE_U32:
@@ -1165,7 +1171,7 @@ U32 LLControlGroup::saveToFile(const LLString& filename, BOOL nondefault_only)
1165 file << "</settings>\n"; 1171 file << "</settings>\n";
1166 file.close(); 1172 file.close();
1167 1173
1168 return controls.getLength(); 1174 return controls.size();
1169} 1175}
1170 1176
1171void LLControlGroup::applyOverrides(const std::map<std::string, std::string>& overrides) 1177void LLControlGroup::applyOverrides(const std::map<std::string, std::string>& overrides)
@@ -1435,8 +1441,3 @@ void main()
1435} 1441}
1436#endif 1442#endif
1437 1443
1438BOOL control_insert_before( LLControlBase* first, LLControlBase* second )
1439{
1440 return ( first->getName().compare(second->getName()) < 0 );
1441}
1442
diff --git a/linden/indra/llxml/llxml_vc8.vcproj b/linden/indra/llxml/llxml_vc8.vcproj
index a049d41..b39ae53 100644
--- a/linden/indra/llxml/llxml_vc8.vcproj
+++ b/linden/indra/llxml/llxml_vc8.vcproj
@@ -1,279 +1,279 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="8.00" 4 Version="8.00"
5 Name="llxml" 5 Name="llxml"
6 ProjectGUID="{A5470DA6-0C3A-4602-B930-43DB25511A59}" 6 ProjectGUID="{A5470DA6-0C3A-4602-B930-43DB25511A59}"
7 RootNamespace="llxml" 7 RootNamespace="llxml"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 > 9 >
10 <Platforms> 10 <Platforms>
11 <Platform 11 <Platform
12 Name="Win32" 12 Name="Win32"
13 /> 13 />
14 </Platforms> 14 </Platforms>
15 <ToolFiles> 15 <ToolFiles>
16 </ToolFiles> 16 </ToolFiles>
17 <Configurations> 17 <Configurations>
18 <Configuration 18 <Configuration
19 Name="Debug|Win32" 19 Name="Debug|Win32"
20 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 20 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
21 IntermediateDirectory="Debug" 21 IntermediateDirectory="Debug"
22 ConfigurationType="4" 22 ConfigurationType="4"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 CharacterSet="1" 24 CharacterSet="1"
25 > 25 >
26 <Tool 26 <Tool
27 Name="VCPreBuildEventTool" 27 Name="VCPreBuildEventTool"
28 /> 28 />
29 <Tool 29 <Tool
30 Name="VCCustomBuildTool" 30 Name="VCCustomBuildTool"
31 /> 31 />
32 <Tool 32 <Tool
33 Name="VCXMLDataGeneratorTool" 33 Name="VCXMLDataGeneratorTool"
34 /> 34 />
35 <Tool 35 <Tool
36 Name="VCWebServiceProxyGeneratorTool" 36 Name="VCWebServiceProxyGeneratorTool"
37 /> 37 />
38 <Tool 38 <Tool
39 Name="VCMIDLTool" 39 Name="VCMIDLTool"
40 /> 40 />
41 <Tool 41 <Tool
42 Name="VCCLCompilerTool" 42 Name="VCCLCompilerTool"
43 Optimization="0" 43 Optimization="0"
44 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 44 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" 45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
46 MinimalRebuild="true" 46 MinimalRebuild="true"
47 BasicRuntimeChecks="3" 47 BasicRuntimeChecks="3"
48 RuntimeLibrary="1" 48 RuntimeLibrary="1"
49 StructMemberAlignment="4" 49 StructMemberAlignment="4"
50 TreatWChar_tAsBuiltInType="false" 50 TreatWChar_tAsBuiltInType="false"
51 ForceConformanceInForLoopScope="true" 51 ForceConformanceInForLoopScope="true"
52 UsePrecompiledHeader="0" 52 UsePrecompiledHeader="0"
53 WarningLevel="3" 53 WarningLevel="3"
54 WarnAsError="true" 54 WarnAsError="true"
55 Detect64BitPortabilityProblems="false" 55 Detect64BitPortabilityProblems="false"
56 DebugInformationFormat="4" 56 DebugInformationFormat="4"
57 /> 57 />
58 <Tool 58 <Tool
59 Name="VCManagedResourceCompilerTool" 59 Name="VCManagedResourceCompilerTool"
60 /> 60 />
61 <Tool 61 <Tool
62 Name="VCResourceCompilerTool" 62 Name="VCResourceCompilerTool"
63 /> 63 />
64 <Tool 64 <Tool
65 Name="VCPreLinkEventTool" 65 Name="VCPreLinkEventTool"
66 /> 66 />
67 <Tool 67 <Tool
68 Name="VCLibrarianTool" 68 Name="VCLibrarianTool"
69 OutputFile="$(OutDir)/llxml.lib" 69 OutputFile="$(OutDir)/llxml.lib"
70 /> 70 />
71 <Tool 71 <Tool
72 Name="VCALinkTool" 72 Name="VCALinkTool"
73 /> 73 />
74 <Tool 74 <Tool
75 Name="VCXDCMakeTool" 75 Name="VCXDCMakeTool"
76 /> 76 />
77 <Tool 77 <Tool
78 Name="VCBscMakeTool" 78 Name="VCBscMakeTool"
79 /> 79 />
80 <Tool 80 <Tool
81 Name="VCFxCopTool" 81 Name="VCFxCopTool"
82 /> 82 />
83 <Tool 83 <Tool
84 Name="VCPostBuildEventTool" 84 Name="VCPostBuildEventTool"
85 /> 85 />
86 </Configuration> 86 </Configuration>
87 <Configuration 87 <Configuration
88 Name="Release|Win32" 88 Name="Release|Win32"
89 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 89 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
90 IntermediateDirectory="Release" 90 IntermediateDirectory="Release"
91 ConfigurationType="4" 91 ConfigurationType="4"
92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
93 CharacterSet="1" 93 CharacterSet="1"
94 > 94 >
95 <Tool 95 <Tool
96 Name="VCPreBuildEventTool" 96 Name="VCPreBuildEventTool"
97 /> 97 />
98 <Tool 98 <Tool
99 Name="VCCustomBuildTool" 99 Name="VCCustomBuildTool"
100 /> 100 />
101 <Tool 101 <Tool
102 Name="VCXMLDataGeneratorTool" 102 Name="VCXMLDataGeneratorTool"
103 /> 103 />
104 <Tool 104 <Tool
105 Name="VCWebServiceProxyGeneratorTool" 105 Name="VCWebServiceProxyGeneratorTool"
106 /> 106 />
107 <Tool 107 <Tool
108 Name="VCMIDLTool" 108 Name="VCMIDLTool"
109 /> 109 />
110 <Tool 110 <Tool
111 Name="VCCLCompilerTool" 111 Name="VCCLCompilerTool"
112 AdditionalOptions="/Oy-" 112 AdditionalOptions="/Oy-"
113 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 113 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
115 RuntimeLibrary="0" 115 RuntimeLibrary="0"
116 StructMemberAlignment="0" 116 StructMemberAlignment="0"
117 TreatWChar_tAsBuiltInType="false" 117 TreatWChar_tAsBuiltInType="false"
118 ForceConformanceInForLoopScope="true" 118 ForceConformanceInForLoopScope="true"
119 UsePrecompiledHeader="0" 119 UsePrecompiledHeader="0"
120 WarningLevel="3" 120 WarningLevel="3"
121 WarnAsError="true" 121 WarnAsError="true"
122 Detect64BitPortabilityProblems="false" 122 Detect64BitPortabilityProblems="false"
123 DebugInformationFormat="3" 123 DebugInformationFormat="3"
124 /> 124 />
125 <Tool 125 <Tool
126 Name="VCManagedResourceCompilerTool" 126 Name="VCManagedResourceCompilerTool"
127 /> 127 />
128 <Tool 128 <Tool
129 Name="VCResourceCompilerTool" 129 Name="VCResourceCompilerTool"
130 /> 130 />
131 <Tool 131 <Tool
132 Name="VCPreLinkEventTool" 132 Name="VCPreLinkEventTool"
133 /> 133 />
134 <Tool 134 <Tool
135 Name="VCLibrarianTool" 135 Name="VCLibrarianTool"
136 OutputFile="$(OutDir)/llxml.lib" 136 OutputFile="$(OutDir)/llxml.lib"
137 /> 137 />
138 <Tool 138 <Tool
139 Name="VCALinkTool" 139 Name="VCALinkTool"
140 /> 140 />
141 <Tool 141 <Tool
142 Name="VCXDCMakeTool" 142 Name="VCXDCMakeTool"
143 /> 143 />
144 <Tool 144 <Tool
145 Name="VCBscMakeTool" 145 Name="VCBscMakeTool"
146 /> 146 />
147 <Tool 147 <Tool
148 Name="VCFxCopTool" 148 Name="VCFxCopTool"
149 /> 149 />
150 <Tool 150 <Tool
151 Name="VCPostBuildEventTool" 151 Name="VCPostBuildEventTool"
152 /> 152 />
153 </Configuration> 153 </Configuration>
154 <Configuration 154 <Configuration
155 Name="ReleaseNoOpt|Win32" 155 Name="ReleaseNoOpt|Win32"
156 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 156 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
157 IntermediateDirectory="$(ConfigurationName)" 157 IntermediateDirectory="$(ConfigurationName)"
158 ConfigurationType="4" 158 ConfigurationType="4"
159 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 159 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
160 CharacterSet="1" 160 CharacterSet="1"
161 > 161 >
162 <Tool 162 <Tool
163 Name="VCPreBuildEventTool" 163 Name="VCPreBuildEventTool"
164 /> 164 />
165 <Tool 165 <Tool
166 Name="VCCustomBuildTool" 166 Name="VCCustomBuildTool"
167 /> 167 />
168 <Tool 168 <Tool
169 Name="VCXMLDataGeneratorTool" 169 Name="VCXMLDataGeneratorTool"
170 /> 170 />
171 <Tool 171 <Tool
172 Name="VCWebServiceProxyGeneratorTool" 172 Name="VCWebServiceProxyGeneratorTool"
173 /> 173 />
174 <Tool 174 <Tool
175 Name="VCMIDLTool" 175 Name="VCMIDLTool"
176 /> 176 />
177 <Tool 177 <Tool
178 Name="VCCLCompilerTool" 178 Name="VCCLCompilerTool"
179 AdditionalOptions="/Oy-" 179 AdditionalOptions="/Oy-"
180 Optimization="0" 180 Optimization="0"
181 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 181 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
182 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 182 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
183 RuntimeLibrary="0" 183 RuntimeLibrary="0"
184 StructMemberAlignment="0" 184 StructMemberAlignment="0"
185 TreatWChar_tAsBuiltInType="false" 185 TreatWChar_tAsBuiltInType="false"
186 ForceConformanceInForLoopScope="true" 186 ForceConformanceInForLoopScope="true"
187 UsePrecompiledHeader="0" 187 UsePrecompiledHeader="0"
188 WarningLevel="3" 188 WarningLevel="3"
189 WarnAsError="true" 189 WarnAsError="true"
190 Detect64BitPortabilityProblems="false" 190 Detect64BitPortabilityProblems="false"
191 DebugInformationFormat="3" 191 DebugInformationFormat="3"
192 /> 192 />
193 <Tool 193 <Tool
194 Name="VCManagedResourceCompilerTool" 194 Name="VCManagedResourceCompilerTool"
195 /> 195 />
196 <Tool 196 <Tool
197 Name="VCResourceCompilerTool" 197 Name="VCResourceCompilerTool"
198 /> 198 />
199 <Tool 199 <Tool
200 Name="VCPreLinkEventTool" 200 Name="VCPreLinkEventTool"
201 /> 201 />
202 <Tool 202 <Tool
203 Name="VCLibrarianTool" 203 Name="VCLibrarianTool"
204 OutputFile="$(OutDir)/llxml.lib" 204 OutputFile="$(OutDir)/llxml.lib"
205 /> 205 />
206 <Tool 206 <Tool
207 Name="VCALinkTool" 207 Name="VCALinkTool"
208 /> 208 />
209 <Tool 209 <Tool
210 Name="VCXDCMakeTool" 210 Name="VCXDCMakeTool"
211 /> 211 />
212 <Tool 212 <Tool
213 Name="VCBscMakeTool" 213 Name="VCBscMakeTool"
214 /> 214 />
215 <Tool 215 <Tool
216 Name="VCFxCopTool" 216 Name="VCFxCopTool"
217 /> 217 />
218 <Tool 218 <Tool
219 Name="VCPostBuildEventTool" 219 Name="VCPostBuildEventTool"
220 /> 220 />
221 </Configuration> 221 </Configuration>
222 </Configurations> 222 </Configurations>
223 <References> 223 <References>
224 </References> 224 </References>
225 <Files> 225 <Files>
226 <Filter 226 <Filter
227 Name="Source Files" 227 Name="Source Files"
228 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" 228 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
229 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 229 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
230 > 230 >
231 <File 231 <File
232 RelativePath=".\llcontrol.cpp" 232 RelativePath=".\llcontrol.cpp"
233 > 233 >
234 </File> 234 </File>
235 <File 235 <File
236 RelativePath=".\llxmlnode.cpp" 236 RelativePath=".\llxmlnode.cpp"
237 > 237 >
238 </File> 238 </File>
239 <File 239 <File
240 RelativePath=".\llxmlparser.cpp" 240 RelativePath=".\llxmlparser.cpp"
241 > 241 >
242 </File> 242 </File>
243 <File 243 <File
244 RelativePath=".\llxmltree.cpp" 244 RelativePath=".\llxmltree.cpp"
245 > 245 >
246 </File> 246 </File>
247 </Filter> 247 </Filter>
248 <Filter 248 <Filter
249 Name="Header Files" 249 Name="Header Files"
250 Filter="h;hpp;hxx;hm;inl;inc;xsd" 250 Filter="h;hpp;hxx;hm;inl;inc;xsd"
251 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 251 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
252 > 252 >
253 <File 253 <File
254 RelativePath=".\llcontrol.h" 254 RelativePath=".\llcontrol.h"
255 > 255 >
256 </File> 256 </File>
257 <File 257 <File
258 RelativePath=".\llxmlnode.h" 258 RelativePath=".\llxmlnode.h"
259 > 259 >
260 </File> 260 </File>
261 <File 261 <File
262 RelativePath=".\llxmlparser.h" 262 RelativePath=".\llxmlparser.h"
263 > 263 >
264 </File> 264 </File>
265 <File 265 <File
266 RelativePath=".\llxmltree.h" 266 RelativePath=".\llxmltree.h"
267 > 267 >
268 </File> 268 </File>
269 </Filter> 269 </Filter>
270 <Filter 270 <Filter
271 Name="Resource Files" 271 Name="Resource Files"
272 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 272 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
273 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 273 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
274 > 274 >
275 </Filter> 275 </Filter>
276 </Files> 276 </Files>
277 <Globals> 277 <Globals>
278 </Globals> 278 </Globals>
279</VisualStudioProject> 279</VisualStudioProject>
diff --git a/linden/indra/llxml/llxml_vc9.vcproj b/linden/indra/llxml/llxml_vc9.vcproj
index e4553e8..eb719c9 100644
--- a/linden/indra/llxml/llxml_vc9.vcproj
+++ b/linden/indra/llxml/llxml_vc9.vcproj
@@ -1,280 +1,280 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="9.00" 4 Version="9.00"
5 Name="llxml" 5 Name="llxml"
6 ProjectGUID="{A5470DA6-0C3A-4602-B930-43DB25511A59}" 6 ProjectGUID="{A5470DA6-0C3A-4602-B930-43DB25511A59}"
7 RootNamespace="llxml" 7 RootNamespace="llxml"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 TargetFrameworkVersion="131072" 9 TargetFrameworkVersion="131072"
10 > 10 >
11 <Platforms> 11 <Platforms>
12 <Platform 12 <Platform
13 Name="Win32" 13 Name="Win32"
14 /> 14 />
15 </Platforms> 15 </Platforms>
16 <ToolFiles> 16 <ToolFiles>
17 </ToolFiles> 17 </ToolFiles>
18 <Configurations> 18 <Configurations>
19 <Configuration 19 <Configuration
20 Name="Debug|Win32" 20 Name="Debug|Win32"
21 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 21 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
22 IntermediateDirectory="Debug" 22 IntermediateDirectory="Debug"
23 ConfigurationType="4" 23 ConfigurationType="4"
24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
25 CharacterSet="1" 25 CharacterSet="1"
26 > 26 >
27 <Tool 27 <Tool
28 Name="VCPreBuildEventTool" 28 Name="VCPreBuildEventTool"
29 /> 29 />
30 <Tool 30 <Tool
31 Name="VCCustomBuildTool" 31 Name="VCCustomBuildTool"
32 /> 32 />
33 <Tool 33 <Tool
34 Name="VCXMLDataGeneratorTool" 34 Name="VCXMLDataGeneratorTool"
35 /> 35 />
36 <Tool 36 <Tool
37 Name="VCWebServiceProxyGeneratorTool" 37 Name="VCWebServiceProxyGeneratorTool"
38 /> 38 />
39 <Tool 39 <Tool
40 Name="VCMIDLTool" 40 Name="VCMIDLTool"
41 /> 41 />
42 <Tool 42 <Tool
43 Name="VCCLCompilerTool" 43 Name="VCCLCompilerTool"
44 Optimization="0" 44 Optimization="0"
45 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 45 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" 46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
47 MinimalRebuild="true" 47 MinimalRebuild="true"
48 BasicRuntimeChecks="3" 48 BasicRuntimeChecks="3"
49 RuntimeLibrary="1" 49 RuntimeLibrary="1"
50 StructMemberAlignment="4" 50 StructMemberAlignment="4"
51 TreatWChar_tAsBuiltInType="false" 51 TreatWChar_tAsBuiltInType="false"
52 ForceConformanceInForLoopScope="true" 52 ForceConformanceInForLoopScope="true"
53 UsePrecompiledHeader="0" 53 UsePrecompiledHeader="0"
54 WarningLevel="3" 54 WarningLevel="3"
55 WarnAsError="true" 55 WarnAsError="true"
56 Detect64BitPortabilityProblems="false" 56 Detect64BitPortabilityProblems="false"
57 DebugInformationFormat="4" 57 DebugInformationFormat="4"
58 /> 58 />
59 <Tool 59 <Tool
60 Name="VCManagedResourceCompilerTool" 60 Name="VCManagedResourceCompilerTool"
61 /> 61 />
62 <Tool 62 <Tool
63 Name="VCResourceCompilerTool" 63 Name="VCResourceCompilerTool"
64 /> 64 />
65 <Tool 65 <Tool
66 Name="VCPreLinkEventTool" 66 Name="VCPreLinkEventTool"
67 /> 67 />
68 <Tool 68 <Tool
69 Name="VCLibrarianTool" 69 Name="VCLibrarianTool"
70 OutputFile="$(OutDir)/llxml.lib" 70 OutputFile="$(OutDir)/llxml.lib"
71 /> 71 />
72 <Tool 72 <Tool
73 Name="VCALinkTool" 73 Name="VCALinkTool"
74 /> 74 />
75 <Tool 75 <Tool
76 Name="VCXDCMakeTool" 76 Name="VCXDCMakeTool"
77 /> 77 />
78 <Tool 78 <Tool
79 Name="VCBscMakeTool" 79 Name="VCBscMakeTool"
80 /> 80 />
81 <Tool 81 <Tool
82 Name="VCFxCopTool" 82 Name="VCFxCopTool"
83 /> 83 />
84 <Tool 84 <Tool
85 Name="VCPostBuildEventTool" 85 Name="VCPostBuildEventTool"
86 /> 86 />
87 </Configuration> 87 </Configuration>
88 <Configuration 88 <Configuration
89 Name="Release|Win32" 89 Name="Release|Win32"
90 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 90 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
91 IntermediateDirectory="Release" 91 IntermediateDirectory="Release"
92 ConfigurationType="4" 92 ConfigurationType="4"
93 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 93 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
94 CharacterSet="1" 94 CharacterSet="1"
95 > 95 >
96 <Tool 96 <Tool
97 Name="VCPreBuildEventTool" 97 Name="VCPreBuildEventTool"
98 /> 98 />
99 <Tool 99 <Tool
100 Name="VCCustomBuildTool" 100 Name="VCCustomBuildTool"
101 /> 101 />
102 <Tool 102 <Tool
103 Name="VCXMLDataGeneratorTool" 103 Name="VCXMLDataGeneratorTool"
104 /> 104 />
105 <Tool 105 <Tool
106 Name="VCWebServiceProxyGeneratorTool" 106 Name="VCWebServiceProxyGeneratorTool"
107 /> 107 />
108 <Tool 108 <Tool
109 Name="VCMIDLTool" 109 Name="VCMIDLTool"
110 /> 110 />
111 <Tool 111 <Tool
112 Name="VCCLCompilerTool" 112 Name="VCCLCompilerTool"
113 AdditionalOptions="/Oy-" 113 AdditionalOptions="/Oy-"
114 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 114 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
115 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 115 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
116 RuntimeLibrary="0" 116 RuntimeLibrary="0"
117 StructMemberAlignment="0" 117 StructMemberAlignment="0"
118 TreatWChar_tAsBuiltInType="false" 118 TreatWChar_tAsBuiltInType="false"
119 ForceConformanceInForLoopScope="true" 119 ForceConformanceInForLoopScope="true"
120 UsePrecompiledHeader="0" 120 UsePrecompiledHeader="0"
121 WarningLevel="3" 121 WarningLevel="3"
122 WarnAsError="true" 122 WarnAsError="true"
123 Detect64BitPortabilityProblems="false" 123 Detect64BitPortabilityProblems="false"
124 DebugInformationFormat="3" 124 DebugInformationFormat="3"
125 /> 125 />
126 <Tool 126 <Tool
127 Name="VCManagedResourceCompilerTool" 127 Name="VCManagedResourceCompilerTool"
128 /> 128 />
129 <Tool 129 <Tool
130 Name="VCResourceCompilerTool" 130 Name="VCResourceCompilerTool"
131 /> 131 />
132 <Tool 132 <Tool
133 Name="VCPreLinkEventTool" 133 Name="VCPreLinkEventTool"
134 /> 134 />
135 <Tool 135 <Tool
136 Name="VCLibrarianTool" 136 Name="VCLibrarianTool"
137 OutputFile="$(OutDir)/llxml.lib" 137 OutputFile="$(OutDir)/llxml.lib"
138 /> 138 />
139 <Tool 139 <Tool
140 Name="VCALinkTool" 140 Name="VCALinkTool"
141 /> 141 />
142 <Tool 142 <Tool
143 Name="VCXDCMakeTool" 143 Name="VCXDCMakeTool"
144 /> 144 />
145 <Tool 145 <Tool
146 Name="VCBscMakeTool" 146 Name="VCBscMakeTool"
147 /> 147 />
148 <Tool 148 <Tool
149 Name="VCFxCopTool" 149 Name="VCFxCopTool"
150 /> 150 />
151 <Tool 151 <Tool
152 Name="VCPostBuildEventTool" 152 Name="VCPostBuildEventTool"
153 /> 153 />
154 </Configuration> 154 </Configuration>
155 <Configuration 155 <Configuration
156 Name="ReleaseNoOpt|Win32" 156 Name="ReleaseNoOpt|Win32"
157 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 157 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
158 IntermediateDirectory="$(ConfigurationName)" 158 IntermediateDirectory="$(ConfigurationName)"
159 ConfigurationType="4" 159 ConfigurationType="4"
160 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 160 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
161 CharacterSet="1" 161 CharacterSet="1"
162 > 162 >
163 <Tool 163 <Tool
164 Name="VCPreBuildEventTool" 164 Name="VCPreBuildEventTool"
165 /> 165 />
166 <Tool 166 <Tool
167 Name="VCCustomBuildTool" 167 Name="VCCustomBuildTool"
168 /> 168 />
169 <Tool 169 <Tool
170 Name="VCXMLDataGeneratorTool" 170 Name="VCXMLDataGeneratorTool"
171 /> 171 />
172 <Tool 172 <Tool
173 Name="VCWebServiceProxyGeneratorTool" 173 Name="VCWebServiceProxyGeneratorTool"
174 /> 174 />
175 <Tool 175 <Tool
176 Name="VCMIDLTool" 176 Name="VCMIDLTool"
177 /> 177 />
178 <Tool 178 <Tool
179 Name="VCCLCompilerTool" 179 Name="VCCLCompilerTool"
180 AdditionalOptions="/Oy-" 180 AdditionalOptions="/Oy-"
181 Optimization="0" 181 Optimization="0"
182 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\" 182 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\..\libraries\i686-win32\include;..\..\libraries\include\"
183 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 183 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
184 RuntimeLibrary="0" 184 RuntimeLibrary="0"
185 StructMemberAlignment="0" 185 StructMemberAlignment="0"
186 TreatWChar_tAsBuiltInType="false" 186 TreatWChar_tAsBuiltInType="false"
187 ForceConformanceInForLoopScope="true" 187 ForceConformanceInForLoopScope="true"
188 UsePrecompiledHeader="0" 188 UsePrecompiledHeader="0"
189 WarningLevel="3" 189 WarningLevel="3"
190 WarnAsError="true" 190 WarnAsError="true"
191 Detect64BitPortabilityProblems="false" 191 Detect64BitPortabilityProblems="false"
192 DebugInformationFormat="3" 192 DebugInformationFormat="3"
193 /> 193 />
194 <Tool 194 <Tool
195 Name="VCManagedResourceCompilerTool" 195 Name="VCManagedResourceCompilerTool"
196 /> 196 />
197 <Tool 197 <Tool
198 Name="VCResourceCompilerTool" 198 Name="VCResourceCompilerTool"
199 /> 199 />
200 <Tool 200 <Tool
201 Name="VCPreLinkEventTool" 201 Name="VCPreLinkEventTool"
202 /> 202 />
203 <Tool 203 <Tool
204 Name="VCLibrarianTool" 204 Name="VCLibrarianTool"
205 OutputFile="$(OutDir)/llxml.lib" 205 OutputFile="$(OutDir)/llxml.lib"
206 /> 206 />
207 <Tool 207 <Tool
208 Name="VCALinkTool" 208 Name="VCALinkTool"
209 /> 209 />
210 <Tool 210 <Tool
211 Name="VCXDCMakeTool" 211 Name="VCXDCMakeTool"
212 /> 212 />
213 <Tool 213 <Tool
214 Name="VCBscMakeTool" 214 Name="VCBscMakeTool"
215 /> 215 />
216 <Tool 216 <Tool
217 Name="VCFxCopTool" 217 Name="VCFxCopTool"
218 /> 218 />
219 <Tool 219 <Tool
220 Name="VCPostBuildEventTool" 220 Name="VCPostBuildEventTool"
221 /> 221 />
222 </Configuration> 222 </Configuration>
223 </Configurations> 223 </Configurations>
224 <References> 224 <References>
225 </References> 225 </References>
226 <Files> 226 <Files>
227 <Filter 227 <Filter
228 Name="Source Files" 228 Name="Source Files"
229 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" 229 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
230 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 230 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
231 > 231 >
232 <File 232 <File
233 RelativePath=".\llcontrol.cpp" 233 RelativePath=".\llcontrol.cpp"
234 > 234 >
235 </File> 235 </File>
236 <File 236 <File
237 RelativePath=".\llxmlnode.cpp" 237 RelativePath=".\llxmlnode.cpp"
238 > 238 >
239 </File> 239 </File>
240 <File 240 <File
241 RelativePath=".\llxmlparser.cpp" 241 RelativePath=".\llxmlparser.cpp"
242 > 242 >
243 </File> 243 </File>
244 <File 244 <File
245 RelativePath=".\llxmltree.cpp" 245 RelativePath=".\llxmltree.cpp"
246 > 246 >
247 </File> 247 </File>
248 </Filter> 248 </Filter>
249 <Filter 249 <Filter
250 Name="Header Files" 250 Name="Header Files"
251 Filter="h;hpp;hxx;hm;inl;inc;xsd" 251 Filter="h;hpp;hxx;hm;inl;inc;xsd"
252 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 252 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
253 > 253 >
254 <File 254 <File
255 RelativePath=".\llcontrol.h" 255 RelativePath=".\llcontrol.h"
256 > 256 >
257 </File> 257 </File>
258 <File 258 <File
259 RelativePath=".\llxmlnode.h" 259 RelativePath=".\llxmlnode.h"
260 > 260 >
261 </File> 261 </File>
262 <File 262 <File
263 RelativePath=".\llxmlparser.h" 263 RelativePath=".\llxmlparser.h"
264 > 264 >
265 </File> 265 </File>
266 <File 266 <File
267 RelativePath=".\llxmltree.h" 267 RelativePath=".\llxmltree.h"
268 > 268 >
269 </File> 269 </File>
270 </Filter> 270 </Filter>
271 <Filter 271 <Filter
272 Name="Resource Files" 272 Name="Resource Files"
273 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 273 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
274 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 274 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
275 > 275 >
276 </Filter> 276 </Filter>
277 </Files> 277 </Files>
278 <Globals> 278 <Globals>
279 </Globals> 279 </Globals>
280</VisualStudioProject> 280</VisualStudioProject>
diff --git a/linden/indra/llxml/llxmlnode.cpp b/linden/indra/llxml/llxmlnode.cpp
index 275b6c2..757e2f7 100644
--- a/linden/indra/llxml/llxmlnode.cpp
+++ b/linden/indra/llxml/llxmlnode.cpp
@@ -3024,80 +3024,65 @@ LLXMLNodePtr LLXMLNode::getNextSibling()
3024LLString LLXMLNode::getTextContents() const 3024LLString LLXMLNode::getTextContents() const
3025{ 3025{
3026 std::string msg; 3026 std::string msg;
3027 LLXMLNodeList p_children; 3027 LLString contents = mValue;
3028 getChildren("p", p_children); 3028 std::string::size_type n = contents.find_first_not_of(" \t\n");
3029 if (p_children.size() > 0) 3029 if (n != std::string::npos && contents[n] == '\"')
3030 { 3030 {
3031 // Case 1: node has <p>text</p> tags 3031 // Case 1: node has quoted text
3032 LLXMLNodeList::iterator itor; 3032 S32 num_lines = 0;
3033 for (itor = p_children.begin(); itor != p_children.end(); ++itor) 3033 while(1)
3034 { 3034 {
3035 LLXMLNodePtr p = itor->second; 3035 // mContents[n] == '"'
3036 msg += p->getValue() + "\n"; 3036 ++n;
3037 } 3037 std::string::size_type t = n;
3038 } 3038 std::string::size_type m = 0;
3039 else 3039 // fix-up escaped characters
3040 {
3041 LLString contents = mValue;
3042 std::string::size_type n = contents.find_first_not_of(" \t\n");
3043 if (n != std::string::npos && contents[n] == '\"')
3044 {
3045 // Case 2: node has quoted text
3046 S32 num_lines = 0;
3047 while(1) 3040 while(1)
3048 { 3041 {
3049 // mContents[n] == '"' 3042 m = contents.find_first_of("\\\"", t); // find first \ or "
3050 ++n; 3043 if ((m == std::string::npos) || (contents[m] == '\"'))
3051 std::string::size_type t = n;
3052 std::string::size_type m = 0;
3053 // fix-up escaped characters
3054 while(1)
3055 {
3056 m = contents.find_first_of("\\\"", t); // find first \ or "
3057 if ((m == std::string::npos) || (contents[m] == '\"'))
3058 {
3059 break;
3060 }
3061 contents.erase(m,1);
3062 t = m+1;
3063 }
3064 if (m == std::string::npos)
3065 { 3044 {
3066 break; 3045 break;
3067 } 3046 }
3068 // mContents[m] == '"' 3047 contents.erase(m,1);
3069 num_lines++; 3048 t = m+1;
3070 msg += contents.substr(n,m-n) + "\n"; 3049 }
3071 n = contents.find_first_of("\"", m+1); 3050 if (m == std::string::npos)
3072 if (n == std::string::npos) 3051 {
3052 break;
3053 }
3054 // mContents[m] == '"'
3055 num_lines++;
3056 msg += contents.substr(n,m-n) + "\n";
3057 n = contents.find_first_of("\"", m+1);
3058 if (n == std::string::npos)
3059 {
3060 if (num_lines == 1)
3073 { 3061 {
3074 if (num_lines == 1) 3062 msg.erase(msg.size()-1); // remove "\n" if only one line
3075 {
3076 msg.erase(msg.size()-1); // remove "\n" if only one line
3077 }
3078 break;
3079 } 3063 }
3064 break;
3080 } 3065 }
3081 } 3066 }
3082 else 3067 }
3068 else
3069 {
3070 // Case 2: node has embedded text (beginning and trailing whitespace trimmed)
3071 LLString::size_type start = mValue.find_first_not_of(" \t\n");
3072 if (start != mValue.npos)
3083 { 3073 {
3084 // Case 3: node has embedded text (beginning and trailing whitespace trimmed) 3074 LLString::size_type end = mValue.find_last_not_of(" \t\n");
3085 LLString::size_type start = mValue.find_first_not_of(" \t\n"); 3075 if (end != mValue.npos)
3086 if (start != mValue.npos)
3087 { 3076 {
3088 LLString::size_type end = mValue.find_last_not_of(" \t\n"); 3077 msg = mValue.substr(start, end+1-start);
3089 if (end != mValue.npos) 3078 }
3090 { 3079 else
3091 msg = mValue.substr(start, end+1-start); 3080 {
3092 } 3081 msg = mValue.substr(start);
3093 else
3094 {
3095 msg = mValue.substr(start);
3096 }
3097 } 3082 }
3098 // Convert any internal CR to LF
3099 msg = utf8str_removeCRLF(msg);
3100 } 3083 }
3084 // Convert any internal CR to LF
3085 msg = utf8str_removeCRLF(msg);
3101 } 3086 }
3102 return msg; 3087 return msg;
3103} 3088}