summaryrefslogtreecommitdiffstats
path: root/sc/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/bcaslot.cxx56
-rw-r--r--sc/source/core/data/document.cxx8
-rw-r--r--sc/source/core/inc/bcaslot.hxx8
3 files changed, 72 insertions, 0 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index f2609a4aea9d..8229d6846bdb 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -28,6 +28,10 @@
#include "refupdat.hxx"
#include "table.hxx"
+#if DEBUG_AREA_BROADCASTER
+#include <formulacell.hxx>
+#endif
+
// Number of slots per dimension
// must be integer divisors of MAXCOLCOUNT respectively MAXROWCOUNT
#define BCA_SLOTS_COL ((MAXCOLCOUNT_DEFINE) / 16)
@@ -489,6 +493,33 @@ void ScBroadcastAreaSlot::GetAllListeners(
}
}
+#if DEBUG_AREA_BROADCASTER
+void ScBroadcastAreaSlot::Dump() const
+{
+ ScBroadcastAreas::const_iterator it = aBroadcastAreaTbl.begin(), itEnd = aBroadcastAreaTbl.end();
+ for (; it != itEnd; ++it)
+ {
+ const ScBroadcastAreaEntry& rEntry = *it;
+ const ScBroadcastArea* pArea = rEntry.mpArea;
+ cout << " * range: " << rtl::OUStringToOString(pArea->GetRange().Format(SCA_VALID|SCA_TAB_3D, pDoc), RTL_TEXTENCODING_UTF8).getStr() << endl;
+ const SvtBroadcaster& rBC = pArea->GetBroadcaster();
+ const SvtBroadcaster::ListenersType& rListeners = rBC.GetAllListeners();
+ size_t n = rListeners.size();
+ cout << " * listener count: " << n << endl;
+ for (size_t i = 0; i < n; ++i)
+ {
+ const ScFormulaCell* pFC = dynamic_cast<const ScFormulaCell*>(rListeners[i]);
+ if (!pFC)
+ continue;
+
+ cout << " * listener: formula cell: "
+ << rtl::OUStringToOString(pFC->aPos.Format(SCA_VALID|SCA_TAB_3D, pDoc), RTL_TEXTENCODING_UTF8).getStr()
+ << endl;
+ }
+ }
+}
+#endif
+
void ScBroadcastAreaSlot::FinallyEraseAreas()
{
pBASM->FinallyEraseAreas( this);
@@ -1026,4 +1057,29 @@ std::vector<sc::AreaListener> ScBroadcastAreaSlotMachine::GetAllListeners(
return aRet;
}
+#if DEBUG_AREA_BROADCASTER
+void ScBroadcastAreaSlotMachine::Dump() const
+{
+ cout << "slot distribution count: " << nBcaSlots << endl;
+ TableSlotsMap::const_iterator it = aTableSlotsMap.begin(), itEnd = aTableSlotsMap.end();
+ for (; it != itEnd; ++it)
+ {
+ cout << "-- sheet (index: " << it->first << ")" << endl;
+
+ TableSlots* pTabSlots = it->second;
+ assert(pTabSlots);
+ ScBroadcastAreaSlot** ppSlots = pTabSlots->getSlots();
+ for (SCSIZE i = 0; i < nBcaSlots; ++i)
+ {
+ const ScBroadcastAreaSlot* pSlot = ppSlots[i];
+ if (pSlot)
+ {
+ cout << "* slot " << i << endl;
+ pSlot->Dump();
+ }
+ }
+ }
+}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c8c8af7fc87a..b3a3fc1077d1 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2352,6 +2352,14 @@ void ScDocument::DumpFormulaGroups( SCTAB nTab, SCCOL nCol ) const
}
#endif
+#if DEBUG_AREA_BROADCASTER
+void ScDocument::DumpAreaBroadcasters() const
+{
+ if (pBASM)
+ pBASM->Dump();
+}
+#endif
+
bool ScDocument::TableExists( SCTAB nTab ) const
{
return ValidTab(nTab) && static_cast<size_t>(nTab) < maTabs.size() && maTabs[nTab];
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index a79089058e88..2f632071b46a 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -225,6 +225,10 @@ public:
void GetAllListeners(
const ScRange& rRange, std::vector<sc::AreaListener>& rListeners, sc::AreaOverlapType eType );
+
+#if DEBUG_AREA_BROADCASTER
+ void Dump() const;
+#endif
};
/**
@@ -321,6 +325,10 @@ public:
std::vector<sc::AreaListener> GetAllListeners(
const ScRange& rRange, sc::AreaOverlapType eType );
+
+#if DEBUG_AREA_BROADCASTER
+ void Dump() const;
+#endif
};
class ScBulkBroadcast