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 namespace sfx2
{ class LinkManager
; }
35 class DocumentLinksAdministrationManager
: public IDocumentLinksAdministration
39 DocumentLinksAdministrationManager( SwDoc
& i_rSwdoc
);
41 bool IsVisibleLinks() const override
;
43 void SetVisibleLinks(bool bFlag
) override
;
45 sfx2::LinkManager
& GetLinkManager() override
;
47 const sfx2::LinkManager
& GetLinkManager() const override
;
49 void UpdateLinks() override
;
51 bool GetData(const OUString
& rItem
, const OUString
& rMimeType
, css::uno::Any
& rValue
) const override
;
53 void SetData(const OUString
& rItem
) override
;
55 ::sfx2::SvLinkSource
* CreateLinkSource(const OUString
& rItem
) override
;
57 bool EmbedAllLinks() override
;
59 void SetLinksUpdated(const bool bNewLinksUpdated
) override
;
61 bool LinksUpdated() const override
;
63 //Non-Interface method
64 bool SelectServerObj( const OUString
& rStr
, SwPaM
*& rpPam
, std::unique_ptr
<SwNodeRange
>& rpRange
) const;
66 virtual ~DocumentLinksAdministrationManager() override
;
70 DocumentLinksAdministrationManager(DocumentLinksAdministrationManager
const&) = delete;
71 DocumentLinksAdministrationManager
& operator=(DocumentLinksAdministrationManager
const&) = delete;
73 bool mbVisibleLinks
; //< TRUE: Links are inserted visibly.
74 bool mbLinksUpdated
; //< #i38810# flag indicating, that the links have been updated.
75 std::unique_ptr
<sfx2::LinkManager
> m_pLinkMgr
; //< List of linked stuff (graphics/DDE/OLE).
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */