~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to filters/kword/mswrite/libmswrite.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
namespace MSWrite
38
38
{
39
39
#if 0
40
 
        class DocumentInfo
41
 
        {
42
 
        private:
43
 
                Word m_numObjects;
44
 
                bool m_hasHeader;
45
 
                bool m_hasFooter;
46
 
                bool m_hasHeaderOnFirstPage;
47
 
                bool m_hasFooterOnFirstPage;
48
 
 
49
 
        public:
50
 
                DocumentInfo ()
51
 
                {
52
 
                        m_numObjects = 0;
53
 
                        m_hasHeader = m_hasFooter = false;
54
 
                        m_hasHeaderOnFirstPage = m_hasFooterOnFirstPage = false;
55
 
                }
56
 
 
57
 
                Word getNumObjects (void) const {       return m_numObjects;    }
58
 
                void setNumObjects (const Word numObjects)      {       m_numObjects = numObjects;      }
59
 
 
60
 
                bool getHasHeader (void) const  {       return m_hasHeader;     }
61
 
                void setHasHeader (const bool hasHeader)        {       m_hasHeader = hasHeader;        }
62
 
 
63
 
                bool getHasFooter (void) const  {       return m_hasFooter;     }
64
 
                void setHasFooter (const bool hasFooter)        {       m_hasFooter = hasFooter;        }
65
 
 
66
 
                bool getHasHeaderOnFirstPage (void) const       {       return m_hasHeaderOnFirstPage;  }
67
 
                void setHasHeaderOnFirstPage (const bool hasHeaderOnFirstPage)  {       m_hasHeader = hasHeaderOnFirstPage;     }
68
 
 
69
 
                bool getHasFooterOnFirstPage (void) const       {       return m_hasFooterOnFirstPage;  }
70
 
                void setHasFooterOnFirstPage (const bool hasFooterOnFirstPage)  {       m_hasFooterOnFirstPage = hasFooterOnFirstPage;  }
71
 
        };
 
40
class DocumentInfo
 
41
{
 
42
private:
 
43
    Word m_numObjects;
 
44
    bool m_hasHeader;
 
45
    bool m_hasFooter;
 
46
    bool m_hasHeaderOnFirstPage;
 
47
    bool m_hasFooterOnFirstPage;
 
48
 
 
49
public:
 
50
    DocumentInfo() {
 
51
        m_numObjects = 0;
 
52
        m_hasHeader = m_hasFooter = false;
 
53
        m_hasHeaderOnFirstPage = m_hasFooterOnFirstPage = false;
 
54
    }
 
55
 
 
56
    Word getNumObjects(void) const {
 
57
        return m_numObjects;
 
58
    }
 
59
    void setNumObjects(const Word numObjects) {
 
60
        m_numObjects = numObjects;
 
61
    }
 
62
 
 
63
    bool getHasHeader(void) const {
 
64
        return m_hasHeader;
 
65
    }
 
66
    void setHasHeader(const bool hasHeader) {
 
67
        m_hasHeader = hasHeader;
 
68
    }
 
69
 
 
70
    bool getHasFooter(void) const {
 
71
        return m_hasFooter;
 
72
    }
 
73
    void setHasFooter(const bool hasFooter) {
 
74
        m_hasFooter = hasFooter;
 
75
    }
 
76
 
 
77
    bool getHasHeaderOnFirstPage(void) const {
 
78
        return m_hasHeaderOnFirstPage;
 
79
    }
 
80
    void setHasHeaderOnFirstPage(const bool hasHeaderOnFirstPage) {
 
81
        m_hasHeader = hasHeaderOnFirstPage;
 
82
    }
 
83
 
 
84
    bool getHasFooterOnFirstPage(void) const {
 
85
        return m_hasFooterOnFirstPage;
 
86
    }
 
87
    void setHasFooterOnFirstPage(const bool hasFooterOnFirstPage) {
 
88
        m_hasFooterOnFirstPage = hasFooterOnFirstPage;
 
89
    }
 
90
};
72
91
#endif
73
92
 
74
93
 
75
 
        // [PRIVATE] don't use
76
 
        class FormatInfo : public NeedsDevice, public NeedsHeader
77
 
        {
78
 
        private:
79
 
                List <FormatInfoPage> m_formatInfoPageList;
80
 
                List <FormatInfoPage>::Iterator m_formatInfoPageIterator;
81
 
                DWord m_nextChar;
82
 
 
83
 
                enum FormatInfoPageTypes m_type;
84
 
 
85
 
                friend class InternalParser;
86
 
                friend class InternalGenerator;
87
 
                        Word m_leftMargin, m_rightMargin;       // for ParaType only
88
 
                        FontTable *m_fontTable; // for CharType only
89
 
                        void setMargins (const Word leftMargin, const Word rightMargin)
90
 
                        {
91
 
                                m_leftMargin = leftMargin, m_rightMargin = rightMargin;
92
 
                        }
93
 
                        void setFontTable (FontTable *fontTable)        {       m_fontTable = fontTable;        }
94
 
 
95
 
                FormatInfo &operator= (const FormatInfo &rhs);  // TODO
96
 
        public:
97
 
                FormatInfo ();
98
 
                virtual ~FormatInfo ();
99
 
 
100
 
                void setType (const enum FormatInfoPageTypes t) {       m_type = t;     }
101
 
 
102
 
                bool readFromDevice (void);
103
 
                bool writeToDevice (const void *defaultProperty);
104
 
 
105
 
                void *begin (void);
106
 
                void *next (void);
107
 
                bool end (void) /*const*/;
108
 
 
109
 
                bool add (const void *property, const bool force = false);
110
 
        };
111
 
 
112
 
 
113
 
        class Generator;
114
 
        class Parser
115
 
        {
116
 
        protected:
117
 
                Generator *m_generator;
118
 
 
119
 
        public:
120
 
                Parser (Generator *generator = NULL)
121
 
                {
122
 
                        setGenerator (generator);
123
 
                }
124
 
                
125
 
                virtual ~Parser ()
126
 
                {
127
 
                }
128
 
 
129
 
                void setGenerator (Generator *generator)
130
 
                {
131
 
                        m_generator = generator;
132
 
                }
133
 
 
134
 
                // Note: You aren't allowed to call parse() more than once.
135
 
                //       Create another Parser instance if you need to reparse.
136
 
                //
137
 
                //       This permits subclasses implementations of parse() to defer
138
 
                //       uninitialization to the destructor, if desired.
139
 
                virtual bool parse (void) = 0;
140
 
        };
141
 
 
142
 
 
143
 
        class Generator
144
 
        {
145
 
        public:
146
 
                Generator ();
147
 
                virtual ~Generator ();
148
 
 
149
 
                /**
150
 
                 *
151
 
                 * Document block (you must implement these signals)
152
 
                 *
153
 
                 */
154
 
                virtual bool writeDocumentBegin (const Word format, const PageLayout *pageLayout) = 0;
155
 
                virtual bool writeDocumentEnd (const Word format, const PageLayout *pageLayout) = 0;
156
 
 
157
 
                /**
158
 
                 *
159
 
                 * Various sections in the document
160
 
                 *
161
 
                 */
162
 
                virtual bool writeFooterBegin (void)    {       return true;    }
163
 
                virtual bool writeFooterEnd (void)      {       return true;    }
164
 
 
165
 
                virtual bool writeHeaderBegin (void)    {       return true;    }
166
 
                virtual bool writeHeaderEnd (void)      {       return true;    }
167
 
 
168
 
                virtual bool writeBodyBegin (void) = 0;
169
 
                virtual bool writeBodyEnd (void)        = 0;
170
 
 
171
 
                /**
172
 
                 *
173
 
                 * Paragraph block
174
 
                 *
175
 
                 */
176
 
                virtual bool writeParaInfoBegin (const FormatParaProperty * /*paraProperty*/,
177
 
                                                                                                        const OLE * /*ole*/ = NULL,
178
 
                                                                                                        const Image * /*image*/ = NULL) {       return true;    }
179
 
                virtual bool writeParaInfoEnd (const FormatParaProperty * /*paraProperty*/,
180
 
                                                                                                        const OLE * /*ole*/ = NULL,
181
 
                                                                                                        const Image * /*image*/ = NULL) {       return true;    }
182
 
 
183
 
                /**
184
 
                 *
185
 
                 * Character block
186
 
                 *
187
 
                 */
188
 
                virtual bool writeCharInfoBegin (const FormatCharProperty * /*charProperty*/)   {       return true;    }
189
 
                virtual bool writeCharInfoEnd (const FormatCharProperty * /*charProperty*/,
190
 
                                                                                                        const bool /*endOfParagraph*/ = false)  {       return true;    }
191
 
 
192
 
 
193
 
                /**
194
 
                 *
195
 
                 * Binary output
196
 
                 *
197
 
                 */
198
 
                virtual bool writeBinary (const Byte * /*buffer*/, const DWord /*length*/)      {       return true;    }
199
 
 
200
 
 
201
 
                /*
202
 
                 *
203
 
                 * Text output
204
 
                 *
205
 
                 */
206
 
 
207
 
                /**
208
 
                 *
209
 
                 * processText
210
 
                 * this calls writeText, newLineWrite etc...
211
 
                 */
212
 
                bool processText (const Byte *string, bool willReachEndOfParagraph);
213
 
                virtual bool writeText (const Byte *string) = 0;
214
 
 
215
 
 
216
 
                /**
217
 
                 *
218
 
                 * Miscellaneous special signals called by processText
219
 
                 *
220
 
                 */
221
 
                virtual bool writePageNew (const int /*pageNumberClaimed*/ = 0)
222
 
                {
223
 
                        return true;
224
 
                }
225
 
                virtual bool writePageBreak (void)
226
 
                {
227
 
                        return writeText ((const Byte *) "\xc");        // i.e. (char)12
228
 
                }
229
 
                virtual bool writePageNumber (void)
230
 
                {
231
 
                        return writeText ((const Byte *) "\x1");        // i.e. (char)1
232
 
                }
233
 
                virtual bool writeCarriageReturn (void)
234
 
                {
235
 
                        return writeText ((const Byte *) "\xd");        // i.e. (char)13
236
 
                }
237
 
                virtual bool writeNewLine (const bool /*endOfParagraph*/ = true)
238
 
                {
239
 
                        return writeText ((const Byte *) "\n"); // i.e. (char)10
240
 
                }
241
 
                virtual bool writeOptionalHyphen (void)
242
 
                {
243
 
                        return writeText ((const Byte *) "-");
244
 
                }
245
 
 
246
 
                /**
247
 
                 *
248
 
                 * implement this signal to show the progress of the conversion
249
 
                 * (0 <= value <= 100)
250
 
                 *
251
 
                 */
252
 
                virtual void sigProgress (const int /*value*/)  {}
253
 
        };
254
 
 
255
 
 
256
 
        class InternalParser : public Parser, public NeedsDevice
257
 
        {
258
 
        private:
259
 
                Header *m_header;
260
 
                SectionTable *m_sectionTable;
261
 
                PageLayout *m_pageLayout;
262
 
                PageTable *m_pageTable;
263
 
                FontTable *m_fontTable;
264
 
                FormatInfo *m_paragraphInfo, *m_characterInfo;
265
 
 
266
 
                Image *m_image;
267
 
                OLE *m_ole;
268
 
 
269
 
        public:
270
 
                InternalParser ();
271
 
                virtual ~InternalParser ();
272
 
 
273
 
                bool parse (void);
274
 
        };
275
 
 
276
 
 
277
 
        class InternalGenerator : public Generator, public NeedsDevice
278
 
        {
279
 
        private:
280
 
                Header *m_header;
281
 
                SectionTable *m_sectionTable;
282
 
                PageLayout *m_pageLayout;
283
 
                PageTable *m_pageTable;
284
 
                FontTable *m_fontTable;
285
 
                FormatInfo *m_paragraphInfo, *m_characterInfo;
286
 
 
287
 
                Image *m_image;
288
 
                OLE *m_ole;
289
 
                
290
 
                bool seekNextPage (void);
291
 
                
292
 
        public:
293
 
                InternalGenerator ();
294
 
                virtual ~InternalGenerator ();
295
 
 
296
 
                bool writeDocumentBegin (const Word format, const PageLayout *pageLayout);
297
 
                bool writeDocumentEnd (const Word format, const PageLayout *pageLayout);
298
 
 
299
 
                bool writeFooterBegin (void)
300
 
                {
301
 
                        // don't care
302
 
                        return true;
303
 
                }
304
 
                bool writeFooterEnd(void)
305
 
                {
306
 
                        // don't care
307
 
                        return true;
308
 
                }
309
 
 
310
 
                bool writeHeaderBegin (void)
311
 
                {
312
 
                        // don't care
313
 
                        return true;
314
 
                }
315
 
                bool writeHeaderEnd (void)
316
 
                {
317
 
                        // don't care
318
 
                        return true;
319
 
                }
320
 
 
321
 
                bool writeBodyBegin (void)
322
 
                {
323
 
                        // don't care
324
 
                        return true;
325
 
                }
326
 
 
327
 
                bool writeBodyEnd (void)
328
 
                {
329
 
                        // don't care
330
 
                        return true;
331
 
                }
332
 
 
333
 
 
334
 
                /**
335
 
                 *
336
 
                 * Paragraph block
337
 
                 *
338
 
                 */
339
 
                bool writeParaInfoBegin (const FormatParaProperty *paraProperty,
340
 
                                                                                        const OLE *oleHeader = NULL,
341
 
                                                                                        const Image *imageHeader = NULL);
342
 
                bool writeParaInfoEnd (const FormatParaProperty *paraProperty,
343
 
                                                                                const OLE *oleHeader = NULL,
344
 
                                                                                const Image *imageHeader = NULL);
345
 
 
346
 
                bool writeCharInfoBegin (const FormatCharProperty *charProperty);
347
 
                bool writeCharInfoEnd (const FormatCharProperty *charProperty,
348
 
                                                                                const bool endOfParagraph = false);
349
 
 
350
 
 
351
 
                bool writeBinary (const Byte *buffer, const DWord length);
352
 
 
353
 
 
354
 
                bool writeText (const Byte *string);
355
 
 
356
 
 
357
 
                bool writePageNew (const int pageNumberClaimed = 0);
358
 
 
359
 
                bool writePageBreak (void)
360
 
                {
361
 
                        return writeText ((const Byte *) "\xC");        // i.e. (char)12
362
 
                }
363
 
                bool writePageNumber (void)
364
 
                {
365
 
                        return writeText ((const Byte *) "\x1");        // i.e. (char)1
366
 
                }
367
 
                bool writeCarriageReturn (void)
368
 
                {
369
 
                        // it's DOS/Windows(r) which has \r\n newlines
370
 
                        return writeText ((const Byte *) "\xD");        // i.e. (char)13
371
 
                }
372
 
                bool writeNewLine (const bool)
373
 
                {
374
 
                        return writeText ((const Byte *) "\n"); // i.e. (char)10
375
 
                }
376
 
                bool writeOptionalHyphen (void)
377
 
                {
378
 
                        return writeText ((const Byte *) "\x1F");       // i.e. (char)31
379
 
                }
380
 
 
381
 
                void sigProgress (const int)
382
 
                {
383
 
                        // don't care
384
 
                        return;
385
 
                }
386
 
 
387
 
        };
388
 
}       // namespace MSWrite    {
389
 
 
390
 
