MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / fixObjectNode

Method fixObjectNode

html/enmlformatter.cpp:473–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471
472
473void EnmlFormatter::fixObjectNode(QWebElement &e) {
474 QString type = e.attribute("type", "");
475 if (type == "application/pdf") {
476 qint32 lid = e.attribute("lid", "0").toInt();
477 e.removeAttribute("width");
478 e.removeAttribute("height");
479 e.removeAttribute("lid");
480 e.removeAttribute("border");
481 if (lid>0) {
482 resources.append(lid);
483 e.setOuterXml(e.toOuterXml().replace("<object", "<en-media").replace("</object", "</en-media"));
484 }
485 removeInvalidAttributes(e);
486 } else {
487 e.removeFromDocument();
488 }
489}
490
491
492

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected