diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-18 16:35:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-24 08:27:56 +0000 |
commit | 3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (patch) | |
tree | b281c279936763f21a9f07047246dfdc72e8d4fe /sc/source/ui | |
parent | 2c8e66129f14c6d0b9174d27546e233b3995d8d4 (diff) |
loplugin:unusedmethods in sc
Change-Id: Ic378126a30be853d10fe174c451cee3c6ded404f
Reviewed-on: https://gerrit.libreoffice.org/25109
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 23 | ||||
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 70 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleSpreadsheet.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleText.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/anyrefdg.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/imoptdlg.hxx | 21 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 9 |
9 files changed, 0 insertions, 141 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 75904774d971..17eb94d2ca80 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -737,29 +737,6 @@ ScAccessibleTextData* ScAccessibleCellTextData::Clone() const return new ScAccessibleCellTextData( mpViewShell, aCellPos, meSplitPos, mpAccessibleCell ); } -void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, OUString& rText) -{ -// #104893#; don't use the input string -// ScCellTextData::GetCellText(rCellPos, rText); - ScDocument& rDoc = pDocShell->GetDocument(); - // #104893#; use the displayed string - rText = rDoc.GetString(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab()); - if (mpViewShell) - { - const ScViewOptions& aOptions = mpViewShell->GetViewData().GetOptions(); - ScRefCellValue aCell(rDoc, ScAddress(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab())); - if (aCell.meType == CELLTYPE_FORMULA && aOptions.GetOption( VOPT_FORMULAS )) - { - aCell.mpFormula->GetFormula(rText); - } - else if (!aOptions.GetOption( VOPT_NULLVALS )) - { - if ((aCell.meType == CELLTYPE_VALUE || aCell.meType == CELLTYPE_FORMULA) && aCell.getValue() == 0.0) - rText.clear(); - } - } -} - SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder() { ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 1cfb393587a9..2bf014a9ff09 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1528,13 +1528,6 @@ void ScTabStops::CycleFocus( bool bReverse ) // else : all controls are disabled, so can't do anything } -vcl::Window* ScTabStops::GetCurrentControl() -{ - if ( mnCurTabStop >= maControls.size() ) - return nullptr; - return maControls[mnCurTabStop]; -} - void ScTabStops::clear() { mnCurTabStop = 0; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 471ff0086707..6d31312bc42d 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1455,76 +1455,6 @@ static FormulaToken* convertToToken( ScDocument* pHostDoc, ScDocument* pSrcDoc, return nullptr; } -template<class T> -struct ColumnBatch -{ - ScDocument* mpHostDoc; - ScDocument* mpSrcDoc; - - std::vector<T> maStorage; - CellType meType1; - CellType meType2; - SCROW mnRowStart; - - ColumnBatch( ScDocument* pHostDoc, ScDocument* pSrcDoc, CellType eType1, CellType eType2 ) : - mpHostDoc(pHostDoc), - mpSrcDoc(pSrcDoc), - meType1(eType1), - meType2(eType2), - mnRowStart(-1) {} - - void update(ScRefCellValue& raCell, const SCCOL nCol, const SCROW nRow, ScMatrixRef& xMat) - { - if (raCell.meType == meType1 || raCell.meType == meType2) - { - if (mnRowStart < 0) - mnRowStart = nRow; - maStorage.push_back(getValue(raCell)); - } - else - { - flush(nCol, xMat); - } - } - - void flush(const SCCOL nCol, ScMatrixRef& xMat) - { - if (maStorage.empty()) - return; - putValues(xMat, nCol); - mnRowStart = -1; - maStorage.clear(); - } - - T getValue(ScRefCellValue& raCell) const; - void putValues(ScMatrixRef& xMat, const SCCOL nCol) const; -}; - -template<> -inline svl::SharedString ColumnBatch<svl::SharedString>::getValue(ScRefCellValue& rCell) const -{ - OUString aStr = rCell.getString(mpSrcDoc); - return mpHostDoc->GetSharedStringPool().intern(aStr); -} - -template<class T> -inline T ColumnBatch<T>::getValue(ScRefCellValue& raCell) const -{ - return raCell.mfValue; -} - -template<> -inline void ColumnBatch<svl::SharedString>::putValues(ScMatrixRef& xMat, const SCCOL nCol) const -{ - xMat->PutString(&maStorage.front(), maStorage.size(), nCol, mnRowStart); -} - -template<class T> -inline void ColumnBatch<T>::putValues(ScMatrixRef& xMat, const SCCOL nCol) const -{ - xMat->PutDouble(&maStorage.front(), maStorage.size(), nCol, mnRowStart); -} - static std::unique_ptr<ScTokenArray> convertToTokenArray( ScDocument* pHostDoc, ScDocument* pSrcDoc, ScRange& rRange, vector<ScExternalRefCache::SingleRangeData>& rCacheData ) { diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 9ff0c09588d9..c4fb374ebff1 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -35,7 +35,6 @@ class ScMyAddress : public ScAddress { public: - ScMyAddress() : ScAddress() {} ScMyAddress(SCCOL nColP, SCROW nRowP, SCTAB nTabP) : ScAddress(nColP, nRowP, nTabP) {} ScMyAddress(const ScAddress& rAddress) : ScAddress(rAddress) {} diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 8dfea5162682..0bea5fae1145 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -91,8 +91,6 @@ public: virtual SvxViewForwarder* GetViewForwarder() override; virtual SvxEditViewForwarder* GetEditViewForwarder( bool bCreate ) override; -protected: - virtual void GetCellText(const ScAddress& rCellPos, OUString& rText) override; private: ScViewForwarder* mpViewForwarder; ScEditViewForwarder* mpEditViewForwarder; diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 20d58591cb86..2ff1edf9327f 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -257,12 +257,6 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase< TBase, bBindRef > struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog> { - template<class T1, class T2, class T3, class T4> - ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4 ) - : ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4) - { - } - template<class T1, class T2, class T3, class T4, class T5> ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4, const T5& rt5 ) : ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4, rt5) diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 8824acb17534..4f1b5cd93ec0 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -215,7 +215,6 @@ public: void AddTabStop( vcl::Window* pWin ); void SetTabStop( vcl::Window* pWin ); void CycleFocus( bool bReverse = false ); - vcl::Window* GetCurrentControl(); void clear(); }; @@ -377,7 +376,6 @@ private: void packWindow(); void setAllMemberState(bool bSet); void selectCurrentMemberOnly(bool bSet); - void cycleFocus(bool bReverse = false); DECL_LINK_TYPED( ButtonHdl, Button*, void ); DECL_LINK_TYPED( TriStateHdl, Button*, void ); diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index 44d31c1b0332..82ecf28d155b 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -32,34 +32,13 @@ class SC_DLLPUBLIC ScImportOptions { public: - ScImportOptions() - : nFieldSepCode(0), nTextSepCode(0), - eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false), - bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) - {} ScImportOptions( const OUString& rStr ); - ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const OUString& rStr ) - : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr), - bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) - { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } - ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) { SetTextEncoding( nEnc ); } - ScImportOptions( const ScImportOptions& rCpy ) - : nFieldSepCode (rCpy.nFieldSepCode), - nTextSepCode (rCpy.nTextSepCode), - aStrFont (rCpy.aStrFont), - eCharSet (rCpy.eCharSet), - bFixedWidth (rCpy.bFixedWidth), - bSaveAsShown (rCpy.bSaveAsShown), - bQuoteAllText (rCpy.bQuoteAllText), - bSaveFormulas (rCpy.bSaveFormulas) - {} - ScImportOptions& operator=( const ScImportOptions& rCpy ) { nFieldSepCode = rCpy.nFieldSepCode; diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index f52b030f9e45..3c9cbf318a66 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -935,15 +935,6 @@ ScCellEditSource* ScCellTextData::GetOriginalSource() return pOriginalSource; } -void ScCellTextData::GetCellText(const ScAddress& rCellPos, OUString& rText) -{ - if (pDocShell) - { - ScDocument& rDoc = pDocShell->GetDocument(); - rDoc.GetInputString( rCellPos.Col(), rCellPos.Row(), rCellPos.Tab(), rText ); - } -} - SvxTextForwarder* ScCellTextData::GetTextForwarder() { if (!pEditEngine) |