#endif  // __LIBMSWRITE_H__
 
94
// [PRIVATE] don't use
 
95
class FormatInfo : public NeedsDevice, public NeedsHeader
 
96
{
 
97
private:
 
98
    List <FormatInfoPage> m_formatInfoPageList;
 
99
    List <FormatInfoPage>::Iterator m_formatInfoPageIterator;
 
100
    DWord m_nextChar;
 
101
 
 
102
    enum FormatInfoPageTypes m_type;
 
103
 
 
104
    friend class InternalParser;
 
105
    friend class InternalGenerator;
 
106
    Word m_leftMargin, m_rightMargin; // for ParaType only
 
107
    FontTable *m_fontTable; // for CharType only
 
108
    void setMargins(const Word leftMargin, const Word rightMargin) {
 
109
        m_leftMargin = leftMargin, m_rightMargin = rightMargin;
 
110
    }
 
111
    void setFontTable(FontTable *fontTable) {
 
112
        m_fontTable = fontTable;
 
113
    }
 
114
 
 
115
    FormatInfo &operator= (const FormatInfo &rhs); // TODO
 
116
public:
 
117
    FormatInfo();
 
118
    virtual ~FormatInfo();
 
119
 
 
120
    void setType(const enum FormatInfoPageTypes t) {
 
121
        m_type = t;
 
122
    }
 
123
 
 
124
    bool readFromDevice(void);
 
125
    bool writeToDevice(const void *defaultProperty);
 
126
 
 
127
    void *begin(void);
 
128
    void *next(void);
 
129
    bool end(void) /*const*/;
 
130
 
 
131
    bool add(const void *property, const bool force = false);
 
132
};
 
