10#include <broadcast.hxx>
53 for (
const auto& rLis : it->second)
57 auto pFC = std::get<const ScFormulaCell*>(rLis.pData);
58 if (pFC->aPos == rFormulaPos)
73 for (
const auto& rLis : it->second)
77 auto pFC = std::get<const ScFormulaCell*>(rLis.pData);
78 if (pFC->aPos == rFormulaPos)
90 rStrm <<
"---" << std::endl;
94 rStrm <<
"- type: cell-broadcaster\n";
95 rStrm <<
" position: " << rPos.Format(nPosFlags, pDoc) << std::endl;
97 if (!rListeners.empty())
98 rStrm <<
" listeners:\n";
100 for (
const auto& rLis : rListeners)
106 auto* pFC = std::get<const ScFormulaCell*>(rLis.pData);
107 rStrm <<
" - type: formula-cell\n";
108 rStrm <<
" position: " << pFC->aPos.Format(nPosFlags, pDoc) << std::endl;
113 rStrm <<
" - type: unknown" << std::endl;
122 rStrm <<
"- type: area-broadcaster\n";
123 rStrm <<
" range: " << rRange.Format(*pDoc, nPosFlags) << std::endl;
125 if (!rListeners.empty())
126 rStrm <<
" listeners:\n";
128 for (
const auto& rLis : rListeners)
134 auto* pFC = std::get<const ScFormulaCell*>(rLis.pData);
135 rStrm <<
" - type: formula-cell\n";
136 rStrm <<
" position: " << pFC->aPos.Format(nPosFlags, pDoc) << std::endl;
141 auto* pFGL = std::get<const sc::FormulaGroupAreaListener*>(rLis.pData);
143 auto pTopCell = pFGL->getTopCell();
144 if (
auto xFG = pTopCell->GetCellGroup(); xFG)
148 rStrm <<
" - type: formula-group\n";
149 rStrm <<
" range: " << aGR.
Format(*pDoc, nPosFlags) << std::endl;
155 rStrm <<
" - type: unknown" << std::endl;
void IncRow(SCROW nDelta=1)
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
std::unique_ptr< sal_Int32[]> pData
CAUTION! The following defines must be in the same namespace as the respective type.
AreaListener(const ScFormulaCell *p)
CellListener(const ScFormulaCell *p)
bool hasFormulaCellListener(const ScAddress &rBroadcasterPos, const ScAddress &rFormulaPos) const
Check if a formula cell listens on a single cell.
std::map< ScAddress, std::vector< CellListener > > aCellListenerStore
std::map< ScRange, std::vector< AreaListener > > aAreaListenerStore
void dump(std::ostream &rStrm, const ScDocument *pDoc=nullptr) const
Dump all broadcaster state in YAML format.