Fix build
[LibreOffice.git] / sc / inc / documentlinkmgr.hxx
blobde36ec40fa815c9e6d1841e6bd4e182f4019eeda
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include <memory>
13 #include <string_view>
15 class SfxObjectShell;
16 namespace weld { class Window; }
18 namespace sfx2 {
20 class LinkManager;
24 namespace sc {
26 class DataStream;
27 struct DocumentLinkManagerImpl;
29 class DocumentLinkManager
31 std::unique_ptr<DocumentLinkManagerImpl> mpImpl;
33 public:
34 DocumentLinkManager( SfxObjectShell* pShell );
35 DocumentLinkManager(const DocumentLinkManager&) = delete;
36 const DocumentLinkManager& operator=(const DocumentLinkManager&) = delete;
37 ~DocumentLinkManager();
39 void setDataStream( DataStream* p );
40 DataStream* getDataStream();
41 const DataStream* getDataStream() const;
43 /**
44 * @param bCreate if true, create a new link manager instance in case one
45 * does not exist.
47 * @return link manager instance.
49 sfx2::LinkManager* getLinkManager( bool bCreate = true );
51 const sfx2::LinkManager* getExistingLinkManager() const;
53 bool idleCheckLinks();
55 bool hasDdeLinks() const;
56 bool hasDdeOrOleOrWebServiceLinks() const;
57 bool hasExternalRefLinks() const;
59 bool updateDdeOrOleOrWebServiceLinks(weld::Window* pWin);
61 void updateDdeLink( std::u16string_view rAppl, std::u16string_view rTopic, std::u16string_view rItem );
63 size_t getDdeLinkCount() const;
65 private:
66 bool hasDdeOrOleOrWebServiceLinks(bool bDde, bool bOle, bool bWebService) const;
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */