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