diff options
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index d86b5fc..7d326cb 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -60,121 +60,6 @@ static const char *getSectionName(int level) return secLabels[QMIN(maxLevels-1,l)]; } -#if 0 -static int rowspan(DocHtmlCell *cell) -{ - int retval = 0; - HtmlAttribList attrs = cell->attribs(); - uint i; - for (i=0; i<attrs.count(); ++i) - { - if (attrs.at(i)->name.lower()=="rowspan") - { - retval = attrs.at(i)->value.toInt(); - break; - } - } - return retval; -} - -static int colspan(DocHtmlCell *cell) -{ - int retval = 1; - HtmlAttribList attrs = cell->attribs(); - uint i; - for (i=0; i<attrs.count(); ++i) - { - if (attrs.at(i)->name.lower()=="colspan") - { - retval = QMAX(1,attrs.at(i)->value.toInt()); - break; - } - } - return retval; -} - -static int align(DocHtmlCell *cell) -{ - HtmlAttribList attrs = cell->attribs(); - uint i; - for (i=0; i<attrs.count(); ++i) - { - if (attrs.at(i)->name.lower()=="align") - { - if (attrs.at(i)->value.lower()=="center") - return 1; - else if (attrs.at(i)->value.lower()=="right") - return 2; - else return 0; - } - } - return 0; -} - -struct ActiveRowSpan -{ - ActiveRowSpan(int rows,int col) : rowsLeft(rows), column(col) {} - int rowsLeft; - int column; -}; - -typedef QList<ActiveRowSpan> RowSpanList; - -static int determineNumCols(DocHtmlTable *table) -{ - RowSpanList rowSpans; - rowSpans.setAutoDelete(TRUE); - int maxCols=0; - int rowIdx=1; - QListIterator<DocNode> li(table->children()); - DocNode *rowNode; - for (li.toFirst();(rowNode=li.current());++li) - { - int colIdx=1; - int cells=0; - if (rowNode->kind()==DocNode::Kind_HtmlRow) - { - uint i; - DocHtmlRow *row = (DocHtmlRow*)rowNode; - QListIterator<DocNode> rli(row->children()); - DocNode *cellNode; - for (rli.toFirst();(cellNode=rli.current());++rli) - { - if (cellNode->kind()==DocNode::Kind_HtmlCell) - { - DocHtmlCell *cell = (DocHtmlCell*)cellNode; - int rs = rowspan(cell); - int cs = colspan(cell); - - for (i=0;i<rowSpans.count();i++) - { - if (rowSpans.at(i)->rowsLeft>0 && - rowSpans.at(i)->column==colIdx) - { - colIdx=rowSpans.at(i)->column+1; - cells++; - } - } - if (rs>0) rowSpans.append(new ActiveRowSpan(rs,colIdx)); - cell->setRowIndex(rowIdx); - cell->setColumnIndex(colIdx); - colIdx+=cs; - cells++; - } - } - for (i=0;i<rowSpans.count();i++) - { - if (rowSpans.at(i)->rowsLeft>0) rowSpans.at(i)->rowsLeft--; - } - row->setVisibleCells(cells); - rowIdx++; - } - if (colIdx-1>maxCols) maxCols=colIdx-1; - } - return maxCols; -} -#endif - QCString LatexDocVisitor::escapeMakeIndexChars(const char *s) { QCString result; @@ -1363,25 +1248,6 @@ void LatexDocVisitor::visitPost(DocSecRefList *) m_t << "\\normalsize" << endl; } -//void LatexDocVisitor::visitPre(DocLanguage *l) -//{ -// QCString langId = Config_getEnum("OUTPUT_LANGUAGE"); -// if (l->id().lower()!=langId.lower()) -// { -// pushEnabled(); -// m_hide = TRUE; -// } -//} -// -//void LatexDocVisitor::visitPost(DocLanguage *l) -//{ -// QCString langId = Config_getEnum("OUTPUT_LANGUAGE"); -// if (l->id().lower()!=langId.lower()) -// { -// popEnabled(); -// } -//} - void LatexDocVisitor::visitPre(DocParamSect *s) { if (m_hide) return; |