mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
CSS support (in progress)
This commit is contained in:
parent
cbf156e8d5
commit
c281770998
10 changed files with 100 additions and 74 deletions
|
@ -508,12 +508,14 @@ bool XHTMLReader::readFile(const ZLFile &file, const std::string &referenceName)
|
|||
return readDocument(file);
|
||||
}
|
||||
|
||||
void XHTMLReader::addStyleEntry(const std::string tag, const std::string aClass) {
|
||||
bool XHTMLReader::addStyleEntry(const std::string tag, const std::string aClass) {
|
||||
shared_ptr<ZLTextStyleEntry> entry = myStyleSheetTable.control(tag, aClass);
|
||||
if (!entry.isNull()) {
|
||||
myModelReader.addStyleEntry(*entry);
|
||||
myStyleEntryStack.push_back(entry);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void XHTMLReader::startElementHandler(const char *tag, const char **attributes) {
|
||||
|
@ -548,6 +550,7 @@ void XHTMLReader::startElementHandler(const char *tag, const char **attributes)
|
|||
shared_ptr<ZLTextStyleEntry> entry = myStyleParser.parseString(style);
|
||||
myModelReader.addStyleEntry(*entry);
|
||||
myStyleEntryStack.push_back(entry);
|
||||
} else {
|
||||
}
|
||||
myCSSStack.push_back(myStyleEntryStack.size() - sizeBefore);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue