1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTLINKSADMINISTRATIONMANAGER_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTLINKSADMINISTRATIONMANAGER_HXX
23 #include <IDocumentLinksAdministration.hxx>
27 #include <string_view>
29 namespace sfx2
{ class LinkManager
; }
37 class DocumentLinksAdministrationManager final
: public IDocumentLinksAdministration
41 DocumentLinksAdministrationManager( SwDoc
& i_rSwdoc
);
43 bool IsVisibleLinks() const override
;
45 void SetVisibleLinks(bool bFlag
) override
;
47 sfx2::LinkManager
& GetLinkManager() override
;
49 const sfx2::LinkManager
& GetLinkManager() const override
;
51 void UpdateLinks() override
;
53 bool GetData(const OUString
& rItem
, const OUString
& rMimeType
, css::uno::Any
& rValue
) const override
;
55 void SetData(const OUString
& rItem
) override
;
57 ::sfx2::SvLinkSource
* CreateLinkSource(const OUString
& rItem
) override
;
59 bool EmbedAllLinks() override
;
61 void SetLinksUpdated(const bool bNewLinksUpdated
) override
;
63 bool LinksUpdated() const override
;
65 //Non-Interface method
66 bool SelectServerObj( std::u16string_view rStr
, SwPaM
*& rpPam
, std::optional
<SwNodeRange
>& rpRange
) const;
68 virtual ~DocumentLinksAdministrationManager() override
;
72 DocumentLinksAdministrationManager(DocumentLinksAdministrationManager
const&) = delete;
73 DocumentLinksAdministrationManager
& operator=(DocumentLinksAdministrationManager
const&) = delete;
75 bool mbVisibleLinks
; //< TRUE: Links are inserted visibly.
76 bool mbLinksUpdated
; //< #i38810# flag indicating, that the links have been updated.
77 std::unique_ptr
<sfx2::LinkManager
> m_pLinkMgr
; //< List of linked stuff (graphics/DDE/OLE).
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */