LibreOffice Module sw (master)  1
shellio.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 <hintids.hxx>
21 #include <osl/diagnose.h>
22 #include <tools/date.hxx>
23 #include <tools/time.hxx>
24 #include <svl/urihelper.hxx>
25 #include <svl/fstathelper.hxx>
27 #include <sfx2/docfile.hxx>
28 #include <editeng/lrspitem.hxx>
29 #include <editeng/ulspitem.hxx>
30 #include <editeng/boxitem.hxx>
31 #include <editeng/paperinf.hxx>
32 #include <node.hxx>
33 #include <docary.hxx>
34 #include <fmtanchr.hxx>
35 #include <fmtfsize.hxx>
36 #include <fmtpdsc.hxx>
37 #include <swtypes.hxx>
38 #include <shellio.hxx>
39 #include <doc.hxx>
40 #include <IDocumentUndoRedo.hxx>
46 #include <IDocumentState.hxx>
48 #include <pam.hxx>
49 #include <editsh.hxx>
50 #include <undobj.hxx>
51 #include <swundo.hxx>
52 #include <swtable.hxx>
53 #include <tblafmt.hxx>
54 #include <tblsel.hxx>
55 #include <pagedesc.hxx>
56 #include <poolfmt.hxx>
57 #include <fltini.hxx>
58 #include <docsh.hxx>
59 #include <ndtxt.hxx>
60 #include <redline.hxx>
61 #include <swerror.h>
62 #include <paratr.hxx>
63 #include <pausethreadstarting.hxx>
64 
65 using namespace ::com::sun::star;
66 
67 static bool sw_MergePortions(SwNode *const& pNode, void *)
68 {
69  if (pNode->IsTextNode())
70  {
71  pNode->GetTextNode()->FileLoadedInitHints();
72  }
73  return true;
74 }
75 
76 ErrCode SwReader::Read( const Reader& rOptions )
77 {
78  // copy variables
79  Reader* po = const_cast<Reader*>(&rOptions);
80  po->m_pStream = pStrm;
81  po->m_pStorage = pStg;
82  po->m_xStorage = xStg;
83  po->m_bInsertMode = nullptr != pCursor;
85 
86  // if a Medium is selected, get its Stream
87  if( nullptr != (po->m_pMedium = pMedium ) &&
88  !po->SetStrmStgPtr() )
89  {
90  po->SetReadUTF8( false );
91  po->SetBlockMode( false );
92  po->SetOrganizerMode( false );
93  po->SetIgnoreHTMLComments( false );
95  }
96 
97  ErrCode nError = ERRCODE_NONE;
98 
99  GetDoc();
100 
101  // while reading, do not call OLE-Modified
102  Link<bool,void> aOLELink( mxDoc->GetOle2Link() );
103  mxDoc->SetOle2Link( Link<bool,void>() );
104 
105  mxDoc->SetInReading( true );
106  mxDoc->SetInXMLImport( dynamic_cast< XMLReader* >(po) != nullptr );
107 
108  SwPaM *pPam;
109  if( pCursor )
110  pPam = pCursor;
111  else
112  {
113  // if the Reader was not called by a Shell, create a PaM ourselves
114  SwNodeIndex nNode( mxDoc->GetNodes().GetEndOfContent(), -1 );
115  pPam = new SwPaM( nNode );
116  // For Web documents the default template was set already by InitNew,
117  // unless the filter is not HTML,
118  // or a SetTemplateName was called in ConvertFrom.
119  if( !mxDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) || ReadHTML != po || !po->mxTemplate.is() )
120  po->SetTemplate( *mxDoc );
121  }
122 
123  // Pams are connected like rings; stop when we return to the 1st element
124  SwPaM *pEnd = pPam;
125 
126  bool bReadPageDescs = false;
127  bool const bDocUndo = mxDoc->GetIDocumentUndoRedo().DoesUndo();
128  bool bSaveUndo = bDocUndo && pCursor;
129  if( bSaveUndo )
130  {
131  // the reading of the page template cannot be undone!
132  bReadPageDescs = po->m_aOption.IsPageDescs();
133  if( bReadPageDescs )
134  {
135  bSaveUndo = false;
136  mxDoc->GetIDocumentUndoRedo().DelAllUndoObj();
137  }
138  else
139  {
140  mxDoc->GetIDocumentUndoRedo().ClearRedo();
141  mxDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSDOKUMENT, nullptr );
142  }
143  }
144  mxDoc->GetIDocumentUndoRedo().DoUndo(false);
145 
146  SwNodeIndex aSplitIdx( mxDoc->GetNodes() );
147 
148  RedlineFlags eOld = mxDoc->getIDocumentRedlineAccess().GetRedlineFlags();
149  RedlineFlags ePostReadRedlineFlags( RedlineFlags::Ignore );
150 
151  // Array of FlyFormats
152  SwFrameFormatsV aFlyFrameArr;
153  // only read templates? then ignore multi selection!
154  bool bFormatsOnly = po->m_aOption.IsFormatsOnly();
155 
156  while( true )
157  {
158  std::unique_ptr<SwUndoInsDoc> pUndo;
159  if( bSaveUndo )
160  pUndo.reset(new SwUndoInsDoc( *pPam ));
161 
162  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
163 
164  std::unique_ptr<SwPaM> pUndoPam;
165  if( bDocUndo || pCursor )
166  {
167  // set Pam to the previous node, so that it is not also moved
168  const SwNodeIndex& rTmp = pPam->GetPoint()->nNode;
169  pUndoPam.reset(new SwPaM( rTmp, rTmp, 0, -1 ));
170  }
171 
172  // store for now all Fly's
173  if( pCursor )
174  {
175  std::copy(mxDoc->GetSpzFrameFormats()->begin(),
176  mxDoc->GetSpzFrameFormats()->end(), std::back_inserter(aFlyFrameArr));
177  }
178 
179  const sal_Int32 nSttContent = pPam->GetPoint()->nContent.GetIndex();
180 
181  // make sure the End position is correct for all Readers
182  SwContentNode* pCNd = pPam->GetContentNode();
183  sal_Int32 nEndContent = pCNd ? pCNd->Len() - nSttContent : 0;
184  SwNodeIndex aEndPos( pPam->GetPoint()->nNode, 1 );
185 
186  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
187 
188  nError = po->Read( *mxDoc, sBaseURL, *pPam, aFileName );
189 
190  // an ODF document may contain redline mode in settings.xml; save it!
191  ePostReadRedlineFlags = mxDoc->getIDocumentRedlineAccess().GetRedlineFlags();
192 
193  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
194 
195  if( ! nError.IsError() ) // set the End position already
196  {
197  --aEndPos;
198  pCNd = aEndPos.GetNode().GetContentNode();
199  if( !pCNd && nullptr == ( pCNd = SwNodes::GoPrevious( &aEndPos ) ))
200  pCNd = mxDoc->GetNodes().GoNext( &aEndPos );
201 
202  pPam->GetPoint()->nNode = aEndPos;
203  const sal_Int32 nLen = pCNd->Len();
204  if( nLen < nEndContent )
205  nEndContent = 0;
206  else
207  nEndContent = nLen - nEndContent;
208  pPam->GetPoint()->nContent.Assign( pCNd, nEndContent );
209 
210  const SwStartNode* pTableBoxStart = pCNd->FindTableBoxStartNode();
211  if ( pTableBoxStart )
212  {
213  SwTableBox* pBox = pTableBoxStart->GetTableBox();
214  if ( pBox )
215  {
216  mxDoc->ChkBoxNumFormat( *pBox, true );
217  }
218  }
219  }
220 
221  if( pCursor )
222  {
223  *pUndoPam->GetMark() = *pPam->GetPoint();
224  ++pUndoPam->GetPoint()->nNode;
225  SwNode& rNd = pUndoPam->GetNode();
226  if( rNd.IsContentNode() )
227  pUndoPam->GetPoint()->nContent.Assign(
228  static_cast<SwContentNode*>(&rNd), nSttContent );
229  else
230  pUndoPam->GetPoint()->nContent.Assign( nullptr, 0 );
231 
232  bool bChkHeaderFooter = rNd.FindHeaderStartNode() ||
233  rNd.FindFooterStartNode();
234 
235  // search all new Fly's, and store them as individual Undo Objects
236  for( SwFrameFormats::size_type n = 0; n < mxDoc->GetSpzFrameFormats()->size(); ++n )
237  {
238  SwFrameFormat* pFrameFormat = (*mxDoc->GetSpzFrameFormats())[ n ];
239  const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
240  // ok, here IsAlive is a misnomer...
241  if (!aFlyFrameArr.IsAlive(pFrameFormat))
242  {
243  if ( (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
244  // TODO: why is this not handled via SetInsertRange?
246  pUndoPam->GetPoint()->nNode.GetIndex(),
247  pUndoPam->GetMark()->nNode.GetIndex()))
248  {
249  if( bChkHeaderFooter &&
250  (RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) &&
251  RES_DRAWFRMFMT == pFrameFormat->Which() )
252  {
253  // DrawObjects are not allowed in Headers/Footers!
254  pFrameFormat->DelFrames();
255  mxDoc->DelFrameFormat( pFrameFormat );
256  --n;
257  }
258  else
259  {
260  if( bSaveUndo )
261  {
262  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
263  // UGLY: temp. enable undo
264  mxDoc->GetIDocumentUndoRedo().DoUndo(true);
265  mxDoc->GetIDocumentUndoRedo().AppendUndo(
266  std::make_unique<SwUndoInsLayFormat>( pFrameFormat,0,0 ) );
267  mxDoc->GetIDocumentUndoRedo().DoUndo(false);
268  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
269  }
270  if( pFrameFormat->HasWriterListeners() )
271  {
272  // Draw-Objects create a Frame when being inserted; thus delete them
273  pFrameFormat->DelFrames();
274  }
275 
276  if (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
277  {
278  if( !rAnchor.GetContentAnchor() )
279  {
280  pFrameFormat->MakeFrames();
281  }
282  else if( pCursor )
283  {
284  mxDoc->SetContainsAtPageObjWithContentAnchor( true );
285  }
286  }
287  else
288  pFrameFormat->MakeFrames();
289  }
290  }
291  }
292  }
293  aFlyFrameArr.clear();
294 
295  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
296  if( mxDoc->getIDocumentRedlineAccess().IsRedlineOn() )
297  mxDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pUndoPam ), true);
298  else
299  mxDoc->getIDocumentRedlineAccess().SplitRedline( *pUndoPam );
300  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
301  }
302  if( bSaveUndo )
303  {
304  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
305  pUndo->SetInsertRange( *pUndoPam, false );
306  // UGLY: temp. enable undo
307  mxDoc->GetIDocumentUndoRedo().DoUndo(true);
308  mxDoc->GetIDocumentUndoRedo().AppendUndo( std::move(pUndo) );
309  mxDoc->GetIDocumentUndoRedo().DoUndo(false);
310  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
311  }
312 
313  pUndoPam.reset();
314 
315  pPam = pPam->GetNext();
316  if( pPam == pEnd )
317  break;
318 
319  // only read templates? then ignore multi selection! Bug 68593
320  if( bFormatsOnly )
321  break;
322 
323  /*
324  * !!! The Status of the Stream has to be reset directly. !!!
325  * When Seeking, the current Status-, EOF- and bad-Bit is set;
326  * nobody knows why
327  */
328  if( pStrm )
329  {
330  pStrm->Seek(0);
331  pStrm->ResetError();
332  }
333  }
334 
335  // fdo#52028: ODF file import does not result in MergePortions being called
336  // for every attribute, since that would be inefficient. So call it here.
337  // This is only necessary for formats that may contain RSIDs (ODF,MSO).
338  // It's too hard to figure out which nodes were inserted in Insert->File
339  // case (redlines, flys, footnotes, header/footer) so just do every node.
340  mxDoc->GetNodes().ForEach(&sw_MergePortions);
341 
342  mxDoc->SetInReading( false );
343  mxDoc->SetInXMLImport( false );
344 
345  mxDoc->InvalidateNumRules();
346  mxDoc->UpdateNumRule();
347  mxDoc->ChkCondColls();
348  mxDoc->SetAllUniqueFlyNames();
349  mxDoc->getIDocumentState().SetLoaded();
350  // Clear unassigned cell styles, because they aren't needed anymore.
351  mxDoc->GetCellStyles().clear();
352 
353  mxDoc->GetIDocumentUndoRedo().DoUndo(bDocUndo);
354  if (!bReadPageDescs && bSaveUndo )
355  {
356  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
357  mxDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSDOKUMENT, nullptr );
358  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
359  }
360 
361  // delete Pam if it was created only for reading
362  if( !pCursor )
363  {
364  delete pPam; // open a new one
365 
366  // #i42634# Moved common code of SwReader::Read() and
367  // SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
368  // ATM still with Update
369  mxDoc->getIDocumentLinksAdministration().UpdateLinks();
370 
371  // not insert: set the redline mode read from settings.xml
372  eOld = ePostReadRedlineFlags & ~RedlineFlags::Ignore;
373 
374  mxDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0);
375  }
376 
377  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
378  mxDoc->SetOle2Link( aOLELink );
379 
380  if( pCursor ) // the document is now modified
381  mxDoc->getIDocumentState().SetModified();
382  // #i38810# - If links have been updated, the document
383  // have to be modified. During update of links the OLE link at the document
384  // isn't set. Thus, the document's modified state has to be set again after
385  // the OLE link is restored - see above <mxDoc->SetOle2Link( aOLELink )>.
386  if ( mxDoc->getIDocumentLinksAdministration().LinksUpdated() )
387  {
388  mxDoc->getIDocumentState().SetModified();
389  }
390 
391  po->SetReadUTF8( false );
392  po->SetBlockMode( false );
393  po->SetOrganizerMode( false );
394  po->SetIgnoreHTMLComments( false );
395 
396  return nError;
397 }
398 
399 
400 SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument)
401  : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCursor(nullptr),
402  aFileName(rFileName), mbSkipImages(false)
403 {
404  SetBaseURL( rMedium.GetBaseURL() );
405  SetSkipImages( rMedium.IsSkipImages() );
406 }
407 
408 
409 // Read into an existing document
410 SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam)
411  : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCursor(&rPam),
412  aFileName(rFileName), mbSkipImages(false)
413 {
414  SetBaseURL( rBaseURL );
415 }
416 
417 SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam)
418  : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium),
419  pCursor(&rPam), aFileName(rFileName), mbSkipImages(false)
420 {
421  SetBaseURL( rMedium.GetBaseURL() );
422 }
423 
424 SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam )
425  : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCursor(&rPam), aFileName(rFilename), mbSkipImages(false)
426 {
427 }
428 
430  : m_aDateStamp( Date::EMPTY ),
431  m_aTimeStamp( tools::Time::EMPTY ),
432  m_aCheckDateTime( DateTime::EMPTY ),
433  m_pStream(nullptr), m_pMedium(nullptr), m_bInsertMode(false),
434  m_bTemplateBrowseMode(false), m_bReadUTF8(false), m_bBlockMode(false), m_bOrganizerMode(false),
435  m_bHasAskTemplateName(false), m_bIgnoreHTMLComments(false), m_bSkipImages(false)
436 {
437 }
438 
440 {
441 }
442 
443 OUString Reader::GetTemplateName(SwDoc& /*rDoc*/) const
444 {
445  return OUString();
446 }
447 
448 // load the Filter template, set and release
450 {
451  if( !m_bHasAskTemplateName )
452  {
454  m_bHasAskTemplateName = true;
455  }
456 
457  if( m_aTemplateName.isEmpty() )
458  ClearTemplate();
459  else
460  {
462  const OUString aFileName = aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
463  OSL_ENSURE( !aTDir.HasError(), "No absolute path for template name!" );
464  DateTime aCurrDateTime( DateTime::SYSTEM );
465  bool bLoad = false;
466 
467  // if the template is already loaded, check once-a-minute if it has changed
468  if( !mxTemplate.is() || aCurrDateTime >= m_aCheckDateTime )
469  {
470  Date aTstDate( Date::EMPTY );
471  tools::Time aTstTime( tools::Time::EMPTY );
474  &aTstDate, &aTstTime ) &&
475  ( !mxTemplate.is() || m_aDateStamp != aTstDate || m_aTimeStamp != aTstTime ))
476  {
477  bLoad = true;
478  m_aDateStamp = aTstDate;
479  m_aTimeStamp = aTstTime;
480  }
481 
482  // only one minute later check if it has changed
483  m_aCheckDateTime = aCurrDateTime;
484  m_aCheckDateTime += tools::Time( 0, 1 );
485  }
486 
487  if (bLoad)
488  {
489  ClearTemplate();
490  OSL_ENSURE( !mxTemplate.is(), "Who holds the template doc?" );
491 
492  // If the writer module is not installed,
493  // we cannot create a SwDocShell. We could create a
494  // SwWebDocShell however, because this exists always
495  // for the help.
496  SvtModuleOptions aModuleOptions;
497  if (aModuleOptions.IsWriter())
498  {
499  SwDocShell *pDocSh = new SwDocShell(SfxObjectCreateMode::INTERNAL);
500  SfxObjectShellLock xDocSh = pDocSh;
501  if (pDocSh->DoInitNew())
502  {
503  mxTemplate = pDocSh->GetDoc();
504  mxTemplate->SetOle2Link( Link<bool,void>() );
505  // always FALSE
506  mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
507  mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
508  mxTemplate->RemoveAllFormatLanguageDependencies();
509 
510  ReadXML->SetOrganizerMode( true );
511  SfxMedium aMedium( aFileName, StreamMode::NONE );
512  SwReader aRdr( aMedium, OUString(), mxTemplate.get() );
513  aRdr.Read( *ReadXML );
514  ReadXML->SetOrganizerMode( false );
515  }
516  }
517  }
518 
519  OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || m_aTemplateName=="$$Dummy$$",
520  "TemplatePtr but no template exist!" );
521  }
522 
523  return mxTemplate.get();
524 }
525 
527 {
528  bool bRet = false;
529 
530  GetTemplateDoc(rDoc);
531  if( mxTemplate.is() )
532  {
534  rDoc.ReplaceStyles( *mxTemplate );
535  rDoc.getIDocumentFieldsAccess().SetFixFields(nullptr);
536  bRet = true;
537  }
538 
539  return bRet;
540 }
541 
543 {
544  mxTemplate.clear();
545 }
546 
547 void Reader::SetTemplateName( const OUString& rDir )
548 {
549  if( !rDir.isEmpty() && m_aTemplateName != rDir )
550  {
551  ClearTemplate();
552  m_aTemplateName = rDir;
553  }
554 }
555 
557 {
558  ClearTemplate();
559  mxTemplate = new SwDoc;
560  mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
561  mxTemplate->getIDocumentDeviceAccess().getPrinter( true );
562  mxTemplate->RemoveAllFormatLanguageDependencies();
563  m_aCheckDateTime = Date( 1, 1, 2300 ); // year 2300 should be sufficient
564  m_aTemplateName = "$$Dummy$$";
565 }
566 
567 // Users that do not need to open these Streams / Storages,
568 // have to override this method
570 {
571  OSL_ENSURE( m_pMedium, "Where is the Media??" );
572 
573  if( m_pMedium->IsStorage() )
574  {
576  {
578  return true;
579  }
580  }
581  else
582  {
585  {
586  m_pStorage = new SotStorage( *m_pStream );
587  m_pStream = nullptr;
588  }
589  else if ( !(SwReaderType::Stream & GetReaderType()) )
590  {
591  m_pStream = nullptr;
592  return false;
593  }
594 
595  return true;
596  }
597  return false;
598 }
599 
601 {
602  return SwReaderType::Stream;
603 }
604 
605 void Reader::SetFltName( const OUString& )
606 {
607 }
608 
610 {
611  rFrameSet.Put( SvxLRSpaceItem(RES_LR_SPACE) );
612  rFrameSet.Put( SvxULSpaceItem(RES_UL_SPACE) );
613  rFrameSet.Put( SvxBoxItem(RES_BOX) );
614 }
615 
617 {
618  sal_uInt16 const s_ids[3] = {
620  };
621  for (sal_uInt16 i : s_ids)
622  {
623  SwFrameFormat *const pFrameFormat = rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( i );
624 
625  pFrameFormat->ResetFormatAttr( RES_LR_SPACE );
626  pFrameFormat->ResetFormatAttr( RES_UL_SPACE );
627  pFrameFormat->ResetFormatAttr( RES_BOX );
628  }
629 }
630 
631  // read the sections of the document, which is equal to the medium.
632  // returns the count of it
633 size_t Reader::GetSectionList(SfxMedium&, std::vector<OUString>&) const
634 {
635  return 0;
636 }
637 
638 bool SwReader::HasGlossaries( const Reader& rOptions )
639 {
640  // copy variables
641  Reader* po = const_cast<Reader*>(&rOptions);
642  po->m_pStream = pStrm;
643  po->m_pStorage = pStg;
644  po->m_bInsertMode = false;
645 
646  // if a Medium is selected, get its Stream
647  bool bRet = false;
648  if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() )
649  bRet = po->HasGlossaries();
650  return bRet;
651 }
652 
653 bool SwReader::ReadGlossaries( const Reader& rOptions,
654  SwTextBlocks& rBlocks, bool bSaveRelFiles )
655 {
656  // copy variables
657  Reader* po = const_cast<Reader*>(&rOptions);
658  po->m_pStream = pStrm;
659  po->m_pStorage = pStg;
660  po->m_bInsertMode = false;
661 
662  // if a Medium is selected, get its Stream
663  bool bRet = false;
664  if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() )
665  bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
666  return bRet;
667 }
668 
670 {
671  return false;
672 }
673 
675 {
676  return false;
677 }
678 
680 {
681  return SwReaderType::Storage;
682 }
683 
684 /*
685  * Writer
686  */
687 
688 /*
689  * Constructors, Destructors are inline (inc/shellio.hxx).
690  */
691 
692 SwWriter::SwWriter(SvStream& rStrm, SwCursorShell &rShell, bool bInWriteAll)
693  : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell),
694  rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
695 {
696 }
697 
699  : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
700  bWriteAll(true)
701 {
702 }
703 
704 SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool bInWriteAll)
705  : pStrm(&rStrm), pMedium(nullptr), pOutPam(&rPam), pShell(nullptr),
706  rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
707 {
708 }
709 
710 SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocument)
711  : pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true)
712 {
713 }
714 
715 SwWriter::SwWriter(SfxMedium& rMedium, SwCursorShell &rShell, bool bInWriteAll)
716  : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell),
717  rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
718 {
719 }
720 
721 SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
722  : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
723  bWriteAll(true)
724 {
725 }
726 
727 ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileName )
728 {
729  // #i73788#
730  SwPauseThreadStarting aPauseThreadStarting;
731 
732  bool bHasMark = false;
733  std::shared_ptr<SwUnoCursor> pTempCursor;
734  SwPaM * pPam;
735 
737 
738  if ( pShell && !bWriteAll && pShell->IsTableMode() )
739  {
740  bWriteAll = true;
741  xDoc = new SwDoc;
742 
743  // Copy parts of a table:
744  // Create a table with the width of the original and copy the selected cells.
745  // The sizes are corrected by ratio.
746 
747  // search the layout for cells
748  SwSelBoxes aBoxes;
749  GetTableSel( *pShell, aBoxes );
750  const SwTableNode* pTableNd = static_cast<const SwTableNode*>(aBoxes[0]->GetSttNd()->StartOfSectionNode());
751  SwNodeIndex aIdx( xDoc->GetNodes().GetEndOfExtras(), 2 );
752  SwContentNode *pNd = aIdx.GetNode().GetContentNode();
753  OSL_ENSURE( pNd, "Node not found" );
754  SwPosition aPos( aIdx, SwIndex( pNd ) );
755  pTableNd->GetTable().MakeCopy( xDoc.get(), aPos, aBoxes );
756  }
757 
758  if( !bWriteAll && ( pShell || pOutPam ))
759  {
760  if( pShell )
761  pPam = pShell->GetCursor();
762  else
763  pPam = pOutPam;
764 
765  SwPaM *pEnd = pPam;
766 
767  // 1st round: Check if there is a selection
768  while(true)
769  {
770  bHasMark = bHasMark || pPam->HasMark();
771  pPam = pPam->GetNext();
772  if(bHasMark || pPam == pEnd)
773  break;
774  }
775 
776  // if there is no selection, select the whole document
777  if(!bHasMark)
778  {
779  if( pShell )
780  {
781  pShell->Push();
782  pShell->SttEndDoc(true);
783  pShell->SetMark();
784  pShell->SttEndDoc(false);
785  }
786  else
787  {
788  pPam = new SwPaM( *pPam, pPam );
789  pPam->Move( fnMoveBackward, GoInDoc );
790  pPam->SetMark();
791  pPam->Move( fnMoveForward, GoInDoc );
792  }
793  }
794  // pPam is still the current Cursor !!
795  }
796  else
797  {
798  // no Shell or write-everything -> create a Pam
799  SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc;
800  pTempCursor = pOutDoc->CreateUnoCursor(
801  SwPosition(pOutDoc->GetNodes().GetEndOfContent()), false);
802  pPam = pTempCursor.get();
803  if( pOutDoc->IsClipBoard() )
804  {
805  pPam->Move( fnMoveBackward, GoInDoc );
806  pPam->SetMark();
807  pPam->Move( fnMoveForward, GoInDoc );
808  }
809  else
810  {
811  pPam->SetMark();
812  pPam->Move( fnMoveBackward, GoInDoc );
813  }
814  }
815 
816  rxWriter->m_bWriteAll = bWriteAll;
817  SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc;
818 
819  // If the default PageDesc has still the initial value,
820  // (e.g. if no printer was set) then set it to DIN A4.
821  // #i37248# - Modifications are only allowed at a new document.
822  // <pOutDoc> contains a new document, if <xDoc> is set - see above.
823  if ( xDoc.is() && !pOutDoc->getIDocumentDeviceAccess().getPrinter( false ) )
824  {
825  const SwPageDesc& rPgDsc = pOutDoc->GetPageDesc( 0 );
826  //const SwPageDesc& rPgDsc = *pOutDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD );
827  const SwFormatFrameSize& rSz = rPgDsc.GetMaster().GetFrameSize();
828  // Clipboard-Document is always created w/o printer; thus the
829  // default PageDesc is always aug LONG_MAX !! Set then to DIN A4
830  if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() )
831  {
832  SwPageDesc aNew( rPgDsc );
833  SwFormatFrameSize aNewSz( rSz );
835  aNewSz.SetHeight( a4.Width() );
836  aNewSz.SetWidth( a4.Height() );
837  aNew.GetMaster().SetFormatAttr( aNewSz );
838  pOutDoc->ChgPageDesc( 0, aNew );
839  }
840  }
841 
842  bool bLockedView(false);
843  SwEditShell* pESh = pOutDoc->GetEditShell();
844  if( pESh )
845  {
846  bLockedView = pESh->IsViewLocked();
847  pESh->LockView( true ); //lock visible section
848  pESh->StartAllAction();
849  }
850 
851  const bool bOrigPurgeOle = pOutDoc->getIDocumentSettingAccess().get(DocumentSettingId::PURGE_OLE);
853 
854  ErrCode nError = ERRCODE_NONE;
855  if( pMedium )
856  nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
857  else if( pStrm )
858  nError = rxWriter->Write( *pPam, *pStrm, pRealFileName );
859  else if( xStg.is() )
860  nError = rxWriter->Write( *pPam, xStg, pRealFileName );
861 
862  pOutDoc->getIDocumentSettingAccess().set(DocumentSettingId::PURGE_OLE, bOrigPurgeOle );
863 
864  if( pESh )
865  {
866  pESh->EndAllAction();
867  pESh->LockView( bLockedView );
868  }
869 
870  // If the selection was only created for printing, reset the old cursor before returning
871  if( !bWriteAll && ( pShell || pOutPam ))
872  {
873  if(!bHasMark)
874  {
875  if( pShell )
877  else
878  delete pPam;
879  }
880  }
881  else
882  {
883  // Everything was written successfully? Tell the document!
884  if ( !nError.IsError() && !xDoc.is() )
885  {
887  // #i38810# - reset also flag, that indicates updated links
889  }
890  }
891 
892  if ( xDoc.is() )
893  {
894  xDoc.clear();
895  bWriteAll = false;
896  }
897 
898  return nError;
899 }
900 
901 bool SetHTMLTemplate( SwDoc & rDoc )
902 {
903  // get template name of the Sfx-HTML-Filter !!!
904  if( !ReadHTML->GetTemplateDoc(rDoc) )
906 
907  bool bRet = ReadHTML->SetTemplate( rDoc );
908 
909  SwNodes& rNds = rDoc.GetNodes();
910  SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 );
911  SwContentNode* pCNd = rNds.GoNext( &aIdx );
912  if( pCNd )
913  {
914  pCNd->SetAttr
916  pCNd->ChgFormatColl( rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT, false ));
917  }
918 
919  return bRet;
920 }
921 
922 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reader()
Definition: shellio.cxx:429
long Width() const
Starts a section of nodes in the document model.
Definition: node.hxx:303
bool IsSkipImages() const
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
Definition: doc.cxx:1807
virtual sal_Int32 Len() const
Definition: node.cxx:1181
SfxMedium * pMedium
Definition: shellio.hxx:503
SVL_DLLPUBLIC bool IsDocument(const OUString &rURL)
virtual bool ReadGlossaries(SwTextBlocks &, bool bSaveRelFiles) const
Definition: shellio.cxx:674
const SwStartNode * FindHeaderStartNode() const
Definition: node.hxx:202
Marks a position in the document model.
Definition: pam.hxx:35
OUString sBaseURL
Definition: shellio.hxx:152
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:184
bool ReadGlossaries(const Reader &, SwTextBlocks &, bool bSaveRelFiles)
Definition: shellio.cxx:653
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
Definition: node.cxx:745
tools::Time m_aTimeStamp
Definition: shellio.hxx:207
const SwStartNode * FindFooterStartNode() const
Definition: node.hxx:204
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:562
void ClearTemplate()
Definition: shellio.cxx:542
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
Definition: doc.cxx:270
bool IsPageDescs() const
Definition: shellio.hxx:122
long Height() const
SwNodeIndex nNode
Definition: pam.hxx:37
bool IsTableMode() const
Definition: crsrsh.hxx:646
long GetWidth() const
virtual void SetLinksUpdated(const bool bNewLinksUpdated)=0
rtl::Reference< SwDoc > mxDoc
Definition: docfac.hxx:29
bool IsFormatsOnly() const
Definition: shellio.hxx:117
Date m_aDateStamp
Definition: shellio.hxx:206
SfxMedium *const pMedium
Definition: shellio.hxx:148
Definition: doc.hxx:185
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
Definition: doc.cxx:292
virtual SwReaderType GetReaderType() override
Definition: shellio.cxx:679
bool SetTemplate(SwDoc &rDoc)
Definition: shellio.cxx:526
void SetOrganizerMode(bool bSet)
Definition: shellio.hxx:258
SvStream * pStrm
Definition: shellio.hxx:145
bool m_bTemplateBrowseMode
Definition: shellio.hxx:218
sal_uInt64 Seek(sal_uInt64 nPos)
tools::SvRef< SotStorage > m_pStorage
Definition: shellio.hxx:212
static SwContentNode * GoPrevious(SwNodeIndex *)
Definition: nodes.cxx:1290
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
Definition: shellio.cxx:727
bool m_bHasAskTemplateName
Definition: shellio.hxx:222
void SetReadUTF8(bool bSet)
Definition: shellio.hxx:252
bool HasError() const
virtual SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)=0
Return required automatic format.
static bool IsStorageFile(OUString const &rFileName)
bool HasWriterListeners() const
Definition: calbck.hxx:211
void EndAllAction()
Definition: edws.cxx:96
void ReplaceStyles(const SwDoc &rSource, bool bIncludePageStyles=true)
Definition: docfmt.cxx:1548
SwContentNode * GetContentNode(bool bPoint=true) const
Definition: pam.hxx:229
SwPaM *const pOutPam
Definition: shellio.hxx:505
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:389
bool IsStorage()
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
void SetSkipImages(bool bSkipImages)
Definition: shellio.hxx:177
Reader * ReadXML
Definition: fltini.cxx:65
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
Definition: shellio.cxx:609
SwIndex nContent
Definition: pam.hxx:38
SwDoc * GetDoc()
Document is created after calling Read(...).
Definition: docfact.cxx:38
Unsorted, undeleting SwFrameFormat vector.
Definition: docary.hxx:279
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:458
bool MakeCopy(SwDoc *, const SwPosition &, const SwSelBoxes &, bool bCpyName=false) const
Definition: tblrwcl.cxx:2030
void SetBlockMode(bool bSet)
Definition: shellio.hxx:255
PAPER_A4
Reader * ReadHTML
Definition: fltini.cxx:65
#define RES_UL_SPACE
Definition: hintids.hxx:197
const SwTable & GetTable() const
Definition: node.hxx:497
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempIfNo=true)
SwReader(SfxMedium &, const OUString &rFilename, SwDoc *pDoc=nullptr)
Definition: shellio.cxx:400
SwPaM *const pCursor
Definition: shellio.hxx:150
SwDoc & rDoc
Definition: shellio.hxx:507
SwPaM * GetNext()
Definition: pam.hxx:264
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
void SetWidth(long n)
bool IsAlive(typename std::remove_pointer< Value >::type const *const p) const
check that given format is still alive (i.e. contained here)
Definition: docary.hxx:144
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:164
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
bool IsContentNode() const
Definition: node.hxx:628
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:481
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:147
Style of a layout element.
Definition: frmfmt.hxx:57
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
tools::SvRef< SotStorage > const pStg
Definition: shellio.hxx:146
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
Definition: tblsel.cxx:144
const SwPosition * GetPoint() const
Definition: pam.hxx:207
void SetIgnoreHTMLComments(bool bSet)
Definition: shellio.hxx:260
virtual bool SetStrmStgPtr()
Definition: shellio.cxx:569
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:198
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
const SwPageDesc & GetPageDesc(const size_t i) const
Definition: doc.hxx:876
SwEditShell const * GetEditShell() const
Definition: doccorr.cxx:323
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
Helper class to pause starting of threads during existence of an instance of this class...
SwWriter(SvStream &, SwCursorShell &, bool bWriteAll=false)
Definition: shellio.cxx:692
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2221
Text body.
Definition: poolfmt.hxx:251
int i
SwContentNode * GetContentNode()
Definition: node.hxx:615
FlyAnchors.
Definition: fmtanchr.hxx:34
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:205
bool m_bSkipImages
Definition: shellio.hxx:224
virtual void DelFrames()
Destroys all Frames in aDepend (Frames are identified via dynamic_cast).
Definition: atrfrm.cxx:2617
Marks a character position inside a document model node.
Definition: index.hxx:37
SwDoc * GetTemplateDoc(SwDoc &rDoc)
Definition: shellio.cxx:449
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:502
OUString GetBaseURL(bool bForSaving=false)
OUString m_aTemplateName
Definition: shellio.hxx:204
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:426
static bool sw_MergePortions(SwNode *const &pNode, void *)
Definition: shellio.cxx:67
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
Definition: docdesc.cxx:860
void SetMark()
Definition: crsrsh.hxx:874
Marks a node in the document model.
Definition: ndindex.hxx:31
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:880
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
SwCursorShell * pShell
Definition: shellio.hxx:506
bool SetHTMLTemplate(SwDoc &rDoc)
Definition: shellio.cxx:901
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
const long LONG_MAX
SwReaderType
Definition: shellio.hxx:183
virtual OUString GetTemplateName(SwDoc &rDoc) const
Definition: shellio.cxx:443
#define RES_LR_SPACE
Definition: hintids.hxx:196
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:458
void SetBaseURL(const OUString &rURL)
Definition: shellio.hxx:176
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
void MakeHTMLDummyTemplateDoc()
Definition: shellio.cxx:556
ignore Redlines
bool IsError() const
ErrCode Read(const Reader &)
Definition: shellio.cxx:76
sal_uInt16 Which() const
for Querying of Writer-functions.
Definition: format.hxx:78
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SvStream * GetInStream()
virtual void SetFltName(const OUString &rFltNm)
Definition: shellio.cxx:605
virtual bool ResetFormatAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: format.cxx:650
SwgReaderOption m_aOption
Definition: shellio.hxx:216
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1485
virtual ~Reader()
Definition: shellio.cxx:439
#define RES_DRAWFRMFMT
Definition: hintids.hxx:277
#define ERRCODE_NONE
bool mbSkipImages
Definition: shellio.hxx:153
void LockView(bool b)
Definition: viewsh.hxx:465
virtual bool HasGlossaries() const
Definition: shellio.cxx:669
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:59
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &)=0
bool bWriteAll
Definition: shellio.hxx:509
virtual void SetFixFields(const DateTime *pNewDateTime)=0
sal_Int32 GetIndex() const
Definition: index.hxx:95
bool IsClipBoard() const
Definition: doc.hxx:955
virtual void MakeFrames()
Creates the views.
Definition: atrfrm.cxx:2628
bool DoInitNew(SfxMedium *pMedium=nullptr)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:208
SwNodes & GetNodes()
Definition: doc.hxx:402
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
void FileLoadedInitHints()
initialize the hints after file loading (which takes shortcuts)
Definition: ndtxt.cxx:270
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:386
void SetHeight(long n)
SfxMedium * m_pMedium
Definition: shellio.hxx:214
SVL_DLLPUBLIC bool GetModifiedDateTimeOfFile(const OUString &rURL, Date *pDate, tools::Time *pTime)
SvStream * m_pStream
Definition: shellio.hxx:211
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:196
SwMoveFnCollection const & fnMoveBackward
Definition: paminit.cxx:58
rtl::Reference< SwDoc > mxTemplate
Definition: shellio.hxx:203
void RemoveAllFormatLanguageDependencies()
Definition: poolfmt.cxx:314
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const
Definition: shellio.cxx:633
#define RES_BOX
Definition: hintids.hxx:211
css::uno::Reference< css::embed::XStorage > m_xStorage
Definition: shellio.hxx:213
virtual void ResetError()
SwFrameFormatsBase::size_type size_type
Definition: docary.hxx:217
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:455
DateTime m_aCheckDateTime
Definition: shellio.hxx:208
static void ResetFrameFormats(SwDoc &rDoc)
Definition: shellio.cxx:616
static bool IsCreateUndoForNewFly(SwFormatAnchor const &rAnchor, sal_uLong const nStartNode, sal_uLong const nEndNode)
This is not the same as IsDestroyFrameAnchoredAtChar() and intentionally so: because the SwUndoInsert...
Definition: untblk.cxx:166
bool Pop(PopMode)
delete cursor
Definition: crsrsh.cxx:2243
void SetTemplateName(const OUString &rDir)
Definition: shellio.cxx:547
SvStream * pStrm
Definition: shellio.hxx:501
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
Definition: ndarr.hxx:162
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
long GetHeight() const
bool IsTextNode() const
Definition: node.hxx:636
OUString const aFileName
Definition: shellio.hxx:151
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1273
bool HasGlossaries(const Reader &)
Definition: shellio.cxx:638
#define ERR_SWG_FILE_FORMAT_ERROR
Definition: swerror.h:24
bool IsViewLocked() const
Definition: viewsh.hxx:464
virtual SwReaderType GetReaderType()
Definition: shellio.cxx:600
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:843
bool m_bInsertMode
Definition: shellio.hxx:217
virtual void ResetModified()=0
Base class of the Writer document model elements.
Definition: node.hxx:79