~ubuntu-branches/ubuntu/saucy/libwpd/saucy

« back to all changes in this revision

Viewing changes to src/lib/WP6StylesListener.h

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2011-11-29 23:31:13 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20111129233113-xdtwca9h0y6wdxst
Tags: 0.9.4-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
1
2
/* libwpd
2
3
 * Copyright (C) 2003 William Lachance (wrlach@gmail.com)
3
4
 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
44
45
public:
45
46
        WP6StylesListener(std::list<WPXPageSpan> &pageList, WPXTableList tableList);
46
47
 
47
 
        void setDate(const uint16_t /* type */, const uint16_t /* year */, 
48
 
                     const uint8_t /* month */, const uint8_t /* day */, 
49
 
                     const uint8_t /* hour */, const uint8_t /* minute */, 
50
 
                     const uint8_t /* second */, const uint8_t /* dayOfWeek */, 
51
 
                     const uint8_t /* timeZone */, const uint8_t /* unused */) {}
 
48
        void setDate(const uint16_t /* type */, const uint16_t /* year */,
 
49
                     const uint8_t /* month */, const uint8_t /* day */,
 
50
                     const uint8_t /* hour */, const uint8_t /* minute */,
 
51
                     const uint8_t /* second */, const uint8_t /* dayOfWeek */,
 
52
                     const uint8_t /* timeZone */, const uint8_t /* unused */) {}
52
53
        void setExtendedInformation(const uint16_t /* type */, const WPXString & /*data*/) {}
53
54
        void startDocument() {}
54
55
        void startSubDocument() {}
55
56
        void setAlignmentCharacter(const uint16_t /* character */) {}
56
57
        void setLeaderCharacter(const uint16_t /* character */, const uint8_t /* numberOfSpaces */) {}
57
 
        void defineTabStops(const bool /* isRelative */, const std::vector<WPXTabStop> & /* tabStops */, 
58
 
                                    const std::vector<bool> & /* usePreWP9LeaderMethods */) {}
59
 
        void insertCharacter(uint32_t /* character */) { if (!isUndoOn()) m_currentPageHasContent = true; }
60
 
        void insertTab(const uint8_t /* tabType */, double /* tabPosition */) { if (!isUndoOn()) m_currentPageHasContent = true; }
61
 
        void handleLineBreak()  { if (!isUndoOn()) m_currentPageHasContent = true; }
62
 
        void insertEOL() { if (!isUndoOn()) m_currentPageHasContent = true; }
63
 
        void insertBreak(const uint8_t breakType);
 
58
        void defineTabStops(const bool /* isRelative */, const std::vector<WPXTabStop> & /* tabStops */,
 
59
                            const std::vector<bool> & /* usePreWP9LeaderMethods */) {}
 
60
        void insertCharacter(uint32_t /* character */)
 
61
        {
 
62
                if (!isUndoOn()) m_currentPageHasContent = true;
 
63
        }
 
64
        void insertTab(const uint8_t /* tabType */, double /* tabPosition */)
 
65
        {
 
66
                if (!isUndoOn()) m_currentPageHasContent = true;
 
67
        }
 
68
        void handleLineBreak()
 
69
        {
 
70
                if (!isUndoOn()) m_currentPageHasContent = true;
 
71
        }
 
72
        void insertEOL()
 
73
        {
 
74
                if (!isUndoOn()) m_currentPageHasContent = true;
 
75
        }
 
76
        void insertBreak(const uint8_t breakType);
64
77
        void characterColorChange(const uint8_t /* red */, const uint8_t /* green */, const uint8_t /* blue */) {}
65
78
        void characterShadingChange(const uint8_t /* shading */) {}
66
79
        void highlightChange(const bool /* isOn */, const RGBSColor /* color */) {}
76
89
        void paragraphMarginChange(const uint8_t /* side */, const int16_t /* margin */) {}
77
90
        void indentFirstLineChange(const int16_t /* offset */) {}
78
91
        void columnChange(const WPXTextColumnType /* columnType */, const uint8_t /* numColumns */,
79
 
                                const std::vector<double> & /* columnWidth */, const std::vector<bool> & /* isFixedWidth */) {}
 
92
                          const std::vector<double> & /* columnWidth */, const std::vector<bool> & /* isFixedWidth */) {}
80
93
        void updateOutlineDefinition(const WP6OutlineLocation /* outlineLocation */, const uint16_t /* outlineHash */,
81
 
                                             const uint8_t * /* numberingMethods */, const uint8_t /* tabBehaviourFlag */) {}
 
94
                                     const uint8_t * /* numberingMethods */, const uint8_t /* tabBehaviourFlag */) {}
82
95
 
83
96
        void paragraphNumberOn(const uint16_t /* outlineHash */, const uint8_t /* level */, const uint8_t /* flag */) {}
