|
|
@ -2181,8 +2181,9 @@ namespace NLGUI
|
|
|
|
sint32 indent = LIIndent;
|
|
|
|
sint32 indent = LIIndent;
|
|
|
|
// list-style-type: outside
|
|
|
|
// list-style-type: outside
|
|
|
|
if (_CurrentViewLink)
|
|
|
|
if (_CurrentViewLink)
|
|
|
|
indent -= _CurrentViewLink->getMaxUsedW();
|
|
|
|
{
|
|
|
|
getParagraph()->setFirstViewIndent(indent);
|
|
|
|
getParagraph()->setFirstViewIndent(-_CurrentViewLink->getMaxUsedW());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flushString ();
|
|
|
|
flushString ();
|
|
|
|
|
|
|
|
|
|
|
@ -2238,8 +2239,7 @@ namespace NLGUI
|
|
|
|
if (present[MY_HTML_TABLE_CELLPADDING] && value[MY_HTML_TABLE_CELLPADDING])
|
|
|
|
if (present[MY_HTML_TABLE_CELLPADDING] && value[MY_HTML_TABLE_CELLPADDING])
|
|
|
|
fromString(value[MY_HTML_TABLE_CELLPADDING], table->CellPadding);
|
|
|
|
fromString(value[MY_HTML_TABLE_CELLPADDING], table->CellPadding);
|
|
|
|
|
|
|
|
|
|
|
|
// Table must fit the container size
|
|
|
|
table->setMarginLeft(getIndent());
|
|
|
|
|
|
|
|
|
|
|
|
addHtmlGroup (table, 0);
|
|
|
|
addHtmlGroup (table, 0);
|
|
|
|
|
|
|
|
|
|
|
|
_Tables.push_back(table);
|
|
|
|
_Tables.push_back(table);
|
|
|
@ -2247,6 +2247,7 @@ namespace NLGUI
|
|
|
|
// Add a cell pointer
|
|
|
|
// Add a cell pointer
|
|
|
|
_Cells.push_back(NULL);
|
|
|
|
_Cells.push_back(NULL);
|
|
|
|
_TR.push_back(false);
|
|
|
|
_TR.push_back(false);
|
|
|
|
|
|
|
|
_Indent.push_back(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case HTML_TH:
|
|
|
|
case HTML_TH:
|
|
|
@ -2328,7 +2329,12 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
|
|
_Cells.back()->NewLine = getTR();
|
|
|
|
_Cells.back()->NewLine = getTR();
|
|
|
|
table->addChild (_Cells.back());
|
|
|
|
table->addChild (_Cells.back());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// reusing indent pushed by table
|
|
|
|
|
|
|
|
_Indent.back() = 0;
|
|
|
|
|
|
|
|
|
|
|
|
newParagraph(TDBeginSpace);
|
|
|
|
newParagraph(TDBeginSpace);
|
|
|
|
|
|
|
|
// indent is already 0, getParagraph()->setMarginLeft(0); // maybe setIndent(0) if LI is using one
|
|
|
|
|
|
|
|
|
|
|
|
// Reset TR flag
|
|
|
|
// Reset TR flag
|
|
|
|
if (!_TR.empty())
|
|
|
|
if (!_TR.empty())
|
|
|
@ -2418,7 +2424,7 @@ namespace NLGUI
|
|
|
|
_UL.push_back(HTMLOListElement(1, "square"));
|
|
|
|
_UL.push_back(HTMLOListElement(1, "square"));
|
|
|
|
// if LI is already present
|
|
|
|
// if LI is already present
|
|
|
|
_LI = _UL.size() > 1 || _DL.size() > 1;
|
|
|
|
_LI = _UL.size() > 1 || _DL.size() > 1;
|
|
|
|
_Indent += ULIndent;
|
|
|
|
_Indent.push_back(getIndent() + ULIndent);
|
|
|
|
endParagraph();
|
|
|
|
endParagraph();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case HTML_OBJECT:
|
|
|
|
case HTML_OBJECT:
|
|
|
@ -2489,6 +2495,13 @@ namespace NLGUI
|
|
|
|
case HTML_DT:
|
|
|
|
case HTML_DT:
|
|
|
|
if (!_DL.empty())
|
|
|
|
if (!_DL.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// close DT if still open
|
|
|
|
|
|
|
|
if (_DL.back().DD)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_DL.back().DD = false;
|
|
|
|
|
|
|
|
popIfNotEmpty(_Indent);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// see if this is the first <dt>, closing tag not required
|
|
|
|
// see if this is the first <dt>, closing tag not required
|
|
|
|
if (!_DL.back().DT)
|
|
|
|
if (!_DL.back().DT)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2519,8 +2532,8 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
|
|
if (!_DL.back().DD)
|
|
|
|
if (!_DL.back().DD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_Indent += ULIndent;
|
|
|
|
|
|
|
|
_DL.back().DD = true;
|
|
|
|
_DL.back().DD = true;
|
|
|
|
|
|
|
|
_Indent.push_back(getIndent() + ULIndent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!_LI)
|
|
|
|
if (!_LI)
|
|
|
@ -2547,7 +2560,7 @@ namespace NLGUI
|
|
|
|
_UL.push_back(HTMLOListElement(start, type));
|
|
|
|
_UL.push_back(HTMLOListElement(start, type));
|
|
|
|
// if LI is already present
|
|
|
|
// if LI is already present
|
|
|
|
_LI = _UL.size() > 1 || _DL.size() > 1;
|
|
|
|
_LI = _UL.size() > 1 || _DL.size() > 1;
|
|
|
|
_Indent += ULIndent;
|
|
|
|
_Indent.push_back(getIndent() + ULIndent);
|
|
|
|
endParagraph();
|
|
|
|
endParagraph();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2659,6 +2672,7 @@ namespace NLGUI
|
|
|
|
popIfNotEmpty (_TR);
|
|
|
|
popIfNotEmpty (_TR);
|
|
|
|
popIfNotEmpty (_Cells);
|
|
|
|
popIfNotEmpty (_Cells);
|
|
|
|
popIfNotEmpty (_Tables);
|
|
|
|
popIfNotEmpty (_Tables);
|
|
|
|
|
|
|
|
popIfNotEmpty (_Indent);
|
|
|
|
endParagraph();
|
|
|
|
endParagraph();
|
|
|
|
// Add a cell
|
|
|
|
// Add a cell
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2801,13 +2815,9 @@ namespace NLGUI
|
|
|
|
case HTML_UL:
|
|
|
|
case HTML_UL:
|
|
|
|
if (!_UL.empty())
|
|
|
|
if (!_UL.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_Indent > ULIndent)
|
|
|
|
|
|
|
|
_Indent = _Indent - ULIndent;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_Indent = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endParagraph();
|
|
|
|
endParagraph();
|
|
|
|
popIfNotEmpty(_UL);
|
|
|
|
popIfNotEmpty(_UL);
|
|
|
|
|
|
|
|
popIfNotEmpty(_Indent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case HTML_DL:
|
|
|
|
case HTML_DL:
|
|
|
@ -2824,10 +2834,7 @@ namespace NLGUI
|
|
|
|
// unclosed DD
|
|
|
|
// unclosed DD
|
|
|
|
if (_DL.back().DD)
|
|
|
|
if (_DL.back().DD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_Indent > ULIndent)
|
|
|
|
popIfNotEmpty(_Indent);
|
|
|
|
_Indent = _Indent - ULIndent;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_Indent = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
popIfNotEmpty (_DL);
|
|
|
|
popIfNotEmpty (_DL);
|
|
|
@ -2846,12 +2853,8 @@ namespace NLGUI
|
|
|
|
// parser will process two DD in a row as nested when first DD is not closed
|
|
|
|
// parser will process two DD in a row as nested when first DD is not closed
|
|
|
|
if (_DL.back().DD)
|
|
|
|
if (_DL.back().DD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_Indent > ULIndent)
|
|
|
|
|
|
|
|
_Indent = _Indent - ULIndent;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_Indent = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_DL.back().DD = false;
|
|
|
|
_DL.back().DD = false;
|
|
|
|
|
|
|
|
popIfNotEmpty(_Indent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2964,7 +2967,7 @@ namespace NLGUI
|
|
|
|
_Connecting = false;
|
|
|
|
_Connecting = false;
|
|
|
|
_CurrentViewLink = NULL;
|
|
|
|
_CurrentViewLink = NULL;
|
|
|
|
_CurrentViewImage = NULL;
|
|
|
|
_CurrentViewImage = NULL;
|
|
|
|
_Indent = 0;
|
|
|
|
_Indent.clear();
|
|
|
|
_LI = false;
|
|
|
|
_LI = false;
|
|
|
|
_SelectOption = false;
|
|
|
|
_SelectOption = false;
|
|
|
|
_GroupListAdaptor = NULL;
|
|
|
|
_GroupListAdaptor = NULL;
|
|
|
@ -4033,7 +4036,7 @@ namespace NLGUI
|
|
|
|
CGroupParagraph *newParagraph = new CGroupParagraph(CViewBase::TCtorParam());
|
|
|
|
CGroupParagraph *newParagraph = new CGroupParagraph(CViewBase::TCtorParam());
|
|
|
|
newParagraph->setResizeFromChildH(true);
|
|
|
|
newParagraph->setResizeFromChildH(true);
|
|
|
|
|
|
|
|
|
|
|
|
newParagraph->setIndent(_Indent);
|
|
|
|
newParagraph->setMarginLeft(getIndent());
|
|
|
|
|
|
|
|
|
|
|
|
// Add to the group
|
|
|
|
// Add to the group
|
|
|
|
addHtmlGroup (newParagraph, beginSpace);
|
|
|
|
addHtmlGroup (newParagraph, beginSpace);
|
|
|
@ -4767,7 +4770,7 @@ namespace NLGUI
|
|
|
|
_FontOblique.clear();
|
|
|
|
_FontOblique.clear();
|
|
|
|
_FontUnderlined.clear();
|
|
|
|
_FontUnderlined.clear();
|
|
|
|
_FontStrikeThrough.clear();
|
|
|
|
_FontStrikeThrough.clear();
|
|
|
|
_Indent = 0;
|
|
|
|
_Indent.clear();
|
|
|
|
_LI = false;
|
|
|
|
_LI = false;
|
|
|
|
_UL.clear();
|
|
|
|
_UL.clear();
|
|
|
|
_DL.clear();
|
|
|
|
_DL.clear();
|
|
|
|