LibreOffice Module sw (master)  1
DocumentLinksAdministrationManager.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 
21 
22 #include <doc.hxx>
24 #include <IDocumentUndoRedo.hxx>
25 #include <IDocumentState.hxx>
26 #include <IDocumentMarkAccess.hxx>
27 #include <sfx2/objsh.hxx>
28 #include <sfx2/linkmgr.hxx>
29 #include <sfx2/docfile.hxx>
30 #include <dialoghelp.hxx>
31 #include <linkenum.hxx>
32 #include <com/sun/star/document/UpdateDocMode.hpp>
33 #include <swtypes.hxx>
34 #include <docsh.hxx>
35 #include <bookmrk.hxx>
36 #include <swserv.hxx>
37 #include <swbaslnk.hxx>
38 #include <section.hxx>
39 #include <docary.hxx>
40 #include <frmfmt.hxx>
41 #include <fmtcntnt.hxx>
42 #include <swtable.hxx>
43 #include <ndtxt.hxx>
44 #include <tools/urlobj.hxx>
45 #include <unotools/charclass.hxx>
47 
48 using namespace ::com::sun::star;
49 
50 //Helper functions for this file
51 namespace
52 {
53  struct FindItem
54  {
55  const OUString m_Item;
56  SwTableNode* pTableNd;
57  SwSectionNode* pSectNd;
58 
59  explicit FindItem(const OUString& rS)
60  : m_Item(rS), pTableNd(nullptr), pSectNd(nullptr)
61  {}
62  };
63 
64  ::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks )
65  {
66  for (const auto& rLinkIter : rLinks)
67  {
68  ::sfx2::SvBaseLink& rLnk = *rLinkIter;
69  if ((OBJECT_CLIENT_GRF == rLnk.GetObjType() || OBJECT_CLIENT_FILE == rLnk.GetObjType())
70  && dynamic_cast<const SwBaseLink*>(&rLnk) != nullptr)
71  {
72  tools::SvRef<sfx2::SvBaseLink> xLink(&rLnk);
73 
74  OUString sFName;
75  sfx2::LinkManager::GetDisplayNames( xLink.get(), nullptr, &sFName );
76 
77  INetURLObject aURL( sFName );
78  if( INetProtocol::File == aURL.GetProtocol() ||
79  INetProtocol::Cid == aURL.GetProtocol() )
80  return &rLnk;
81  }
82  }
83  return nullptr;
84  }
85 
86 
87  ::sw::mark::DdeBookmark* lcl_FindDdeBookmark( const IDocumentMarkAccess& rMarkAccess, const OUString& rName, const bool bCaseSensitive )
88  {
89  //Iterating over all bookmarks, checking DdeBookmarks
90  const OUString sNameLc = bCaseSensitive ? rName : GetAppCharClass().lowercase(rName);
92  ppMark != rMarkAccess.getAllMarksEnd();
93  ++ppMark)
94  {
95  if (::sw::mark::DdeBookmark* const pBkmk = dynamic_cast< ::sw::mark::DdeBookmark*>(*ppMark))
96  {
97  if (
98  (bCaseSensitive && (pBkmk->GetName() == sNameLc)) ||
99  (!bCaseSensitive && GetAppCharClass().lowercase(pBkmk->GetName()) == sNameLc)
100  )
101  {
102  return pBkmk;
103  }
104  }
105  }
106  return nullptr;
107  }
108 
109 
110  bool lcl_FindSection( const SwSectionFormat* pSectFormat, FindItem * const pItem, bool bCaseSensitive )
111  {
112  SwSection* pSect = pSectFormat->GetSection();
113  if( pSect )
114  {
115  OUString sNm( bCaseSensitive
116  ? pSect->GetSectionName()
117  : GetAppCharClass().lowercase( pSect->GetSectionName() ));
118  OUString sCompare( bCaseSensitive
119  ? pItem->m_Item
120  : GetAppCharClass().lowercase( pItem->m_Item ) );
121  if( sNm == sCompare )
122  {
123  // found, so get the data
124  const SwNodeIndex* pIdx;
125  if( nullptr != (pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
126  &pSectFormat->GetDoc()->GetNodes() == &pIdx->GetNodes() )
127  {
128  // a table in the normal NodesArr
129  pItem->pSectNd = pIdx->GetNode().GetSectionNode();
130  return false;
131  }
132  // If the name is already correct, but not the rest then we don't have them.
133  // The names are always unique.
134  }
135  }
136  return true;
137  }
138 
139  bool lcl_FindTable( const SwFrameFormat* pTableFormat, FindItem * const pItem )
140  {
141  OUString sNm( GetAppCharClass().lowercase( pTableFormat->GetName() ));
142  if ( sNm == pItem->m_Item )
143  {
144  SwTable* pTmpTable;
145  SwTableBox* pFBox;
146  if( nullptr != ( pTmpTable = SwTable::FindTable( pTableFormat ) ) &&
147  nullptr != ( pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
148  pFBox->GetSttNd() &&
149  &pTableFormat->GetDoc()->GetNodes() == &pFBox->GetSttNd()->GetNodes() )
150  {
151  // a table in the normal NodesArr
152  pItem->pTableNd = const_cast<SwTableNode*>(
153  pFBox->GetSttNd()->FindTableNode());
154  return false;
155  }
156  // If the name is already correct, but not the rest then we don't have them.
157  // The names are always unique.
158  }
159  return true;
160  }
161 
162 }
163 
164 
165 namespace sw
166 {
167 
169  : mbVisibleLinks(true)
170  , mbLinksUpdated( false ) //#i38810#
171  , m_pLinkMgr( new sfx2::LinkManager(nullptr) )
172  , m_rDoc( i_rSwdoc )
173 {
174 }
175 
177 {
178  return mbVisibleLinks;
179 }
180 
182 {
183  mbVisibleLinks = bFlag;
184 }
185 
187 {
188  return *m_pLinkMgr;
189 }
190 
192 {
193  return *m_pLinkMgr;
194 }
195 
196 // #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks()
197 // to new SwDoc::UpdateLinks():
199 {
200  if (!m_rDoc.GetDocShell())
201  return;
203  if (eMode == SfxObjectCreateMode::INTERNAL)
204  return;
205  if (eMode == SfxObjectCreateMode::ORGANIZER)
206  return;
207  if (m_rDoc.GetDocShell()->IsPreview())
208  return;
209  if (GetLinkManager().GetLinks().empty())
210  return;
211  sal_uInt16 nLinkMode = m_rDoc.GetDocumentSettingManager().getLinkUpdateMode(true);
212  sal_uInt16 nUpdateDocMode = m_rDoc.GetDocShell()->GetUpdateDocMode();
213  if (nLinkMode == NEVER && nUpdateDocMode != document::UpdateDocMode::FULL_UPDATE)
214  return;
215 
216  bool bAskUpdate = nLinkMode == MANUAL;
217  bool bUpdate = true;
218  switch(nUpdateDocMode)
219  {
220  case document::UpdateDocMode::NO_UPDATE: bUpdate = false;break;
221  case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = false; break;
222  case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = true; break;
223  }
224  if (nLinkMode == AUTOMATIC && !bAskUpdate)
225  {
226  SfxMedium * medium = m_rDoc.GetDocShell()->GetMedium();
227  if (!SvtSecurityOptions().isTrustedLocationUriForUpdatingLinks(
228  medium == nullptr ? OUString() : medium->GetName()))
229  {
230  bAskUpdate = true;
231  }
232  }
234  if (bUpdate)
235  {
236  rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
237 
238  weld::Window* pDlgParent = GetFrameWeld(m_rDoc.GetDocShell());
239  GetLinkManager().UpdateAllLinks(bAskUpdate, false, pDlgParent);
240  }
241  else
242  {
243  rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
244  }
245 }
246 
247 bool DocumentLinksAdministrationManager::GetData( const OUString& rItem, const OUString& rMimeType,
248  uno::Any & rValue ) const
249 {
250  // search for bookmarks and sections case sensitive at first. If nothing is found then try again case insensitive
251  bool bCaseSensitive = true;
252  while( true )
253  {
254  ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*m_rDoc.getIDocumentMarkAccess(), rItem, bCaseSensitive);
255  if(pBkmk)
256  return SwServerObject(*pBkmk).GetData(rValue, rMimeType);
257 
258  // Do we already have the Item?
259  OUString sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
260  FindItem aPara( sItem );
261  for( const SwSectionFormat* pFormat : m_rDoc.GetSections() )
262  {
263  if (!(lcl_FindSection(pFormat, &aPara, bCaseSensitive)))
264  break;
265  }
266  if( aPara.pSectNd )
267  {
268  // found, so get the data
269  return SwServerObject( *aPara.pSectNd ).GetData( rValue, rMimeType );
270  }
271  if( !bCaseSensitive )
272  break;
273  bCaseSensitive = false;
274  }
275 
276  FindItem aPara( GetAppCharClass().lowercase( rItem ));
277  for( const SwFrameFormat* pFormat : *m_rDoc.GetTableFrameFormats() )
278  {
279  if (!(lcl_FindTable(pFormat, &aPara)))
280  break;
281  }
282  if( aPara.pTableNd )
283  {
284  return SwServerObject( *aPara.pTableNd ).GetData( rValue, rMimeType );
285  }
286 
287  return false;
288 }
289 
290 void DocumentLinksAdministrationManager::SetData( const OUString& rItem )
291 {
292  // search for bookmarks and sections case sensitive at first. If nothing is found then try again case insensitive
293  bool bCaseSensitive = true;
294  while( true )
295  {
296  ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*m_rDoc.getIDocumentMarkAccess(), rItem, bCaseSensitive);
297  if(pBkmk)
298  {
299  return;
300  }
301 
302  // Do we already have the Item?
303  OUString sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
304  FindItem aPara( sItem );
305  for( const SwSectionFormat* pFormat : m_rDoc.GetSections() )
306  {
307  if (!(lcl_FindSection(pFormat, &aPara, bCaseSensitive)))
308  break;
309  }
310  if( aPara.pSectNd )
311  {
312  // found, so get the data
313  return;
314  }
315  if( !bCaseSensitive )
316  break;
317  bCaseSensitive = false;
318  }
319 
320  OUString sItem(GetAppCharClass().lowercase(rItem));
321  FindItem aPara( sItem );
322  for( const SwFrameFormat* pFormat : *m_rDoc.GetTableFrameFormats() )
323  {
324  if (!(lcl_FindTable(pFormat, &aPara)))
325  break;
326  }
327 }
328 
330 {
331  SwServerObject* pObj = nullptr;
332 
333  // search for bookmarks and sections case sensitive at first. If nothing is found then try again case insensitive
334  bool bCaseSensitive = true;
335  while( true )
336  {
337  // bookmarks
338  ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*m_rDoc.getIDocumentMarkAccess(), rItem, bCaseSensitive);
339  if(pBkmk && pBkmk->IsExpanded()
340  && (nullptr == (pObj = pBkmk->GetRefObject())))
341  {
342  // mark found, but no link yet -> create hotlink
343  pObj = new SwServerObject(*pBkmk);
344  pBkmk->SetRefObject(pObj);
346  }
347  if(pObj)
348  return pObj;
349 
350  FindItem aPara(bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
351  // sections
352  for( const SwSectionFormat* pFormat : m_rDoc.GetSections() )
353  {
354  if (!(lcl_FindSection(pFormat, &aPara, bCaseSensitive)))
355  break;
356  }
357 
358  if(aPara.pSectNd
359  && (nullptr == (pObj = aPara.pSectNd->GetSection().GetObject())))
360  {
361  // section found, but no link yet -> create hotlink
362  pObj = new SwServerObject( *aPara.pSectNd );
363  aPara.pSectNd->GetSection().SetRefObject( pObj );
365  }
366  if(pObj)
367  return pObj;
368  if( !bCaseSensitive )
369  break;
370  bCaseSensitive = false;
371  }
372 
373  FindItem aPara( GetAppCharClass().lowercase(rItem) );
374  // tables
375  for( const SwFrameFormat* pFormat : *m_rDoc.GetTableFrameFormats() )
376  {
377  if (!(lcl_FindTable(pFormat, &aPara)))
378  break;
379  }
380  if(aPara.pTableNd
381  && (nullptr == (pObj = aPara.pTableNd->GetTable().GetObject())))
382  {
383  // table found, but no link yet -> create hotlink
384  pObj = new SwServerObject(*aPara.pTableNd);
385  aPara.pTableNd->GetTable().SetRefObject(pObj);
387  }
388  return pObj;
389 }
390 
393 {
394  bool bRet = false;
395  sfx2::LinkManager& rLnkMgr = GetLinkManager();
396  const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks();
397  if( !rLinks.empty() )
398  {
399  ::sw::UndoGuard const undoGuard(m_rDoc.GetIDocumentUndoRedo());
400 
401  ::sfx2::SvBaseLink* pLnk = nullptr;
402  while( nullptr != (pLnk = lcl_FindNextRemovableLink( rLinks ) ) )
403  {
404  tools::SvRef<sfx2::SvBaseLink> xLink = pLnk;
405  // Tell the link that it's being destroyed!
406  xLink->Closed();
407 
408  // if one forgot to remove itself
409  if( xLink.is() )
410  rLnkMgr.Remove( xLink.get() );
411 
412  bRet = true;
413  }
414 
417  }
418  return bRet;
419 }
420 
422 {
423  mbLinksUpdated = bNewLinksUpdated;
424 }
425 
427 {
428  return mbLinksUpdated;
429 }
430 
432 {
433 }
434 
435 bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr, SwPaM*& rpPam, std::unique_ptr<SwNodeRange>& rpRange ) const
436 {
437  // Do we actually have the Item?
438  rpPam = nullptr;
439  rpRange = nullptr;
440 
441  OUString sItem( INetURLObject::decode( rStr,
443 
444  sal_Int32 nPos = sItem.indexOf( cMarkSeparator );
445 
446  const CharClass& rCC = GetAppCharClass();
447 
448  // Extension for sections: not only link bookmarks/sections
449  // but also frames (text!), tables, outlines:
450  if( -1 != nPos )
451  {
452  bool bContinue = false;
453  OUString sName( sItem.copy( 0, nPos ) );
454  OUString sCmp( sItem.copy( nPos + 1 ));
455  sItem = rCC.lowercase( sItem );
456 
457  FindItem aPara( sName );
458 
459  if( sCmp == "table" )
460  {
461  sName = rCC.lowercase( sName );
462  for( const SwFrameFormat* pFormat : *m_rDoc.GetTableFrameFormats() )
463  {
464  if (!(lcl_FindTable(pFormat, &aPara)))
465  break;
466  }
467  if( aPara.pTableNd )
468  {
469  rpRange.reset(new SwNodeRange( *aPara.pTableNd, 0,
470  *aPara.pTableNd->EndOfSectionNode(), 1 ));
471  return true;
472  }
473  }
474  else if( sCmp == "frame" )
475  {
476  SwNodeIndex* pIdx;
477  SwNode* pNd;
478  const SwFlyFrameFormat* pFlyFormat = m_rDoc.FindFlyByName( sName );
479  if( pFlyFormat &&
480  nullptr != ( pIdx = const_cast<SwNodeIndex*>(pFlyFormat->GetContent().GetContentIdx()) ) &&
481  !( pNd = &pIdx->GetNode())->IsNoTextNode() )
482  {
483  rpRange.reset(new SwNodeRange( *pNd, 1, *pNd->EndOfSectionNode() ));
484  return true;
485  }
486  }
487  else if( sCmp == "region" )
488  {
489  sItem = sName; // Is being dealt with further down!
490  bContinue = true;
491  }
492  else if( sCmp == "outline" )
493  {
495  if (m_rDoc.GotoOutline(aPos, sName, nullptr))
496  {
497  SwNode* pNd = &aPos.nNode.GetNode();
498  const int nLvl = pNd->GetTextNode()->GetAttrOutlineLevel()-1;
499 
500  const SwOutlineNodes& rOutlNds = m_rDoc.GetNodes().GetOutLineNds();
502  (void)rOutlNds.Seek_Entry( pNd, &nTmpPos );
503  rpRange.reset(new SwNodeRange( aPos.nNode, 0, aPos.nNode ));
504 
505  // look for the section's end, now
506  for( ++nTmpPos;
507  nTmpPos < rOutlNds.size() &&
508  nLvl < rOutlNds[ nTmpPos ]->GetTextNode()->
509  GetAttrOutlineLevel()-1;
510  ++nTmpPos )
511  ; // there is no block
512 
513  if( nTmpPos < rOutlNds.size() )
514  rpRange->aEnd = *rOutlNds[ nTmpPos ];
515  else
516  rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
517  return true;
518  }
519  }
520 
521  if( !bContinue )
522  return false;
523  }
524 
525  // search for bookmarks and sections case sensitive at first. If nothing is found then try again case insensitive
526  bool bCaseSensitive = true;
527  while( true )
528  {
529  ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*m_rDoc.getIDocumentMarkAccess(), sItem, bCaseSensitive);
530  if(pBkmk)
531  {
532  if(pBkmk->IsExpanded())
533  rpPam = new SwPaM(
534  pBkmk->GetMarkPos(),
535  pBkmk->GetOtherMarkPos());
536  return static_cast<bool>(rpPam);
537  }
538 
539  FindItem aPara( bCaseSensitive ? sItem : rCC.lowercase( sItem ) );
540 
541  if( !m_rDoc.GetSections().empty() )
542  {
543  for( const SwSectionFormat* pFormat : m_rDoc.GetSections() )
544  {
545  if (!(lcl_FindSection(pFormat, &aPara, bCaseSensitive)))
546  break;
547  }
548  if( aPara.pSectNd )
549  {
550  rpRange.reset(new SwNodeRange( *aPara.pSectNd, 1,
551  *aPara.pSectNd->EndOfSectionNode() ));
552  return true;
553 
554  }
555  }
556  if( !bCaseSensitive )
557  break;
558  bCaseSensitive = false;
559  }
560  return false;
561 }
562 
563 
564 }
565 
566 
567 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool is() const
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:682
bool IsVisibleLinks() const override
Insert links in-/visibly into LinkManager (linked ranges).
Marks a position in the document model.
Definition: pam.hxx:35
sal_Int16 GetUpdateDocMode() const
Definition: docsh.hxx:283
SwDocShell * GetDocShell()
Definition: doc.hxx:1342
const SwFrameFormats * GetTableFrameFormats() const
Definition: doc.hxx:807
SwNodeIndex nNode
Definition: pam.hxx:37
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
#define OBJECT_CLIENT_FILE
const OUString & GetName() const
virtual void SetModified()=0
Must be called manually at changes of format.
Provides access to the marks of a document.
Definition: doc.hxx:185
SwNode & GetNode() const
Definition: ndindex.hxx:119
bool InsertServer(SvLinkSource *rObj)
IDocumentMarkAccess * getIDocumentMarkAccess()
Definition: docbm.cxx:1602
Dialog to specify the properties of date form field.
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:143
bool empty() const
Definition: docary.hxx:89
int GetAttrOutlineLevel() const
Returns outline level of this text node.
Definition: ndtxt.cxx:4032
virtual bool IsExpanded() const override
Definition: bookmrk.hxx:83
virtual bool GetData(css::uno::Any &rData, const OUString &rMimeType, bool bSynchron=false) override
Definition: swserv.cxx:40
bool SelectServerObj(const OUString &rStr, SwPaM *&rpPam, std::unique_ptr< SwNodeRange > &rpRange) const
const OUString & GetName() const
Definition: format.hxx:111
virtual void DelAllUndoObj()=0
Delete all Undo actions.
SfxObjectCreateMode GetCreateMode() const
size_type size() const
void SetRefObject(SwServerObject *pObj)
Definition: bookmrk.cxx:352
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:164
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
SwTableSortBoxes & GetTabSortBoxes()
Definition: swtable.hxx:259
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
static SwTable * FindTable(SwFrameFormat const *const pFormat)
Definition: swtable.cxx:1920
T * get() const
const SwFlyFrameFormat * FindFlyByName(const OUString &rName, SwNodeType nNdTyp=SwNodeType::NONE) const
Definition: doclay.cxx:1384
Style of a layout element.
Definition: frmfmt.hxx:57
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
const SvBaseLinks & GetLinks() const
SfxObjectCreateMode
const OUString & GetSectionName() const
Definition: section.hxx:169
void Remove(SvBaseLink const *pLink)
OUString sName
bool IsPreview() const
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:393
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
Marks a node in the document model.
Definition: ndindex.hxx:31
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
Definition: ndarr.hxx:234
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:693
bool GetData(const OUString &rItem, const OUString &rMimeType, css::uno::Any &rValue) const override
for linking of parts of documents.
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:119
OUString lowercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:137
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:110
const SwNodeIndex * GetContentIdx() const
Definition: fmtcntnt.hxx:46
static bool GetDisplayNames(const SvBaseLink *, OUString *pType, OUString *pFile=nullptr, OUString *pLink=nullptr, OUString *pFilter=nullptr)
virtual SwPosition & GetOtherMarkPos() const override
Definition: bookmrk.hxx:60
AUTOMATIC
const SwStartNode * GetSttNd() const
Definition: swtable.hxx:439
bool GotoOutline(SwPosition &rPos, const OUString &rName, SwRootFrame const *=nullptr) const
Definition: docnum.cxx:721
void UpdateAllLinks(bool bAskUpdate, bool bUpdateGrfLinks, weld::Window *pParentWin)
const SwNodes & GetNodes() const
Definition: ndindex.hxx:156
virtual SwPosition & GetMarkPos() const override
Definition: bookmrk.hxx:56
SwNodes & GetNodes()
Definition: doc.hxx:402
void SetLinksUpdated(const bool bNewLinksUpdated) override
::sw::DocumentSettingManager & GetDocumentSettingManager()
Definition: doc.cxx:185
virtual sal_uInt16 getLinkUpdateMode(bool bGlobalSettings) const override
Get the current link update mode.
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:386
const SwFormatContent & GetContent(bool=true) const
Definition: fmtcntnt.hxx:55
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:349
::sfx2::SvLinkSource * CreateLinkSource(const OUString &rItem) override
SwSectionNode * GetSectionNode()
Definition: node.hxx:607
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
Definition: ndnum.cxx:32
SwSection * GetSection() const
Definition: section.cxx:668
std::vector< SwNode * >::size_type size_type
void UpdateLinks() override
#i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks() to new SwDoc::UpdateLink...
SwSectionFormats & GetSections()
Definition: doc.hxx:1328
sal_Int32 nPos
CharClass & GetAppCharClass()
Definition: init.cxx:709
bool EmbedAllLinks() override
embedded all local links (Areas/Graphics)
const SwServerObject * GetRefObject() const
Definition: bookmrk.hxx:146
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:842
Base class of the Writer document model elements.
Definition: node.hxx:79
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo
SfxMedium * GetMedium() const
static OUString decode(OUString const &rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)