summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-08 08:51:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-08 17:17:36 +0200
commit53312ca4ee722a6d5ba22d1f578c6de5fbc37207 (patch)
tree0958ed3af146236305947489425f12f73e9cbcc9 /sc
parent4aa60490622cc10f8d3a31489c62a5622d240c83 (diff)
loplugin:unusedmethods
Change-Id: I52efd8d843d0e4cc7a6adefb0eb95aa50469af38 Reviewed-on: https://gerrit.libreoffice.org/73693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/column.hxx1
-rw-r--r--sc/source/core/data/column.cxx126
-rw-r--r--sc/source/ui/inc/condformatdlgentry.hxx1
-rw-r--r--sc/source/ui/inc/inputwin.hxx1
4 files changed, 0 insertions, 129 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index e7e40fd528bf..78272c7f4f3b 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -555,7 +555,6 @@ public:
void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
void SetDirtyIfPostponed();
void BroadcastRecalcOnRefMove();
- void TransferListeners( ScColumn& rDestCol, SCROW nRow1, SCROW nRow2, SCROW nRowDelta );
void CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 );
void CollectFormulaCells( std::vector<ScFormulaCell*>& rCells, SCROW nRow1, SCROW nRow2 );
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 18132d2fc454..76fc911a82a6 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -3358,132 +3358,6 @@ void ScColumn::BroadcastRecalcOnRefMove()
BroadcastCells(aFunc.getDirtyRows(), SfxHintId::ScDataChanged);
}
-namespace {
-
-class TransferListenersHandler
-{
-public:
- struct Entry
- {
- size_t mnRow;
- std::vector<SvtListener*> maListeners;
- };
- typedef std::vector<Entry> ListenerListType;
-
- void swapListeners( std::vector<Entry>& rListenerList )
- {
- maListenerList.swap(rListenerList);
- }
-
- void operator() ( size_t nRow, SvtBroadcaster* pBroadcaster )
- {
- assert(pBroadcaster);
-
- // It's important to make a copy of the broadcasters listener list here
- Entry aEntry { nRow, pBroadcaster->GetAllListeners() };
- if (aEntry.maListeners.empty())
- // No listeners to transfer.
- return;
-
- for (SvtListener* pLis : aEntry.maListeners)
- pLis->EndListening(*pBroadcaster);
-
- maListenerList.push_back(aEntry);
-
- // At this point, the source broadcaster should have no more listeners.
- assert(!pBroadcaster->HasListeners());
- }
-
-private:
- ListenerListType maListenerList;
-};
-
-class RemoveEmptyBroadcasterHandler
-{
- sc::ColumnSpanSet maSet;
- ScDocument& mrDoc;
- SCCOL const mnCol;
- SCTAB const mnTab;
-
-public:
- RemoveEmptyBroadcasterHandler( ScDocument& rDoc, SCCOL nCol, SCTAB nTab ) :
- maSet(false), mrDoc(rDoc), mnCol(nCol), mnTab(nTab) {}
-
- void operator() ( size_t nRow, const SvtBroadcaster* pBroadcaster )
- {
- if (!pBroadcaster->HasListeners())
- maSet.set(mnTab, mnCol, nRow, true);
- }
-
- void purge()
- {
- sc::PurgeListenerAction aAction(mrDoc);
- maSet.executeAction(aAction);
- }
-};
-
-}
-
-void ScColumn::TransferListeners(
- ScColumn& rDestCol, SCROW nRow1, SCROW nRow2, SCROW nRowDelta )
-{
- if (nRow2 < nRow1)
- return;
-
- if (!ValidRow(nRow1) || !ValidRow(nRow2))
- return;
-
- if (nRowDelta <= 0 && !ValidRow(nRow1+nRowDelta))
- return;
-
- if (nRowDelta >= 0 && !ValidRow(nRow2+nRowDelta))
- return;
-
- // Collect all listeners from the source broadcasters. The listeners will
- // be removed from their broadcasters as they are collected.
- TransferListenersHandler aFunc;
- sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFunc);
-
- TransferListenersHandler::ListenerListType aListenerList;
- aFunc.swapListeners(aListenerList);
-
- // Re-register listeners with their destination broadcasters.
- sc::BroadcasterStoreType::iterator itDestPos = rDestCol.maBroadcasters.begin();
- for (TransferListenersHandler::Entry& rEntry : aListenerList)
- {
- SCROW nDestRow = rEntry.mnRow + nRowDelta;
-
- sc::BroadcasterStoreType::position_type aPos =
- rDestCol.maBroadcasters.position(itDestPos, nDestRow);
-
- itDestPos = aPos.first;
- SvtBroadcaster* pDestBrd = nullptr;
- if (aPos.first->type == sc::element_type_broadcaster)
- {
- // Existing broadcaster.
- pDestBrd = sc::broadcaster_block::at(*aPos.first->data, aPos.second);
- }
- else
- {
- // No existing broadcaster. Create a new one.
- assert(aPos.first->type == sc::element_type_empty);
- pDestBrd = new SvtBroadcaster;
- itDestPos = rDestCol.maBroadcasters.set(itDestPos, nDestRow, pDestBrd);
- }
-
- // Transfer all listeners from the source to the destination.
- for (SvtListener* pLis : rEntry.maListeners)
- {
- pLis->StartListening(*pDestBrd);
- }
- }
-
- // Remove any broadcasters that have no listeners.
- RemoveEmptyBroadcasterHandler aFuncRemoveEmpty(*GetDoc(), nCol, nTab);
- sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFuncRemoveEmpty);
- aFuncRemoveEmpty.purge();
-}
-
void ScColumn::CalcAll()
{
CalcAllHandler aFunc;
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx
index abda9c3528c8..ed987a03c7ae 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -79,7 +79,6 @@ public:
virtual ~ScCondFrmtEntry();
void Show() { mxGrid->show(); }
- void Hide() { mxGrid->hide(); }
void set_grid_top_attach(int nAttach) { mxBorder->set_grid_top_attach(nAttach); }
int get_grid_top_attach() const { return mxBorder->get_grid_top_attach(); }
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index cdf3048519be..ebcd6656bb4a 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -234,7 +234,6 @@ public:
void SetFormulaMode(bool bSet) override;
void MakeDialogEditView() override;
bool IsInputActive() override;
- ScrollBar& GetScrollBar() { return maTextWndGroup->GetScrollBar(); }
void IncrementVerticalSize();
void DecrementVerticalSize();
long GetNumLines() { return maTextWndGroup->GetNumLines(); }