LibreOffice Module sw (master)  1
writer.cxx
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 
20 #include <memory>
21 #include <hintids.hxx>
22 
23 #include <sot/storage.hxx>
24 #include <sfx2/docfile.hxx>
25 #include <svl/urihelper.hxx>
26 #include <vcl/graphicfilter.hxx>
27 #include <tools/diagnose_ex.h>
28 #include <editeng/fontitem.hxx>
29 #include <editeng/eeitem.hxx>
30 #include <sal/log.hxx>
31 #include <osl/diagnose.h>
32 #include <shellio.hxx>
33 #include <doc.hxx>
34 #include <docary.hxx>
35 #include <IMark.hxx>
37 #include <IDocumentMarkAccess.hxx>
38 #include <numrule.hxx>
39 #include <swerror.h>
40 #include <com/sun/star/ucb/ContentCreationException.hpp>
41 
42 using namespace css;
43 
44 namespace
45 {
46  SvStream& lcl_OutLongExt( SvStream& rStrm, sal_uLong nVal, bool bNeg )
47  {
48  sal_Char aBuf[28];
49 
50  int i = SAL_N_ELEMENTS(aBuf);
51  aBuf[--i] = 0;
52  do
53  {
54  aBuf[--i] = '0' + static_cast<sal_Char>(nVal % 10);
55  nVal /= 10;
56  } while (nVal);
57 
58  if (bNeg)
59  aBuf[--i] = '-';
60 
61  return rStrm.WriteCharPtr( &aBuf[i] );
62  }
63 }
64 
65 typedef std::multimap<sal_uLong, const ::sw::mark::IMark*> SwBookmarkNodeTable;
66 
68 {
70 
71  std::unique_ptr< std::map<OUString, OUString> > pFileNameMap;
72  std::vector<const SvxFontItem*> aFontRemoveLst;
73  SwBookmarkNodeTable aBkmkNodePos;
74 
75  Writer_Impl();
76 
77  void RemoveFontList( SwDoc& rDoc );
78  void InsertBkmk( const ::sw::mark::IMark& rBkmk );
79 };
80 
82  : m_pStream(nullptr)
83 {
84 }
85 
87 {
88  for( const auto& rpFontItem : aFontRemoveLst )
89  {
90  rDoc.GetAttrPool().Remove( *rpFontItem );
91  }
92 }
93 
94 void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
95 {
96  sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex();
97 
98  aBkmkNodePos.emplace( nNd, &rBkmk );
99 
100  if(rBkmk.IsExpanded() && rBkmk.GetOtherMarkPos().nNode != nNd)
101  {
102  nNd = rBkmk.GetOtherMarkPos().nNode.GetIndex();
103  aBkmkNodePos.emplace( nNd, &rBkmk );
104  }
105 }
106 
107 /*
108  * This module is the central collection point for all writer-filters
109  * and is a DLL !
110  *
111  * So that the Writer can work with different writers, the output-functions
112  * of the content carrying objects have to be mapped to the various
113  * output-functions.
114  *
115  * For that, to inquire its output function, every object can be gripped
116  * via the which-value in a table.
117  * These functions are available in the corresponding Writer-DLL's.
118  */
119 
121  : m_pImpl(std::make_unique<Writer_Impl>())
122  , m_pOrigFileName(nullptr), m_pDoc(nullptr), m_pOrigPam(nullptr), m_pCurrentPam(nullptr)
123  , m_bHideDeleteRedlines(false)
124 {
128  m_bOrganizerMode = false;
130 }
131 
133 {
134 }
135 
136 /*
137  * Document Interface Access
138  */
143 
145 {
146  m_pImpl->RemoveFontList( *m_pDoc );
147  m_pImpl.reset(new Writer_Impl);
148 
149  if( m_pCurrentPam )
150  {
151  while( m_pCurrentPam->GetNext() != m_pCurrentPam )
152  delete m_pCurrentPam->GetNext();
153  delete m_pCurrentPam;
154  }
155  m_pCurrentPam = nullptr;
156  m_pOrigFileName = nullptr;
157  m_pDoc = nullptr;
158 
162  m_bOrganizerMode = false;
163 }
164 
165 bool Writer::CopyNextPam( SwPaM ** ppPam )
166 {
167  if( (*ppPam)->GetNext() == m_pOrigPam )
168  {
169  *ppPam = m_pOrigPam; // set back to the beginning pam
170  return false; // end of the ring
171  }
172 
173  // otherwise copy the next value from the next Pam
174  *ppPam = (*ppPam)->GetNext();
175 
176  *m_pCurrentPam->GetPoint() = *(*ppPam)->Start();
177  *m_pCurrentPam->GetMark() = *(*ppPam)->End();
178 
179  return true;
180 }
181 
182 // search the next Bookmark-Position from the Bookmark-Table
183 
184 sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const
185 {
186  const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess();
188  if(ppBkmk != pMarkAccess->getBookmarksEnd())
189  return ppBkmk - pMarkAccess->getBookmarksBegin();
190  return -1;
191 }
192 
193 SwPaM *
194 Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndIdx)
195 {
196  SwNodes *const pNds = &rDoc.GetNodes();
197 
198  SwNodeIndex aStt( *pNds, nStartIdx );
199  SwContentNode* pCNode = aStt.GetNode().GetContentNode();
200  if( !pCNode && nullptr == pNds->GoNext( &aStt ) )
201  {
202  OSL_FAIL( "No more ContentNode at StartPos" );
203  }
204 
205  SwPaM* pNew = new SwPaM( aStt );
206  pNew->SetMark();
207  aStt = nEndIdx;
208  pCNode = aStt.GetNode().GetContentNode();
209  if (!pCNode)
210  pCNode = SwNodes::GoPrevious(&aStt);
211  assert(pCNode && "No more ContentNode at StartPos");
212  pCNode->MakeEndIndex( &pNew->GetPoint()->nContent );
213  pNew->GetPoint()->nNode = aStt;
214  return pNew;
215 }
216 
217 // Stream-specific
219 {
220  assert(m_pImpl->m_pStream && "Oh-oh. Writer with no Stream!");
221  return *m_pImpl->m_pStream;
222 }
223 
224 void Writer::SetStream(SvStream *const pStream)
225 {
226  m_pImpl->m_pStream = pStream;
227 }
228 
229 SvStream& Writer::OutLong( SvStream& rStrm, long nVal )
230 {
231  const bool bNeg = nVal < 0;
232  if (bNeg)
233  nVal = -nVal;
234 
235  return lcl_OutLongExt(rStrm, static_cast<sal_uLong>(nVal), bNeg);
236 }
237 
239 {
240  return lcl_OutLongExt(rStrm, nVal, false);
241 }
242 
243 ErrCode Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName )
244 {
245  if ( IsStgWriter() )
246  {
247  ErrCode nResult = ERRCODE_ABORT;
248  try
249  {
250  tools::SvRef<SotStorage> aRef = new SotStorage( rStrm );
251  nResult = Write( rPaM, *aRef, pFName );
252  if ( nResult == ERRCODE_NONE )
253  aRef->Commit();
254  }
255  catch (const css::ucb::ContentCreationException &)
256  {
257  TOOLS_WARN_EXCEPTION("sw", "Writer::Write caught");
258  }
259  return nResult;
260  }
261 
262  m_pDoc = rPaM.GetDoc();
263  m_pOrigFileName = pFName;
264  m_pImpl->m_pStream = &rStrm;
265 
266  // Copy PaM, so that it can be modified
267  m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
268  // for comparison secure to the current Pam
269  m_pOrigPam = &rPaM;
270 
271  ErrCode nRet = WriteStream();
272 
273  ResetWriter();
274 
275  return nRet;
276 }
277 
279 {}
280 
281 ErrCode Writer::Write( SwPaM& rPam, SfxMedium& rMedium, const OUString* pFileName )
282 {
283  SetupFilterOptions(rMedium);
284  // This method must be overridden in SwXMLWriter a storage from medium will be used there.
285  // The microsoft format can write to storage but the storage will be based on the stream.
286  return Write( rPam, *rMedium.GetOutStream(), pFileName );
287 }
288 
289 ErrCode Writer::Write( SwPaM& /*rPam*/, SotStorage&, const OUString* )
290 {
291  OSL_ENSURE( false, "Write in Storages on a stream?" );
292  return ERR_SWG_WRITE_ERROR;
293 }
294 
295 ErrCode Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const OUString*, SfxMedium* )
296 {
297  OSL_ENSURE( false, "Write in Storages on a stream?" );
298  return ERR_SWG_WRITE_ERROR;
299 }
300 
301 bool Writer::CopyLocalFileToINet( OUString& rFileNm )
302 {
303  if( !m_pOrigFileName ) // can be happen, by example if we
304  return false; // write into the clipboard
305 
306  bool bRet = false;
307  INetURLObject aFileUrl( rFileNm ), aTargetUrl( *m_pOrigFileName );
308 
309 // this is our old without the Mail-Export
310  if( ! ( INetProtocol::File == aFileUrl.GetProtocol() &&
311  INetProtocol::File != aTargetUrl.GetProtocol() &&
312  INetProtocol::Ftp <= aTargetUrl.GetProtocol() &&
313  INetProtocol::VndSunStarWebdav >= aTargetUrl.GetProtocol() ) )
314  return bRet;
315 
316  if (m_pImpl->pFileNameMap)
317  {
318  // has the file been moved?
319  std::map<OUString, OUString>::iterator it = m_pImpl->pFileNameMap->find( rFileNm );
320  if ( it != m_pImpl->pFileNameMap->end() )
321  {
322  rFileNm = it->second;
323  return true;
324  }
325  }
326  else
327  {
328  m_pImpl->pFileNameMap.reset( new std::map<OUString, OUString> );
329  }
330 
331  OUString aSrc = rFileNm;
332  OUString aDest = aTargetUrl.GetPartBeforeLastName();
333  aDest += aFileUrl.GetLastName();
334 
335  SfxMedium aSrcFile( aSrc, StreamMode::READ );
336  SfxMedium aDstFile( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
337 
338  aDstFile.GetOutStream()->WriteStream( *aSrcFile.GetInStream() );
339 
340  aSrcFile.Close();
341  aDstFile.Commit();
342 
343  bRet = ERRCODE_NONE == aDstFile.GetError();
344 
345  if( bRet )
346  {
347  m_pImpl->pFileNameMap->insert( std::make_pair( aSrc, aDest ) );
348  rFileNm = aDest;
349  }
350 
351  return bRet;
352 }
353 
355 {
356  // then there are a few fonts in the NumRules
357  // These put into the Pool. After this does they have a RefCount > 1
358  // it can be removed - it is already in the Pool
359  SfxItemPool& rPool = m_pDoc->GetAttrPool();
360  const SwNumRuleTable& rListTable = m_pDoc->GetNumRuleTable();
361  const SwNumRule* pRule;
362  const SwNumFormat* pFormat;
363  const vcl::Font* pFont;
364  const vcl::Font* pDefFont = &numfunc::GetDefBulletFont();
365  bool bCheck = false;
366 
367  for( size_t nGet = rListTable.size(); nGet; )
368  if( SwDoc::IsUsed( *(pRule = rListTable[ --nGet ] )))
369  for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
370  if( SVX_NUM_CHAR_SPECIAL == (pFormat = &pRule->Get( nLvl ))->GetNumberingType() ||
371  SVX_NUM_BITMAP == pFormat->GetNumberingType() )
372  {
373  if( nullptr == ( pFont = pFormat->GetBulletFont() ) )
374  pFont = pDefFont;
375 
376  if( bCheck )
377  {
378  if( *pFont == *pDefFont )
379  continue;
380  }
381  else if( *pFont == *pDefFont )
382  bCheck = true;
383 
384  AddFontItem( rPool, SvxFontItem( pFont->GetFamilyType(),
385  pFont->GetFamilyName(), pFont->GetStyleName(),
386  pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT ));
387  }
388 }
389 
391 {
392  SfxItemPool& rPool = m_pDoc->GetAttrPool();
393  if( rPool.GetSecondaryPool() )
394  {
398  }
399 }
400 
401 void Writer::AddFontItems_( SfxItemPool& rPool, sal_uInt16 nW )
402 {
403  const SvxFontItem* pFont = static_cast<const SvxFontItem*>(&rPool.GetDefaultItem( nW ));
404  AddFontItem( rPool, *pFont );
405 
406  if( nullptr != ( pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem( nW ))) )
407  AddFontItem( rPool, *pFont );
408 
409  for (const SfxPoolItem* pItem : rPool.GetItemSurrogates(nW))
410  AddFontItem( rPool, *static_cast<const SvxFontItem*>(pItem) );
411 }
412 
413 void Writer::AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont )
414 {
415  const SvxFontItem* pItem;
416  if( RES_CHRATR_FONT != rFont.Which() )
417  {
418  SvxFontItem aFont( rFont );
419  aFont.SetWhich( RES_CHRATR_FONT );
420  pItem = &rPool.Put( aFont );
421  }
422  else
423  pItem = &rPool.Put( rFont );
424 
425  if( 1 < pItem->GetRefCount() )
426  rPool.Remove( *pItem );
427  else
428  {
429  m_pImpl->aFontRemoveLst.push_back( pItem );
430  }
431 }
432 
433 // build a bookmark table, which is sort by the node position. The
434 // OtherPos of the bookmarks also inserted.
436 {
437  const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess();
438  for(IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->getBookmarksBegin();
439  ppBkmk != pMarkAccess->getBookmarksEnd();
440  ++ppBkmk)
441  {
442  m_pImpl->InsertBkmk(**ppBkmk);
443  }
444 }
445 
446 // search all Bookmarks in the range and return it in the Array
447 bool Writer::GetBookmarks(const SwContentNode& rNd, sal_Int32 nStt,
448  sal_Int32 nEnd, std::vector< const ::sw::mark::IMark* >& rArr)
449 {
450  OSL_ENSURE( rArr.empty(), "there are still entries available" );
451 
452  sal_uLong nNd = rNd.GetIndex();
453  std::pair<SwBookmarkNodeTable::const_iterator, SwBookmarkNodeTable::const_iterator> aIterPair
454  = m_pImpl->aBkmkNodePos.equal_range( nNd );
455  if( aIterPair.first != aIterPair.second )
456  {
457  // there exist some bookmarks, search now all which is in the range
458  if( !nStt && nEnd == rNd.Len() )
459  // all
460  for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it )
461  rArr.push_back( it->second );
462  else
463  {
464  for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it )
465  {
466  const ::sw::mark::IMark& rBkmk = *(it->second);
467  sal_Int32 nContent;
468  if( rBkmk.GetMarkPos().nNode == nNd &&
469  (nContent = rBkmk.GetMarkPos().nContent.GetIndex() ) >= nStt &&
470  nContent < nEnd )
471  {
472  rArr.push_back( &rBkmk );
473  }
474  else if( rBkmk.IsExpanded() && nNd ==
475  rBkmk.GetOtherMarkPos().nNode.GetIndex() && (nContent =
476  rBkmk.GetOtherMarkPos().nContent.GetIndex() ) >= nStt &&
477  nContent < nEnd )
478  {
479  rArr.push_back( &rBkmk );
480  }
481  }
482  }
483  }
484  return !rArr.empty();
485 }
486 
487 // Storage-specific
489 {
490  OSL_ENSURE( false, "Write in Storages on a stream?" );
491  return ERR_SWG_WRITE_ERROR;
492 }
493 
494 ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName )
495 {
496  SetStream(nullptr);
497  pStg = &rStg;
498  m_pDoc = rPaM.GetDoc();
499  m_pOrigFileName = pFName;
500 
501  // Copy PaM, so that it can be modified
502  m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
503  // for comparison secure to the current Pam
504  m_pOrigPam = &rPaM;
505 
506  ErrCode nRet = WriteStorage();
507 
508  pStg = nullptr;
509  ResetWriter();
510 
511  return nRet;
512 }
513 
514 ErrCode StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const OUString* pFName, SfxMedium* pMedium )
515 {
516  SetStream(nullptr);
517  pStg = nullptr;
518  xStg = rStg;
519  m_pDoc = rPaM.GetDoc();
520  m_pOrigFileName = pFName;
521 
522  // Copy PaM, so that it can be modified
523  m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
524  // for comparison secure to the current Pam
525  m_pOrigPam = &rPaM;
526 
527  ErrCode nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
528 
529  pStg = nullptr;
530  ResetWriter();
531 
532  return nRet;
533 }
534 
535 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxNumType GetNumberingType() const
virtual sal_Int32 Len() const
Definition: node.cxx:1183
#define EE_CHAR_FONTINFO
sal_uLong GetIndex() const
Definition: node.hxx:282
tools::SvRef< SotStorage > pStg
Definition: shellio.hxx:475
Marks a position in the document model.
Definition: pam.hxx:35
const OUString & GetFamilyName() const
std::unique_ptr< Writer_Impl > m_pImpl
Definition: shellio.hxx:377
bool GetBookmarks(const SwContentNode &rNd, sal_Int32 nStt, sal_Int32 nEnd, std::vector< const ::sw::mark::IMark * > &rArr)
Definition: writer.cxx:447
static SvStream & OutLong(SvStream &rStrm, long nVal)
Definition: writer.cxx:229
SwPaM * m_pCurrentPam
Definition: shellio.hxx:404
#define ERR_SWG_WRITE_ERROR
Definition: swerror.h:30
const OUString & GetStyleName() const
SwNodeIndex nNode
Definition: pam.hxx:37
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
sal_uIntPtr sal_uLong
void ResetWriter()
Definition: writer.cxx:144
const SwPosition * GetMark() const
Definition: pam.hxx:209
SvStream * m_pStream
Definition: writer.cxx:69
Provides access to the marks of a document.
Definition: doc.hxx:185
virtual const_iterator_t findFirstBookmarkStartsAfter(const SwPosition &rPos) const =0
Finds the first mark that is starting after.
aBuf
bool Commit()
#define RES_CHRATR_FONT
Definition: hintids.hxx:75
static SwContentNode * GoPrevious(SwNodeIndex *)
Definition: nodes.cxx:1290
SwNode & GetNode() const
Definition: ndindex.hxx:118
bool m_bASCII_ParaAsCR
Definition: shellio.hxx:409
virtual ErrCode WriteStream() override
Definition: writer.cxx:488
IDocumentMarkAccess * getIDocumentMarkAccess()
Definition: docbm.cxx:1552
void Remove(const SfxPoolItem &)
SvStream & WriteCharPtr(const char *pBuf)
ErrCode GetError() const
IDocumentSettingAccess & getIDocumentSettingAccess()
Definition: writer.cxx:139
bool Commit()
FontFamily GetFamilyType()
bool m_bWriteAll
Definition: shellio.hxx:405
void Close(bool bInDestruction=false)
bool m_bOrganizerMode
Definition: shellio.hxx:416
bool m_bWriteOnlyFirstTable
Definition: shellio.hxx:408
SwIndex nContent
Definition: pam.hxx:38
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:458
bool m_bASCII_ParaAsBlank
Definition: shellio.hxx:410
char sal_Char
virtual ErrCode WriteMedium(SfxMedium &)=0
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
void RemoveFontList(SwDoc &rDoc)
Definition: writer.cxx:86
SvStream * GetOutStream()
virtual ErrCode WriteStorage()=0
virtual ErrCode WriteStream()=0
SwPaM * GetNext()
Definition: pam.hxx:264
#define SAL_N_ELEMENTS(arr)
std::multimap< sal_uLong, const ::sw::mark::IMark * > SwBookmarkNodeTable
Definition: writer.cxx:65
SVX_NUM_BITMAP
SVX_NUM_CHAR_SPECIAL
bool m_bWriteClipboardDoc
Definition: shellio.hxx:407
bool m_bASCII_NoLastLineEnd
Definition: shellio.hxx:411
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
bool CopyNextPam(SwPaM **)
Definition: writer.cxx:165
SwPaM * m_pOrigPam
Definition: shellio.hxx:403
void PutNumFormatFontsInAttrPool()
Definition: writer.cxx:354
#define TOOLS_WARN_EXCEPTION(area, stream)
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *)
Definition: writer.cxx:281
FontPitch GetPitch()
const SwPosition * GetPoint() const
Definition: pam.hxx:207
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
Definition: number.cxx:1264
Writer()
Definition: writer.cxx:120
std::vector< const SvxFontItem * > aFontRemoveLst
Definition: writer.cxx:72
void PutEditEngFontsInAttrPool()
Definition: writer.cxx:390
int i
SwContentNode * GetContentNode()
Definition: node.hxx:615
const vcl::Font * GetBulletFont() const
SwDoc * GetDoc() const
Definition: pam.hxx:243
size_t size() const
Definition: docary.hxx:91
static SwPaM * NewSwPaM(SwDoc &rDoc, sal_uLong const nStartIdx, sal_uLong const nEndIdx)
Definition: writer.cxx:194
Provides access to settings of a document.
Marks a node in the document model.
Definition: ndindex.hxx:31
void SetStream(SvStream *const pStream)
Definition: writer.cxx:224
bool m_bBlock
Definition: shellio.hxx:415
SwBookmarkNodeTable aBkmkNodePos
Definition: writer.cxx:73
void AddFontItem(SfxItemPool &rPool, const SvxFontItem &rFont)
Definition: writer.cxx:413
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SvStream & WriteStream(SvStream &rStream)
const SwPosition * Start() const
Definition: pam.hxx:212
Writer_Impl()
Definition: writer.cxx:81
SfxItemPool * GetSecondaryPool() const
const SwNumFormat & Get(sal_uInt16 i) const
Definition: number.cxx:83
bool m_bUCS2_WithStartChar
Definition: shellio.hxx:412
SvStream * GetInStream()
std::unique_ptr< std::map< OUString, OUString > > pFileNameMap
Definition: writer.cxx:71
#define EE_CHAR_FONTINFO_CJK
void AddFontItems_(SfxItemPool &rPool, sal_uInt16 nWhichId)
Definition: writer.cxx:401
virtual ErrCode Write(SwPaM &, const css::uno::Reference< css::embed::XStorage > &, const OUString *, SfxMedium *=nullptr) override
#define ERRCODE_NONE
unsigned char sal_uInt8
OUString GetPartBeforeLastName() const
const SwNumRuleTable & GetNumRuleTable() const
Definition: doc.hxx:1055
virtual const_iterator_t getBookmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:476
bool IsUsed(const SwModify &) const
Definition: poolfmt.cxx:122
INetProtocol GetProtocol() const
static SvStream & OutULong(SvStream &rStrm, sal_uLong nVal)
Definition: writer.cxx:238
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:208
SwNodes & GetNodes()
Definition: doc.hxx:403
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
const SwPosition * End() const
Definition: pam.hxx:217
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
IDocumentStylePoolAccess & getIDocumentStylePoolAccess()
Definition: writer.cxx:141
sal_Int32 FindPos_Bkmk(const SwPosition &rPos) const
Definition: writer.cxx:184
SvStream & Strm()
Definition: writer.cxx:218
#define ERRCODE_ABORT
const OUString * m_pOrigFileName
Definition: shellio.hxx:384
Access to the style pool.
#define EE_CHAR_FONTINFO_CTL
virtual void SetupFilterOptions(SfxMedium &rMedium)
Definition: writer.cxx:278
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:457
bool m_bExportPargraphNumbering
Definition: shellio.hxx:413
virtual bool IsStgWriter() const
Definition: fltini.cxx:206
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1273
void MakeEndIndex(SwIndex *pIdx)
Definition: node.hxx:392
rtl_TextEncoding GetCharSet() const
SwDoc * m_pDoc
Definition: shellio.hxx:402
void InsertBkmk(const ::sw::mark::IMark &rBkmk)
Definition: writer.cxx:94
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1307
bool CopyLocalFileToINet(OUString &rFileNm)
Definition: writer.cxx:301
virtual ~Writer() override
Definition: writer.cxx:132
void CreateBookmarkTable()
Definition: writer.cxx:435
bool m_bShowProgress
Definition: shellio.hxx:406