Commit 9a312540 authored by jan.koester's avatar jan.koester
Browse files

remove deprecated function

parent b4239094
Loading
Loading
Loading
Loading
+4 −14
Changes for src/html.cpp: 4 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -492,6 +492,7 @@ void libhtmlpp::HtmlElement::appendChild(libhtmlpp::Element* el){
            curel=new HtmlElement;
        else if(el->getType()==TextEl)
            curel=new TextElement;
        if(prev)
            prev->_nextElement=curel;
        _copy(prev,curel,el);
    }else{
@@ -750,17 +751,6 @@ void libhtmlpp::print(Element* el, HtmlElement* parent,std::string& output) {
    }
}

libhtmlpp::HtmlElement * libhtmlpp::getRootNode(libhtmlpp::Element* el){
    for(Element *curel=el; curel; curel=curel->nextElement()){
        if(curel->getType()==HtmlEl){
            if(strcmp(((libhtmlpp::HtmlElement*)curel)->getTagname(),"html")==0){
                return (libhtmlpp::HtmlElement*)curel;
            }
        }
    }
    return nullptr;
}

libhtmlpp::HtmlElement *libhtmlpp::HtmlElement::getElementbyID(const char *id) const{
    for(const Element *curel=this; curel; curel=curel->nextElement()){
        if(curel->getType()==HtmlEl){
@@ -892,17 +882,17 @@ libhtmlpp::HtmlTable::Row & libhtmlpp::HtmlTable::operator[](size_t pos){
void libhtmlpp::HtmlTable::insert(libhtmlpp::HtmlElement* element){
    element->setTagname("table");
    for(Row *crow=_firstRow; crow; crow=crow->_nextRow){
        HtmlElement *hrow= new HtmlElement("tr");
        HtmlElement hrow("tr");

        for(Column *ccol=crow->_firstColumn; ccol; ccol=ccol->_nextColumn ){
            HtmlString buf;
            buf << "<td>";
            buf+=ccol->Data;
            buf << "</td>";
            hrow->appendChild(buf.parse());
            hrow.appendChild(buf.parse());
        }

        element->appendChild(hrow);
        element->appendChild(&hrow);
    }
}

+0 −2
Changes for src/html.h: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -144,8 +144,6 @@ namespace libhtmlpp {

    void print(Element* el, HtmlElement* parent,std::string &output);

    HtmlElement *getRootNode(Element* el);

    class HtmlString {
    public:
        HtmlString();