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/.
12 #include "address.hxx"
23 class FormulaGroupAreaListener
;
25 struct BroadcasterState
29 using DataType
= std::variant
<const ScFormulaCell
*, const SvtListener
*>;
33 CellListener(const ScFormulaCell
* p
);
34 CellListener(const SvtListener
* p
);
39 using DataType
= std::variant
<const ScFormulaCell
*, const sc::FormulaGroupAreaListener
*,
44 AreaListener(const ScFormulaCell
* p
);
45 AreaListener(const sc::FormulaGroupAreaListener
* p
);
46 AreaListener(const SvtListener
* p
);
49 std::map
<ScAddress
, std::vector
<CellListener
>> aCellListenerStore
;
50 std::map
<ScRange
, std::vector
<AreaListener
>> aAreaListenerStore
;
53 * Check if a formula cell listens on a single cell.
55 bool hasFormulaCellListener(const ScAddress
& rBroadcasterPos
,
56 const ScAddress
& rFormulaPos
) const;
59 * Check if a formula cell listens on a single range.
61 bool hasFormulaCellListener(const ScRange
& rBroadcasterRange
,
62 const ScAddress
& rFormulaPos
) const;
65 * Dump all broadcaster state in YAML format.
67 void dump(std::ostream
& rStrm
, const ScDocument
* pDoc
= nullptr) const;
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */