本文整理汇总了C++中endParagraph函数的典型用法代码示例。如果您正苦于以下问题:C++ endParagraph函数的具体用法?C++ endParagraph怎么用?C++ endParagraph使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了endParagraph函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:euroelessar,项目名称:FBReader,代码行数:34,代码来源:DocBookBookReader.cpp
示例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);
}
}
开发者ID:BrendanL79,项目名称:FBReaderJ,代码行数:29,代码来源:XHTMLReader.cpp
示例3: endParagraph
void BookReader::addVideoEntry(const ZLVideoEntry &entry) {
if (myCurrentTextModel != 0) {
mySectionContainsRegularContents = true;
endParagraph();
beginParagraph();
myCurrentTextModel->addVideoEntry(entry);
endParagraph();
}
}
开发者ID:gvb1234,项目名称:FBReaderJ,代码行数:9,代码来源:BookReader.cpp
示例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);
}
}
开发者ID:euroelessar,项目名称:FBReader,代码行数:25,代码来源:XHTMLReader.cpp
示例5: endParagraph
void TxtBookReader::internalEndParagraph() {
if (!myLastLineIsEmpty) {
myLineFeedCounter = 0;
}
myLastLineIsEmpty = true;
endParagraph();
}
开发者ID:chenhbzl,项目名称:BooxApp,代码行数:7,代码来源:TxtBookReader.cpp
示例6: bookReader
void XHTMLTagRestartParagraphAction::doAtStart(XHTMLReader &reader, const char**) {
if (reader.myCurrentParagraphIsEmpty) {
bookReader(reader).addData(" ");
}
endParagraph(reader);
beginParagraph(reader);
}
开发者ID:Alexander--,项目名称:FBReaderJ,代码行数:7,代码来源:XHTMLReader.cpp
示例7: endParagraph
void XHTMLTagPreAction::doAtStart(XHTMLReader &reader, const char**) {
endParagraph(reader);
reader.myParseStack.back().kind = PREFORMATTED;
if (++reader.myPreformatted == 1) {
beginParagraph(reader);
}
}
开发者ID:isxinchen,项目名称:harbour-books,代码行数:7,代码来源:XHTMLReader.cpp
示例8: endParagraph
void XHTMLTagBodyAction::doAtEnd(XHTMLReader &reader) {
endParagraph(reader);
--reader.myBodyCounter;
if (reader.myBodyCounter <= 0) {
reader.myReadState = XHTML_READ_NOTHING;
}
}
开发者ID:BrendanL79,项目名称:FBReaderJ,代码行数:7,代码来源:XHTMLReader.cpp
示例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);
}
开发者ID:Alexander--,项目名称:FBReaderJ,代码行数:8,代码来源:XHTMLReader.cpp
示例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();
}
开发者ID:euroelessar,项目名称:FBReader,代码行数:9,代码来源:TxtBookReader.cpp
示例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;
}
}
}
开发者ID:0359xiaodong,项目名称:android-reader,代码行数:10,代码来源:BookReader.cpp
示例12: bookReader
void XHTMLTagLineBreakAction::doAtEnd(XHTMLReader& reader) {
BookReader &br = bookReader(reader);
if (br.paragraphIsOpen()) {
br.addLineBreak();
} else {
beginParagraph(reader);
br.addLineBreak();
endParagraph(reader);
}
}
开发者ID:isxinchen,项目名称:harbour-books,代码行数:10,代码来源:XHTMLReader.cpp
示例13: addData
void PluckerBookReader::safeEndParagraph() {
if (myParagraphStarted) {
if (myBufferIsEmpty) {
static const std::string SPACE = " ";
addData(SPACE);
}
endParagraph();
myParagraphStarted = false;
}
}
开发者ID:justsoso8,项目名称:fbreader-0.8.17,代码行数:10,代码来源:PluckerBookReader.cpp
示例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);
}
}
开发者ID:ethangao,项目名称:FBReaderJ,代码行数:13,代码来源:BookReader.cpp
示例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();
}
}
}
开发者ID:chenhbzl,项目名称:BooxApp,代码行数:15,代码来源:BookReader.cpp
示例16: flushTextBufferToParagraph
void BookReader::addImageReference(const std::string &id, short vOffset, bool isCover) {
if (myCurrentTextModel != 0) {
mySectionContainsRegularContents = true;
if (paragraphIsOpen()) {
flushTextBufferToParagraph();
myCurrentTextModel->addImage(id, vOffset, isCover);
} else {
beginParagraph();
myCurrentTextModel->addControl(IMAGE, true);
myCurrentTextModel->addImage(id, vOffset, isCover);
myCurrentTextModel->addControl(IMAGE, false);
endParagraph();
}
}
}
开发者ID:ethangao,项目名称:FBReaderJ,代码行数:15,代码来源:BookReader.cpp
示例17: endParagraph
void XHTMLTagItemAction::doAtStart(XHTMLReader &reader, const char**) {
endParagraph(reader);
beginParagraph(reader);
if (!reader.myListNumStack.empty()) {
bookReader(reader).addFixedHSpace(3 * reader.myListNumStack.size());
int &index = reader.myListNumStack.top();
if (index == 0) {
static const std::string bullet = "\xE2\x80\xA2\xC0\xA0";
bookReader(reader).addData(bullet);
} else {
bookReader(reader).addData(ZLStringUtil::numberToString(index++) + ".");
}
bookReader(reader).addFixedHSpace(1);
}
reader.myNewParagraphInProgress = true;
}
开发者ID:Ca5th,项目名称:FBReaderJ,代码行数:16,代码来源:XHTMLReader.cpp
示例18: switch
void XHTMLReader::characterDataHandler(const char *text, std::size_t len) {
switch (myReadState) {
case XHTML_READ_NOTHING:
case XHTML_READ_VIDEO:
break;
case XHTML_READ_STYLE:
if (!myTableParser.isNull()) {
myTableParser->parseString(text, len);
}
break;
case XHTML_READ_BODY:
if (myPreformatted) {
if (*text == '\r' || *text == '\n') {
endParagraph();
text += 1;
len -= 1;
beginParagraph();
myModelReader.addControl(PREFORMATTED, true);
}
std::size_t spaceCounter = 0;
while (spaceCounter < len && std::isspace((unsigned char)*(text + spaceCounter))) {
++spaceCounter;
}
myModelReader.addFixedHSpace(spaceCounter);
text += spaceCounter;
len -= spaceCounter;
} else if (myNewParagraphInProgress || !myModelReader.paragraphIsOpen()) {
while (std::isspace((unsigned char)*text)) {
++text;
if (--len == 0) {
break;
}
}
}
if (len > 0) {
myCurrentParagraphIsEmpty = false;
if (!myModelReader.paragraphIsOpen()) {
myModelReader.beginParagraph();
}
myModelReader.addData(std::string(text, len));
myNewParagraphInProgress = false;
}
break;
}
}
开发者ID:BrendanL79,项目名称:FBReaderJ,代码行数:45,代码来源:XHTMLReader.cpp
示例19: printWbePage
void printWbePage(char *buffer, int size) {
int i;
for (i = 0; i < size - 3; ++i) {
if (startParagraph(buffer[i], buffer[i + 1], buffer[i + 2])) {
print = true;
i = i + 3;
printf("\n");
}
if (endParagraph(buffer[i], buffer[i + 1], buffer[i + 2])) {
print = false;
printf("\n");
}
if (print) {
printf("%c", buffer[i]);
}
}
}
开发者ID:bravealdus,项目名称:webclient,代码行数:20,代码来源:socketTools.c
示例20: spaceAfterBlocker
void XHTMLReader::restartParagraph() {
if (myCurrentParagraphIsEmpty) {
myModelReader.addFixedHSpace(1);
}
ZLTextStyleEntry spaceAfterBlocker(ZLTextStyleEntry::STYLE_OTHER_ENTRY);
spaceAfterBlocker.setLength(
ZLTextStyleEntry::LENGTH_SPACE_AFTER,
0,
ZLTextStyleEntry::SIZE_UNIT_PIXEL
);
addTextStyleEntry(spaceAfterBlocker);
endParagraph();
beginParagraph(true);
ZLTextStyleEntry spaceBeforeBlocker(ZLTextStyleEntry::STYLE_OTHER_ENTRY);
spaceBeforeBlocker.setLength(
ZLTextStyleEntry::LENGTH_SPACE_BEFORE,
0,
ZLTextStyleEntry::SIZE_UNIT_PIXEL
);
addTextStyleEntry(spaceBeforeBlocker);
}
开发者ID:Ca5th,项目名称:FBReaderJ,代码行数:21,代码来源:XHTMLReader.cpp
注:本文中的endParagraph函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论