~ubuntu-branches/ubuntu/vivid/fbreader/vivid-proposed

« back to all changes in this revision

Viewing changes to fbreader/src/formats/pdb/HtmlMetainfoReader.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2008-01-23 16:51:07 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123165107-5q19etahzd72c33a
Tags: 0.8.12-3
* Add libzlui-maemo which allows using fbreader on the maemo platform, on
  Debian. Thanks, Riku Voipio. Closes: #462299
* makefiles/arch/maemo.mk: Don't build with -thumb. (Riku)
* Loosen dependency versions some more, so it only depends on the current
  upstream version or higher, ignoring the Debian revision.
* Use binary:Version instead of deprecated Source-Version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * FBReader -- electronic book reader
3
 
 * Copyright (C) 2004-2007 Nikolay Pultsin <geometer@mawhrin.net>
4
 
 * Copyright (C) 2005 Mikhail Sobolev <mss@mawhrin.net>
 
2
 * Copyright (C) 2004-2008 Geometer Plus <contact@geometerplus.com>
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or modify
7
5
 * it under the terms of the GNU General Public License as published by
23
21
 
24
22
#include "HtmlMetainfoReader.h"
25
23
 
26
 
HtmlMetainfoReader::HtmlMetainfoReader(BookDescription &description) : HtmlReader(description.encoding()), myDescription(description) {
 
24
HtmlMetainfoReader::HtmlMetainfoReader(BookDescription &description, ReadType readType) : HtmlReader(description.encoding()), myDescription(description), myReadType(readType) {
27
25
}
28
26
 
29
27
bool HtmlMetainfoReader::tagHandler(const HtmlReader::HtmlTag &tag) {
30
28
        if (tag.Name == "BODY") {
31
29
                return false;
32
 
        } else if (tag.Name == "DC:TITLE") {
 
30
        } else if (((myReadType & TITLE) == TITLE) && (tag.Name == "DC:TITLE")) {
33
31
                myReadTitle = tag.Start;
34
32
                if (!tag.Start && !myTitle.empty()) {
35
33
                        myDescription.title() = myTitle;
36
34
                        myTitle.erase();
37
35
                }
38
 
        } else if (tag.Name == "DC:CREATOR") {
 
36
        } else if (((myReadType & AUTHOR) == AUTHOR) && (tag.Name == "DC:CREATOR")) {
39
37
                if (tag.Start) {
40
38
                        bool flag = false;
41
39
                        for (size_t i = 0; i < tag.Attributes.size(); ++i) {