void DocBookReader::handleStartField() { if (myReadState == READ_FIELD) { //for nested fields handleEndField(); } myReadState = READ_FIELD; myReadFieldState = READ_FIELD_INFO; myHyperlinkTypeState = NO_HYPERLINK; }
bool OleStreamParser::readStream(OleMainStream &oleMainStream) { ZLUnicodeUtil::Ucs2Char ucs2char; bool tabMode = false; while (getUcs2Char(oleMainStream, ucs2char)) { if (tabMode) { tabMode = false; if (ucs2char == WORD_TABLE_SEPARATOR) { handleTableEndRow(); continue; } else { handleTableSeparator(); } } if (ucs2char < 32) { switch (ucs2char) { case NULL_SYMBOL: break; case WORD_HARD_LINEBREAK: handleHardLinebreak(); break; case WORD_END_OF_PARAGRAPH: case WORD_PAGE_BREAK: handleParagraphEnd(); break; case WORD_TABLE_SEPARATOR: tabMode = true; break; case WORD_FOOTNOTE_MARK: handleFootNoteMark(); break; case WORD_START_FIELD: handleStartField(); break; case WORD_SEPARATOR_FIELD: handleSeparatorField(); break; case WORD_END_FIELD: handleEndField(); break; case INLINE_IMAGE: case FLOAT_IMAGE: break; default: handleOtherControlChar(ucs2char); break; } } else if (ucs2char == WORD_ZERO_WIDTH_UNBREAKABLE_SPACE) { continue; //skip } else { handleChar(ucs2char); } } return true; }