LibreOffice Module sw (master)  1
shellio.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_SW_INC_SHELLIO_HXX
20 #define INCLUDED_SW_INC_SHELLIO_HXX
21 
22 #include <memory>
23 
24 #include <com/sun/star/uno/Reference.h>
25 #include <sot/storage.hxx>
26 #include <tools/date.hxx>
27 #include <tools/time.hxx>
28 #include <tools/datetime.hxx>
29 #include <tools/ref.hxx>
30 #include <rtl/ref.hxx>
31 #include <osl/thread.h>
32 #include <o3tl/deleter.hxx>
33 #include <o3tl/typed_flags_set.hxx>
34 #include "swdllapi.h"
35 #include "docfac.hxx"
36 
37 class SfxItemPool;
38 class SfxItemSet;
39 class SfxMedium;
40 class SvStream;
41 class SvxFontItem;
42 class SvxMacroTableDtor;
43 class SwContentNode;
44 class SwCursorShell;
45 class SwDoc;
46 class SwPaM;
47 class SwTextBlocks;
48 struct SwPosition;
49 struct Writer_Impl;
50 namespace sw
51 {
52 namespace mark
53 {
54 class IMark;
55 }
56 }
57 namespace com { namespace sun { namespace star { namespace embed { class XStorage; } } } }
58 
59 // Defines the count of chars at which a paragraph read via ASCII/W4W-Reader
60 // is forced to wrap. It has to be always greater than 200!!!
61 #define MAX_ASCII_PARA 10000
62 
64 {
65  OUString sFont;
66  rtl_TextEncoding eCharSet;
69  bool bIncludeBOM; // Whether to include a byte-order-mark in the output.
70 
71 public:
72 
73  const OUString& GetFontName() const { return sFont; }
74  void SetFontName( const OUString& rFont ) { sFont = rFont; }
75 
76  rtl_TextEncoding GetCharSet() const { return eCharSet; }
77  void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
78 
79  LanguageType GetLanguage() const { return nLanguage; }
80  void SetLanguage( LanguageType nVal ) { nLanguage = nVal; }
81 
82  LineEnd GetParaFlags() const { return eCRLF_Flag; }
83  void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
84 
85  bool GetIncludeBOM() const { return bIncludeBOM; }
86  void SetIncludeBOM( bool bVal ) { bIncludeBOM = bVal; }
87 
88  void Reset()
89  {
90  sFont.clear();
91  eCRLF_Flag = GetSystemLineEnd();
92  eCharSet = ::osl_getThreadTextEncoding();
93  nLanguage = LANGUAGE_SYSTEM;
94  bIncludeBOM = true;
95  }
96  // for the automatic conversion (mail/news/...)
97  void ReadUserData( const OUString& );
98  void WriteUserData( OUString& );
99 
101 };
102 
103 // Base class of possible options for a special reader.
104 class Reader;
105 
107 {
113  bool m_bMerge;
114 public:
115  void ResetAllFormatsOnly() { m_bFrameFormats = m_bPageDescs = m_bTextFormats = m_bNumRules = m_bMerge = false; }
116  bool IsFormatsOnly() const { return m_bFrameFormats || m_bPageDescs || m_bTextFormats || m_bNumRules || m_bMerge; }
117 
118  bool IsFrameFormats() const { return m_bFrameFormats; }
119  void SetFrameFormats( const bool bNew) { m_bFrameFormats = bNew; }
120 
121  bool IsPageDescs() const { return m_bPageDescs; }
122  void SetPageDescs( const bool bNew) { m_bPageDescs = bNew; }
123 
124  bool IsTextFormats() const { return m_bTextFormats; }
125  void SetTextFormats( const bool bNew) { m_bTextFormats = bNew; }
126 
127  bool IsNumRules() const { return m_bNumRules; }
128  void SetNumRules( const bool bNew) { m_bNumRules = bNew; }
129 
130  bool IsMerge() const { return m_bMerge; }
131  void SetMerge( const bool bNew ) { m_bMerge = bNew; }
132 
133  const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
134  void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
135  void ResetASCIIOpts() { aASCIIOpts.Reset(); }
136 
138  { ResetAllFormatsOnly(); aASCIIOpts.Reset(); }
139 };
140 
141 // Calls reader with its options, document, cursor etc.
143 {
146  css::uno::Reference < css::embed::XStorage > xStg;
147  SfxMedium* const pMedium; // Who wants to obtain a Medium (W4W).
148 
149  SwPaM* const pCursor;
150  OUString const aFileName;
151  OUString sBaseURL;
153 
154 public:
155 
156  // Initial reading. Document is created only at Read(...)
157  // or in case it is given, into that.
158  // Special case for Load with Sw3Reader.
159  SwReader( SfxMedium&, const OUString& rFilename, SwDoc *pDoc = nullptr );
160 
161  // Read into existing document.
162  // Document and position in document are taken from SwPaM.
163  SwReader( SvStream&, const OUString& rFilename, const OUString& rBaseURL, SwPaM& );
164  SwReader( SfxMedium&, const OUString& rFilename, SwPaM& );
165  SwReader( const css::uno::Reference < css::embed::XStorage >&, const OUString& rFilename, SwPaM& );
166 
167  // The only export interface is SwReader::Read(...)!!!
168  ErrCode Read( const Reader& );
169 
170  // Ask for glossaries.
171  bool HasGlossaries( const Reader& );
172  bool ReadGlossaries( const Reader&, SwTextBlocks&, bool bSaveRelFiles );
173 
174 protected:
175  void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; }
176  void SetSkipImages( bool bSkipImages ) { mbSkipImages = bSkipImages; }
177 };
178 
179 typedef std::unique_ptr<SwReader, o3tl::default_delete<SwReader>> SwReaderPtr;
180 
181 // Special Readers can be both!! (Excel, W4W, .. ).
182 enum class SwReaderType {
183  NONE = 0x00,
184  Stream = 0x01,
185  Storage = 0x02
186 };
187 namespace o3tl {
188  template<> struct typed_flags<SwReaderType> : is_typed_flags<SwReaderType, 0x03> {};
189 };
190 
191 extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDOC(SvStream &rStream, const OUString &rFltName);
192 extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportRTF(SvStream &rStream);
193 extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportHTML(SvStream &rStream);
194 SAL_DLLPUBLIC_EXPORT void FlushFontCache();
195 
197 {
198  friend class SwReader;
199  friend bool TestImportDOC(SvStream &rStream, const OUString &rFltName);
200  friend bool TestImportRTF(SvStream &rStream);
201  friend bool TestImportHTML(SvStream &rStream);
203  OUString m_aTemplateName;
204 
208 
209 protected:
212  css::uno::Reference < css::embed::XStorage > m_xStorage;
213  SfxMedium* m_pMedium; // Who wants to obtain a Medium (W4W).
214 
216  bool m_bInsertMode : 1;
217  bool m_bTemplateBrowseMode : 1;
218  bool m_bReadUTF8: 1; // Interpret stream as UTF-8.
219  bool m_bBlockMode: 1;
220  bool m_bOrganizerMode : 1;
221  bool m_bHasAskTemplateName : 1;
222  bool m_bIgnoreHTMLComments : 1;
223  bool m_bSkipImages : 1;
224 
225  virtual OUString GetTemplateName(SwDoc& rDoc) const;
226 
227 public:
228  Reader();
229  virtual ~Reader();
230 
231  virtual SwReaderType GetReaderType();
232  SwgReaderOption& GetReaderOpt() { return m_aOption; }
233 
234  virtual void SetFltName( const OUString& rFltNm );
235 
236  // Adapt item-set of a Frame-Format to the old format.
237  static void ResetFrameFormatAttrs( SfxItemSet &rFrameSet );
238 
239  // Adapt Frame-/Graphics-/OLE- styles to the old format
240  // (without borders etc.).
241  static void ResetFrameFormats( SwDoc& rDoc );
242 
243  // Load filter template, set it and release it again.
244  SwDoc* GetTemplateDoc(SwDoc& rDoc);
245  bool SetTemplate( SwDoc& rDoc );
246  void ClearTemplate();
247  void SetTemplateName( const OUString& rDir );
248  void MakeHTMLDummyTemplateDoc();
249 
250  bool IsReadUTF8() const { return m_bReadUTF8; }
251  void SetReadUTF8( bool bSet ) { m_bReadUTF8 = bSet; }
252 
253  bool IsBlockMode() const { return m_bBlockMode; }
254  void SetBlockMode( bool bSet ) { m_bBlockMode = bSet; }
255 
256  bool IsOrganizerMode() const { return m_bOrganizerMode; }
257  void SetOrganizerMode( bool bSet ) { m_bOrganizerMode = bSet; }
258 
259  void SetIgnoreHTMLComments( bool bSet ) { m_bIgnoreHTMLComments = bSet; }
260 
261  virtual bool HasGlossaries() const;
262  virtual bool ReadGlossaries( SwTextBlocks&, bool bSaveRelFiles ) const;
263 
264  // Read the sections of the document, which is equal to the medium.
265  // Returns the count of it
266  virtual size_t GetSectionList( SfxMedium& rMedium,
267  std::vector<OUString>& rStrings) const;
268 
269  const tools::SvRef<SotStorage>& getSotStorageRef() { return m_pStorage; };
270  void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { m_pStorage = pStgRef; };
271 
272 private:
273  virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &)=0;
274 
275  // Everyone who does not need the streams / storages open
276  // has to override the method (W4W!!).
277  virtual bool SetStrmStgPtr();
278 };
279 
280 class AsciiReader: public Reader
281 {
282  friend class SwReader;
283  virtual ErrCode Read( SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override;
284 public:
286 };
287 
289 {
290  OUString aFltName;
291 
292 public:
293  virtual SwReaderType GetReaderType() override;
294  const OUString& GetFltName() { return aFltName; }
295  virtual void SetFltName( const OUString& r ) override;
296 };
297 
298 // The given stream has to be created dynamically and must
299 // be requested via Stream() before the instance is deleted!
300 
301 class SwImpBlocks;
302 
304 {
305  std::unique_ptr<SwImpBlocks> pImp;
307 
308 public:
309  SwTextBlocks( const OUString& );
310  ~SwTextBlocks();
311 
312  SwDoc* GetDoc();
313  void ClearDoc(); // Delete Doc-contents.
314  OUString GetName();
315  void SetName( const OUString& );
316  ErrCode const & GetError() const { return nErr; }
317 
318  OUString GetBaseURL() const;
319  void SetBaseURL( const OUString& rURL );
320 
321  bool IsOld() const;
322 
323  sal_uInt16 GetCount() const; // Get count text modules.
324  sal_uInt16 GetIndex( const OUString& ) const; // Get index of short names.
325  sal_uInt16 GetLongIndex( const OUString& ) const; // Get index of long names.
326  OUString GetShortName( sal_uInt16 ) const; // Get short name for index.
327  OUString GetLongName( sal_uInt16 ) const; // Get long name for index.
328 
329  bool Delete( sal_uInt16 );
330  void Rename( sal_uInt16, const OUString*, const OUString* );
331  ErrCode const & CopyBlock( SwTextBlocks const & rSource, OUString& rSrcShort,
332  const OUString& rLong );
333 
334  bool BeginGetDoc( sal_uInt16 ); // Read text modules.
335  void EndGetDoc(); // Release text modules.
336 
337  bool BeginPutDoc( const OUString&, const OUString& ); // Begin save.
338  sal_uInt16 PutDoc(); // End save.
339 
340  sal_uInt16 PutText( const OUString&, const OUString&, const OUString& ); // Save (short name, text).
341 
342  bool IsOnlyTextBlock( sal_uInt16 ) const;
343  bool IsOnlyTextBlock( const OUString& rShort ) const;
344 
345  OUString const & GetFileName() const; // Filename of pImp.
346  bool IsReadOnly() const; // ReadOnly-flag of pImp.
347 
348  bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable );
349  bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTable );
350 
351  bool StartPutMuchBlockEntries();
352  void EndPutMuchBlockEntries();
353 };
354 
355 // BEGIN source/filter/basflt/fltini.cxx
356 
357 extern Reader *ReadAscii, *ReadHTML, *ReadXML;
358 
360 
361 // END source/filter/basflt/fltini.cxx
362 
363 extern bool SetHTMLTemplate( SwDoc &rDoc ); //For templates from HTML before loading shellio.cxx.
364 
365 // Base-class of all writers.
366 
369 
371  : public SvRefBase
372 {
374  OUString m_sBaseURL;
375 
376  void AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
377  void AddFontItems_( SfxItemPool& rPool, sal_uInt16 nWhichId );
378 
379  std::unique_ptr<Writer_Impl> m_pImpl;
380 
381  Writer(Writer const&) = delete;
382  Writer& operator=(Writer const&) = delete;
383 
384 protected:
385 
386  const OUString* m_pOrigFileName;
387 
388  void ResetWriter();
389  bool CopyNextPam( SwPaM ** );
390 
391  void PutNumFormatFontsInAttrPool();
392  void PutEditEngFontsInAttrPool();
393 
394  virtual ErrCode WriteStream() = 0;
395  void SetBaseURL( const OUString& rURL ) { m_sBaseURL = rURL; }
396 
397  IDocumentSettingAccess& getIDocumentSettingAccess();
398  const IDocumentSettingAccess& getIDocumentSettingAccess() const;
399 
400  IDocumentStylePoolAccess& getIDocumentStylePoolAccess();
401  const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const;
402 
403 public:
405  SwPaM* m_pOrigPam; // Last Pam that has to be processed.
407  bool m_bWriteAll : 1;
408  bool m_bShowProgress : 1;
409  bool m_bWriteClipboardDoc : 1;
410  bool m_bWriteOnlyFirstTable : 1;
411  bool m_bASCII_ParaAsCR : 1;
412  bool m_bASCII_ParaAsBlank : 1;
413  bool m_bASCII_NoLastLineEnd : 1;
414  bool m_bUCS2_WithStartChar : 1;
415  bool m_bExportPargraphNumbering : 1;
416 
417  bool m_bBlock : 1;
418  bool m_bOrganizerMode : 1;
419  bool m_bHideDeleteRedlines : 1;
420 
421  Writer();
422  virtual ~Writer() override;
423 
424  virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* );
425  ErrCode Write( SwPaM&, SvStream&, const OUString* );
426  virtual ErrCode Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString*, SfxMedium* = nullptr );
427  virtual ErrCode Write( SwPaM&, SotStorage&, const OUString* );
428 
429  virtual void SetupFilterOptions(SfxMedium& rMedium);
430 
431  virtual bool IsStgWriter() const;
432 
433  void SetShowProgress( bool bFlag ) { m_bShowProgress = bFlag; }
434 
435  const OUString* GetOrigFileName() const { return m_pOrigFileName; }
436 
437  const SwAsciiOptions& GetAsciiOptions() const { return m_aAsciiOptions; }
438  void SetAsciiOptions( const SwAsciiOptions& rOpt ) { m_aAsciiOptions = rOpt; }
439 
440  const OUString& GetBaseURL() const { return m_sBaseURL;}
441 
442  // Look up next bookmark position from bookmark-table.
443  sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
444  // Build a bookmark table, which is sort by the node position. The
445  // OtherPos of the bookmarks also inserted.
446  void CreateBookmarkTable();
447  // Search all Bookmarks in the range and return it in the Array.
448  bool GetBookmarks( const SwContentNode& rNd,
449  sal_Int32 nStt, sal_Int32 nEnd,
450  std::vector< const ::sw::mark::IMark* >& rArr );
451 
452  // Create new PaM at position.
453  static SwPaM * NewSwPaM(SwDoc & rDoc,
454  sal_uLong const nStartIdx, sal_uLong const nEndIdx);
455 
456  // If applicable copy a local file into internet.
457  bool CopyLocalFileToINet( OUString& rFileNm );
458 
459  // Stream-specific routines. Do not use in storage-writer!
460 
461  // Optimizing output on stream.
462  static SvStream& OutLong( SvStream& rStrm, long nVal );
463  static SvStream& OutULong( SvStream& rStrm, sal_uLong nVal );
464 
465  void SetStream(SvStream *const pStream);
466  SvStream& Strm();
467 
468  void SetOrganizerMode( bool bSet ) { m_bOrganizerMode = bSet; }
469 };
470 
472 
473 // Base class for all storage writers.
475 {
476 protected:
478  css::uno::Reference < css::embed::XStorage > xStg;
479 
480  // Create error at call.
481  virtual ErrCode WriteStream() override;
482  virtual ErrCode WriteStorage() = 0;
483  virtual ErrCode WriteMedium( SfxMedium& ) = 0;
484 
485  using Writer::Write;
486 
487 public:
488  StgWriter() : Writer() {}
489 
490  virtual bool IsStgWriter() const override;
491 
492  virtual ErrCode Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString*, SfxMedium* = nullptr ) override;
493  virtual ErrCode Write( SwPaM&, SotStorage&, const OUString* ) override;
494 
495  SotStorage& GetStorage() const { return *pStg; }
496 };
497 
498 // Interface class for general access on special writers.
499 
501 {
503  css::uno::Reference < css::embed::XStorage > xStg;
505 
506  SwPaM* const pOutPam;
509 
510  bool bWriteAll;
511 
512 public:
513  ErrCode Write( WriterRef const & rxWriter, const OUString* = nullptr);
514 
515  SwWriter( SvStream&, SwCursorShell &, bool bWriteAll = false );
516  SwWriter( SvStream&, SwDoc & );
517  SwWriter( SvStream&, SwPaM &, bool bWriteAll = false );
518 
519  SwWriter( const css::uno::Reference < css::embed::XStorage >&, SwDoc& );
520 
521  SwWriter( SfxMedium&, SwCursorShell &, bool bWriteAll );
522  SwWriter( SfxMedium&, SwDoc & );
523 };
524 
525 typedef Reader* (*FnGetReader)();
526 typedef void (*FnGetWriter)(const OUString&, const OUString& rBaseURL, WriterRef&);
527 ErrCode SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, bool, const OUString& );
529 
531 {
535  bool const bDelReader;
536 
537  SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel )
538  : pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
539  {}
540 
542  Reader* GetReader();
543 
545  void GetWriter( const OUString& rNm, const OUString& rBaseURL, WriterRef& xWrt ) const;
546 };
547 
548 namespace SwReaderWriter
549 {
552 
554  Reader* GetReader( const OUString& rFltName );
555 
557  SW_DLLPUBLIC void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& xWrt );
558 }
559 
560 void GetRTFWriter( const OUString&, const OUString&, WriterRef& );
561 void GetASCWriter(const OUString&, const OUString&, WriterRef&);
562 void GetHTMLWriter( const OUString&, const OUString&, WriterRef& );
563 void GetXMLWriter( const OUString&, const OUString&, WriterRef& );
564 
565 #endif
566 
567 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetShowProgress(bool bFlag)
Definition: shellio.hxx:433
rtl_TextEncoding GetCharSet() const
Definition: shellio.hxx:76
FnGetWriter const fnGetWriter
Definition: shellio.hxx:534
SfxMedium * pMedium
Definition: shellio.hxx:504
SAL_DLLPUBLIC_EXPORT bool TestImportDOC(SvStream &rStream, const OUString &rFltName)
Definition: ww8par.cxx:6218
const OUString & GetBaseURL() const
Definition: shellio.hxx:440
bool GetIncludeBOM() const
Definition: shellio.hxx:85
tools::SvRef< SotStorage > pStg
Definition: shellio.hxx:477
void ResetASCIIOpts()
Definition: shellio.hxx:135
Marks a position in the document model.
Definition: pam.hxx:35
bool IsMerge() const
Definition: shellio.hxx:130
OUString sBaseURL
Definition: shellio.hxx:151
std::unique_ptr< Writer_Impl > m_pImpl
Definition: shellio.hxx:379
bool ReadGlossaries(const Reader &, SwTextBlocks &, bool bSaveRelFiles)
Definition: shellio.cxx:669
tools::Time m_aTimeStamp
Definition: shellio.hxx:206
bool SetHTMLTemplate(SwDoc &rDoc)
Definition: shellio.cxx:915
SwPaM * m_pCurrentPam
Definition: shellio.hxx:406
void SetPageDescs(const bool bNew)
Definition: shellio.hxx:122
SAL_DLLPUBLIC_EXPORT bool TestImportRTF(SvStream &rStream)
Definition: swparrtf.cxx:167
const OUString & GetFontName() const
Definition: shellio.hxx:73
bool IsPageDescs() const
Definition: shellio.hxx:121
bool IsFrameFormats() const
Definition: shellio.hxx:118
bool IsFormatsOnly() const
Definition: shellio.hxx:116
bool IsReadOnly(const OUString &rURL, bool *pbExist)
sal_uIntPtr sal_uLong
Date m_aDateStamp
Definition: shellio.hxx:205
void(* FnGetWriter)(const OUString &, const OUString &rBaseURL, WriterRef &)
Definition: shellio.hxx:526
SfxMedium *const pMedium
Definition: shellio.hxx:147
Definition: doc.hxx:185
LanguageType GetLanguage() const
Definition: shellio.hxx:79
tools::SvRef< Writer > WriterRef
Definition: shellio.hxx:471
void SetOrganizerMode(bool bSet)
Definition: shellio.hxx:257
SvStream * pStrm
Definition: shellio.hxx:144
tools::SvRef< SotStorage > m_pStorage
Definition: shellio.hxx:211
void SetReadUTF8(bool bSet)
Definition: shellio.hxx:251
Dialog to specify the properties of drop-down form field.
Definition: accfrmobj.cxx:40
void SetParaFlags(LineEnd eVal)
Definition: shellio.hxx:83
ErrCode SaveOrDelMSVBAStorage(SfxObjectShell &, SotStorage &, bool, const OUString &)
Definition: fltini.cxx:734
Reader * ReadHTML
Definition: fltini.cxx:65
bool const bDelReader
Definition: shellio.hxx:535
ErrCode const & GetError() const
Definition: shellio.hxx:316
void SetTextFormats(const bool bNew)
Definition: shellio.hxx:125
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
Definition: shellio.hxx:179
SwPaM *const pOutPam
Definition: shellio.hxx:506
SwAsciiOptions aASCIIOpts
Definition: shellio.hxx:108
ErrCode GetSaveWarningOfMSVBAStorage(SfxObjectShell &rDocS)
Definition: fltini.cxx:746
void SetSkipImages(bool bSkipImages)
Definition: shellio.hxx:176
void SetLanguage(LanguageType nVal)
Definition: shellio.hxx:80
Reader * GetReader(const OUString &rFltName)
Return reader based on the name.
Definition: fltini.cxx:187
void SetOrganizerMode(bool bSet)
Definition: shellio.hxx:468
void SetBlockMode(bool bSet)
Definition: shellio.hxx:254
LineEnd GetSystemLineEnd()
const SwAsciiOptions & GetASCIIOpts() const
Definition: shellio.hxx:133
SwPaM *const pCursor
Definition: shellio.hxx:149
SwAsciiOptions m_aAsciiOptions
Definition: shellio.hxx:373
void GetRTFWriter(const OUString &, const OUString &, WriterRef &)
Definition: fltini.cxx:675
virtual ErrCode WriteStream()=0
SAL_DLLPUBLIC_EXPORT bool TestImportHTML(SvStream &rStream)
Definition: swhtml.cxx:5580
SwDoc & rDoc
Definition: shellio.hxx:508
Reader * GetDOCXReader()
Definition: fltini.cxx:172
Reader * ReadXML
Definition: fltini.cxx:65
void SetBaseURL(const OUString &rURL)
Definition: shellio.hxx:395
void GetWriter(const OUString &rNm, const OUString &rBaseURL, WriterRef &xWrt) const
Get access to the writer.
Definition: fltini.cxx:100
void SetCharSet(rtl_TextEncoding nVal)
Definition: shellio.hxx:77
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
SwPaM * m_pOrigPam
Definition: shellio.hxx:405
OUString sFont
Definition: shellio.hxx:65
FnGetReader const fnGetReader
Definition: shellio.hxx:533
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:146
SwgReaderOption & GetReaderOpt()
Definition: shellio.hxx:232
Reader *(* FnGetReader)()
Definition: shellio.hxx:525
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *)
Definition: writer.cxx:284
tools::SvRef< SotStorage > const pStg
Definition: shellio.hxx:145
void SetIgnoreHTMLComments(bool bSet)
Definition: shellio.hxx:259
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
Definition: parasc.cxx:78
#define LANGUAGE_SYSTEM
void GetXMLWriter(const OUString &, const OUString &, WriterRef &)
Definition: wrtxml.cxx:570
bool IsNumRules() const
Definition: shellio.hxx:127
std::unique_ptr< SwImpBlocks > pImp
Definition: shellio.hxx:305
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:503
OUString m_aTemplateName
Definition: shellio.hxx:203
OUString aFltName
Definition: shellio.hxx:290
Provides access to settings of a document.
Reader * GetReader()
Get access to the reader.
Definition: fltini.cxx:88
bool IsBlockMode() const
Definition: shellio.hxx:253
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
LineEnd eCRLF_Flag
Definition: shellio.hxx:68
SwCursorShell * pShell
Definition: shellio.hxx:507
bool IsTextFormats() const
Definition: shellio.hxx:124
rtl_TextEncoding eCharSet
Definition: shellio.hxx:66
Reader * ReadAscii
Definition: fltini.cxx:65
bool m_bTextFormats
Definition: shellio.hxx:111
SwReaderType
Definition: shellio.hxx:182
LineEnd
void SetBaseURL(const OUString &rURL)
Definition: shellio.hxx:175
ErrCode Read(const Reader &)
Definition: shellio.cxx:76
bool IsReadUTF8() const
Definition: shellio.hxx:250
virtual void SetFltName(const OUString &rFltNm)
Definition: shellio.cxx:621
void GetASCWriter(const OUString &, const OUString &, WriterRef &)
Definition: wrtasc.cxx:207
SotStorage & GetStorage() const
Definition: shellio.hxx:495
SwgReaderOption m_aOption
Definition: shellio.hxx:215
SvRefBase & operator=(const SvRefBase &)
void ResetAllFormatsOnly()
Definition: shellio.hxx:115
bool bIncludeBOM
Definition: shellio.hxx:69
bool mbSkipImages
Definition: shellio.hxx:152
bool bWriteAll
Definition: shellio.hxx:510
SW_DLLPUBLIC Reader * SwGetReaderXML()
Definition: fltini.cxx:108
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:478
const OUString * GetOrigFileName() const
Definition: shellio.hxx:435
SAL_DLLPUBLIC_EXPORT void FlushFontCache()
Definition: swfntcch.cxx:67
void setSotStorageRef(const tools::SvRef< SotStorage > &pStgRef)
Definition: shellio.hxx:270
SfxMedium * m_pMedium
Definition: shellio.hxx:213
SvStream * m_pStream
Definition: shellio.hxx:210
LanguageType nLanguage
Definition: shellio.hxx:67
void SetIncludeBOM(bool bVal)
Definition: shellio.hxx:86
Reader * GetRtfReader()
Definition: fltini.cxx:167
ErrCode nErr
Definition: shellio.hxx:306
rtl::Reference< SwDoc > mxTemplate
Definition: shellio.hxx:202
OUString m_sBaseURL
Definition: shellio.hxx:374
const OUString * m_pOrigFileName
Definition: shellio.hxx:386
Access to the style pool.
css::uno::Reference< css::embed::XStorage > m_xStorage
Definition: shellio.hxx:212
void GetWriter(const OUString &rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
Definition: fltini.cxx:177
LineEnd GetParaFlags() const
Definition: shellio.hxx:82
void SetASCIIOpts(const SwAsciiOptions &rOpts)
Definition: shellio.hxx:134
void SetAsciiOptions(const SwAsciiOptions &rOpt)
Definition: shellio.hxx:438
const SwAsciiOptions & GetAsciiOptions() const
Definition: shellio.hxx:437
DateTime m_aCheckDateTime
Definition: shellio.hxx:207
bool m_bFrameFormats
Definition: shellio.hxx:109
const tools::SvRef< SotStorage > & getSotStorageRef()
Definition: shellio.hxx:269
const OUString & GetFltName()
Definition: shellio.hxx:294
SvStream * pStrm
Definition: shellio.hxx:502
bool IsOrganizerMode() const
Definition: shellio.hxx:256
void Reset()
Definition: shellio.hxx:88
SwReaderWriterEntry(const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel)
Definition: shellio.hxx:537
void SetFrameFormats(const bool bNew)
Definition: shellio.hxx:119
virtual bool IsStgWriter() const
Definition: fltini.cxx:206
OUString const aFileName
Definition: shellio.hxx:150
bool HasGlossaries(const Reader &)
Definition: shellio.cxx:654
virtual SwReaderType GetReaderType()
Definition: shellio.cxx:616
void GetHTMLWriter(const OUString &, const OUString &, WriterRef &)
Definition: wrthtml.cxx:1550
SwDoc * m_pDoc
Definition: shellio.hxx:404
void SetMerge(const bool bNew)
Definition: shellio.hxx:131
void SetNumRules(const bool bNew)
Definition: shellio.hxx:128
void SetFontName(const OUString &rFont)
Definition: shellio.hxx:74
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo