本文整理汇总了C++中endParagraph函数的典型用法代码示例。如果您正苦于以下问题:C++ endParagraph函数的具体用法?C++ endParagraph怎么用?C++ endParagraph使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了endParagraph函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void DocBookBookReader::endElementHandler(int tag) {
switch (tag) {
case _SECT1:
myReadText = false;
popKind();
endContentsParagraph();
insertEndOfSectionParagraph();
break;
case _PARA:
endParagraph();
break;
case _TITLE:
endParagraph();
popKind();
endContentsParagraph();
exitTitle();
break;
case _EMPHASIS:
addControl(EMPHASIS, false);
break;
case _CITETITLE:
addControl(CITE, false);
break;
case _ULINK:
case _EMAIL:
addControl(CODE, false);
break;
case _BLOCKQUOTE:
popKind();
break;
default:
break;
}
}
示例2: pathPrefix
void XHTMLTagImageAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) {
const char *fileName = reader.attributeValue(xmlattributes, *myPredicate);
if (fileName == 0) {
return;
}
const std::string fullfileName = pathPrefix(reader) + MiscUtil::decodeHtmlURL(fileName);
ZLFile imageFile(fullfileName);
if (!imageFile.exists()) {
return;
}
const bool flagParagraphIsOpen = bookReader(reader).paragraphIsOpen();
if (flagParagraphIsOpen) {
if (reader.myCurrentParagraphIsEmpty) {
bookReader(reader).addControl(IMAGE, true);
} else {
endParagraph(reader);
}
}
const std::string imageName = imageFile.name(false);
bookReader(reader).addImageReference(imageName, 0, reader.myMarkNextImageAsCover);
bookReader(reader).addImage(imageName, new ZLFileImage(imageFile, "", 0, 0, reader.myEncryptionMap->info(imageFile.path())));
reader.myMarkNextImageAsCover = false;
if (flagParagraphIsOpen && reader.myCurrentParagraphIsEmpty) {
bookReader(reader).addControl(IMAGE, false);
endParagraph(reader);
}
}
示例3: endParagraph
void BookReader::addVideoEntry(const ZLVideoEntry &entry) {
if (myCurrentTextModel != 0) {
mySectionContainsRegularContents = true;
endParagraph();
beginParagraph();
myCurrentTextModel->addVideoEntry(entry);
endParagraph();
}
}
示例4: pathPrefix
void XHTMLTagImageAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) {
const char *fileName = reader.attributeValue(xmlattributes, *myPredicate);
if (fileName == 0) {
return;
}
const std::string fullfileName = pathPrefix(reader) + MiscUtil::decodeHtmlURL(fileName);
ZLFile imageFile(fullfileName);
if (!imageFile.exists()) {
return;
}
bool flag = bookReader(reader).paragraphIsOpen();
if (flag) {
endParagraph(reader);
}
if (std::strlen(fileName) > 2 && std::strncmp(fileName, "./", 2) == 0) {
fileName +=2;
}
bookReader(reader).addImageReference(fullfileName);
bookReader(reader).addImage(fullfileName, new ZLFileImage(ZLFile(fullfileName), 0));
if (flag) {
beginParagraph(reader);
}
}
示例5: endParagraph
void TxtBookReader::internalEndParagraph() {
if (!myLastLineIsEmpty) {
myLineFeedCounter = 0;
}
myLastLineIsEmpty = true;
endParagraph();
}
示例6: bookReader
void XHTMLTagRestartParagraphAction::doAtStart(XHTMLReader &reader, const char**) {
if (reader.myCurrentParagraphIsEmpty) {
bookReader(reader).addData(" ");
}
endParagraph(reader);
beginParagraph(reader);
}
示例7: endParagraph
void XHTMLTagPreAction::doAtStart(XHTMLReader &reader, const char**) {
endParagraph(reader);
reader.myParseStack.back().kind = PREFORMATTED;
if (++reader.myPreformatted == 1) {
beginParagraph(reader);
}
}
示例8: endParagraph
void XHTMLTagBodyAction::doAtEnd(XHTMLReader &reader) {
endParagraph(reader);
--reader.myBodyCounter;
if (reader.myBodyCounter <= 0) {
reader.myReadState = XHTML_READ_NOTHING;
}
}
示例9: endParagraph
void XHTMLTagItemAction::doAtStart(XHTMLReader &reader, const char**) {
endParagraph(reader);
// TODO: increase left indent
beginParagraph(reader);
// TODO: replace bullet sign by number inside OL tag
const std::string bullet = "\xE2\x80\xA2\xC0\xA0";
bookReader(reader).addData(bullet);
}
示例10: endParagraph
void TxtBookReader::internalEndParagraph() {
if (!myLastLineIsEmpty) {
//myLineFeedCounter = 0;
myLineFeedCounter = -1; /* Fixed by Hatred: zero value was break LINE INDENT formater -
second line print with indent like new paragraf */
}
myLastLineIsEmpty = true;
endParagraph();
}
示例11: endParagraph
void BookReader::insertEndParagraph(ZLTextParagraph::Kind kind) {
if (myCurrentTextModel != 0 && mySectionContainsRegularContents) {
std::size_t size = myCurrentTextModel->paragraphsNumber();
if ((size > 0) && (((*myCurrentTextModel)[(std::size_t)-1])->kind() != kind)) {
endParagraph();
((ZLTextPlainModel&)*myCurrentTextModel).createParagraph(kind);
mySectionContainsRegularContents = false;
}
}
}
示例12: bookReader
void XHTMLTagLineBreakAction::doAtEnd(XHTMLReader& reader) {
BookReader &br = bookReader(reader);
if (br.paragraphIsOpen()) {
br.addLineBreak();
} else {
beginParagraph(reader);
br.addLineBreak();
endParagraph(reader);
}
}
示例13: addData
void PluckerBookReader::safeEndParagraph() {
if (myParagraphStarted) {
if (myBufferIsEmpty) {
static const std::string SPACE = " ";
addData(SPACE);
}
endParagraph();
myParagraphStarted = false;
}
}
示例14: endParagraph
void BookReader::beginParagraph(ZLTextParagraph::Kind kind) {
endParagraph();
if (myCurrentTextModel != 0) {
((ZLTextPlainModel&)*myCurrentTextModel).createParagraph(kind);
for (std::vector<FBTextKind>::const_iterator it = myKindStack.begin(); it != myKindStack.end(); ++it) {
myCurrentTextModel->addControl(*it, true);
}
if (!myHyperlinkReference.empty()) {
myCurrentTextModel->addHyperlinkControl(myHyperlinkKind, myHyperlinkType, myHyperlinkReference);
}
myModelsWithOpenParagraphs.push_back(myCurrentTextModel);
}
}
示例15: flushTextBufferToParagraph
void BookReader::addImageReference(const std::string &id, short vOffset) {
if (myCurrentTextModel != 0) {
mySectionContainsRegularContents = true;
if (myTextParagraphExists) {
flushTextBufferToParagraph();
myCurrentTextModel->addImage(id, myModel.imageMap(), vOffset);
} else {
beginParagraph();
myCurrentTextModel->addControl(IMAGE, true);
myCurrentTextModel->addImage(id, myModel.imageMap(), vOffset);
myCurrentTextModel->addControl(IMAGE, false);
endParagraph();
}
}
}