|
|
@ -223,7 +223,7 @@ bool CGroupHTML::addBnpDownload(const string &url, const string &action, const s
|
|
|
|
#ifdef LOG_DL
|
|
|
|
#ifdef LOG_DL
|
|
|
|
nlwarning("add to download '%s' dest '%s'", url.c_str(), dest.c_str());
|
|
|
|
nlwarning("add to download '%s' dest '%s'", url.c_str(), dest.c_str());
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// erase the tmp file if exists
|
|
|
|
// erase the tmp file if exists
|
|
|
|
if (NLMISC::CFile::fileExists(tmpdest))
|
|
|
|
if (NLMISC::CFile::fileExists(tmpdest))
|
|
|
|
NLMISC::CFile::deleteFile(tmpdest);
|
|
|
|
NLMISC::CFile::deleteFile(tmpdest);
|
|
|
@ -622,7 +622,7 @@ void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTCh
|
|
|
|
_LinkTitle.push_back("");
|
|
|
|
_LinkTitle.push_back("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -948,7 +948,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|
|
|
|
|
|
|
|
|
|
|
typedef pair<string, string> TTmplParam;
|
|
|
|
typedef pair<string, string> TTmplParam;
|
|
|
|
vector<TTmplParam> tmplParams;
|
|
|
|
vector<TTmplParam> tmplParams;
|
|
|
|
|
|
|
|
|
|
|
|
string templateName;
|
|
|
|
string templateName;
|
|
|
|
if (!style.empty())
|
|
|
|
if (!style.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1044,12 +1044,12 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|
|
|
CRGBA bgColor = getColor (value[HTML_BODY_BGCOLOR]);
|
|
|
|
CRGBA bgColor = getColor (value[HTML_BODY_BGCOLOR]);
|
|
|
|
setBackgroundColor (bgColor);
|
|
|
|
setBackgroundColor (bgColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string style;
|
|
|
|
string style;
|
|
|
|
if (present[HTML_BODY_STYLE] && value[HTML_BODY_STYLE])
|
|
|
|
if (present[HTML_BODY_STYLE] && value[HTML_BODY_STYLE])
|
|
|
|
style = value[HTML_BODY_STYLE];
|
|
|
|
style = value[HTML_BODY_STYLE];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!style.empty())
|
|
|
|
if (!style.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TStyle styles = parseStyle(style);
|
|
|
|
TStyle styles = parseStyle(style);
|
|
|
@ -1057,7 +1057,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|
|
|
|
|
|
|
|
|
|
|
it = styles.find("background-repeat");
|
|
|
|
it = styles.find("background-repeat");
|
|
|
|
bool repeat = (it != styles.end() && it->second == "1");
|
|
|
|
bool repeat = (it != styles.end() && it->second == "1");
|
|
|
|
|
|
|
|
|
|
|
|
// Webig only
|
|
|
|
// Webig only
|
|
|
|
it = styles.find("background-scale");
|
|
|
|
it = styles.find("background-scale");
|
|
|
|
bool scale = (it != styles.end() && it->second == "1");
|
|
|
|
bool scale = (it != styles.end() && it->second == "1");
|
|
|
@ -1187,7 +1187,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|
|
|
if (it != styles.end() && (*it).second == "1")
|
|
|
|
if (it != styles.end() && (*it).second == "1")
|
|
|
|
reloadImg = true;
|
|
|
|
reloadImg = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
addImage (value[MY_HTML_IMG_SRC], globalColor, reloadImg);
|
|
|
|
addImage (value[MY_HTML_IMG_SRC], globalColor, reloadImg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1838,6 +1838,7 @@ CGroupHTML::CGroupHTML(const TCtorParam ¶m)
|
|
|
|
_GroupHtmlByUID[_GroupHtmlUID]= this;
|
|
|
|
_GroupHtmlByUID[_GroupHtmlUID]= this;
|
|
|
|
|
|
|
|
|
|
|
|
// init
|
|
|
|
// init
|
|
|
|
|
|
|
|
_TrustedDomain = false;
|
|
|
|
_ParsingLua = false;
|
|
|
|
_ParsingLua = false;
|
|
|
|
_IgnoreText = false;
|
|
|
|
_IgnoreText = false;
|
|
|
|
_BrowseNextTime = false;
|
|
|
|
_BrowseNextTime = false;
|
|
|
@ -2469,7 +2470,7 @@ void CGroupHTML::addString(const ucstring &str)
|
|
|
|
getParagraph()->addChild (buttonGroup);
|
|
|
|
getParagraph()->addChild (buttonGroup);
|
|
|
|
paragraphChange ();
|
|
|
|
paragraphChange ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3706,14 +3707,14 @@ int CGroupHTML::luaRemoveContent(CLuaState &ls)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
int CGroupHTML::luaInsertText(CLuaState &ls)
|
|
|
|
int CGroupHTML::luaInsertText(CLuaState &ls)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const char *funcName = "insertText";
|
|
|
|
const char *funcName = "insertText";
|
|
|
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
|
|
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TBOOLEAN);
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TBOOLEAN);
|
|
|
|
|
|
|
|
|
|
|
|
string name = ls.toString(1);
|
|
|
|
string name = ls.toString(1);
|
|
|
|
|
|
|
|
|
|
|
|
ucstring text;
|
|
|
|
ucstring text;
|
|
|
|