~ubuntu-branches/debian/sid/libwps/sid

« back to all changes in this revision

Viewing changes to src/lib/WPSContentListener.h

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2011-05-04 22:02:18 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110504220218-va9i1xbysfsh3p94
Tags: 0.2.2-1
* New upstream release
* remove unused variables in WPS4.cpp and WPS8.cpp (closes: #625387)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        ~_WPSContentParsingState();
41
41
 
42
42
        uint32_t m_textAttributeBits;
 
43
        uint16_t m_spec;
43
44
        float m_fontSize;
44
45
        WPXString m_fontName;
 
46
        uint32_t m_lcid;
 
47
        uint32_t m_textcolor;
 
48
 
 
49
        uint16_t m_fieldcode;
 
50
 
 
51
        int m_codepage;
45
52
 
46
53
        bool m_isParagraphColumnBreak;
47
54
        bool m_isParagraphPageBreak;
48
55
        uint8_t m_paragraphJustification;
49
56
        float m_paragraphLineSpacing;
 
57
        uint32_t m_paraLayoutFlags;
 
58
 
 
59
        uint16_t m_footnoteId;
 
60
        uint16_t m_endnoteId;
 
61
 
 
62
        uint8_t m_numbering;
 
63
        uint16_t m_numstyle;
 
64
        uint16_t m_numsep;
 
65
 
 
66
        int m_curListType;
 
67
        bool m_isOrdered;
50
68
 
51
69
        bool m_isDocumentStarted;
52
70
        bool m_isPageSpanOpened;
56
74
        bool m_isSpanOpened;
57
75
        bool m_isParagraphOpened;
58
76
 
 
77
        bool m_isFootEndNote;
 
78
 
 
79
        bool m_isParaListItem;
 
80
 
59
81
        std::list<WPSPageSpan>::iterator m_nextPageSpanIter;
60
82
        int m_numPagesRemainingInSpan;
61
83
 
72
94
        float m_paragraphMarginTop;
73
95
        float m_paragraphMarginBottom;
74
96
 
 
97
        float m_paragraphIndentFirst;
 
98
 
75
99
        WPXString m_textBuffer;
76
100
 
77
101
private:
79
103
        _WPSContentParsingState& operator=(const _WPSContentParsingState&);
80
104
};
81
105
 
 
106
struct ListSignature
 
107
{
 
108
        uint16_t a,b,c;
 
109
 
 
110
        bool operator == (ListSignature &y)
 
111
        {
 
112
                return (a == y.a) && (b == y.b) && (c == y.c);
 
113
        }
 
114
};
 
115
 
 
116
struct TabPos
 
117
{
 
118
        float pos;
 
119
        char  align;
 
120
        char  leader;
 
121
};
 
122
 
82
123
class WPSContentListener
83
124
{
84
125
public:
86
127
        void endDocument();
87
128
        void insertBreak(const uint8_t breakType);
88
129
        void insertCharacter(const uint16_t character);
89
 
 
 
130
        void insertField();
 
131
 
 
132
        void openFootnote();
 
133
        void closeFootnote();
 
134
        void openEndnote();
 
135
        void closeEndnote();
 
136
 
 
137
        void setSpec(const uint16_t specCode);
90
138
        void setTextFont(const WPXString fontName);
91
139
        void setFontSize(const uint16_t fontSize);
92
 
        
 
140
        void setLCID(const uint32_t lcid);
 
141
        void setCodepage(const int codepage);
 
142
        void setColor(const unsigned int rgb);
 
143
        void setFieldType(uint16_t code);
 
144
        void setFieldFormat(uint16_t code);
 
145
 
 
146
        void setAlign(const uint8_t align);
 
147
        void setParaFlags(const uint32_t flags);
 
148
        void setMargins(const float first=0.0, const float left=0.0, const float right=0.0,
 
149
                        const float before=0.0, const float after=0.0);
 
150
        void setTabs(std::vector<TabPos> &tabs);
 
151
 
 
152
        void setNumberingType(const uint8_t style);
 
153
        void setNumberingProp(const uint16_t type, const uint16_t sep);
 
154
 
93
155
        void insertEOL();
94
156
 
 
157
        uint16_t getSpec() const;
95
158
protected:
96
159
        WPSContentListener(std::list<WPSPageSpan> &pageList, WPXDocumentInterface *documentInterface);
97
160
        virtual ~WPSContentListener();
116
179
 
117
180
        void _insertText(const WPXString &textBuffer);
118
181
 
 
182
        int  _getListId();
119
183
private:
120
184
        WPSContentListener(const WPSContentListener&);
121
185
        WPSContentListener& operator=(const WPSContentListener&);
122
186
 
 
187
        std::vector<TabPos> m_tabs;
123
188
        std::list<WPSPageSpan> &m_pageList;
 
189
        std::vector<ListSignature> m_listFormats;
124
190
};
125
191
 
126
192
#endif /* WPSCONTENTLISTENER_H */