Subversion Repositories spk

Rev

Rev 281 | Rev 300 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 281 Rev 285
Line 5715... Line 5715...
5715
	Utils::WString newStr(str);
5715
	Utils::WString newStr(str);
5716
	Utils::WStringList changes;
5716
	Utils::WStringList changes;
5717
 
5717
 
5718
	// find all XML commands, &<command>;
5718
	// find all XML commands, &<command>;
5719
	Utils::WString sStr = str;
5719
	Utils::WString sStr = str;
5720
	Utils::WString::size_type pos = sStr.find_first_of(L"&", 0);
5720
	std::wstring::size_type pos = sStr.toStdWString().find_first_of(L"&", 0);
5721
	while ( pos != Utils::WString::npos ) {
5721
	while ( pos != std::wstring::npos ) {
5722
		// find the next space and next ;.  If ; comes first, assume its acommand
5722
		// find the next space and next ;.  If ; comes first, assume its acommand
5723
		Utils::WString::size_type spacePos = sStr.find_first_of(L" ", pos);
5723
		std::wstring::size_type spacePos = sStr.toStdWString().find_first_of(L" ", pos);
5724
		Utils::WString::size_type colonPos = sStr.find_first_of(L";", pos);
5724
		std::wstring::size_type colonPos = sStr.toStdWString().find_first_of(L";", pos);
5725
		if ( colonPos != Utils::WString::npos && colonPos < spacePos ) {
5725
		if ( colonPos != std::wstring::npos && colonPos < spacePos ) {
5726
			// replace with <::command::> so they the & doesn't get replaced
5726
			// replace with <::command::> so they the & doesn't get replaced
5727
			Utils::WString repStr = sStr.substr(pos, (colonPos + 1) - pos);
5727
			Utils::WString repStr = sStr.substr(pos, (colonPos + 1) - pos);
5728
			Utils::WString repWithStr = L"<::" + sStr.substr(pos + 1, colonPos - pos - 1) + L"::>";
5728
			Utils::WString repWithStr = L"<::" + sStr.substr(pos + 1, colonPos - pos - 1) + L"::>";
5729
			newStr = newStr.findReplace(repStr, repWithStr);
5729
			newStr = newStr.findReplace(repStr, repWithStr);
5730
			changes.pushBack(repStr, repWithStr);
5730
			changes.pushBack(repStr, repWithStr);
5731
		}
5731
		}
5732
 
5732
 
5733
		// find the next command
5733
		// find the next command
5734
		pos = sStr.find_first_of(L"&", pos + 1);
5734
		pos = sStr.toStdWString().find_first_of(L"&", pos + 1);
5735
	}
5735
	}
5736
 
5736
 
5737
	// replace the & now
5737
	// replace the & now
5738
	newStr = newStr.findReplace(L"&", L"&amp;");
5738
	newStr = newStr.findReplace(L"&", L"&amp;");
5739
 
5739
 
Line 9383... Line 9383...
9383
			{
9383
			{
9384
				checkType = first.right(-6);
9384
				checkType = first.right(-6);
9385
				shared = true;
9385
				shared = true;
9386
			}
9386
			}
9387
			bool packed = false;
9387
			bool packed = false;
9388
			if (checkType.right(3).compare(L"PCK"))
9388
			if (checkType.right(3).toStdWString().compare(L"PCK"))
9389
			{
9389
			{
9390
				checkType = checkType.left(-3);
9390
				checkType = checkType.left(-3);
9391
				packed = true;
9391
				packed = true;
9392
			}
9392
			}
9393
 
9393