1 /************************************************************************/
2 /*									*/
3 /*  Reading RTF.							*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef		RTF_READER_IMPL_H
8 #   define		RTF_READER_IMPL_H
9 
10 #   include	<docBuf.h>
11 #   include	<docNoteProperties.h>
12 #   include	<sioGeneral.h>
13 #   include	<docTabStop.h>
14 #   include	<docTabStopList.h>
15 #   include	<docListOverride.h>
16 #   include	<docDocumentList.h>
17 #   include	<docBorderProperties.h>
18 #   include	"docRtfTextConverter.h"
19 #   include	"docRtfControlWord.h"
20 
21 struct RtfReader;
22 typedef struct RtfReader RtfReader;
23 
24 /************************************************************************/
25 /*									*/
26 /*  Context for Reading RTF.						*/
27 /*									*/
28 /************************************************************************/
29 
30 struct RtfFieldStackLevel;
31 
32 typedef struct RtfReadingState
33     {
34     int				rrsBytesPerUnicode;
35     int				rrsUnicodeBytesToSkip;
36 
37     TextAttribute		rrsTextAttribute;
38 				    /************************************/
39 				    /*  Font number is in buffer terms.	*/
40 				    /*  NOT in file terms.		*/
41 				    /************************************/
42     int				rrsTextCharset;
43     ItemShading			rrsTextShading;
44     int				rrsTextShadingChanged;
45     ParagraphProperties		rrsParagraphProperties;
46     TabStopList			rrsTabStopList;
47     ItemShading			rrsParagraphShading;
48     FrameProperties		rrsParaFrameProperties;
49 
50     MemoryBuffer		rrsSavedText;
51 
52     struct RtfReadingState *	rrsPrev;
53     } RtfReadingState;
54 
55 typedef int (*RtfAddTextParticule)(	struct RtfReader *	rr,
56 					const char *		text,
57 					int			len );
58 
59 struct RtfReader
60     {
61     RtfReadingState *		rrcState;
62     RtfAddTextParticule		rrcAddParticule;
63     SimpleInputStream *		rrcSis;
64 
65 				/**
66 				 *  Type of BufferItem. Still retated
67 				 *  to the depth in the document
68 				 */
69     int				rrcLevel;
70 
71 				/**
72 				 *  Incremented/Decremented around groups
73 				 *  with an unknown control word. This is
74 				 *  to ignore everything inside the group and
75 				 *  to only complain about the unknown group
76 				 *  and to shut up about its contents.
77 				 */
78     int				rrcInIgnoredGroup;
79 
80 				/**
81 				 *  Complain about unknown control words
82 				 */
83     int				rrcComplainUnknown;
84 
85 				/**
86 				 *  Character that could not be unread
87 				 *  using ungetc().
88 				 */
89     int				rrcCharacterAhead;
90 
91     int				rrcAfterNoteref;
92 
93     int				rrReadFlags;
94 
95     int				rrCurrentLine;
96     struct BufferDocument *	rrDocument;
97     struct DocumentTree *	rrcTree;
98     struct BufferItem *		rrcNode;
99 				/****************************************/
100 				/*  The current position in the input.	*/
101 				/****************************************/
102 				/****************************************/
103 				/*  Text attributes of the current pos.	*/
104 				/****************************************/
105     FrameProperties		rrcRowFrameProperties;
106 
107     CellProperties		rrcCellProperties;
108     PropertyMask		rrcCellPropertyMask;
109     ItemShading			rrcCellShading;
110 
111     SectionProperties		rrcSectionProperties;
112     PropertyMask		rrcSectionPropertyMask;
113     int				rrcSectionColumn;
114 
115     RowProperties		rrcRowProperties;
116     PropertyMask		rrcRowPropertyMask;
117     ItemShading			rrcRowShading;
118 
119     BorderProperties		rrcBorderProperties;
120 
121     struct DrawingShape *	rrDrawingShape;
122     const RtfControlWord *	rrShapeProperty;
123     MemoryBuffer		rrShapePropertyName;
124     MemoryBuffer		rrShapePropertyValue;
125 
126     int				rrcNextObjectVertex;
127 				    /**
128 				     *  The style in the stylesheet that is
129 				     *  built up before it is inserted in the
130 				     *  document. It is abused to hold the
131 				     *  new properties in a property change.
132 				     */
133     DocumentStyle		rrcStyle;
134     DocumentProperties		rrcDocumentProperties;
135     PropertyMask		rrcDocPropertyMask;
136     TabStop			rrcTabStop;
137     RGB8Color			rrcColor;
138     int				rrcGotComponent;
139     struct tm			rrcTm;
140     unsigned char *		rrcInfoText;
141     SelectionScope		rrcSelectionScope;
142 
143     ParagraphNumber		rrcParagraphNumber;
144     ItemShading			rrcParagraphNumberTextShading;
145     ParagraphNumber *		rrcParagraphNumbers;
146     int				rrcParagraphNumberCount;
147 
148     DocumentList		rrcDocumentList;
149     ListLevel			rrcDocumentListLevel;
150     MemoryBuffer		rrcListLevelText;
151     MemoryBuffer		rrcListLevelNumbers;
152 
153     ListOverride		rrcListOverride;
154     ListOverrideLevel		rrcListOverrideLevel;
155 
156 				/****************************************/
157 				/*  Document properties.		*/
158 				/****************************************/
159     DocumentFont		rrcCurrentFont;
160     EncodedFont			rrcCurrentEncodedFont;
161     PagedList			rrcEncodedFontList;
162 
163     int				rrcDefaultFont;
164     int				rrcDefaultFontDbch;
165     int				rrcDefaultFontLoch;
166     int				rrcDefaultFontHich;
167     int				rrcDefaultFontBi;
168 
169 				/****************************************/
170 				/*  For reading the font table.		*/
171 				/*  Style sheet.			*/
172 				/****************************************/
173     int				rrcInsertedObjectNr;
174     PictureProperties		rrcPictureProperties;
175     PropertyMask		rrcPicturePropMask;
176     MemoryBuffer		rrcBookmark;
177     struct RtfFieldStackLevel *	rrcFieldStack;
178     int				rrcLastFieldNumber;
179 				/****************************************/
180 				/*  For reading 'objects' and pictures.	*/
181 				/*  For reading 'fields'.		*/
182 				/****************************************/
183     int				rrAfterParaHeadField;
184     int				rrParagraphBreakOverride;
185     int				rrcGotDocGeometry;
186 				/****************************************/
187 				/*  For coping with the way word saves	*/
188 				/*  {\pntext ... }			*/
189 				/****************************************/
190 
191     struct TextConverter *	rrRtfTextConverter;
192     struct TextConverter *	rrTextTextConverter;
193 
194 				/**
195 				 * Only used for reading Undo/Redo traces.
196 				 * -1: old; 1: new
197 				 */
198     int				rrcTraceReadWhat;
199     int				rrcTraceCommand;
200     int				rrcTraceSelectionPosition;
201     int				rrcTraceFieldKind;
202     int				rrcTraceInProps;
203 
204     SelectionScope		rrcTraceOldSelectionScope;
205     EditRange			rrcTraceOldRange;
206     int				rrcTraceOldCol0;
207     int				rrcTraceOldCol1;
208     int				rrcTraceOldPage;
209     int				rrcTraceOldColumn;
210 
211     int				rrcTracePropLevel;
212     int				rrcTraceTargetType;
213 
214     SelectionScope		rrcTraceNewSelectionScope;
215     EditRange			rrcTraceNewRange;
216     int				rrcTraceNewCol0;
217     int				rrcTraceNewCol1;
218     int				rrcTraceNewPage;
219     int				rrcTraceNewColumn;
220 
221     NoteProperties		rrcNoteProperties;
222     PropertyMask		rrcNotePropertyMask;
223     };
224 
225 /************************************************************************/
226 /*									*/
227 /*  What you can find in an RTF file.					*/
228 /*									*/
229 /************************************************************************/
230 
231 #   define	RTFfiCTRLGROUP	1
232 #   define	RTFfiWORD	2
233 #   define	RTFfiCHAR	3
234 #   define	RTFfiTAB	4
235 #   define	RTFfiCLOSE	5
236 #   define	RTFfiSTARGROUP	6
237 #   define	RTFfiTEXTGROUP	7
238 
239 /************************************************************************/
240 
241 /************************************************************************/
242 /*									*/
243 /*  Shortcuts in the definition of property tables.			*/
244 /*									*/
245 /************************************************************************/
246 
247 #   define RTF_TEXT_GROUP( s, id, co ) \
248 		RTF_DEST_CO( s, id, docRtfApplyDocEncodedTextGroup, co )
249 
250 #   define RTF_BYTE_GROUP( s, id, co ) \
251 		RTF_DEST_CO( s, id, docRtfApplyRawBytesGroup, co )
252 
253 /************************************************************************/
254 
255 typedef enum RtfLookupId
256     {
257     RTFlookupXEF,
258     RTFlookupBXE,
259     RTFlookupIXE,
260 
261     RTFlookupTC,
262     RTFlookupTCN,
263     RTFlookupTCF,
264     RTFlookupTCL,
265 
266     RTFlookup_COUNT
267     } RtfLookupId;
268 
269 /************************************************************************/
270 /*									*/
271 /*  Common data.							*/
272 /*									*/
273 /************************************************************************/
274 
275 extern RtfControlWord	docRtfDocumentGroups[];
276 extern const char DOC_RTF_LENIENT_MESSAGE[];
277 
278 /************************************************************************/
279 /*									*/
280 /*  Routine declarations.						*/
281 /*									*/
282 /************************************************************************/
283 
284 extern void docRtfPopReadingState(	RtfReader *		rr );
285 
286 extern const RtfControlWord * docRtfFindPropertyWord(
287 					const char *		controlWord );
288 
289 extern const RtfControlWord * docRtfFindShapePropertyWord(
290 					const char *		controlWord );
291 
292 extern int docRtfFindControl(	RtfReader *		rr,
293 				int *			pC,
294 				char *			controlWord,
295 				int *			pGotArg,
296 				int *			pArg );
297 
298 extern int docRtfIgnoreWord(	const RtfControlWord *	rcw,
299 				int			arg,
300 				RtfReader *		rr );
301 
302 extern int docRtfIgnoreText(	RtfReader *		rr,
303 				const char *		text,
304 				int			len );
305 
306 extern int docRtfRefuseText(	RtfReader *		rr,
307 				const char *		text,
308 				int			len );
309 
310 extern int docRtfSaveDocEncodedText(
311 				RtfReader *		rr,
312 				const char *		text,
313 				int			len );
314 
315 extern int docRtfSaveFontEncodedText(
316 				RtfReader *		rr,
317 				const char *		text,
318 				int			len );
319 
320 extern int docRtfSaveRawBytes(	RtfReader *		rr,
321 				const char *		text,
322 				int			len );
323 
324 extern int docRtfStoreSavedText(char **			pTarget,
325 				int *			pSize,
326 				RtfReader *		rr,
327 				int			removeSemicolon );
328 
329 extern int docRtfFontTable(		const RtfControlWord *	rcw,
330 					int			arg,
331 					RtfReader *		rr );
332 
333 extern int docRtfColorTable(		const RtfControlWord *	rcw,
334 					int			arg,
335 					RtfReader *		rr );
336 
337 extern int docRtfRevisionTable(		const RtfControlWord *	rcw,
338 					int			arg,
339 					RtfReader *		rr );
340 
341 extern int docRtfStylesheet(		const RtfControlWord *	rcw,
342 					int			arg,
343 					RtfReader *		rr );
344 
345 extern int docRtfListTable(		const RtfControlWord *	rcw,
346 					int			arg,
347 					RtfReader *		rr );
348 
349 extern int docRtfReadInfo(		const RtfControlWord *	rcw,
350 					int			arg,
351 					RtfReader *		rr );
352 
353 extern int docRtfRememberDocProperty(	const RtfControlWord *	rcw,
354 					int			arg,
355 					RtfReader *		rr );
356 
357 extern int docRtfReadUnknownGroup(	RtfReader *		rr );
358 
359 extern int docRtfRememberParaFrameProperty(
360 					const RtfControlWord *	rcw,
361 					int			arg,
362 					RtfReader *		rr );
363 
364 extern int docRtfRememberRowFrameProperty(
365 					const RtfControlWord *	rcw,
366 					int			arg,
367 					RtfReader *		rr );
368 
369 extern int docRtfRememberProperty(	const RtfControlWord *	rcw,
370 					int			arg,
371 					RtfReader *		rr );
372 
373 extern int docRtfPopScopeFromFieldStack( RtfReader *		rr );
374 extern int docRtfPopParaFromFieldStack( RtfReader *		rr,
375 					int			paraNr );
376 
377 extern int docRtfRememberParagraphProperty(
378 					const RtfControlWord *	rcw,
379 					int			arg,
380 					RtfReader *		rr );
381 
382 extern int docRtfBeginBorder(	const RtfControlWord *	rcw,
383 				int			arg,
384 				RtfReader *		rr );
385 
386 extern int docRtfBrdrProperty(	const RtfControlWord *	rcw,
387 				int			arg,
388 				RtfReader *		rr );
389 
390 extern int docRtfRememberSectionProperty(
391 					const RtfControlWord *	rcw,
392 					int			arg,
393 					RtfReader *		rr );
394 
395 extern int docRtfRememberTextProperty(	const RtfControlWord *	rcw,
396 					int			arg,
397 					RtfReader *		rr );
398 
399 extern int docRtfRememberPntextProperty( const RtfControlWord *	rcw,
400 					int			arg,
401 					RtfReader *		rr );
402 
403 extern int docRtfRememberCellProperty(	const RtfControlWord *	rcw,
404 					int			arg,
405 					RtfReader *		rr );
406 
407 extern int docRtfRememberCellInstanceProperty(
408 					const RtfControlWord *	rcw,
409 					int			arg,
410 					RtfReader *		rr );
411 
412 extern int docRtfRememberRowProperty(	const RtfControlWord *	rcw,
413 					int			arg,
414 					RtfReader *		rr );
415 
416 extern int docRtfRememberStyleProperty(	const RtfControlWord *	rcw,
417 					int			arg,
418 					RtfReader *		rr );
419 
420 extern int docRtfRememberListLevelProperty(
421 					const RtfControlWord *	rcw,
422 					int			arg,
423 					RtfReader *		rr );
424 
425 extern int docRtfRememberListProperty(	const RtfControlWord *	rcw,
426 					int			arg,
427 					RtfReader *		rr );
428 
429 extern void docRtfPushReadingState(	RtfReader *		rr,
430 					RtfReadingState *	rrs );
431 
432 extern const RtfControlWord * docRtfFindWord(
433 					const char *		controlWord,
434 					const RtfControlWord *	controlWords );
435 
436 extern int docRtfApplyControlWord(	const RtfControlWord *	rcw,
437 					int			gotArg,
438 					int			arg,
439 					RtfReader *		rr );
440 
441 extern int docRtfReadGroup(	const RtfControlWord *	rcw,
442 				int			gotArg,
443 				int			arg,
444 				RtfReader *		rr,
445 				const RtfControlWord *	groupWords,
446 				RtfAddTextParticule	addParticule,
447 				RtfCommitGroup		commitGroup );
448 
449 extern int docRtfReadGroupX(	const RtfControlWord *	rcw,
450 				const RtfControlWord *	applyFirst,
451 				int			gotArg,
452 				int			arg,
453 				RtfReader *		rr,
454 				const RtfControlWord *	groupWords,
455 				RtfAddTextParticule	addParticule,
456 				RtfCommitGroup		commitGroup );
457 
458 extern int docRtfSkipGroup(	const RtfControlWord *	groupRcw,
459 				int			ignored_arg,
460 				RtfReader *		rr );
461 
462 extern int docRtfConsumeGroup(	const RtfControlWord *	applyFirst,
463 				int			gotArg,
464 				int			arg,
465 				RtfReader *		rr,
466 				const RtfControlWord *	groupWords,
467 				RtfAddTextParticule	addParticule );
468 
469 extern int docRtfReadPict(	const RtfControlWord *	rcw,
470 				int			arg,
471 				RtfReader *		rr );
472 
473 extern int docRtfReadShpXPict(	const RtfControlWord *	rcw,
474 				int			arg,
475 				RtfReader *		rr );
476 
477 extern int docRtfReadObject(	const RtfControlWord *	rcw,
478 				int			arg,
479 				RtfReader *		rr );
480 
481 extern int docRtfReadDrawingObject(
482 				const RtfControlWord *	rcw,
483 				int			arg,
484 				RtfReader *		rr );
485 
486 extern int docRtfReadShape(	const RtfControlWord *	rcw,
487 				int			arg,
488 				RtfReader *		rr );
489 
490 extern int docRtfTextParticule(	RtfReader *		rr,
491 				const char *		text,
492 				int			len );
493 
494 extern int docRtfReadField(	const RtfControlWord *	rcw,
495 				int			arg,
496 				RtfReader *		rr );
497 
498 extern int docRtfReadTextField(	const RtfControlWord *	rcw,
499 				int			arg,
500 				RtfReader *		rr );
501 
502 extern int docRtfLookupEntry(	const RtfControlWord *	rcw,
503 				int			arg,
504 				RtfReader *		rr );
505 
506 extern int docRtfReadExtTree(	const RtfControlWord *	rcw,
507 				int			arg,
508 				RtfReader *		rr );
509 
510 extern int docRtfReadFootnote(	const RtfControlWord *	rcw,
511 				int			arg,
512 				RtfReader *		rr );
513 
514 extern int docRtfBkmkStart(	const RtfControlWord *	rcw,
515 				int			arg,
516 				RtfReader *		rr );
517 
518 extern int docRtfBkmkEnd(	const RtfControlWord *	rcw,
519 				int			arg,
520 				RtfReader *		rr );
521 
522 extern DocumentField * docRtfSpecialField(
523 				int			fieldKind,
524 				const char *		fieldinst,
525 				int			fieldsize,
526 				const char *		fieldRslt,
527 				RtfReader *		rr );
528 
529 extern int docRtfTextSpecialToField(	const RtfControlWord *	rcw,
530 					int			arg,
531 					RtfReader *		rr );
532 
533 extern int docRtfRememberListOverrideLevelProperty(
534 					const RtfControlWord *	rcw,
535 					int			arg,
536 					RtfReader *		rr );
537 
538 extern int docRtfRememberListOverrideProperty(
539 					const RtfControlWord *	rcw,
540 					int			arg,
541 					RtfReader *		rr );
542 
543 extern int docRtfListOverrideTable(	const RtfControlWord *	rcw,
544 					int			arg,
545 					RtfReader *		rr );
546 
547 extern int docRtfRememberTabStopProperty(
548 				const RtfControlWord *		rcw,
549 				int				arg,
550 				RtfReader *			rr );
551 
552 extern int docRtfFontProperty(	const RtfControlWord *		rcw,
553 				int				arg,
554 				RtfReader *			rr );
555 
556 extern int docRtfObjectProperty(	const RtfControlWord *	rcw,
557 					int			arg,
558 					RtfReader *		rr );
559 
560 extern int docRtfPictureProperty(	const RtfControlWord *	rcw,
561 					int			arg,
562 					RtfReader *		rr );
563 
564 extern int docRtfTextSpecialChar(	const RtfControlWord *	rcw,
565 					int			arg,
566 					RtfReader *		rr );
567 
568 extern int docRtfTextUnicode(		const RtfControlWord *	rcw,
569 					int			arg,
570 					RtfReader *		rr );
571 
572 extern int docRtfTextSpecialParticule(	const RtfControlWord *	rcw,
573 					int			arg,
574 					RtfReader *		rr );
575 
576 extern int docRtfTextBidiMark(		const RtfControlWord *	rcw,
577 					int			arg,
578 					RtfReader *		rr );
579 
580 extern int docRtfDrawingObjectProperty(	const RtfControlWord *	rcw,
581 					int			arg,
582 					RtfReader *		rr );
583 
584 extern int docRtfDrawingObjectCoordinate(
585 					const RtfControlWord *	rcw,
586 					int			arg,
587 					RtfReader *		rr );
588 
589 extern int docRtfShpProperty(		const RtfControlWord *	rcw,
590 					int			arg,
591 					RtfReader *		rr );
592 
593 extern int docRtfPnProperty(		const RtfControlWord *	rcw,
594 					int			arg,
595 					RtfReader *		rr );
596 
597 extern int docRtfHierarchy(		const RtfControlWord *	rcw,
598 					int			arg,
599 					RtfReader *		rr );
600 
601 extern int docRtfReadDocumentTree(	const RtfControlWord *	rcw,
602 					DocumentTree *		dt,
603 					int *			pExtItKind,
604 					RtfReader *		rr,
605 					int			ignoreEmpty,
606 					const SelectionScope *	ss );
607 
608 extern int docRtfShapeProperty(		const RtfControlWord *	rcw,
609 					int			arg,
610 					RtfReader *		rr );
611 extern int docRtfShapePropertyName(	const RtfControlWord *	rcw,
612 					int			arg,
613 					RtfReader *		rr );
614 extern int docRtfShapePropertyValue(	const RtfControlWord *	rcw,
615 					int			arg,
616 					RtfReader *		rr );
617 
618 extern int docRtfReadRowProperties(	const RtfControlWord *	rcw,
619 					int			arg,
620 					RtfReader *		rr );
621 
622 extern int docRtfLookupWord(		const RtfControlWord *	rcw,
623 					int			arg,
624 					RtfReader *		rr );
625 
626 extern int docRtfColorComp(		const RtfControlWord *	rcw,
627 					int			arg,
628 					RtfReader *		rr );
629 
630 extern int docRtfColorIgnored(		const RtfControlWord *	rcw,
631 					int			arg,
632 					RtfReader *		rr );
633 
634 extern int docRtfCommitDocPropText(	const RtfControlWord *	rcw,
635 					RtfReader *		rr );
636 
637 extern int docRtfDocTimeGroup(		const RtfControlWord *  rcw,
638 					int			arg,
639 					RtfReader *		rr );
640 
641 extern void docRtfRefreshTextShading(	RtfReader *		rr,
642 					RtfReadingState *	rrs );
643 
644 extern int docRtfRefreshParagraphProperties(	BufferDocument *	bd,
645 						RtfReadingState *	rrs );
646 
647 extern int docRtfSetParaProperties(	ParagraphProperties *	pp,
648 					BufferDocument *	bd,
649 					int			mindTable,
650 					RtfReadingState *	rrs,
651 					int			breakOverride );
652 
653 extern int docRtfAdaptToParaProperties(	struct BufferItem *	paraNode,
654 					BufferDocument *	bd,
655 					RtfReadingState *	rrs,
656 					int			breakOverride );
657 
658 extern void docRtfSetForRow(		struct BufferItem *	node );
659 
660 extern void docRtfResetParagraphProperties(
661 					RtfReadingState *	rrs );
662 
663 extern void docRtfResetTextAttribute(	RtfReadingState *	rrs,
664 					BufferDocument *	bd );
665 
666 extern int docRtfSkipPn(	const RtfControlWord *	rcw,
667 				int			arg,
668 				RtfReader *		rr );
669 
670 extern int docRtfReadPnseclvl(	const RtfControlWord *	rcw,
671 				int			arg,
672 				RtfReader *		rr );
673 
674 extern int docRtfRememberFieldProperty(	const RtfControlWord *	rcw,
675 					int			arg,
676 					RtfReader *		rr );
677 
678 extern int docRtfRememberNoteProperty(	const RtfControlWord *	rcw,
679 					int			arg,
680 					RtfReader *		rr );
681 
682 extern int docRtfApplyDocEncodedTextGroup(
683 					const RtfControlWord *	rcw,
684 					int			arg,
685 					RtfReader *		rr );
686 
687 extern int docRtfApplyRawBytesGroup(	const RtfControlWord *	rcw,
688 					int			arg,
689 					RtfReader *		rr );
690 
691 extern int docRtfReadTimeField(	const RtfControlWord *	rcw,
692 				int			arg,
693 				RtfReader *		rr );
694 
695 extern struct BufferItem *	docRtfGetParaNode(	RtfReader *	rr );
696 extern struct BufferItem *	docRtfGetSectNode(	RtfReader *	rr );
697 
698 extern int docRtfFinishCurrentNode(	const RtfControlWord *	rcw,
699 					RtfReader *		rr );
700 
701 extern void docRtfRestartFont(			RtfReader *	rr );
702 
703 extern int docRtfReadMapFont(	const RtfReader *		rr,
704 				int *				pDocFontNum,
705 				int *				pCharset,
706 				int				fileFontNum );
707 
708 extern int docRtfRememberTextShadingProperty(
709 				const RtfControlWord *		rcw,
710 				int				arg,
711 				RtfReader *			rr );
712 
713 extern int docRtfRememberParaShadingProperty(
714 					const RtfControlWord *	rcw,
715 					int			arg,
716 					RtfReader *		rr );
717 
718 extern int docRtfRememberCellShadingProperty(
719 					const RtfControlWord *	rcw,
720 					int			arg,
721 					RtfReader *		rr );
722 
723 extern int docRtfRememberRowShadingProperty(
724 					const RtfControlWord *	rcw,
725 					int			arg,
726 					RtfReader *		rr );
727 
728 extern int docRtfReadGetBorderNumber(	RtfReader *		rr );
729 
730 extern int docRtfReadListLevelGroup(	const RtfControlWord *	rcw,
731 					RtfReader *		rr );
732 
733 extern int docRtfMemoryBufferSetText(
734 				MemoryBuffer *		mb,
735 				RtfReader *		rr,
736 				int			removeSemicolon );
737 
738 extern int docRtfMemoryBufferAppendText(
739 				MemoryBuffer *		mb,
740 				RtfReader *		rr );
741 
742 extern int docRtfSelectionScopeProperty(	const RtfControlWord *	rcw,
743 						int			arg,
744 						RtfReader *		rr );
745 
746 extern int docRtfEditRangeProperty(		const RtfControlWord *	rcw,
747 						int			arg,
748 						RtfReader *		rr );
749 
750 extern int docRtfSelectionOpen(		const RtfControlWord *	rcw,
751 					int			arg,
752 					RtfReader *		rr );
753 
754 extern int docRtfStoreStyleProperties(	RtfReader *		rr );
755 
756 extern int docRtfRememberList(	const RtfControlWord *		rcw,
757 				int				arg,
758 				RtfReader *			rr );
759 
760 extern int docRtfRememberListLevel(	const RtfControlWord *	rcw,
761 					int			arg,
762 					RtfReader *		rr );
763 
764 extern int docRtfCommitListLevelText(	const RtfControlWord *	rcw,
765 					RtfReader *		rr );
766 extern int docRtfCommitListLevelNumbers( const RtfControlWord *	rcw,
767 					RtfReader *		rr );
768 extern int docRtfCommitListName(	const RtfControlWord *	rcw,
769 					RtfReader *		rr );
770 extern int docRtfCommitListStyleName(	const RtfControlWord *	rcw,
771 					RtfReader *		rr );
772 
773 extern void docRtfResetCellProperties(	RtfReader *		rr );
774 
775 extern void docRtfReadSetupTextConverters(	RtfReader *	rr );
776 
777 extern RtfReader * docRtfOpenReader(		SimpleInputStream *	sis,
778 						BufferDocument *	bd,
779 						int			flags );
780 
781 extern void docRtfCloseReader(			RtfReader *		rr );
782 
783 #   endif	/*	RTF_READER_IMPL_H	*/
784