133
 
 
134
 
 
135
class Generator;
 
136
class Parser
 
137
{
 
138
protected:
 
139
    Generator *m_generator;
 
140
 
 
141
public:
 
142
    Parser(Generator *generator = NULL) {
 
143
        setGenerator(generator);
 
144
    }
 
145
 
 
146
    virtual ~Parser() {
 
147
    }
 
148
 
 
149
    void setGenerator(Generator *generator) {
 
150
        m_generator = generator;
 
151
    }
 
152
 
 
153
    // Note: You aren't allowed to call parse() more than once.
 
154
    //       Create another Parser instance if you need to reparse.
 
155
    //
 
156
    //       This permits subclasses implementations of parse() to defer
 
157
    //       uninitialization to the destructor, if desired.
 
158
    virtual bool parse(void) = 0;
 
159
};
 
160
 
 
161
 
 
162
class Generator
 
163
{
 
164
public:
 
165
    Generator();
 
166
    virtual ~Generator();
 
167
 
 
168
    /**
 
169
     *
 
170
     * Document block (you must implement these signals)
 
171
     *
 
172
     */
 
173
    virtual bool writeDocumentBegin(const Word format, const PageLayout *pageLayout) = 0;
 
174
    virtual bool writeDocumentEnd(const Word format, const PageLayout *pageLayout) = 0;
 
175
 
 
176
    /**
 
177
     *
 
178
     * Various sections in the document
 
179
     *
 
180
     */
 
181
    virtual bool writeFooterBegin(void) {
 
182
        return true;
 
183
    }
 
184
    virtual bool writeFooterEnd(void) {
 
185
        return true;
 
186
    }
 
187
 
 
188
    virtual bool writeHeaderBegin(void) {
 
189
        return true;
 
190
    }
 
191
    virtual bool writeHeaderEnd(void) {
 
192
        return true;
 
193
    }
 
194
 
 
195
    virtual bool writeBodyBegin(void) = 0;
 
196
    virtual bool writeBodyEnd(void) = 0;
 
197
 
 
198
    /**
 
199
     *
 
200
     * Paragraph block
 
201
     *
 
202
     */
 
203
    virtual bool writeParaInfoBegin(const FormatParaProperty * /*paraProperty*/,
 
204
                                    const OLE * /*ole*/ = NULL,
 
205
                                    const Image * /*image*/ = NULL) {
 
206
        return true;
 
207
    }
 
208
    virtual bool writeParaInfoEnd(const FormatParaProperty * /*paraProperty*/,
 
209
                                  const OLE * /*ole*/ = NULL,
 
210
                                  const Image * /*image*/ = NULL) {
 
211
        return true;
 
212
    }
 
213
 
 
214
    /**
 
215
     *
 
216
     * Character block
 
217
     *
 
218
     */
 
219
    virtual bool writeCharInfoBegin(const FormatCharProperty * /*charProperty*/) {
 
220
        return true;
 
221
    }
 
222
    virtual bool writeCharInfoEnd(const FormatCharProperty * /*charProperty*/,
 
223
                                  const bool /*endOfParagraph*/ = false) {
 
224
        return true;
 
225
    }
 
226
 
 
227
 
 
228
    /**
 
229
     *
 
230
     * Binary output
 
231
     *
 
232
     */
 
233
    virtual bool writeBinary(const Byte * /*buffer*/, const DWord /*length*/) {
 
234
        return true;
 
235
    }
 
236
 
 
237
 
 
238
    /*
 
239
     *
 
240
     * Text output
 
241
     *
 
242
     */
 
243
 
 
244
    /**
 
245
     *
 
246
     * processText
 
247
     * this calls writeText, newLineWrite etc...
 
248
     */
 
249
    bool processText(const Byte *string, bool willReachEndOfParagraph);
 
250
    virtual bool writeText(const Byte *string) = 0;
 
251
 
 
252
 
 
253
    /**
 
254
     *
 
255
     * Miscellaneous special signals called by processText
 
256
     *
 
257
     */
 
258
    virtual bool writePageNew(const int /*pageNumberClaimed*/ = 0) {
 
259
        return true;
 
260
    }
 
261
    virtual bool writePageBreak(void) {
 
262
        return writeText((const Byte *) "\xc");  // i.e. (char)12
 
263
    }
 
264
    virtual bool writePageNumber(void) {
 
265
        return writeText((const Byte *) "\x1");  // i.e. (char)1
 
266
    }
 
267
    virtual bool writeCarriageReturn(void) {
 
268
        return writeText((const Byte *) "\xd");  // i.e. (char)13
 
269
    }
 
270
    virtual bool writeNewLine(const bool /*endOfParagraph*/ = true) {
 
271
        return writeText((const Byte *) "\n");  // i.e. (char)10
 
272
    }
 
273
    virtual bool writeOptionalHyphen(void) {
 
274
        return writeText((const Byte *) "-");
 
275
    }
 
276
 
 
277
    /**
 
278
     *
 
279
     * implement this signal to show the progress of the conversion
 
280
     * (0 <= value <= 100)
 
281
     *
 
282
     */
 
283
    virtual void sigProgress(const int /*value*/) {}
 
284
};
 
