LibreOffice Module sc (master) 1
ddelink.hxx
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
20#pragma once
21
22#include <sfx2/lnkbase.hxx>
23#include <svl/broadcast.hxx>
24#include <types.hxx>
25
26namespace com::sun::star::uno { class Any; }
27
28class ScDocument;
31class SvStream;
32
33class ScDdeLink final : public ::sfx2::SvBaseLink, public SvtBroadcaster
34{
35private:
36static bool bIsInUpdate;
37
39
40 OUString aAppl; // connection/ link data
41 OUString aTopic;
42 OUString aItem;
43 sal_uInt8 nMode; // number format mode
44
45 bool bNeedUpdate; // is set, if update was not possible
46
48
49public:
50
52 OUString aA, OUString aT, OUString aI,
53 sal_uInt8 nM );
54 ScDdeLink( ScDocument& rD, SvStream& rStream, ScMultipleReadHeader& rHdr );
55 ScDdeLink( ScDocument& rD, const ScDdeLink& rOther );
56 virtual ~ScDdeLink() override;
57
58 void Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const;
59
60 // SvBaseLink override:
61 virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
62 const OUString& rMimeType, const css::uno::Any & rValue ) override;
63
64 // SvtBroadcaster override:
65 virtual void ListenersGone() override;
66
67 // for interpreter:
68
69 const ScMatrix* GetResult() const;
70 void SetResult( const ScMatrixRef& pRes );
71
72 const OUString& GetAppl() const { return aAppl; }
73 const OUString& GetTopic() const { return aTopic; }
74 const OUString& GetItem() const { return aItem; }
75 sal_uInt8 GetMode() const { return nMode; }
76
77 void TryUpdate();
78
79 bool NeedsUpdate() const { return bNeedUpdate; }
80
81 static bool IsInUpdate() { return bIsInUpdate; }
82};
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:101
unsigned char sal_uInt8
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25