mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
uid reading for fb2/ePub files
This commit is contained in:
parent
4c5b4d51cd
commit
dae0fe3f56
5 changed files with 6 additions and 4 deletions
|
@ -61,6 +61,7 @@ void FB2UidReader::endElementHandler(int tag) {
|
|||
myBuffer.erase();
|
||||
myReadState = READ_DOCUMENT_INFO;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <ZLStringUtil.h>
|
||||
#include <ZLUnicodeUtil.h>
|
||||
#include <ZLLogger.h>
|
||||
#include <ZLXMLNamespace.h>
|
||||
|
||||
#include "OEBUidReader.h"
|
||||
|
@ -119,7 +118,6 @@ bool OEBUidReader::processNamespaces() const {
|
|||
bool OEBUidReader::readUids(const ZLFile &file) {
|
||||
myReadState = READ_NONE;
|
||||
if (!readDocument(file)) {
|
||||
ZLLogger::Instance().println("epub", "Failure while reading info from " + file.path());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -308,6 +308,9 @@ void Book::addUid(shared_ptr<UID> uid) {
|
|||
}
|
||||
|
||||
void Book::addUid(const std::string &type, const std::string &id) {
|
||||
if (type == "" || id == "") {
|
||||
return;
|
||||
}
|
||||
addUid(new UID(type, id));
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ bool AndroidUtil::init(JavaVM* jvm) {
|
|||
Method_Book_setEncoding = new VoidMethod(Class_Book, "setEncoding", "(Ljava/lang/String;)");
|
||||
Method_Book_addAuthor = new VoidMethod(Class_Book, "addAuthor", "(Ljava/lang/String;Ljava/lang/String;)");
|
||||
Method_Book_addTag = new VoidMethod(Class_Book, "addTag", "(Lorg/geometerplus/fbreader/book/Tag;)");
|
||||
Method_Book_addTag = new VoidMethod(Class_Book, "addUid", "(Ljava/lang/String;Ljava/lang/String;)");
|
||||
Method_Book_addUid = new VoidMethod(Class_Book, "addUid", "(Ljava/lang/String;Ljava/lang/String;)");
|
||||
|
||||
StaticMethod_Tag_getTag = new StaticObjectMethod(Class_Tag, "getTag", Class_Tag, "(Lorg/geometerplus/fbreader/book/Tag;Ljava/lang/String;)");
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ final class SQLiteBooksDatabase extends BooksDatabase {
|
|||
|
||||
myDatabase.beginTransaction();
|
||||
|
||||
switch (myDatabase.getVersion()) {
|
||||
switch (version) {
|
||||
case 0:
|
||||
createTables();
|
||||
case 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue