예제 #1
0
FormatInfoPage *PalmDocPlugin::createInfoPage(ZLOptionsDialog &dialog, const ZLFile &file) {
	shared_ptr<ZLInputStream> stream = createStream(file);
	stream->open();
	bool readAsPalmDoc = ((PalmDocStream&)*stream).hasExtraSections();
	stream->close();
	if (!readAsPalmDoc) {
		return new PlainTextInfoPage(dialog, file, ZLResourceKey("Text"), !TextFormatDetector().isHtml(*stream));
	} else {
		return 0;
	}
}
예제 #2
0
FormatInfoPage *ZTXTPlugin::createInfoPage(ZLOptionsDialog &dialog, const std::string &fileName) {
	ZLFile file(fileName);
	fb::shared_ptr<ZLInputStream> stream = createStream(file);
	return new PlainTextInfoPage(dialog, fileName, ZLResourceKey("Text"), !TextFormatDetector().isHtml(*stream));
}