summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 13:00:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 14:31:12 +0200
commit7f6d5dfb2244468e2faa7be05d4258692c6e84dc (patch)
tree8c03b0980c003a66f2a2683920c1557a3ada6e8e /sc
parentb4009daccd11e416865efd5fd3c205c46691bb12 (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')
-rw-r--r--sc/inc/autoform.hxx1
-rw-r--r--sc/inc/column.hxx1
-rw-r--r--sc/inc/document.hxx1
-rw-r--r--sc/inc/table.hxx7
-rw-r--r--sc/inc/tokenarray.hxx7
-rw-r--r--sc/source/core/data/column.cxx6
-rw-r--r--sc/source/core/data/table2.cxx18
-rw-r--r--sc/source/core/data/table7.cxx12
-rw-r--r--sc/source/core/tool/token.cxx84
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx15
-rw-r--r--sc/source/ui/inc/ChildWindowWrapper.hxx70
-rw-r--r--sc/source/ui/inc/PivotLayoutTreeListBase.hxx2
-rw-r--r--sc/source/ui/inc/namemgrtable.hxx1
-rw-r--r--sc/source/ui/inc/reffact.hxx1
-rw-r--r--sc/source/ui/view/reffact.cxx9
15 files changed, 0 insertions, 235 deletions
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index b9279eef5965..5a6676f15500 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -112,7 +112,6 @@ public:
ScAutoFormatDataField( const ScAutoFormatDataField& rCopy );
~ScAutoFormatDataField();
- const AutoFormatSwBlob& GetAutoFormatSwBlob() const { return m_swFields; }
// number format
const ScNumFormatAbbrev& GetNumFormat() const { return aNumFormat; }
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 22d8191f616d..bb218ea37c72 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -462,7 +462,6 @@ public:
bool* const pIsChanged = nullptr);
const ScPatternAttr* SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> );
void SetPattern( SCROW nRow, const ScPatternAttr& );
- void SetPatternArea( SCROW nStartRow, SCROW nEndRow, std::unique_ptr<ScPatternAttr> );
void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& );
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, SvNumFormatType nNewType );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6045ec64d270..d36db2e6fef4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1791,7 +1791,6 @@ public:
SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab, ScMF nFlags );
- SC_DLLPUBLIC void SetPattern( const ScAddress&, std::unique_ptr<ScPatternAttr> );
SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> );
SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 50f6c5f85aef..dbbf7b57d831 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -707,7 +707,6 @@ public:
const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr,
bool* const pIsChanged = nullptr );
- void SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> );
void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr );
const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPatternAttr> );
void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
@@ -1033,12 +1032,6 @@ public:
*/
void BroadcastRecalcOnRefMove();
- void CollectListeners( std::vector<SvtListener*>& rListeners, const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 );
-
- void TransferListeners(
- ScTable& rDestTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- SCCOL nColDelta, SCROW nRowDelta );
-
void TransferCellValuesTo( const SCCOL nCol, SCROW nRow, size_t nLen, sc::CellValues& rDest );
void CopyCellValuesFrom( const SCCOL nCol, SCROW nRow, const sc::CellValues& rSrc );
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index dca885713b01..e0237000c0ed 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -165,13 +165,6 @@ public:
const sc::RefUpdateContext& rCxt, const ScAddress& rOldPos, const ScAddress& rNewPos );
/**
- * Move reference positions that are within specified moved range.
- *
- * @param rPos position of this formula cell
- */
- sc::RefUpdateResult MoveReference( const ScAddress& rPos, const sc::RefUpdateContext& rCxt );
-
- /**
* Move reference positions in response to column reordering. A range
* reference gets moved only when the whole range fits in a single column.
*
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;