bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName) { fillTagTable(); myPathPrefix = MiscUtil::htmlDirectoryPrefix(file.path()); myReferenceAlias = fileAlias(referenceName); myModelReader.addHyperlinkLabel(myReferenceAlias); const int index = referenceName.rfind('/', referenceName.length() - 1); myReferenceDirName = referenceName.substr(0, index + 1); myPreformatted = false; myNewParagraphInProgress = false; myReadState = XHTML_READ_NOTHING; myBodyCounter = 0; myCurrentParagraphIsEmpty = true; myStyleSheetTable.clear(); myFontMap = new FontMap(); myTagDataStack.clear(); myStyleParser = new StyleSheetSingleStyleParser(myPathPrefix); myTableParser.reset(); return readDocument(file.inputStream(myEncryptionMap)); }
bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName) { fillTagTable(); myPathPrefix = MiscUtil::htmlDirectoryPrefix(file.path()); myReferenceAlias = fileAlias(referenceName); myModelReader.addHyperlinkLabel(myReferenceAlias); const int index = referenceName.rfind('/', referenceName.length() - 1); myReferenceDirName = referenceName.substr(0, index + 1); myPreformatted = false; myNewParagraphInProgress = false; myReadState = READ_NOTHING; myCurrentParagraphIsEmpty = true; myStyleSheetTable.clear(); myCSSStack.clear(); myStyleEntryStack.clear(); myStylesToRemove = 0; myDoPageBreakAfterStack.clear(); myStyleParser = new StyleSheetSingleStyleParser(); myTableParser.reset(); return readDocument(file); }
bool XHTMLReader::readFile(const std::string &pathPrefix, shared_ptr<ZLInputStream> stream, const std::string &referenceName) { myModelReader.addHyperlinkLabel(referenceName); fillTagTable(); myPathPrefix = pathPrefix; myReferenceName = referenceName; myPreformatted = false; return readDocument(stream); }
bool XHTMLReader::readFile(const std::string &pathPrefix, const std::string &fileName, const std::string &referenceName) { myModelReader.addHyperlinkLabel(referenceName); fillTagTable(); myPathPrefix = pathPrefix; myReferenceName = referenceName; myPreformatted = false; return readDocument(pathPrefix + fileName); }
bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName) { myModelReader.addHyperlinkLabel(referenceName); fillTagTable(); myPathPrefix = MiscUtil::htmlDirectoryPrefix(file.path()); myReferenceName = referenceName; const int index = referenceName.rfind('/', referenceName.length() - 1); myReferenceDirName = referenceName.substr(0, index + 1); myPreformatted = 0; myReadState = READ_NOTHING; myElementStack.clear(); myStyleStack.clear(); myParseStack.resize(1); return readDocument(file); }
bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName) { myModelReader.addHyperlinkLabel(referenceName); fillTagTable(); myPathPrefix = MiscUtil::htmlDirectoryPrefix(file.path()); myReferenceName = referenceName; const int index = referenceName.rfind('/', referenceName.length() - 1); myReferenceDirName = referenceName.substr(0, index + 1); myPreformatted = false; myNewParagraphInProgress = false; myReadState = READ_NOTHING; myCSSStack.clear(); myStyleEntryStack.clear(); myStylesToRemove = 0; return readDocument(file); }
bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName) { fillTagTable(); myPathPrefix = MiscUtil::htmlDirectoryPrefix(file.path()); myReferenceAlias = fileAlias(referenceName); myModelReader.addHyperlinkLabel(myReferenceAlias); const int index = referenceName.rfind('/', referenceName.length() - 1); myReferenceDirName = referenceName.substr(0, index + 1); myPreformatted = false; myNewParagraphInProgress = false; myReadState = XHTML_READ_NOTHING; myBodyCounter = 0; myCurrentParagraphIsEmpty = true; myStyleSheetTable.clear(); myFontMap = new FontMap(); myCSSStack.clear(); myStyleEntryStack.clear(); myStylesToRemove = 0; myDoPageBreakAfterStack.clear(); myStyleParser = new StyleSheetSingleStyleParser(myPathPrefix); myTableParser.reset(); shared_ptr<ZLInputStream> stream = file.inputStream(myEncryptionMap); if (!stream.isNull()) { return readDocument(file.inputStream(myEncryptionMap)); } else { if (file.exists() && !myEncryptionMap.isNull()) { myModelReader.insertEncryptedSectionParagraph(); } return false; } }