当前位置: 首页>>代码示例>>C++>>正文


C++ endParagraph函数代码示例

本文整理汇总了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;
	}
}
开发者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


注:本文中的endParagraph函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。