285
 
 
286
 
 
287
class InternalParser : public Parser, public NeedsDevice
 
288
{
 
289
private:
 
290
    Header *m_header;
 
291
    SectionTable *m_sectionTable;
 
292
    PageLayout *m_pageLayout;
 
293
    PageTable *m_pageTable;
 
294
    FontTable *m_fontTable;
 
295
    FormatInfo *m_paragraphInfo, *m_characterInfo;
 
296
 
 
297
    Image *m_image;
 
298
    OLE *m_ole;
 
299
 
 
300
public:
 
301
    InternalParser();
 
302
    virtual ~InternalParser();
 
303
 
 
304
    bool parse(void);
 
305
};
 
306
 
 
307
 
 
308
class InternalGenerator : public Generator, public NeedsDevice
 
309
{
 
310
private:
 
311
    Header *m_header;
 
312
    SectionTable *m_sectionTable;
 
313
    PageLayout *m_pageLayout;
 
314
    PageTable *m_pageTable;
 
315
    FontTable *m_fontTable;
 
316
    FormatInfo *m_paragraphInfo, *m_characterInfo;
 
317
 
 
318
    Image *m_image;
 
319
    OLE *m_ole;
 
320
 
 
321
    bool seekNextPage(void);
 
322
 
 
323
public:
 
324
    InternalGenerator();
 
325
    virtual ~InternalGenerator();
 
326
 
 
327
    bool writeDocumentBegin(const Word format, const PageLayout *pageLayout);
 
328
    bool writeDocumentEnd(const Word format, const PageLayout *pageLayout);
 
329
 
 
330
    bool writeFooterBegin(void) {
 
331
        // don't care
 
332
        return true;
 
333
    }
 
334
    bool writeFooterEnd(void) {
 
335
        // don't care
 
336
        return true;
 
337
    }
 
338
 
 
339
    bool writeHeaderBegin(void) {
 
340
        // don't care
 
341
        return true;
 
342
    }
 
343
    bool writeHeaderEnd(void) {
 
344
        // don't care
 
345
        return true;
 
346
    }
 
347
 
 
348
    bool writeBodyBegin(void) {
 
349
        // don't care
 
350
        return true;
 
351
    }
 
352
 
 
353
    bool writeBodyEnd(void) {
 
354
        // don't care
 
355
        return true;
 
356
    }
 
357
 
 
358
 
 
359
    /**
 
360
     *
 
361
     * Paragraph block
 
362
     *
 
363
     */
 
364
    bool writeParaInfoBegin(const FormatParaProperty *paraProperty,
 
365
                            const OLE *oleHeader = NULL,
 
366
                            const Image *imageHeader = NULL);
 
367
    bool writeParaInfoEnd(const FormatParaProperty *paraProperty,
 
368
                          const OLE *oleHeader = NULL,
 
369
                          const Image *imageHeader = NULL);
 
370
 
 
371
    bool writeCharInfoBegin(const FormatCharProperty *charProperty);
 
372
    bool writeCharInfoEnd(const FormatCharProperty *charProperty,
 
373
                          const bool endOfParagraph = false);
 
374
 
 
375
 
 
376
    bool writeBinary(const Byte *buffer, const DWord length);
 
377
 
 
378
 
 
379
    bool writeText(const Byte *string);
 
380
 
 
381
 
 
382
    bool writePageNew(const int pageNumberClaimed = 0);
 
383
 
 
384
    bool writePageBreak(void) {
 
385
        return writeText((const Byte *) "\xC");  // i.e. (char)12
 
386
    }
 
387
    bool writePageNumber(void) {
 
388
        return writeText((const Byte *) "\x1");  // i.e. (char)1
 
389
    }
 
390
    bool writeCarriageReturn(void) {
 
391
        // it's DOS/Windows(r) which has \r\n newlines
 
392
        return writeText((const Byte *) "\xD");  // i.e. (char)13
 
393
    }
 
394
    bool writeNewLine(const bool) {
 
395
        return writeText((const Byte *) "\n");  // i.e. (char)10
 
396
    }
 
397
    bool writeOptionalHyphen(void) {
 
398
        return writeText((const Byte *) "\x1F");  // i.e. (char)31
 
399
    }
 
400
 
 
401
    void sigProgress(const int) {
 
402
        // don't care
 
403
        return;
 
404
    }
 
405
 
 
406
};
 
407
} // namespace MSWrite {
 
408
 
 
409
#endif // __LIBMSWRITE_H__
391
410
 
392
411
// end of libmswrite.h