~ubuntu-branches/ubuntu/trusty/bibletime/trusty

« back to all changes in this revision

Viewing changes to src/backend/filters/bt_thmlhtml.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Marsden
  • Date: 2009-11-18 17:30:00 UTC
  • mfrom: (1.3.4 upstream) (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091118173000-endkhjz5qai88tvr
Tags: 2.4-1
* New upstream version 2.4
* debian/control: 
  - Replace incorrect bibletime-data Depends on lib4qt-gui
    with bibletime Depends on libqtgui4 (>= 4.4.0). (Closes: #556209).
  - Add Build-depends: on zlib1g-dev and libcurl4-gnutls-dev 
    (Closes: #556805).

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#ifndef BT_THMLHTML_H
11
11
#define BT_THMLHTML_H
12
12
 
13
 
//Sword
 
13
// Sword includes:
14
14
#include <swbuf.h>
15
15
#include <thmlhtml.h>
16
16
 
 
17
 
17
18
namespace Filters {
18
19
 
19
 
        /** ThML to HTML filter.
20
 
        * This filter converts ThML text to HTML text
21
 
        */
 
20
/** ThML to HTML filter.
 
21
* This filter converts ThML text to HTML text
 
22
*/
22
23
 
23
24
class BT_ThMLHTML : public sword::ThMLHTML {
24
25
 
25
 
protected:
26
 
 
27
 
class BT_UserData : public sword::ThMLHTML::MyUserData {
28
 
 
29
 
public:
30
 
BT_UserData(const sword::SWModule *module, const sword::SWKey *key) : sword::ThMLHTML::MyUserData(module, key) {
31
 
                                inscriptRef = false;
32
 
                                swordFootnote = 1;
33
 
                                inFootnoteTag = false;
34
 
                        }
35
 
 
36
 
                        bool inscriptRef;
37
 
                        bool inFootnoteTag;
38
 
                        unsigned short int swordFootnote;
39
 
                };
40
 
 
41
 
                virtual sword::BasicFilterUserData *createUserData(const sword::SWModule* module, const sword::SWKey* key) {
42
 
                        return new BT_UserData(module, key);
43
 
                }
44
 
 
45
 
public:
46
 
                BT_ThMLHTML ();
47
 
                virtual bool handleToken(sword::SWBuf& buf, const char *token, sword::BasicFilterUserData *userData);
48
 
                virtual char processText(sword::SWBuf& buf, const sword::SWKey*, const sword::SWModule* = 0);
49
 
        };
 
26
    protected:
 
27
 
 
28
        class BT_UserData : public sword::ThMLHTML::MyUserData {
 
29
 
 
30
            public:
 
31
                BT_UserData(const sword::SWModule *module, const sword::SWKey *key) : sword::ThMLHTML::MyUserData(module, key) {
 
32
                    inscriptRef = false;
 
33
                    swordFootnote = 1;
 
34
                    inFootnoteTag = false;
 
35
                }
 
36
 
 
37
                bool inscriptRef;
 
38
                bool inFootnoteTag;
 
39
                unsigned short int swordFootnote;
 
40
        };
 
41
 
 
42
        virtual sword::BasicFilterUserData *createUserData(const sword::SWModule* module, const sword::SWKey* key) {
 
43
            return new BT_UserData(module, key);
 
44
        }
 
45
 
 
46
    public:
 
47
        BT_ThMLHTML ();
 
48
        virtual bool handleToken(sword::SWBuf& buf, const char *token, sword::BasicFilterUserData *userData);
 
49
        virtual char processText(sword::SWBuf& buf, const sword::SWKey*, const sword::SWModule* = 0);
 
50
};
50
51
 
51
52
}
52
53