mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
several body tag issues
This commit is contained in:
parent
0875e9e4d7
commit
5235601266
3 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
===== 1.6.10 (Jan ??, 2013) =====
|
||||
* Fixed issue for XHTML files with several body tags (sometimes produced by Calibre)
|
||||
|
||||
===== 1.6.9 (Jan 03, 2013) =====
|
||||
* Added Bulgarian translation (by Ники Арсов)
|
||||
* Updated Dutch translation (by Frank Fesevur)
|
||||
|
|
|
@ -244,12 +244,18 @@ void XHTMLTagParagraphAction::doAtEnd(XHTMLReader &reader) {
|
|||
}
|
||||
|
||||
void XHTMLTagBodyAction::doAtStart(XHTMLReader &reader, const char**) {
|
||||
++reader.myBodyCounter;
|
||||
if (reader.myBodyCounter > 0) {
|
||||
reader.myReadState = XHTMLReader::READ_BODY;
|
||||
}
|
||||
}
|
||||
|
||||
void XHTMLTagBodyAction::doAtEnd(XHTMLReader &reader) {
|
||||
endParagraph(reader);
|
||||
--reader.myBodyCounter;
|
||||
if (reader.myBodyCounter <= 0) {
|
||||
reader.myReadState = XHTMLReader::READ_NOTHING;
|
||||
}
|
||||
}
|
||||
|
||||
void XHTMLTagRestartParagraphAction::doAtStart(XHTMLReader &reader, const char**) {
|
||||
|
@ -525,6 +531,7 @@ bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName)
|
|||
myPreformatted = false;
|
||||
myNewParagraphInProgress = false;
|
||||
myReadState = READ_NOTHING;
|
||||
myBodyCounter = 0;
|
||||
myCurrentParagraphIsEmpty = true;
|
||||
|
||||
myStyleSheetTable.clear();
|
||||
|
|
|
@ -103,6 +103,7 @@ private:
|
|||
READ_STYLE,
|
||||
READ_BODY
|
||||
} myReadState;
|
||||
int myBodyCounter;
|
||||
|
||||
friend class XHTMLTagAction;
|
||||
friend class XHTMLTagStyleAction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue