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