84
 
        void paragraphNumberOff() { if (!isUndoOn()) m_currentPageHasContent = true; }
 
97
        void paragraphNumberOff()
 
98
        {
 
99
                if (!isUndoOn()) m_currentPageHasContent = true;
 
100
        }
85
101
        void displayNumberReferenceGroupOn(const uint8_t /* subGroup */, const uint8_t /* level */) {}
86
 
        void displayNumberReferenceGroupOff(const uint8_t /* subGroup */) { if (!isUndoOn()) m_currentPageHasContent = true; }
 
102
        void displayNumberReferenceGroupOff(const uint8_t /* subGroup */)
 
103
        {
 
104
                if (!isUndoOn()) m_currentPageHasContent = true;
 
105
        }
87
106
        void styleGroupOn(const uint8_t /* subGroup */) {}
88
107
        void styleGroupOff(const uint8_t /* subGroup */) {}
89
108
        void globalOn(const uint8_t /* systemStyle */) {}
93
112
        void headerFooterGroup(const uint8_t headerFooterType, const uint8_t occurenceBits, const uint16_t textPID);
94
113
        void suppressPageCharacteristics(const uint8_t suppressCode);
95
114
        void setPageNumber(const uint16_t pageNumber);
96
 
        void setPageNumberingType(const WPXNumberingType pageNumberingType);
 
115
        void setPageNumberingType(const WPXNumberingType pageNumberingType);
97
116
 
98
117
        void endDocument();
99
118
        void endSubDocument();
100
119
 
101
 
        void defineTable(const uint8_t position, const uint16_t leftOffset);
 
120
        void defineTable(const uint8_t position, const uint16_t leftOffset);
102
121
        void addTableColumnDefinition(const uint32_t /* width */, const uint32_t /* leftGutter */, const uint32_t /* rightGutter */,
103
 
                                const uint32_t /* attributes */, const uint8_t /* alignment */) {}
 
122
                                      const uint32_t /* attributes */, const uint8_t /* alignment */) {}
104
123
        void startTable();
105
 
        void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow);
106
 
        void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, 
107
 
                                const RGBSColor * cellFgColor, const RGBSColor * cellBgColor,
108
 
                                const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, 
109
 
                                const bool useCellAttributes, const uint32_t cellAttributes);
110
 
        void endTable();
 
124
        void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow);
 
125
        void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits,
 
126
                        const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
 
127
                        const RGBSColor *cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment,
 
128
                        const bool useCellAttributes, const uint32_t cellAttributes);
 
129
        void endTable();
111
130
        void boxOn(const uint8_t /* anchoringType */, const uint8_t /* generalPositioningFlags */, const uint8_t /* horizontalPositioningFlags */,
112
 
                const int16_t /* horizontalOffset */, const uint8_t /* leftColumn */, const uint8_t /* rightColumn */,
113
 
                const uint8_t /* verticalPositioningFlags */, const int16_t /* verticalOffset */, const uint8_t /* widthFlags */,
114
 
                const uint16_t /* width */, const uint8_t /* heightFlags */, const uint16_t /* height */, const uint8_t /* boxContentType */,
115
 
                const uint16_t /* nativeWidth */, const uint16_t /* nativeHeight */) {}
 
131
                   const int16_t /* horizontalOffset */, const uint8_t /* leftColumn */, const uint8_t /* rightColumn */,
 
132
                   const uint8_t /* verticalPositioningFlags */, const int16_t /* verticalOffset */, const uint8_t /* widthFlags */,
 
133
                   const uint16_t /* width */, const uint8_t /* heightFlags */, const uint16_t /* height */, const uint8_t /* boxContentType */,
 
134
                   const uint16_t /* nativeWidth */, const uint16_t /* nativeHeight */) {}
116
135
        void boxOff() {}
117
136
        void insertGraphicsData(const uint16_t /* packetId */) {}
118
137
        void insertTextBox(const WP6SubDocument *subDocument);
127
146
        void _changeList() {}
128
147
 
129
148
private:
130
 
        WP6StylesListener(const WP6StylesListener&);
131
 
        WP6StylesListener& operator=(const WP6StylesListener&);
 
149
        WP6StylesListener(const WP6StylesListener &);
 
150
        WP6StylesListener &operator=(const WP6StylesListener &);
132
151
        WPXPageSpan m_currentPage;
133
152
 
134
153
        WPXTableList m_tableList;
135
 
        WPXTable * m_currentTable;
 
154
        WPXTable *m_currentTable;
136
155
        double m_tempMarginLeft, m_tempMarginRight;
137
156
        bool m_currentPageHasContent;
138
157
        bool m_isTableDefined;
142
161
};
143
162
 
144
163
#endif /* WP6STYLESLISTENER_H */
 
164
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */