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  // Clear unassigned cell styles, because they aren't needed anymore.
350  mxDoc->GetCellStyles().clear();
351 
352  mxDoc->GetIDocumentUndoRedo().DoUndo(bDocUndo);
353  if (!bReadPageDescs && bSaveUndo )
354  {
355  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
356  mxDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSDOKUMENT, nullptr );
357  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
358  }
359 
360  // delete Pam if it was created only for reading
361  if( !pCursor )
362  {
363  delete pPam; // open a new one
364 
365  // #i42634# Moved common code of SwReader::Read() and
366  // SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
367  // ATM still with Update
368  mxDoc->getIDocumentLinksAdministration().UpdateLinks();
369 
370  // not insert: set the redline mode read from settings.xml
371  eOld = ePostReadRedlineFlags & ~RedlineFlags::Ignore;
372 
373  mxDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0);
374  }
375 
376  mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
377  mxDoc->SetOle2Link( aOLELink );
378 
379  if( pCursor ) // the document is now modified
380  mxDoc->getIDocumentState().SetModified();
381  // #i38810# - If links have been updated, the document
382  // have to be modified. During update of links the OLE link at the document
383  // isn't set. Thus, the document's modified state has to be set again after
384  // the OLE link is restored - see above <mxDoc->SetOle2Link( aOLELink )>.
385  if ( mxDoc->getIDocumentLinksAdministration().LinksUpdated() )
386  {
387  mxDoc->getIDocumentState().SetModified();
388  }
389 
390  po->SetReadUTF8( false );
391  po->SetBlockMode( false );
392  po->SetOrganizerMode( false );
393  po->SetIgnoreHTMLComments( false );
394 
395  return nError;
396 }
397 
398 
399 SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument)
400  : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCursor(nullptr),
401  aFileName(rFileName), mbSkipImages(false)
402 {
403  SetBaseURL( rMedium.GetBaseURL() );
404  SetSkipImages( rMedium.IsSkipImages() );
405 }
406 
407 
408 // Read into an existing document
409 SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam)
410  : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCursor(&rPam),
411  aFileName(rFileName), mbSkipImages(false)
412 {
413  SetBaseURL( rBaseURL );
414 }
415 
416 SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam)
417  : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium),
418  pCursor(&rPam), aFileName(rFileName), mbSkipImages(false)
419 {
420  SetBaseURL( rMedium.GetBaseURL() );
421 }
422 
423 SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam )
424  : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCursor(&rPam), aFileName(rFilename), mbSkipImages(false)
425 {
426 }
427 
429  : m_aDateStamp( Date::EMPTY ),
430  m_aTimeStamp( tools::Time::EMPTY ),
431  m_aCheckDateTime( DateTime::EMPTY ),
432  m_pStream(nullptr), m_pMedium(nullptr), m_bInsertMode(false),
433  m_bTemplateBrowseMode(false), m_bReadUTF8(false), m_bBlockMode(false), m_bOrganizerMode(false),
434  m_bHasAskTemplateName(false), m_bIgnoreHTMLComments(false), m_bSkipImages(false)
435 {
436 }
437 
439 {
440 }
441 
442 OUString Reader::GetTemplateName(SwDoc& /*rDoc*/) const
443 {
444  return OUString();
445 }
446 
447 // load the Filter template, set and release
449 {
450  if( !m_bHasAskTemplateName )
451  {
453  m_bHasAskTemplateName = true;
454  }
455 
456  if( m_aTemplateName.isEmpty() )
457  ClearTemplate();
458  else
459  {
461  const OUString aFileName = aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
462  OSL_ENSURE( !aTDir.HasError(), "No absolute path for template name!" );
463  DateTime aCurrDateTime( DateTime::SYSTEM );
464  bool bLoad = false;
465 
466  // if the template is already loaded, check once-a-minute if it has changed
467  if( !mxTemplate.is() || aCurrDateTime >= m_aCheckDateTime )
468  {
469  Date aTstDate( Date::EMPTY );
470  tools::Time aTstTime( tools::Time::EMPTY );
473  &aTstDate, &aTstTime ) &&
474  ( !mxTemplate.is() || m_aDateStamp != aTstDate || m_aTimeStamp != aTstTime ))
475  {
476  bLoad = true;
477  m_aDateStamp = aTstDate;
478  m_aTimeStamp = aTstTime;
479  }
480 
481  // only one minute later check if it has changed
482  m_aCheckDateTime = aCurrDateTime;
483  m_aCheckDateTime += tools::Time( 0, 1 );
484  }
485 
486  if (bLoad)
487  {
488  ClearTemplate();
489  OSL_ENSURE( !mxTemplate.is(), "Who holds the template doc?" );
490 
491  // If the writer module is not installed,
492  // we cannot create a SwDocShell. We could create a
493  // SwWebDocShell however, because this exists always
494  // for the help.
495  SvtModuleOptions aModuleOptions;
496  if (aModuleOptions.IsWriter())
497  {
498  SwDocShell *pDocSh = new SwDocShell(SfxObjectCreateMode::INTERNAL);
499  SfxObjectShellLock xDocSh = pDocSh;
500  if (pDocSh->DoInitNew())
501  {
502  mxTemplate = pDocSh->GetDoc();
503  mxTemplate->SetOle2Link( Link<bool,void>() );
504  // always FALSE
505  mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
506  mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
507  mxTemplate->RemoveAllFormatLanguageDependencies();
508 
509  ReadXML->SetOrganizerMode( true );
510  SfxMedium aMedium( aFileName, StreamMode::NONE );
511  SwReader aRdr( aMedium, OUString(), mxTemplate.get() );
512  aRdr.Read( *ReadXML );
513  ReadXML->SetOrganizerMode( false );
514  }
515  }
516  }
517 
518  OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || m_aTemplateName=="$$Dummy$$",
519  "TemplatePtr but no template exist!" );
520  }
521 
522  return mxTemplate.get();
523 }
524 
526 {
527  bool bRet = false;
528 
529  GetTemplateDoc(rDoc);
530  if( mxTemplate.is() )
531  {
533  rDoc.ReplaceStyles( *mxTemplate );
534  rDoc.getIDocumentFieldsAccess().SetFixFields(nullptr);
535  bRet = true;
536  }
537 
538  return bRet;
539 }
540 
542 {
543  mxTemplate.clear();
544 }
545 
546 void Reader::SetTemplateName( const OUString& rDir )
547 {
548  if( !rDir.isEmpty() && m_aTemplateName != rDir )
549  {
550  ClearTemplate();
551  m_aTemplateName = rDir;
552  }
553 }
554 
556 {
557  ClearTemplate();
558  mxTemplate = new SwDoc;
559  mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
560  mxTemplate->getIDocumentDeviceAccess().getPrinter( true );
561  mxTemplate->RemoveAllFormatLanguageDependencies();
562  m_aCheckDateTime = Date( 1, 1, 2300 ); // year 2300 should be sufficient
563  m_aTemplateName = "$$Dummy$$";
564 }
565 
566 // Users that do not need to open these Streams / Storages,
567 // have to override this method
569 {
570  OSL_ENSURE( m_pMedium, "Where is the Media??" );
571 
572  if( m_pMedium->IsStorage() )
573  {
575  {
577  return true;
578  }
579  }
580  else
581  {
584  {
585  m_pStorage = new SotStorage( *m_pStream );
586  m_pStream = nullptr;
587  }
588  else if ( !(SwReaderType::Stream & GetReaderType()) )
589  {
590  m_pStream = nullptr;
591  return false;
592  }
593 
594  return true;
595  }
596  return false;
597 }
598 
600 {
601  return SwReaderType::Stream;
602 }
603 
604 void Reader::SetFltName( const OUString& )
605 {
606 }
607 
609 {
610  rFrameSet.Put( SvxLRSpaceItem(RES_LR_SPACE) );
611  rFrameSet.Put( SvxULSpaceItem(RES_UL_SPACE) );
612  rFrameSet.Put( SvxBoxItem(RES_BOX) );
613 }
614 
616 {
617  sal_uInt16 const s_ids[3] = {
619  };
620  for (sal_uInt16 i : s_ids)
621  {
622  SwFrameFormat *const pFrameFormat = rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( i );
623 
624  pFrameFormat->ResetFormatAttr( RES_LR_SPACE );
625  pFrameFormat->ResetFormatAttr( RES_UL_SPACE );
626  pFrameFormat->ResetFormatAttr( RES_BOX );
627  }
628 }
629 
630  // read the sections of the document, which is equal to the medium.
631  // returns the count of it
632 size_t Reader::GetSectionList(SfxMedium&, std::vector<OUString>&) const
633 {
634  return 0;
635 }
636 
637 bool SwReader::HasGlossaries( const Reader& rOptions )
638 {
639  // copy variables
640  Reader* po = const_cast<Reader*>(&rOptions);
641  po->m_pStream = pStrm;
642  po->m_pStorage = pStg;
643  po->m_bInsertMode = false;
644 
645  // if a Medium is selected, get its Stream
646  bool bRet = false;
647  if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() )
648  bRet = po->HasGlossaries();
649  return bRet;
650 }
651 
652 bool SwReader::ReadGlossaries( const Reader& rOptions,
653  SwTextBlocks& rBlocks, bool bSaveRelFiles )
654 {
655  // copy variables
656  Reader* po = const_cast<Reader*>(&rOptions);
657  po->m_pStream = pStrm;
658  po->m_pStorage = pStg;
659  po->m_bInsertMode = false;
660 
661  // if a Medium is selected, get its Stream
662  bool bRet = false;
663  if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() )
664  bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
665  return bRet;
666 }
667 
669 {
670  return false;
671 }
672 
674 {
675  return false;
676 }
677 
679 {
680  return SwReaderType::Storage;
681 }
682 
683 /*
684  * Writer
685  */
686 
687 /*
688  * Constructors, Destructors are inline (inc/shellio.hxx).
689  */
690 
691 SwWriter::SwWriter(SvStream& rStrm, SwCursorShell &rShell, bool bInWriteAll)
692  : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell),
693  rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
694 {
695 }
696 
698  : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
699  bWriteAll(true)
700 {
701 }
702 
703 SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool bInWriteAll)
704  : pStrm(&rStrm), pMedium(nullptr), pOutPam(&rPam), pShell(nullptr),
705  rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
706 {
707 }
708 
709 SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocument)
710  : pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true)
711 {
712 }
713 
714 SwWriter::SwWriter(SfxMedium& rMedium, SwCursorShell &rShell, bool bInWriteAll)
715  : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell),
716  rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
717 {
718 }
719 
720 SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
721  : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
722  bWriteAll(true)
723 {
724 }
725 
726 ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileName )
727 {
728  // #i73788#
729  SwPauseThreadStarting aPauseThreadStarting;
730 
731  bool bHasMark = false;
732  std::shared_ptr<SwUnoCursor> pTempCursor;
733  SwPaM * pPam;
734 
736 
737  if ( pShell && !bWriteAll && pShell->IsTableMode() )
738  {
739  bWriteAll = true;
740  xDoc = new SwDoc;
741 
742  // Copy parts of a table:
743  // Create a table with the width of the original and copy the selected cells.
744  // The sizes are corrected by ratio.
745 
746  // search the layout for cells
747  SwSelBoxes aBoxes;
748  GetTableSel( *pShell, aBoxes );
749  const SwTableNode* pTableNd = static_cast<const SwTableNode*>(aBoxes[0]->GetSttNd()->StartOfSectionNode());
750  SwNodeIndex aIdx( xDoc->GetNodes().GetEndOfExtras(), 2 );
751  SwContentNode *pNd = aIdx.GetNode().GetContentNode();
752  OSL_ENSURE( pNd, "Node not found" );
753  SwPosition aPos( aIdx, SwIndex( pNd ) );
754  pTableNd->GetTable().MakeCopy( xDoc.get(), aPos, aBoxes );
755  }
756 
757  if( !bWriteAll && ( pShell || pOutPam ))
758  {
759  if( pShell )
760  pPam = pShell->GetCursor();
761  else
762  pPam = pOutPam;
763 
764  SwPaM *pEnd = pPam;
765 
766  // 1st round: Check if there is a selection
767  while(true)
768  {
769  bHasMark = bHasMark || pPam->HasMark();
770  pPam = pPam->GetNext();
771  if(bHasMark || pPam == pEnd)
772  break;
773  }
774 
775  // if there is no selection, select the whole document
776  if(!bHasMark)
777  {
778  if( pShell )
779  {
780  pShell->Push();
781  pShell->SttEndDoc(true);
782  pShell->SetMark();
783  pShell->SttEndDoc(false);
784  }
785  else
786  {
787  pPam = new SwPaM( *pPam, pPam );
788  pPam->Move( fnMoveBackward, GoInDoc );
789  pPam->SetMark();
790  pPam->Move( fnMoveForward, GoInDoc );
791  }
792  }
793  // pPam is still the current Cursor !!
794  }
795  else
796  {
797  // no Shell or write-everything -> create a Pam
798  SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc;
799  pTempCursor = pOutDoc->CreateUnoCursor(
800  SwPosition(pOutDoc->GetNodes().GetEndOfContent()), false);
801  pPam = pTempCursor.get();
802  if( pOutDoc->IsClipBoard() )
803  {
804  pPam->Move( fnMoveBackward, GoInDoc );
805  pPam->SetMark();
806  pPam->Move( fnMoveForward, GoInDoc );
807  }
808  else
809  {
810  pPam->SetMark();
811  pPam->Move( fnMoveBackward, GoInDoc );
812  }
813  }
814 
815  rxWriter->m_bWriteAll = bWriteAll;
816  SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc;
817 
818  // If the default PageDesc has still the initial value,
819  // (e.g. if no printer was set) then set it to DIN A4.
820  // #i37248# - Modifications are only allowed at a new document.
821  // <pOutDoc> contains a new document, if <xDoc> is set - see above.
822  if ( xDoc.is() && !pOutDoc->getIDocumentDeviceAccess().getPrinter( false ) )
823  {
824  const SwPageDesc& rPgDsc = pOutDoc->GetPageDesc( 0 );
825  //const SwPageDesc& rPgDsc = *pOutDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD );
826  const SwFormatFrameSize& rSz = rPgDsc.GetMaster().GetFrameSize();
827  // Clipboard-Document is always created w/o printer; thus the
828  // default PageDesc is always aug LONG_MAX !! Set then to DIN A4
829  if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() )
830  {
831  SwPageDesc aNew( rPgDsc );
832  SwFormatFrameSize aNewSz( rSz );
834  aNewSz.SetHeight( a4.Width() );
835  aNewSz.SetWidth( a4.Height() );
836  aNew.GetMaster().SetFormatAttr( aNewSz );
837  pOutDoc->ChgPageDesc( 0, aNew );
838  }
839  }
840 
841  bool bLockedView(false);
842  SwEditShell* pESh = pOutDoc->GetEditShell();
843  if( pESh )
844  {
845  bLockedView = pESh->IsViewLocked();
846  pESh->LockView( true ); //lock visible section
847  pESh->StartAllAction();
848  }
849 
850  const bool bOrigPurgeOle = pOutDoc->getIDocumentSettingAccess().get(DocumentSettingId::PURGE_OLE);
852 
853  ErrCode nError = ERRCODE_NONE;
854  if( pMedium )
855  nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
856  else if( pStrm )
857  nError = rxWriter->Write( *pPam, *pStrm, pRealFileName );
858  else if( xStg.is() )
859  nError = rxWriter->Write( *pPam, xStg, pRealFileName );
860 
861  pOutDoc->getIDocumentSettingAccess().set(DocumentSettingId::PURGE_OLE, bOrigPurgeOle );
862 
863  if( pESh )
864  {
865  pESh->EndAllAction();
866  pESh->LockView( bLockedView );
867  }
868 
869  // If the selection was only created for printing, reset the old cursor before returning
870  if( !bWriteAll && ( pShell || pOutPam ))
871  {
872  if(!bHasMark)
873  {
874  if( pShell )
876  else
877  delete pPam;
878  }
879  }
880  else
881  {
882  // Everything was written successfully? Tell the document!
883  if ( !nError.IsError() && !xDoc.is() )
884  {
886  // #i38810# - reset also flag, that indicates updated links
888  }
889  }
890 
891  if ( xDoc.is() )
892  {
893  xDoc.clear();
894  bWriteAll = false;
895  }
896 
897  return nError;
898 }
899 
900 bool SetHTMLTemplate( SwDoc & rDoc )
901 {
902  // get template name of the Sfx-HTML-Filter !!!
903  if( !ReadHTML->GetTemplateDoc(rDoc) )
905 
906  bool bRet = ReadHTML->SetTemplate( rDoc );
907 
908  SwNodes& rNds = rDoc.GetNodes();
909  SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 );
910  SwContentNode* pCNd = rNds.GoNext( &aIdx );
911  if( pCNd )
912  {
913  pCNd->SetAttr
915  pCNd->ChgFormatColl( rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT, false ));
916  }
917 
918  return bRet;
919 }
920 
921 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reader()
Definition: shellio.cxx:428
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:1797
virtual sal_Int32 Len() const
Definition: node.cxx:1180
SfxMedium * pMedium
Definition: shellio.hxx:501
SVL_DLLPUBLIC bool IsDocument(const OUString &rURL)
virtual bool ReadGlossaries(SwTextBlocks &, bool bSaveRelFiles) const
Definition: shellio.cxx:673
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:652
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
Definition: node.cxx:743
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:541
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
Definition: doc.cxx:237
bool IsPageDescs() const
Definition: shellio.hxx:122
long Height() const
SwNodeIndex nNode
Definition: pam.hxx:37
bool IsTableMode() const
Definition: crsrsh.hxx:647
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:259
virtual SwReaderType GetReaderType() override
Definition: shellio.cxx:678
bool SetTemplate(SwDoc &rDoc)
Definition: shellio.cxx:525
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:1288
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
Definition: shellio.cxx:726
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:208
void EndAllAction()
Definition: edws.cxx:96
void ReplaceStyles(const SwDoc &rSource, bool bIncludePageStyles=true)
Definition: docfmt.cxx:1520
SwContentNode * GetContentNode(bool bPoint=true) const
Definition: pam.hxx:229
SwPaM *const pOutPam
Definition: shellio.hxx:503
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:356
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:608
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:425
bool MakeCopy(SwDoc *, const SwPosition &, const SwSelBoxes &, bool bCpyName=false) const
Definition: tblrwcl.cxx:2024
void SetBlockMode(bool bSet)
Definition: shellio.hxx:255
PAPER_A4
Reader * ReadHTML
Definition: fltini.cxx:65
#define RES_UL_SPACE
Definition: hintids.hxx:199
const SwTable & GetTable() const
Definition: node.hxx:497
SwReader(SfxMedium &, const OUString &rFilename, SwDoc *pDoc=nullptr)
Definition: shellio.cxx:399
SwPaM *const pCursor
Definition: shellio.hxx:150
SwDoc & rDoc
Definition: shellio.hxx:505
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:485
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:141
const SwPosition * GetPoint() const
Definition: pam.hxx:207
void SetIgnoreHTMLComments(bool bSet)
Definition: shellio.hxx:260
virtual bool SetStrmStgPtr()
Definition: shellio.cxx:568
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:877
SwEditShell const * GetEditShell() const
Definition: doccorr.cxx:317
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:691
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:2631
Marks a character position inside a document model node.
Definition: index.hxx:37
SwDoc * GetTemplateDoc(SwDoc &rDoc)
Definition: shellio.cxx:448
css::uno::Reference< css::embed::XStorage > xStg
Definition: shellio.hxx:500
OUString GetBaseURL(bool bForSaving=false)
OUString m_aTemplateName
Definition: shellio.hxx:204
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:393
static bool sw_MergePortions(SwNode *const &pNode, void *)
Definition: shellio.cxx:67
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
Definition: docdesc.cxx:853
void SetMark()
Definition: crsrsh.hxx:879
Marks a node in the document model.
Definition: ndindex.hxx:31
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:884
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
SwCursorShell * pShell
Definition: shellio.hxx:504
bool SetHTMLTemplate(SwDoc &rDoc)
Definition: shellio.cxx:900
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:442
#define RES_LR_SPACE
Definition: hintids.hxx:198
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:555
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:217
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SvStream * GetInStream()
virtual void SetFltName(const OUString &rFltNm)
Definition: shellio.cxx:604
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:1484
virtual ~Reader()
Definition: shellio.cxx:438
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
#define RES_DRAWFRMFMT
Definition: hintids.hxx:279
#define ERRCODE_NONE
bool mbSkipImages
Definition: shellio.hxx:153
void LockView(bool b)
Definition: viewsh.hxx:465
virtual bool HasGlossaries() const
Definition: shellio.cxx:668
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:507
virtual void SetFixFields(const DateTime *pNewDateTime)=0
sal_Int32 GetIndex() const
Definition: index.hxx:95
bool IsClipBoard() const
Definition: doc.hxx:956
virtual void MakeFrames()
Creates the views.
Definition: atrfrm.cxx:2642
bool DoInitNew(SfxMedium *pMedium=nullptr)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:175
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:276
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const
Definition: shellio.cxx:632
#define RES_BOX
Definition: hintids.hxx:213
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:459
DateTime m_aCheckDateTime
Definition: shellio.hxx:208
static void ResetFrameFormats(SwDoc &rDoc)
Definition: shellio.cxx:615
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:167
bool Pop(PopMode)
delete cursor
Definition: crsrsh.cxx:2243
void SetTemplateName(const OUString &rDir)
Definition: shellio.cxx:546
SvStream * pStrm
Definition: shellio.hxx:499
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:1271
bool HasGlossaries(const Reader &)
Definition: shellio.cxx:637
#define ERR_SWG_FILE_FORMAT_ERROR
Definition: swerror.h:24
bool IsViewLocked() const
Definition: viewsh.hxx:464
virtual SwReaderType GetReaderType()
Definition: shellio.cxx:599
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:842
bool m_bInsertMode
Definition: shellio.hxx:217
virtual void ResetModified()=0
Base class of the Writer document model elements.
Definition: node.hxx:79