|
|
|
@ -1709,9 +1709,9 @@ namespace NLGUI
|
|
|
|
|
_SelectOption = true;
|
|
|
|
|
break;
|
|
|
|
|
case HTML_LI:
|
|
|
|
|
if (getUL())
|
|
|
|
|
if (!_UL.empty())
|
|
|
|
|
{
|
|
|
|
|
// First LI ?
|
|
|
|
|
// UL, OL top margin if this is the first LI
|
|
|
|
|
if (!_LI)
|
|
|
|
|
{
|
|
|
|
|
_LI = true;
|
|
|
|
@ -1721,35 +1721,18 @@ namespace NLGUI
|
|
|
|
|
{
|
|
|
|
|
newParagraph(LIBeginSpace);
|
|
|
|
|
}
|
|
|
|
|
ucstring str;
|
|
|
|
|
str += (ucchar)0x2219;
|
|
|
|
|
str += (ucchar)' ';
|
|
|
|
|
addString (str);
|
|
|
|
|
flushString ();
|
|
|
|
|
getParagraph()->setFirstViewIndent(LIIndent);
|
|
|
|
|
}
|
|
|
|
|
else if (!_OL.empty())
|
|
|
|
|
{
|
|
|
|
|
if (_OL.back().First)
|
|
|
|
|
{
|
|
|
|
|
_OL.back().First = false;
|
|
|
|
|
newParagraph(ULBeginSpace);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
newParagraph(LIBeginSpace);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OL list index can be overridden by <li value="1"> attribute
|
|
|
|
|
if (present[HTML_LI_VALUE] && value[HTML_LI_VALUE])
|
|
|
|
|
fromString(value[HTML_LI_VALUE], _OL.back().Value);
|
|
|
|
|
fromString(value[HTML_LI_VALUE], _UL.back().Value);
|
|
|
|
|
|
|
|
|
|
ucstring str;
|
|
|
|
|
str.fromUtf8(_OL.back().getListMarkerText() + ". ");
|
|
|
|
|
addString(str);
|
|
|
|
|
flushString();
|
|
|
|
|
str.fromUtf8(_UL.back().getListMarkerText());
|
|
|
|
|
addString (str);
|
|
|
|
|
flushString ();
|
|
|
|
|
getParagraph()->setFirstViewIndent(LIIndent);
|
|
|
|
|
_OL.back().Value++;
|
|
|
|
|
|
|
|
|
|
_UL.back().Value++;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_P:
|
|
|
|
@ -1934,10 +1917,11 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_UL:
|
|
|
|
|
_UL.push_back(HTMLOListElement(1, "disc"));
|
|
|
|
|
// if LI is already present
|
|
|
|
|
_LI = _UL.size() > 1;
|
|
|
|
|
_Indent += ULIndent;
|
|
|
|
|
_LI = false;
|
|
|
|
|
endParagraph();
|
|
|
|
|
_UL.push_back(true);
|
|
|
|
|
break;
|
|
|
|
|
case HTML_OBJECT:
|
|
|
|
|
_ObjectType = "";
|
|
|
|
@ -2044,7 +2028,9 @@ namespace NLGUI
|
|
|
|
|
if (present[HTML_OL_TYPE] && value[HTML_OL_TYPE])
|
|
|
|
|
type = value[HTML_OL_TYPE];
|
|
|
|
|
|
|
|
|
|
_OL.push_back(HTMLOListElement(start, type));
|
|
|
|
|
_UL.push_back(HTMLOListElement(start, type));
|
|
|
|
|
// if LI is already present
|
|
|
|
|
_LI = _UL.size() > 1;
|
|
|
|
|
_Indent += ULIndent;
|
|
|
|
|
endParagraph();
|
|
|
|
|
}
|
|
|
|
@ -2218,21 +2204,16 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_OL:
|
|
|
|
|
if (!_OL.empty())
|
|
|
|
|
{
|
|
|
|
|
_Indent -= ULIndent;
|
|
|
|
|
_Indent = std::max(_Indent, (uint)0);
|
|
|
|
|
endParagraph();
|
|
|
|
|
popIfNotEmpty(_OL);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_UL:
|
|
|
|
|
if (getUL())
|
|
|
|
|
if (!_UL.empty())
|
|
|
|
|
{
|
|
|
|
|
_Indent -= ULIndent;
|
|
|
|
|
_Indent = std::max(_Indent, (uint)0);
|
|
|
|
|
if (_Indent > ULIndent)
|
|
|
|
|
_Indent = _Indent - ULIndent;
|
|
|
|
|
else
|
|
|
|
|
_Indent = 0;
|
|
|
|
|
|
|
|
|
|
endParagraph();
|
|
|
|
|
popIfNotEmpty (_UL);
|
|
|
|
|
popIfNotEmpty(_UL);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_DL:
|
|
|
|
@ -4050,7 +4031,6 @@ namespace NLGUI
|
|
|
|
|
_DT = false;
|
|
|
|
|
_UL.clear();
|
|
|
|
|
_DL.clear();
|
|
|
|
|
_OL.clear();
|
|
|
|
|
_A.clear();
|
|
|
|
|
_Link.clear();
|
|
|
|
|
_LinkTitle.clear();
|
|
|
|
@ -5527,7 +5507,12 @@ namespace NLGUI
|
|
|
|
|
sint32 number = Value;
|
|
|
|
|
bool upper = false;
|
|
|
|
|
|
|
|
|
|
if (Type == "a" || Type == "A")
|
|
|
|
|
if (Type == "disc")
|
|
|
|
|
{
|
|
|
|
|
// (ucchar)0x2219;
|
|
|
|
|
ret = "\xe2\x88\x99 ";
|
|
|
|
|
}
|
|
|
|
|
else if (Type == "a" || Type == "A")
|
|
|
|
|
{
|
|
|
|
|
// @see toAlphabeticOrNumeric in WebKit
|
|
|
|
|
static const char lower[26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
|
|
|
|
@ -5549,6 +5534,7 @@ namespace NLGUI
|
|
|
|
|
number /= size;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ret += ". ";
|
|
|
|
|
}
|
|
|
|
|
else if (Type == "i" || Type == "I")
|
|
|
|
|
{
|
|
|
|
@ -5592,10 +5578,11 @@ namespace NLGUI
|
|
|
|
|
ret = toUpper(ret);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ret += ". ";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ret = toString(Value);
|
|
|
|
|
ret = toString(Value) + ". ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|