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