[fbreader] Handle SVG image element when looking for cover
This commit is contained in:
parent
58d0927e82
commit
4704c68caf
1 changed files with 11 additions and 8 deletions
|
@ -39,16 +39,19 @@ private:
|
||||||
XHTMLImageFinder::XHTMLImageFinder(OEBCoverReader &coverReader) : myCoverReader(coverReader) {
|
XHTMLImageFinder::XHTMLImageFinder(OEBCoverReader &coverReader) : myCoverReader(coverReader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::string IMG = "img";
|
|
||||||
|
|
||||||
void XHTMLImageFinder::startElementHandler(const char *tag, const char **attributes) {
|
void XHTMLImageFinder::startElementHandler(const char *tag, const char **attributes) {
|
||||||
|
static const std::string IMG = "img";
|
||||||
|
static const std::string IMAGE = "image";
|
||||||
|
const char *src = NULL;
|
||||||
if (IMG == tag) {
|
if (IMG == tag) {
|
||||||
const char *src = attributeValue(attributes, "src");
|
src = attributeValue(attributes, "src");
|
||||||
if (src != 0) {
|
} else if (IMAGE == tag) {
|
||||||
myCoverReader.myImage =
|
src = attributeValue(attributes, "xlink:href");
|
||||||
new ZLFileImage(ZLFile(myCoverReader.myPathPrefix + src), 0);
|
}
|
||||||
interrupt();
|
if (src) {
|
||||||
}
|
myCoverReader.myImage =
|
||||||
|
new ZLFileImage(ZLFile(myCoverReader.myPathPrefix + src), 0);
|
||||||
|
interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue