1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 01:39:18 +02:00

Merge branch 'master' into 2.6-master

This commit is contained in:
Nikolay Pultsin 2015-10-25 01:56:21 +01:00
commit 4a807e1fcd

View file

@ -45,7 +45,7 @@ FB2BookReader::FB2BookReader(BookModel &model) : myModelReader(model) {
} }
void FB2BookReader::characterDataHandler(const char *text, std::size_t len) { void FB2BookReader::characterDataHandler(const char *text, std::size_t len) {
if ((len > 0) && (!myCurrentImageId.empty() || myModelReader.paragraphIsOpen())) { if (len > 0 && (!myCurrentImageId.empty() || myModelReader.paragraphIsOpen())) {
std::string str(text, len); std::string str(text, len);
if (!myCurrentImageId.empty()) { if (!myCurrentImageId.empty()) {
if (myCurrentImageStart == -1) { if (myCurrentImageStart == -1) {
@ -237,7 +237,7 @@ void FB2BookReader::startElementHandler(int tag, const char **xmlattributes) {
{ {
static const std::string STRANGE_MIME_TYPE = "text/xml"; static const std::string STRANGE_MIME_TYPE = "text/xml";
const char *contentType = attributeValue(xmlattributes, "content-type"); const char *contentType = attributeValue(xmlattributes, "content-type");
if ((contentType != 0) && (id != 0) && (STRANGE_MIME_TYPE != contentType)) { if (contentType != 0 && id != 0 && STRANGE_MIME_TYPE != contentType) {
myCurrentImageId.assign(id); myCurrentImageId.assign(id);
} }
break; break;