void OpenOfficeAction::_setDefaultLanguage()
{
	XmlParser parser;
	wstring file;
	bool bRslt;

	_getPreferencesFile(file);
	if (parser.Load(file) == false)
	{
		g_log.Log(L"OpenOfficeAction::_setDefaultLanguage. Could not open '%s'", (wchar_t *) file.c_str());
		return;
	}

	/*
		XML fragment to generate

		<item oor:path="/org.openoffice.Office.Linguistic/General">
			<prop oor:name="UILocale" oor:op="fuse">
				<value>DEFAULT_LANGUAGE</value>
			</prop>
		</item>
	*/

	XmlNode item(parser.getDocument()), prop(parser.getDocument()), value(parser.getDocument());
	value.SetName(wstring(L"value"));
	value.SetText(wstring(DEFAULT_LANGUAGE));
	
	prop.SetName(wstring(L"prop"));
	prop.AddAttribute(XmlAttribute(L"oor:name", L"UILocale"));
	prop.AddAttribute(XmlAttribute(L"oor:op", L"fuse"));
	prop.AddChildren(value);

	item.SetName(wstring(L"item"));
	item.AddAttribute(XmlAttribute(L"oor:path", L"/org.openoffice.Office.Linguistic/General"));	
	item.AddChildren(prop);

	parser.AppendNode(item);
	bRslt = parser.Save(file);

	g_log.Log(L"OpenOfficeAction::_setDefaultLanguage. Saved file '%s', result %u", (wchar_t *)file.c_str(), (wchar_t *) bRslt);
}