diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-21 10:15:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-21 10:07:37 +0000 |
commit | 0649622956431e0a1955cb80d1175025401ab5e5 (patch) | |
tree | cdaa1ff406d232399d53594ad1a32691402ab665 /sc/source/ui | |
parent | ede35e5c693a287f31e3c02d8afd33580e827380 (diff) |
loplugin:unusedmethods
Change-Id: I52a9f16f3ed543a3c83ca111df70e3f7ae1ef33c
Reviewed-on: https://gerrit.libreoffice.org/34508
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/dbfunc.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/output.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/undodraw.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 170 | ||||
-rw-r--r-- | sc/source/ui/view/output.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/output3.cxx | 28 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 5 |
9 files changed, 0 insertions, 232 deletions
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index 0a6537425867..98049b998bcf 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -85,7 +85,6 @@ public: void UngroupDataPilot(); void DataPilotInput( const ScAddress& rPos, const OUString& rString ); - void DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = nullptr ); void DataPilotSort(ScDPObject* pDPObject, long nDimIndex, bool bAscending, sal_uInt16* pUserListId = nullptr); bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest ); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index d8217c5400f9..93f50dc83516 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -223,14 +223,10 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou void UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ); bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); - void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow, - const OUString& aValue ); void FilterSelect( sal_uLong nSel ); void ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr ); - void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelection, const OUString& rStr ); - bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange ); bool DropScroll( const Point& rMousePos ); diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index d7915538815a..a5eaad917660 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -283,7 +283,6 @@ public: void SetEditCell( SCCOL nCol, SCROW nRow ); void SetSyntaxMode( bool bNewMode ); void SetMetaFileMode( bool bNewMode ); - void SetSingleGrid( bool bNewMode ); void SetGridColor( const Color& rColor ); void SetMarkClipped( bool bSet ); void SetShowNullValues ( bool bSet ); @@ -321,7 +320,6 @@ public: void PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOffset); // only screen: - void DrawingSingle(const sal_uInt16 nLayer); void DrawSelectiveObjects(const sal_uInt16 nLayer); bool SetChangedClip(); // sal_False = not diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx index b2ef04cdbc30..763fa4f57d4a 100644 --- a/sc/source/ui/inc/undodraw.hxx +++ b/sc/source/ui/inc/undodraw.hxx @@ -36,7 +36,6 @@ public: ScUndoDraw( SfxUndoAction* pUndo, ScDocShell* pDocSh ); virtual ~ScUndoDraw() override; - SfxUndoAction* GetDrawUndo() { return pDrawUndo.get(); } SfxUndoAction* ReleaseDrawUndo() { return pDrawUndo.release(); } virtual void Undo() override; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index ff4d34fd7543..a0a20ae9b3ef 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1744,22 +1744,6 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false); } -void ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId ) -{ - ScDocument* pDoc = GetViewData().GetDocument(); - ScDPObject* pDPObj = pDoc->GetDPAtCursor(rPos.Col(), rPos.Row(), rPos.Tab()); - if (!pDPObj) - return; - - sal_uInt16 nOrientation; - long nDimIndex = pDPObj->GetHeaderDim(rPos, nOrientation); - if (nDimIndex < 0) - // Invalid dimension index. Bail out. - return; - - DataPilotSort(pDPObj, nDimIndex, bAscending, pUserListId); -} - bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) { bool bRet = false; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 2f344b0f0bc9..54ad1b0b9a1c 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -147,12 +147,6 @@ using namespace css; using namespace css::uno; -#define SC_AUTOFILTER_ALL 0 -#define SC_AUTOFILTER_TOP10 1 -#define SC_AUTOFILTER_CUSTOM 2 -#define SC_AUTOFILTER_EMPTY 3 -#define SC_AUTOFILTER_NOTEMPTY 4 - enum class ScFilterBoxMode { DataSelect, @@ -554,46 +548,6 @@ IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo&, rInfo, void ) pViewData->GetDispatcher().Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON ); } -void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelection, const OUString& rStr ) -{ - //! gridwin2 ? - - ScDocument* pDoc = pViewData->GetDocument(); - SCTAB nTab = pViewData->GetTabNo(); - ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab); - if ( pDPObj && nCol > 0 ) - { - // look for the dimension header left of the drop-down arrow - sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN; - long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient ); - if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE ) - { - ScDPSaveData aSaveData( *pDPObj->GetSaveData() ); - - bool bIsDataLayout; - OUString aDimName = pDPObj->GetDimName( nField, bIsDataLayout ); - if ( !bIsDataLayout ) - { - ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName); - - if ( bHasSelection ) - { - const OUString aName = rStr; - pDim->SetCurrentPage( &aName ); - } - else - pDim->SetCurrentPage( nullptr ); - - ScDPObject aNewObj( *pDPObj ); - aNewObj.SetSaveData( aSaveData ); - ScDBDocFunc aFunc( *pViewData->GetDocShell() ); - aFunc.DataPilotUpdate( pDPObj, &aNewObj, true, false ); - pViewData->GetView()->CursorPosChanged(); // shells may be switched - } - } - } -} - namespace { struct AutoFilterData : public ScCheckListMenuWindow::ExtendedData @@ -1250,130 +1204,6 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr } } -void ScGridWindow::ExecFilter( sal_uLong nSel, - SCCOL nCol, SCROW nRow, - const OUString& aValue ) -{ - SCTAB nTab = pViewData->GetTabNo(); - ScDocument* pDoc = pViewData->GetDocument(); - svl::SharedStringPool& rPool = pDoc->GetSharedStringPool(); - - ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab, ScDBDataPortion::AREA ); - if (pDBData) - { - ScQueryParam aParam; - pDBData->GetQueryParam( aParam ); // Can only return MAXQUERY entries - - if (SC_AUTOFILTER_CUSTOM == nSel) - { - SCTAB nAreaTab; - SCCOL nStartCol; - SCROW nStartRow; - SCCOL nEndCol; - SCROW nEndRow; - pDBData->GetArea( nAreaTab, nStartCol,nStartRow,nEndCol,nEndRow ); - pViewData->GetView()->MarkRange( ScRange( nStartCol,nStartRow,nAreaTab,nEndCol,nEndRow,nAreaTab)); - pViewData->GetView()->SetCursor(nCol,nRow); //! Also through Slot ?? - pViewData->GetDispatcher().Execute( SID_FILTER, SfxCallMode::SLOT | SfxCallMode::RECORD ); - } - else - { - bool bDeleteOld = false; - SCSIZE nQueryPos = 0; - bool bFound = false; - if (!aParam.bInplace) - bDeleteOld = true; - if (aParam.eSearchType != utl::SearchParam::SearchType::Normal) - bDeleteOld = true; - SCSIZE nCount = aParam.GetEntryCount(); - for (SCSIZE i = 0; i < nCount && !bDeleteOld; ++i) // current filter settings - if (aParam.GetEntry(i).bDoQuery) - { - //! Summaries DrawButtons query! - - ScQueryEntry& rEntry = aParam.GetEntry(i); - if (i>0) - if (rEntry.eConnect != SC_AND) - bDeleteOld = true; - - if (rEntry.nField == nCol) - { - if (bFound) // this column twice? - bDeleteOld = true; - nQueryPos = i; - bFound = true; - } - if (!bFound) - nQueryPos = i + 1; - } - - if (bDeleteOld) - { - SCSIZE nEC = aParam.GetEntryCount(); - for (SCSIZE i=0; i<nEC; i++) - aParam.GetEntry(i).Clear(); - nQueryPos = 0; - aParam.bInplace = true; - aParam.eSearchType = utl::SearchParam::SearchType::Normal; - } - - if ( nQueryPos < nCount || SC_AUTOFILTER_ALL == nSel ) // delete is always possible - { - if (nSel) - { - ScQueryEntry& rNewEntry = aParam.GetEntry(nQueryPos); - ScQueryEntry::Item& rItem = rNewEntry.GetQueryItem(); - rNewEntry.bDoQuery = true; - rNewEntry.nField = nCol; - rItem.meType = ScQueryEntry::ByString; - - if ( nSel == SC_AUTOFILTER_TOP10 ) - { - rNewEntry.eOp = SC_TOPVAL; - rItem.maString = rPool.intern("10"); - } - else if (nSel == SC_AUTOFILTER_EMPTY) - { - rNewEntry.SetQueryByEmpty(); - } - else if (nSel == SC_AUTOFILTER_NOTEMPTY) - { - rNewEntry.SetQueryByNonEmpty(); - } - else - { - rNewEntry.eOp = SC_EQUAL; - rItem.maString = rPool.intern(aValue); - } - if (nQueryPos > 0) - rNewEntry.eConnect = SC_AND; - } - else - { - if (bFound) - aParam.RemoveEntryByField(nCol); - } - - // end edit mode - like in ScCellShell::ExecuteDB - if ( pViewData->HasEditView( pViewData->GetActivePart() ) ) - { - SC_MOD()->InputEnterHandler(); - pViewData->GetViewShell()->UpdateInputHandler(); - } - - pViewData->GetView()->Query( aParam, nullptr, true ); - pDBData->SetQueryParam( aParam ); // save - } - else // "Too many conditions" - pViewData->GetView()->ErrorMessage( STR_FILTER_TOOMANY ); - } - } - else - { - OSL_FAIL("Where is the database range?"); - } -} - void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin ) { if (nButtonDown) diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 519bdbdb9c21..6368dfea5478 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -290,11 +290,6 @@ void ScOutputData::SetMetaFileMode( bool bNewMode ) bMetaFile = bNewMode; } -void ScOutputData::SetSingleGrid( bool bNewMode ) -{ - bSingleGrid = bNewMode; -} - void ScOutputData::SetSyntaxMode( bool bNewMode ) { mbSyntaxMode = bNewMode; diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 56a360e3e8b2..beb7e5fa532b 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -211,32 +211,4 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer) mpDev->SetDrawMode(nOldDrawMode); } -// parts only for the screen - -void ScOutputData::DrawingSingle(const sal_uInt16 nLayer) -{ - bool bHad = false; - SCSIZE nArrY; - for (nArrY=1; nArrY+1<nArrCount; nArrY++) - { - RowInfo* pThisRowInfo = &pRowInfo[nArrY]; - - if ( pThisRowInfo->bChanged ) - { - if (!bHad) - { - bHad = true; - } - } - else if (bHad) - { - DrawSelectiveObjects( nLayer ); - bHad = false; - } - } - - if (bHad) - DrawSelectiveObjects( nLayer ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index bdf391fe9436..23b1ec9532de 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -115,11 +115,6 @@ public: Rectangle aRect = m_pObject->GetLogicRect(); m_pViewShell->DoDPFieldPopup(aRect.TopLeft(), aRect.GetSize()); } - - virtual void SAL_CALL disposing() - { - m_pViewShell = nullptr; - } }; void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) |