merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / shellio.hxx
blobd1ffa05e95baba2cf4e559e96714bbf62a438e6d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shellio.hxx,v $
10 * $Revision: 1.39 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SHELLIO_HXX
31 #define _SHELLIO_HXX
33 #include <com/sun/star/uno/Reference.h>
34 #include <com/sun/star/embed/XStorage.hpp>
35 #include <sfx2/docfile.hxx>
36 #include <sfx2/fcontnr.hxx>
37 #include <sot/formats.hxx>
38 #include <sot/storage.hxx>
39 #include <svtools/parhtml.hxx>
40 #include <tools/string.hxx>
41 #include <tools/date.hxx>
42 #include <tools/time.hxx>
43 #include <tools/datetime.hxx>
44 #include <tools/ref.hxx>
45 #include <tools/urlobj.hxx>
46 #include <swdllapi.h>
47 #include <swtypes.hxx>
48 #include <docfac.hxx> // SwDocFac
49 #include <errhdl.hxx>
50 #include <iodetect.hxx>
52 // einige Forward - Deklarationen
53 class SfxFilterContainer;
54 class SfxFilter;
55 class SfxItemPool;
56 class SfxItemSet;
57 class SfxMedium;
58 class SvPtrarr;
59 class SvStream;
60 class SvStrings;
61 class SvxFontItem;
62 class SvxMacroTableDtor;
63 //class Sw3Io;
64 class SwCntntNode;
65 class SwCrsrShell;
66 class SwDoc;
67 class SwPaM;
68 class SwTextBlocks;
69 struct SwPosition;
70 struct Writer_Impl;
72 // ab so vielen chars wird ein mit einem ASCII/W4W-Reader eingelesener
73 // Absatz zwangsweise umgebrochen. Muss immer groesser als 200 sein !!!
74 #define MAX_ASCII_PARA 10000
77 class SW_DLLPUBLIC SwAsciiOptions
79 String sFont;
80 rtl_TextEncoding eCharSet;
81 USHORT nLanguage;
82 LineEnd eCRLF_Flag;
84 public:
86 const String& GetFontName() const { return sFont; }
87 void SetFontName( const String& rFont ) { sFont = rFont; }
89 rtl_TextEncoding GetCharSet() const { return eCharSet; }
90 void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
92 USHORT GetLanguage() const { return nLanguage; }
93 void SetLanguage( USHORT nVal ) { nLanguage = nVal; }
95 LineEnd GetParaFlags() const { return eCRLF_Flag; }
96 void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
98 void Reset()
100 sFont.Erase();
101 eCRLF_Flag = GetSystemLineEnd();
102 eCharSet = ::gsl_getSystemTextEncoding();
103 nLanguage = 0;
105 // for the automatic conversion (mail/news/...)
106 void ReadUserData( const String& );
107 void WriteUserData( String& );
109 SwAsciiOptions() { Reset(); }
112 /**************** SwReader/Reader ************************/
113 // Basisklasse der moeglichen Optionen fuer einen speziellen Reader
114 class Reader;
115 // Ruft den Reader mit seinen Optionen, Dokument, Cursor etc.
116 class SwReader;
117 // SwRead ist der Pointer auf die Read-Optionen-Basisklasse
118 typedef Reader *SwRead;
120 class SwgReaderOption
122 SwAsciiOptions aASCIIOpts;
123 union
125 BOOL bFmtsOnly;
126 struct
128 BOOL bFrmFmts: 1;
129 BOOL bPageDescs: 1;
130 BOOL bTxtFmts: 1;
131 BOOL bNumRules: 1;
132 BOOL bMerge:1;
133 } Fmts;
134 } What;
136 public:
137 void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
138 BOOL IsFmtsOnly() const { return What.bFmtsOnly; }
140 BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; }
141 void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; }
143 BOOL IsPageDescs() const { return What.Fmts.bPageDescs; }
144 void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; }
146 BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; }
147 void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; }
149 BOOL IsNumRules() const { return What.Fmts.bNumRules; }
150 void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; }
152 BOOL IsMerge() const { return What.Fmts.bMerge; }
153 void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; }
155 const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
156 void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
157 void ResetASCIIOpts() { aASCIIOpts.Reset(); }
159 SwgReaderOption()
160 { ResetAllFmtsOnly(); aASCIIOpts.Reset(); }
163 class SwReader: public SwDocFac
165 SvStream* pStrm;
166 SotStorageRef pStg;
167 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
168 SfxMedium* pMedium; // wer ein Medium haben will (W4W)
170 SwPaM* pCrsr;
171 String aFileName;
172 String sBaseURL;
174 public:
176 * Initiales Einlesen. Dokument wird erst beim Read(..) angelegt.
177 * JP 25.04.95: oder falls es mitgegeben wird, in dieses.
178 * Sonderfall fuer Load mit Sw3Reader
180 //SwReader( SotStorage&, const String& rFilename, SwDoc *pDoc = 0 );
181 //SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwDoc *pDoc = 0 );
182 SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 );
184 * In ein existierendes Dokument einlesen, Dokument und
185 * Position im Dokument werden aus dem SwPaM uebernommen.
187 SwReader( SvStream&, const String& rFilename, const String& rBaseURL, SwPaM& );
188 //SwReader( SotStorage&, const String& rFilename, SwPaM& );
189 SwReader( SfxMedium&, const String& rFilename, SwPaM& );
190 SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwPaM& );
193 * Nur SwReader::Read(...) ist die Export-Schnittstelle!!!
195 BOOL NeedsPasswd( const Reader& );
196 BOOL CheckPasswd( const String&, const Reader& );
197 ULONG Read( const Reader& );
199 // ask for glossaries
200 BOOL HasGlossaries( const Reader& );
201 BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles );
203 const String& GetBaseURL() const { return sBaseURL;}
205 protected:
206 void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
211 /* \f */
212 /**************** SPEZIELLE Reader ************************/
214 // spezielle - Reader koennen beides sein !! (Excel, W4W, .. )
215 #define SW_STREAM_READER 1
216 #define SW_STORAGE_READER 2
218 class SW_DLLPUBLIC Reader
220 friend class SwReader;
221 SwDoc* pTemplate;
222 String aTemplateNm;
223 //String sBaseURL;
225 Date aDStamp;
226 Time aTStamp;
227 DateTime aChkDateTime;
229 protected:
230 SvStream* pStrm;
231 SotStorageRef pStg;
232 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
233 SfxMedium* pMedium; // wer ein Medium haben will (W4W)
235 SwgReaderOption aOpt;
236 BOOL bInsertMode : 1;
237 BOOL bTmplBrowseMode : 1;
238 BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren
239 BOOL bBlockMode: 1;
240 BOOL bOrganizerMode : 1;
241 BOOL bHasAskTemplateName : 1;
242 BOOL bIgnoreHTMLComments : 1;
244 virtual String GetTemplateName() const;
246 public:
247 Reader();
248 virtual ~Reader();
250 virtual int GetReaderType();
251 SwgReaderOption& GetReaderOpt() { return aOpt; }
253 virtual void SetFltName( const String& rFltNm );
254 static void SetNoOutlineNum( SwDoc& rDoc );
256 // den Item-Set eines Frm-Formats an das alte Format anpassen
257 static void ResetFrmFmtAttrs( SfxItemSet &rFrmSet );
259 // die Rahmen-/Grafik-/OLE-Vorlagen an das alte Format (ohne
260 // Umrandung etc.) anpassen
261 static void ResetFrmFmts( SwDoc& rDoc );
263 // Die Filter-Vorlage laden, setzen und wieder freigeben
264 SwDoc* GetTemplateDoc();
265 BOOL SetTemplate( SwDoc& rDoc );
266 void ClearTemplate();
267 void SetTemplateName( const String& rDir );
268 void MakeHTMLDummyTemplateDoc();
270 BOOL IsReadUTF8() const { return bReadUTF8; }
271 void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; }
273 BOOL IsBlockMode() const { return bBlockMode; }
274 void SetBlockMode( BOOL bSet ) { bBlockMode = bSet; }
276 BOOL IsOrganizerMode() const { return bOrganizerMode; }
277 void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
279 void SetIgnoreHTMLComments( BOOL bSet ) { bIgnoreHTMLComments = bSet; }
281 virtual BOOL HasGlossaries() const;
282 virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
284 // read the sections of the document, which is equal to the medium.
285 // returns the count of it
286 virtual USHORT GetSectionList( SfxMedium& rMedium,
287 SvStrings& rStrings ) const;
289 SotStorageRef getSotStorageRef() { return pStg; };
290 void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
292 private:
293 virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
295 // alle die die Streams / Storages nicht geoeffnet brauchen,
296 // muessen die Methode ueberladen (W4W!!)
297 virtual int SetStrmStgPtr();
300 class AsciiReader: public Reader
302 friend class SwReader;
303 virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
304 public:
305 AsciiReader(): Reader() {}
308 /*class SwgReader: public Reader
310 virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
313 class SW_DLLPUBLIC StgReader : public Reader
315 String aFltName;
317 protected:
318 ULONG OpenMainStream( SotStorageStreamRef& rRef, USHORT& rBuffSize );
320 public:
321 virtual int GetReaderType();
322 const String& GetFltName() { return aFltName; }
323 virtual void SetFltName( const String& r );
327 /*class Sw3Reader : public StgReader
329 Sw3Io* pIO;
330 virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
331 public:
332 Sw3Reader() : pIO( 0 ) {}
334 void SetSw3Io( Sw3Io* pIo ) { pIO = pIo; }
336 // read the sections of the document, which is equal to the medium.
337 // returns the count of it
338 virtual USHORT GetSectionList( SfxMedium& rMedium,
339 SvStrings& rStrings ) const;
340 };*/
342 /* \f */
343 ////////////////////////////////////////////////////////////////////////////
345 // Der uebergebene Stream muss dynamisch angelegt werden und
346 // vor dem Loeschen der Instanz per Stream() angefordert
347 // und geloescht werden!
349 class SwImpBlocks;
351 class SW_DLLPUBLIC SwTextBlocks
353 // friend class Sw2TextBlocks;
354 // friend class Sw3IoImp;
355 SwImpBlocks* pImp;
356 ULONG nErr;
358 public:
359 SwTextBlocks( const String& );
360 ~SwTextBlocks();
362 void Flush(){}
364 SwDoc* GetDoc();
365 void ClearDoc(); // Doc-Inhalt loeschen
366 const String& GetName();
367 void SetName( const String& );
368 ULONG GetError() const { return nErr; }
370 String GetBaseURL() const;
371 void SetBaseURL( const String& rURL );
373 BOOL IsOld() const;
374 ULONG ConvertToNew(); // Textbausteine konvertieren
376 USHORT GetCount() const; // Anzahl Textbausteine ermitteln
377 USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
378 USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
379 const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
380 const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
382 BOOL Delete( USHORT ); // Loeschen
383 USHORT Rename( USHORT, const String*, const String* ); // Umbenennen
384 ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
385 const String& rLong ); // Block kopieren
387 BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen
388 void EndGetDoc(); // Textbaustein wieder loslassen
390 BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn
391 USHORT PutDoc(); // Speichern Ende
393 USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
395 BOOL IsOnlyTextBlock( USHORT ) const;
396 BOOL IsOnlyTextBlock( const String& rShort ) const;
398 const String& GetFileName() const; // Dateiname von pImp
399 BOOL IsReadOnly() const; // ReadOnly-Flag von pImp
401 BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl );
402 BOOL SetMacroTable( USHORT nIdx, const SvxMacroTableDtor& rMacroTbl );
404 BOOL StartPutMuchBlockEntries();
405 void EndPutMuchBlockEntries();
408 // BEGIN source/filter/basflt/fltini.cxx
410 extern void _InitFilter();
411 extern void _FinitFilter();
413 extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
415 //SW_DLLPUBLIC SwRead SwGetReaderSw3();
416 SW_DLLPUBLIC SwRead SwGetReaderXML();
418 // END source/filter/basflt/fltini.cxx
421 extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
424 /* \f */
425 /////////////////////////////////////////////////////////////////////////////
428 * Schreiben, Writer
432 /* Basis-Klasse aller Writer */
434 class IDocumentSettingAccess;
435 class IDocumentStylePoolAccess;
437 class SW_DLLPUBLIC Writer : public SvRefBase
439 SwAsciiOptions aAscOpts;
440 String sBaseURL;
442 void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
443 void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
445 protected:
446 Writer_Impl* pImpl;
448 SvStream* pStrm;
449 SwPaM* pOrigPam; // der letze zu bearbeitende Pam
450 const String* pOrigFileName;
452 void ResetWriter();
453 BOOL CopyNextPam( SwPaM ** );
455 void PutNumFmtFontsInAttrPool();
456 void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
457 void PutCJKandCTLFontsInAttrPool();
459 virtual ULONG WriteStream() = 0;
460 void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
462 IDocumentSettingAccess* getIDocumentSettingAccess();
463 const IDocumentSettingAccess* getIDocumentSettingAccess() const;
465 IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
466 const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
468 public:
469 SwDoc* pDoc;
470 SwPaM* pCurPam;
471 BOOL bWriteAll : 1;
472 BOOL bShowProgress : 1;
473 BOOL bWriteClipboardDoc : 1;
474 BOOL bWriteOnlyFirstTable : 1;
475 BOOL bASCII_ParaAsCR : 1;
476 BOOL bASCII_ParaAsBlanc : 1;
477 BOOL bASCII_NoLastLineEnd : 1;
478 BOOL bUCS2_WithStartChar : 1;
479 BOOL bExportPargraphNumbering : 1;
481 BOOL bBlock : 1;
482 BOOL bOrganizerMode : 1;
484 Writer();
485 virtual ~Writer();
487 virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
488 ULONG Write( SwPaM&, SvStream&, const String* = 0 );
489 virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
490 virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
492 virtual void SetPasswd( const String& );
493 virtual void SetVersion( const String&, long );
494 virtual BOOL IsStgWriter() const;
495 // virtual BOOL IsSw3Writer() const;
497 void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; }
499 const String* GetOrigFileName() const { return pOrigFileName; }
501 const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; }
502 void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; }
504 const String& GetBaseURL() const { return sBaseURL;}
506 // suche die naechste Bookmark-Position aus der Bookmark-Tabelle
507 sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
508 // build a bookmark table, which is sort by the node position. The
509 // OtherPos of the bookmarks also inserted.
510 void CreateBookmarkTbl();
511 // search alle Bookmarks in the range and return it in the Array
512 USHORT GetBookmarks( const SwCntntNode& rNd,
513 xub_StrLen nStt, xub_StrLen nEnd,
514 SvPtrarr& rArr );
516 // lege einen neuen PaM an der Position an
517 static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
518 BOOL bNodesArray = TRUE );
520 // kopiere ggfs. eine lokale Datei ins Internet
521 BOOL CopyLocalFileToINet( String& rFileNm );
523 // Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN!
525 // Optimierung der Ausgabe auf den Stream.
526 SvStream& OutLong( SvStream& rStrm, long nVal );
527 SvStream& OutULong( SvStream& rStrm, ULONG nVal );
529 // Hex-Zahl ausgeben, default ist 2.stellige Zahl
530 SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 );
531 // 4-st. Hex-Zahl ausgeben
532 inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex )
533 { return OutHex( rStrm, nHex, 4 ); }
535 inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
536 inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); }
537 inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
538 inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
540 void SetStrm( SvStream& rStrm ) { pStrm = &rStrm; }
541 #ifdef PRODUCT
542 SvStream& Strm() { return *pStrm; }
543 #else
544 SvStream& Strm();
545 #endif
547 void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
550 #ifndef SW_DECL_WRITER_DEFINED
551 #define SW_DECL_WRITER_DEFINED
552 SV_DECL_REF(Writer)
553 #endif
554 SV_IMPL_REF(Writer)
556 // Basisklasse fuer alle Storage-Writer
557 class SW_DLLPUBLIC StgWriter : public Writer
559 protected:
560 String aFltName;
561 SotStorageRef pStg;
562 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
564 // Fehler beim Aufruf erzeugen
565 virtual ULONG WriteStream();
566 virtual ULONG WriteStorage() = 0;
567 virtual ULONG WriteMedium( SfxMedium& ) = 0;
569 using Writer::Write;
571 public:
572 StgWriter() : Writer() {}
574 virtual BOOL IsStgWriter() const;
576 virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
577 virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
579 SotStorage& GetStorage() const { return *pStg; }
582 /*class Sw3Writer : public StgWriter
584 Sw3Io* pIO;
585 BOOL bSaveAs : 1;
587 virtual ULONG WriteStorage();
588 virtual ULONG WriteMedium( SfxMedium& );
590 public:
591 Sw3Writer() : pIO( 0 ), bSaveAs( FALSE ) {}
593 virtual BOOL IsSw3Writer() const;
598 // Schnittstellenklasse fuer den allgemeinen Zugriff auf die
599 // speziellen Writer
601 class SwWriter
603 SvStream* pStrm;
604 SotStorageRef pStg;
605 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
606 SfxMedium* pMedium;
608 SwPaM* pOutPam;
609 SwCrsrShell *pShell;
610 SwDoc &rDoc;
612 //String sBaseURL;
614 BOOL bWriteAll;
616 public:
617 ULONG Write( WriterRef& rxWriter, const String* = 0);
619 SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE );
620 SwWriter( SvStream&, SwDoc & );
621 SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE );
623 // SwWriter( SotStorage&, SwCrsrShell &,BOOL bWriteAll = FALSE );
624 SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
625 // SwWriter( SotStorage&, SwPaM&, BOOL bWriteAll = FALSE );
627 SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE );
628 SwWriter( SfxMedium&, SwDoc & );
629 // SwWriter( SfxMedium&, SwPaM&, BOOL bWriteAll = FALSE );
631 //const String& GetBaseURL() const { return sBaseURL;}
635 /* \f */
636 /////////////////////////////////////////////////////////////////////////////
638 typedef Reader* (*FnGetReader)();
639 typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
641 struct SwReaderWriterEntry
643 Reader* pReader;
644 FnGetReader fnGetReader;
645 FnGetWriter fnGetWriter;
646 BOOL bDelReader;
648 SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
649 : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
652 /// Get access to the reader
653 Reader* GetReader();
655 /// Get access to the writer
656 void GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const;
659 namespace SwReaderWriter
661 /// Return reader based on ReaderWriterEnum
662 Reader* GetReader( ReaderWriterEnum eReader );
664 /// Return reader based on the name
665 Reader* GetReader( const String& rFltName );
667 /// Return writer based on the name
668 void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt );
671 void GetRTFWriter( const String&, const String&, WriterRef& );
672 void GetASCWriter( const String&, const String&, WriterRef& );
673 //void GetSw3Writer( const String&, const String&, WriterRef& );
674 void GetHTMLWriter( const String&, const String&, WriterRef& );
675 void GetXMLWriter( const String&, const String&, WriterRef& );
676 void GetWW8Writer( const String&, const String&, WriterRef& );
678 #endif