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 
332  bool BeginGetDoc( sal_uInt16 ); // Read text modules.
333  void EndGetDoc(); // Release text modules.
334 
335  bool BeginPutDoc( const OUString&, const OUString& ); // Begin save.
336  sal_uInt16 PutDoc(); // End save.
337 
338  sal_uInt16 PutText( const OUString&, const OUString&, const OUString& ); // Save (short name, text).
339 
340  bool IsOnlyTextBlock( sal_uInt16 ) const;
341  bool IsOnlyTextBlock( const OUString& rShort ) const;
342 
343  OUString const & GetFileName() const; // Filename of pImp.
344  bool IsReadOnly() const; // ReadOnly-flag of pImp.
345 
346  bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable );
347  bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTable );
348 
349  bool StartPutMuchBlockEntries();
350  void EndPutMuchBlockEntries();
351 };
352 
353 // BEGIN source/filter/basflt/fltini.cxx
354 
355 extern Reader *ReadAscii, *ReadHTML, *ReadXML;
356 
358 
359 // END source/filter/basflt/fltini.cxx
360 
361 extern bool SetHTMLTemplate( SwDoc &rDoc ); //For templates from HTML before loading shellio.cxx.
362 
363 // Base-class of all writers.
364 
367 
369  : public SvRefBase
370 {
372  OUString m_sBaseURL;
373 
374  void AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
375  void AddFontItems_( SfxItemPool& rPool, sal_uInt16 nWhichId );
376 
377  std::unique_ptr<Writer_Impl> m_pImpl;
378 
379  Writer(Writer const&) = delete;
380  Writer& operator=(Writer const&) = delete;
381 
382 protected:
383 
384  const OUString* m_pOrigFileName;
385 
386  void ResetWriter();
387  bool CopyNextPam( SwPaM ** );
388 
389  void PutNumFormatFontsInAttrPool();
390  void PutEditEngFontsInAttrPool();
391 
392  virtual ErrCode WriteStream() = 0;
393  void SetBaseURL( const OUString& rURL ) { m_sBaseURL = rURL; }
394 
395  IDocumentSettingAccess& getIDocumentSettingAccess();
396  const IDocumentSettingAccess& getIDocumentSettingAccess() const;
397 
398  IDocumentStylePoolAccess& getIDocumentStylePoolAccess();
399  const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const;
400 
401 public:
403  SwPaM* m_pOrigPam; // Last Pam that has to be processed.
405  bool m_bWriteAll : 1;
406  bool m_bShowProgress : 1;
407  bool m_bWriteClipboardDoc : 1;
408  bool m_bWriteOnlyFirstTable : 1;
409  bool m_bASCII_ParaAsCR : 1;
410  bool m_bASCII_ParaAsBlank : 1;
411  bool m_bASCII_NoLastLineEnd : 1;
412  bool m_bUCS2_WithStartChar : 1;
413  bool m_bExportPargraphNumbering : 1;
414 
415  bool m_bBlock : 1;
416  bool m_bOrganizerMode : 1;
417  bool m_bHideDeleteRedlines : 1;
418 
419  Writer();
420  virtual ~Writer() override;
421 
422  virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* );
423  ErrCode Write( SwPaM&, SvStream&, const OUString* );
424  virtual ErrCode Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString*, SfxMedium* = nullptr );
425  virtual ErrCode Write( SwPaM&, SotStorage&, const OUString* );
426 
427  virtual void SetupFilterOptions(SfxMedium& rMedium);
428 
429  virtual bool IsStgWriter() const;
430 
431  void SetShowProgress( bool bFlag ) { m_bShowProgress = bFlag; }
432 
433  const OUString* GetOrigFileName() const { return m_pOrigFileName; }
434 
435  const SwAsciiOptions& GetAsciiOptions() const { return m_aAsciiOptions; }
436  void SetAsciiOptions( const SwAsciiOptions& rOpt ) { m_aAsciiOptions = rOpt; }
437 
438  const OUString& GetBaseURL() const { return m_sBaseURL;}
439 
440  // Look up next bookmark position from bookmark-table.
441  sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
442  // Build a bookmark table, which is sort by the node position. The
443  // OtherPos of the bookmarks also inserted.
444  void CreateBookmarkTable();
445  // Search all Bookmarks in the range and return it in the Array.
446  bool GetBookmarks( const SwContentNode& rNd,
447  sal_Int32 nStt, sal_Int32 nEnd,
448  std::vector< const ::sw::mark::IMark* >& rArr );
449 
450  // Create new PaM at position.
451  static SwPaM * NewSwPaM(SwDoc & rDoc,
452  sal_uLong const nStartIdx, sal_uLong const nEndIdx);
453 
454  // If applicable copy a local file into internet.
455  bool CopyLocalFileToINet( OUString& rFileNm );
456 
457  // Stream-specific routines. Do not use in storage-writer!
458 
459  // Optimizing output on stream.
460  static SvStream& OutLong( SvStream& rStrm, long nVal );
461  static SvStream& OutULong( SvStream& rStrm, sal_uLong nVal );
462 
463  void SetStream(SvStream *const pStream);
464  SvStream& Strm();
465 
466  void SetOrganizerMode( bool bSet ) { m_bOrganizerMode = bSet; }
467 };
468 
470 
471 // Base class for all storage writers.
473 {
474 protected:
476  css::uno::Reference < css::embed::XStorage > xStg;
477 
478  // Create error at call.
479  virtual ErrCode WriteStream() override;
480  virtual ErrCode WriteStorage() = 0;
481  virtual ErrCode WriteMedium( SfxMedium& ) = 0;
482 
483  using Writer::Write;
484 
485 public:
486  StgWriter() : Writer() {}
487 
488  virtual bool IsStgWriter() const override;
489 
490  virtual ErrCode Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString*, SfxMedium* = nullptr ) override;
491  virtual ErrCode Write( SwPaM&, SotStorage&, const OUString* ) override;
492 
493  SotStorage& GetStorage() const { return *pStg; }
494 };
495 
496 // Interface class for general access on special writers.
497 
499 {
501  css::uno::Reference < css::embed::XStorage > xStg;
503 
504  SwPaM* const pOutPam;
507 
508  bool bWriteAll;
509 
510 public:
511  ErrCode Write( WriterRef const & rxWriter, const OUString* = nullptr);
512 
513  SwWriter( SvStream&, SwCursorShell &, bool bWriteAll = false );
514  SwWriter( SvStream&, SwDoc & );
515  SwWriter( SvStream&, SwPaM &, bool bWriteAll = false );
516 
517  SwWriter( const css::uno::Reference < css::embed::XStorage >&, SwDoc& );
518 
519  SwWriter( SfxMedium&, SwCursorShell &, bool bWriteAll );
520  SwWriter( SfxMedium&, SwDoc & );
521 };
522 
523 typedef Reader* (*FnGetReader)();
524 typedef void (*FnGetWriter)(const OUString&, const OUString& rBaseURL, WriterRef&);
525 ErrCode SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, bool, const OUString& );
527 
529 {
533  bool const bDelReader;
534 
535  SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel )
536  : pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
537  {}
538 
540  Reader* GetReader();
541 
543  void GetWriter( const OUString& rNm, const OUString& rBaseURL, WriterRef& xWrt ) const;
544 };
545 
546 namespace SwReaderWriter
547 {
550 
552  Reader* GetReader( const OUString& rFltName );
553 
555  SW_DLLPUBLIC void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& xWrt );
556 }
557 
558 void GetRTFWriter( const OUString&, const OUString&, WriterRef& );
559 void GetASCWriter(const OUString&, const OUString&, WriterRef&);
560 void GetHTMLWriter( const OUString&, const OUString&, WriterRef& );
561 void GetXMLWriter( const OUString&, const OUString&, WriterRef& );
562 
563 #endif
564 
565 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetShowProgress(bool bFlag)
Definition: shellio.hxx:431
rtl_TextEncoding GetCharSet() const
Definition: shellio.hxx:76
FnGetWriter const fnGetWriter
Definition: shellio.hxx:532
SfxMedium * pMedium
Definition: shellio.hxx:502
SAL_DLLPUBLIC_EXPORT bool TestImportDOC(SvStream &rStream, const OUString &rFltName)
Definition: ww8par.cxx:6221
const OUString & GetBaseURL() const
Definition: shellio.hxx:438
bool GetIncludeBOM() const
Definition: shellio.hxx:85
tools::SvRef< SotStorage > pStg
Definition: shellio.hxx:475
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:377
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:404
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:524
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:469
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 date 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:533
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:504
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:466
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:371
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:5587
SwDoc & rDoc
Definition: shellio.hxx:506
Reader * GetDOCXReader()
Definition: fltini.cxx:172
Reader * ReadXML
Definition: fltini.cxx:65
void SetBaseURL(const OUString &rURL)
Definition: shellio.hxx:393
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:403
OUString sFont
Definition: shellio.hxx:65
FnGetReader const fnGetReader
Definition: shellio.hxx:531
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:146
SwgReaderOption & GetReaderOpt()
Definition: shellio.hxx:232
Reader *(* FnGetReader)()
Definition: shellio.hxx:523
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *)
Definition: writer.cxx:281
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:568
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:501
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:505
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:493
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:508
SW_DLLPUBLIC Reader * SwGetReaderXML()
Definition: fltini.cxx:108
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:476
const OUString * GetOrigFileName() const
Definition: shellio.hxx:433
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:372
const OUString * m_pOrigFileName
Definition: shellio.hxx:384
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:436
const SwAsciiOptions & GetAsciiOptions() const
Definition: shellio.hxx:435
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:500
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:535
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:402
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