diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-09 13:00:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-09 14:31:12 +0200 |
commit | 7f6d5dfb2244468e2faa7be05d4258692c6e84dc (patch) | |
tree | 8c03b0980c003a66f2a2683920c1557a3ada6e8e /sc/source | |
parent | b4009daccd11e416865efd5fd3c205c46691bb12 (diff) |
loplugin:unusedmethods
Change-Id: I7b4d2e5e611935284e2902b0089950768dfb7717
Reviewed-on: https://gerrit.libreoffice.org/72036
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/column.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 18 | ||||
-rw-r--r-- | sc/source/core/data/table7.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 84 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 15 | ||||
-rw-r--r-- | sc/source/ui/inc/ChildWindowWrapper.hxx | 70 | ||||
-rw-r--r-- | sc/source/ui/inc/PivotLayoutTreeListBase.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/namemgrtable.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/reffact.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/reffact.cxx | 9 |
10 files changed, 0 insertions, 218 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 312f59682ee9..70ee70b8e1f4 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -694,12 +694,6 @@ void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr ) } void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow, - std::unique_ptr<ScPatternAttr> pPatAttr ) -{ - pAttrArray->SetPatternArea( nStartRow, nEndRow, std::move(pPatAttr), true/*bPutToPool*/ ); -} - -void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr ) { pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ ); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 2c132d8c98dd..27127d42d08a 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1859,18 +1859,6 @@ bool ScTable::BroadcastBroadcasters( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO return bBroadcasted; } -void ScTable::TransferListeners( - ScTable& rDestTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCCOL nColDelta, SCROW nRowDelta ) -{ - for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) - { - ScColumn& rSrcCol = aCol[nCol]; - ScColumn& rDestCol = rDestTab.aCol[nCol+nColDelta]; - rSrcCol.TransferListeners(rDestCol, nRow1, nRow2, nRowDelta); - } -} - void ScTable::SetLoadingMedium(bool bLoading) { mpRowHeights->enableTreeSearch(!bLoading); @@ -2801,12 +2789,6 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO return bChanged; } -void ScTable::SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> pAttr ) -{ - if (ValidColRow(rPos.Col(),rPos.Row())) - aCol[rPos.Col()].SetPattern( rPos.Row(), std::move(pAttr) ); -} - void ScTable::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr ) { if (ValidColRow(rPos.Col(),rPos.Row())) diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx index 7b67a096bc96..1b903f45423d 100644 --- a/sc/source/core/data/table7.cxx +++ b/sc/source/core/data/table7.cxx @@ -286,18 +286,6 @@ void ScTable::RegroupFormulaCells( SCCOL nCol ) aCol[nCol].RegroupFormulaCells(); } -void ScTable::CollectListeners( - std::vector<SvtListener*>& rListeners, const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 ) -{ - if (nCol2 < nCol1 || !IsColValid(nCol1) || !ValidCol(nCol2)) - return; - - const SCCOL nMaxCol2 = std::min<SCCOL>( nCol2, aCol.size() - 1 ); - - for (SCCOL nCol = nCol1; nCol <= nMaxCol2; ++nCol) - aCol[nCol].CollectListeners(rListeners, nRow1, nRow2); -} - bool ScTable::HasFormulaCell( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 ) const { if (nCol2 < nCol1 || !IsColValid(nCol1) || !ValidCol(nCol2)) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 2558d14ab539..0b8b52880dc4 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -3398,90 +3398,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove( return aRes; } -sc::RefUpdateResult ScTokenArray::MoveReference( const ScAddress& rPos, const sc::RefUpdateContext& rCxt ) -{ - sc::RefUpdateResult aRes; - - ScRange aOldRange = rCxt.maRange; - ScRange aErrorMoveRange( ScAddress::UNINITIALIZED ); - if (!aOldRange.Move(-rCxt.mnColDelta, -rCxt.mnRowDelta, -rCxt.mnTabDelta, aErrorMoveRange)) - { - assert(!"can't move"); - } - - FormulaToken** p = pCode.get(); - FormulaToken** pEnd = p + static_cast<size_t>(nLen); - for (; p != pEnd; ++p) - { - switch ((*p)->GetType()) - { - case svSingleRef: - { - formula::FormulaToken* pToken = *p; - ScSingleRefData& rRef = *pToken->GetSingleRef(); - ScAddress aAbs = rRef.toAbs(rPos); - if (aOldRange.In(aAbs)) - { - ScAddress aErrorPos( ScAddress::UNINITIALIZED ); - if (!aAbs.Move(rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta, aErrorPos)) - aAbs = aErrorPos; - rRef.SetAddress(aAbs, rPos); - if (rCxt.mnTabDelta) - rRef.SetFlag3D(aAbs.Tab()!=rPos.Tab()); - } - } - break; - case svDoubleRef: - { - formula::FormulaToken* pToken = *p; - ScComplexRefData& rRef = *pToken->GetDoubleRef(); - ScRange aAbs = rRef.toAbs(rPos); - if (aOldRange.In(aAbs)) - { - ScRange aErrorRange( ScAddress::UNINITIALIZED ); - if (!aAbs.Move(rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta, aErrorRange)) - aAbs = aErrorRange; - rRef.SetRange(aAbs, rPos); - if (rCxt.mnTabDelta) - rRef.Ref1.SetFlag3D(aAbs.aStart.Tab()!=rPos.Tab()); - } - } - break; - case svIndex: - { - switch ((*p)->GetOpCode()) - { - case ocName: - { - SCTAB nOldTab = (*p)->GetSheet(); - if (isNameModified(rCxt.maUpdatedNames, nOldTab, **p)) - aRes.mbNameModified = true; - if (rCxt.mnTabDelta && - rCxt.maRange.aStart.Tab() <= nOldTab && nOldTab <= rCxt.maRange.aEnd.Tab()) - { - aRes.mbNameModified = true; - (*p)->SetSheet( nOldTab + rCxt.mnTabDelta); - } - } - break; - case ocDBArea: - case ocTableRef: - if (isDBDataModified(rCxt.mrDoc, **p)) - aRes.mbNameModified = true; - break; - default: - ; // nothing - } - } - break; - default: - ; - } - } - - return aRes; -} - void ScTokenArray::MoveReferenceColReorder( const ScAddress& rPos, SCTAB nTab, SCROW nRow1, SCROW nRow2, const sc::ColRowReorderMapType& rColMap ) { diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx index 81c421db32bf..c5f783ac18dc 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx @@ -63,21 +63,6 @@ sal_Int8 ScPivotLayoutTreeDropTarget::ExecuteDrop( const ExecuteDropEvent& rEvt return DND_ACTION_NONE; } -bool ScPivotLayoutTreeListBase::HasEntry(const weld::TreeIter& rEntry) -{ - std::unique_ptr<weld::TreeIter> xEntry(mxControl->make_iterator()); - if (!mxControl->get_iter_first(*xEntry)) - return false; - - do - { - if (mxControl->iter_compare(*xEntry, rEntry)) - return true; - } while (mxControl->iter_next(*xEntry)); - - return false; -} - void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector& rVector) { std::unique_ptr<weld::TreeIter> xEachEntry(mxControl->make_iterator()); diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx index 1ad232a7b91b..dad043e22143 100644 --- a/sc/source/ui/inc/ChildWindowWrapper.hxx +++ b/sc/source/ui/inc/ChildWindowWrapper.hxx @@ -19,76 +19,6 @@ #include "tabvwsh.hxx" template <sal_Int16 WindowID> -class ChildWindowWrapper : public SfxChildWindow -{ -public: - ChildWindowWrapper( vcl::Window* pParentP, sal_uInt16 nId, - SfxBindings* pBindings, const SfxChildWinInfo* pInfo ) : - SfxChildWindow(pParentP, nId) - { - ScTabViewShell* pViewShell = getTabViewShell( pBindings ); - if (!pViewShell) - pViewShell = dynamic_cast< ScTabViewShell *>( SfxViewShell::Current() ); - OSL_ENSURE(pViewShell, "Missing view shell!"); - - if (pViewShell) - SetWindow( pViewShell->CreateRefDialog( pBindings, this, pInfo, pParentP, WindowID ) ); - else - SetWindow( nullptr ); - - if (pViewShell && !GetWindow()) - pViewShell->GetViewFrame()->SetChildWindow( nId, false ); - } - - static std::unique_ptr<SfxChildWindow> CreateImpl( - vcl::Window *pParent, sal_uInt16 nId, - SfxBindings *pBindings, SfxChildWinInfo* pInfo ) - { - return std::make_unique<ChildWindowWrapper>(pParent, nId, pBindings, pInfo); - } - - static void RegisterChildWindow ( - bool bVisible = false, - SfxModule* pModule = nullptr, - SfxChildWindowFlags nFlags = SfxChildWindowFlags::NONE) - { - auto pFactory = std::make_unique<SfxChildWinFactory>(ChildWindowWrapper::CreateImpl, WindowID, CHILDWIN_NOPOS ); - pFactory->aInfo.nFlags |= nFlags; - pFactory->aInfo.bVisible = bVisible; - SfxChildWindow::RegisterChildWindow(pModule, std::move(pFactory)); - } - - virtual SfxChildWinInfo GetInfo() const override - { - SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); - static_cast<SfxModelessDialog*>(GetWindow())->FillInfo( aInfo ); - return aInfo; - } - - static sal_uInt16 GetChildWindowId() - { - return WindowID; - } - -private: - static ScTabViewShell* getTabViewShell( const SfxBindings *pBindings ) - { - if( !pBindings ) - return nullptr; - SfxDispatcher* pDispacher = pBindings ->GetDispatcher(); - if( !pDispacher ) - return nullptr; - SfxViewFrame* pFrame = pDispacher->GetFrame(); - if( !pFrame ) - return nullptr; - SfxViewShell* pViewShell = pFrame->GetViewShell(); - if( !pViewShell ) - return nullptr; - return dynamic_cast<ScTabViewShell*>( pViewShell ); - } -}; - -template <sal_Int16 WindowID> class ChildControllerWrapper : public SfxChildWindow { public: diff --git a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx index 4796fdc673ac..701e87b53cff 100644 --- a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx +++ b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx @@ -65,8 +65,6 @@ public: void RemoveEntryForItem(const ScItemValue* pItemValue); - bool HasEntry(const weld::TreeIter& rEntry); - virtual void InsertEntryForSourceTarget(weld::TreeView& rSource, int nTarget); }; diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx index e3a98a3a0f39..71b0ab5d2f08 100644 --- a/sc/source/ui/inc/namemgrtable.hxx +++ b/sc/source/ui/inc/namemgrtable.hxx @@ -70,7 +70,6 @@ public: void GetCurrentLine(ScRangeNameLine& rLine); bool IsMultiSelection(); - bool HasSelection(); std::vector<ScRangeNameLine> GetSelectedEntries(); }; diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index eac1e2aa3ad2..1aa2bd37eedd 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -171,7 +171,6 @@ public: SFX_DECL_CHILDWINDOW_WITHID(Class); - static void SetDefaultPosSize(Point aPos, Size aSize); void SetRefString(const OUString& rStr); void SetCloseHdl( const Link<const OUString*,void>& rLink ); void SetUnoLinks( const Link<const OUString&,void>& rDone, const Link<const OUString&,void>& rAbort, diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index 492dc7c0e697..b26ad4a95143 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -184,15 +184,6 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP, } } -void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize) -{ - bScSimpleRefFlag=true; - nScSimpleRefX=aPos.X(); - nScSimpleRefY=aPos.Y(); - nScSimpleRefHeight=aSize.Height(); - nScSimpleRefWidth=aSize.Width(); -} - void ScSimpleRefDlgWrapper::SetAutoReOpen(bool bFlag) { bAutoReOpen=bFlag; |