If we have an ink note, then we need to pull the image and display it */
| 746 | |
| 747 | /* If we have an ink note, then we need to pull the image and display it */ |
| 748 | bool NoteFormatter::buildInkNote(QWebElement &docElem, QString &hash) { |
| 749 | QLOG_TRACE_IN(); |
| 750 | |
| 751 | ResourceTable resTable(global.db); |
| 752 | qint32 resLid = resTable.getLidByHashHex(note.guid, hash); |
| 753 | if (resLid <= 0) |
| 754 | return false; |
| 755 | docElem.setAttribute("en-tag", "en-media"); |
| 756 | docElem.setAttribute("lid", QString::number(resLid)); |
| 757 | docElem.setAttribute("type", "application/vnd.evernote.ink"); |
| 758 | QString filename = QString("file:///") +global.fileManager.getDbaDirPath()+QString::number(resLid)+QString(".png"); |
| 759 | docElem.setAttribute("src", filename); |
| 760 | QString k = docElem.toOuterXml(); |
| 761 | k.replace("<en-media", "<img"); |
| 762 | k.replace("enmedia>", "img>");; |
| 763 | docElem.setOuterXml(k); |
| 764 | |
| 765 | QLOG_TRACE_OUT(); |
| 766 | return true; |
| 767 | } |
| 768 | |
| 769 | |
| 770 |
nothing calls this directly
no test coverage detected