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