include/sfx2/sidebar/EnumContext.hxx | 4 ---- sc/inc/column.hxx | 1 - sc/inc/document.hxx | 8 -------- sc/inc/formulacell.hxx | 1 - sc/inc/table.hxx | 4 ---- sc/source/core/data/column3.cxx | 9 --------- sc/source/core/data/documen8.cxx | 9 --------- sc/source/core/data/documen9.cxx | 8 -------- sc/source/core/data/document.cxx | 20 -------------------- sc/source/core/data/formulacell.cxx | 6 ------ sc/source/core/data/table2.cxx | 16 ---------------- sc/source/core/data/table6.cxx | 6 ------ sfx2/source/sidebar/Context.cxx | 24 ------------------------ sfx2/source/sidebar/Context.hxx | 4 ---- sfx2/source/sidebar/EnumContext.cxx | 28 ---------------------------- unusedcode.easy | 7 ------- 16 files changed, 155 deletions(-)
New commits: commit dbe081749d9c64c54fd19340a3696237a4ebdf20 Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 16:12:00 2014 +0200 remove unused code ScDocument::IsEmptyData(short, short) and the consequently unused code ScTable::IsEmptyData(short, short) Change-Id: I622de7c1118d61c0e434f80d1b7c41ace24c5592 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 4b777d0..5df7de2 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1764,11 +1764,6 @@ public: SC_DLLPUBLIC ScMacroManager* GetMacroManager(); - /** - * See if specified column has any non-empty cells. - */ - bool IsEmptyData( SCTAB nTab, SCCOL nCol ) const; - void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; /** diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 2290107..3f75563 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -514,8 +514,6 @@ public: 0; } - bool IsEmptyData( SCCOL nCol ) const; - void ResetChanged( const ScRange& rRange ); void SetDirty(); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index e5cf04e..9cf34e3 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -417,15 +417,6 @@ ScMacroManager* ScDocument::GetMacroManager() return mpMacroMgr.get(); } -bool ScDocument::IsEmptyData( SCTAB nTab, SCCOL nCol ) const -{ - const ScTable* pTab = FetchTable(nTab); - if (!pTab) - return true; - - return pTab->IsEmptyData(nCol); -} - void ScDocument::FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const { diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index a09cae1..5ac15da 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1782,14 +1782,6 @@ void ScTable::CalcAfterLoad( sc::CompileFormulaContext& rCxt ) aCol[i].CalcAfterLoad(rCxt); } -bool ScTable::IsEmptyData( SCCOL nCol ) const -{ - if (!ValidCol(nCol)) - return true; - - return aCol[nCol].IsEmptyData(); -} - void ScTable::ResetChanged( const ScRange& rRange ) { SCCOL nStartCol = rRange.aStart.Col(); diff --git a/unusedcode.easy b/unusedcode.easy index 3df9040..d9f5038 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -77,7 +77,6 @@ ScDBQueryDataIterator::DataAccessInternal::setPos(unsigned long) ScDPFilteredCache::SingleFilter::getMatchValue() const ScDocument::CreateFormatTable() const ScDocument::GetCellCount(short, short) const -ScDocument::IsEmptyData(short, short) const ScExtIButton::GetSelected() const ScFlatBoolRowSegments::getValue(int) ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short) commit 0a0290b25221265980a33c76a9897dafa9d16303 Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 16:07:51 2014 +0200 remove unused code ScDocument::CountNotes() Change-Id: Ic0f638f1e052b2d9117207f234d879638cbfc19a diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 863569a..4b777d0 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -912,7 +912,6 @@ public: SC_DLLPUBLIC ScPostIt* ReleaseNote(const ScAddress& rPos); SC_DLLPUBLIC ScPostIt* GetOrCreateNote(const ScAddress& rPos); SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos); - size_t CountNotes() const; size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const; /** diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 1bb6ae5..bd5dd1f 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -6215,18 +6215,6 @@ ScPostIt* ScDocument::CreateNote(const ScAddress& rPos) return pPostIt; } -size_t ScDocument::CountNotes() const -{ - size_t nCount = 0; - SCTAB nTabCount = GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - { - for (SCCOL nCol=0; nCol<MAXCOLCOUNT; nCol++) - nCount += GetNoteCount(nTab, nCol); - } - return nCount; -} - size_t ScDocument::GetNoteCount( SCTAB nTab, SCCOL nCol ) const { const ScTable* pTab = FetchTable(nTab); diff --git a/unusedcode.easy b/unusedcode.easy index 685d9d9..3df9040 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -75,7 +75,6 @@ ScColumn::SetRawString(sc::ColumnBlockPosition&, int, rtl::OUString const&, bool ScComplexRefData::IsDeleted() const ScDBQueryDataIterator::DataAccessInternal::setPos(unsigned long) ScDPFilteredCache::SingleFilter::getMatchValue() const -ScDocument::CountNotes() const ScDocument::CreateFormatTable() const ScDocument::GetCellCount(short, short) const ScDocument::IsEmptyData(short, short) const commit 10bf29702432f00d21c1b227d775907767d5888f Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 16:03:12 2014 +0200 remove unused code ScDocument::GetFormulaTokens and consequently unused code ScTable::GetFormulaTokens ScColumn::GetFormulaTokens Change-Id: Iad1fd45e67489bb8b0f9ed96a36b647e40e6f774 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 7f0c365..ba0fcd4 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -317,7 +317,6 @@ public: const EditTextObject* GetEditText( SCROW nRow ) const; void RemoveEditTextCharAttribs( SCROW nRow, const ScPatternAttr& rAttr ); void GetFormula( SCROW nRow, OUString& rFormula ) const; - const ScTokenArray* GetFormulaTokens( SCROW nRow ) const; const ScFormulaCell* GetFormulaCell( SCROW nRow ) const; ScFormulaCell* GetFormulaCell( SCROW nRow ); CellType GetCellType( SCROW nRow ) const; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 671c27f..863569a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -885,7 +885,6 @@ public: void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat ); void GetNumberFormatInfo( short& nType, sal_uLong& nIndex, const ScAddress& rPos ) const; - const ScTokenArray* GetFormulaTokens( const ScAddress& rPos ) const; SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const; SC_DLLPUBLIC ScFormulaCell* GetFormulaCell( const ScAddress& rPos ); SC_DLLPUBLIC void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rFormula ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index cd55ea9..2290107 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -370,7 +370,6 @@ public: const EditTextObject* GetEditText( SCCOL nCol, SCROW nRow ) const; void RemoveEditTextCharAttribs( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr ); void GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const; - const ScTokenArray* GetFormulaTokens( SCCOL nCol, SCROW nRow ) const; const ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow ) const; ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow ); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 5776ac9..b50536b 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2397,15 +2397,6 @@ void ScColumn::GetFormula( SCROW nRow, OUString& rFormula ) const rFormula = EMPTY_OUSTRING; } -const ScTokenArray* ScColumn::GetFormulaTokens( SCROW nRow ) const -{ - const ScFormulaCell* pCell = FetchFormulaCell(nRow); - if (!pCell) - return NULL; - - return pCell->GetCode(); -} - const ScFormulaCell* ScColumn::GetFormulaCell( SCROW nRow ) const { return FetchFormulaCell(nRow); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 963ffe6..1bb6ae5 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3502,14 +3502,6 @@ void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rForm } -const ScTokenArray* ScDocument::GetFormulaTokens( const ScAddress& rPos ) const -{ - if (!TableExists(rPos.Tab())) - return NULL; - - return maTabs[rPos.Tab()]->GetFormulaTokens(rPos.Col(), rPos.Row()); -} - const ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos ) const { if (!TableExists(rPos.Tab())) diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 88ffc1f..a09cae1 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1492,14 +1492,6 @@ void ScTable::GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const rFormula = OUString(); } -const ScTokenArray* ScTable::GetFormulaTokens( SCCOL nCol, SCROW nRow ) const -{ - if (!ValidColRow(nCol, nRow)) - return NULL; - - return aCol[nCol].GetFormulaTokens(nRow); -} - const ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow ) const { if (!ValidColRow(nCol, nRow)) diff --git a/unusedcode.easy b/unusedcode.easy index 29f0e16..685d9d9 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -78,7 +78,6 @@ ScDPFilteredCache::SingleFilter::getMatchValue() const ScDocument::CountNotes() const ScDocument::CreateFormatTable() const ScDocument::GetCellCount(short, short) const -ScDocument::GetFormulaTokens(ScAddress const&) const ScDocument::IsEmptyData(short, short) const ScExtIButton::GetSelected() const ScFlatBoolRowSegments::getValue(int) commit 8a6c9bc82d22b694a344db9102dd1b91044589d7 Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 16:00:46 2014 +0200 remove unused code ScDocument::RebuildFormulaGroups() and the consequently unused code ScTable::RebuildFormulaGroups() Change-Id: Ic7dfb7420c7cc4ca52c4ed4fe580fbb499ab53b6 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 6bb74e2..671c27f 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1873,7 +1873,6 @@ public: SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true ); void ClearFormulaTree(); - SC_DLLPUBLIC void RebuildFormulaGroups(); void AppendToFormulaTrack( ScFormulaCell* pCell ); void RemoveFromFormulaTrack( ScFormulaCell* pCell ); void TrackFormulas( sal_uLong nHintId = SC_HINT_DATACHANGED ); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 563f17d..cd55ea9 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1021,7 +1021,6 @@ private: void CompileDBFormula( sc::CompileFormulaContext& rCxt, bool bCreateFormulaString ); void CompileNameFormula( sc::CompileFormulaContext& rCxt, bool bCreateFormulaString ); void CompileColRowNameFormula( sc::CompileFormulaContext& rCxt ); - void RebuildFormulaGroups(); void StartListening( const ScAddress& rAddress, SvtListener* pListener ); void EndListening( const ScAddress& rAddress, SvtListener* pListener ); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 9ceb12b..816a597 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -692,12 +692,4 @@ void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine ) rEngine.SetKernAsianPunctuation( GetAsianKerning() ); } -void ScDocument::RebuildFormulaGroups() -{ - SCTAB nTab; - for (nTab=0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++) - if (maTabs[nTab]) - maTabs[nTab]->RebuildFormulaGroups(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index c544bec..4e97590 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -1025,10 +1025,4 @@ bool ScTable::SearchRangeForAllEmptyCells( return bFound; } -void ScTable::RebuildFormulaGroups() -{ - for (SCCOL i=0; i<=MAXCOL; i++) - aCol[i].RegroupFormulaCells(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index 29d0d53b6..29f0e16 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -80,7 +80,6 @@ ScDocument::CreateFormatTable() const ScDocument::GetCellCount(short, short) const ScDocument::GetFormulaTokens(ScAddress const&) const ScDocument::IsEmptyData(short, short) const -ScDocument::RebuildFormulaGroups() ScExtIButton::GetSelected() const ScFlatBoolRowSegments::getValue(int) ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short) commit 9bfbaa5864ae1ceeb932e8d6105c57c1f7bf1015 Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 15:51:13 2014 +0200 remove unused code ScFormulaCell::HasColRowName() Change-Id: I907492e1385f76d27cc8559d599f518d3b91f75d diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 274548b..42e00a9 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -241,7 +241,6 @@ public: */ bool HasRefListExpressibleAsOneReference(ScRange& rRange) const; bool HasRelNameReference() const; - bool HasColRowName() const; bool UpdateReference( const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL, const ScAddress* pUndoCellPos = NULL ); diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 0540e88..a872e91 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2442,12 +2442,6 @@ bool ScFormulaCell::HasRelNameReference() const return false; } -bool ScFormulaCell::HasColRowName() const -{ - pCode->Reset(); - return (pCode->GetNextColRowName() != NULL); -} - bool ScFormulaCell::UpdatePosOnShift( const sc::RefUpdateContext& rCxt ) { if (rCxt.meMode != URM_INSDEL) diff --git a/unusedcode.easy b/unusedcode.easy index 9541d5c..29d0d53b6 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -83,7 +83,6 @@ ScDocument::IsEmptyData(short, short) const ScDocument::RebuildFormulaGroups() ScExtIButton::GetSelected() const ScFlatBoolRowSegments::getValue(int) -ScFormulaCell::HasColRowName() const ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short) ScGridWindow::HasScenarioRange(unsigned short, int, ScRange&) ScMyNotEmptyCellsIterator::GetCell() const commit d7f3dced121ea29f333594bc7a459e564f67f2fc Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 25 15:28:04 2014 +0200 remove unused code in sfx2::sidebar removes these methods: sfx2::sidebar::Context::EvaluateMatch(std::vector<sfx2::sidebar::Context>) sfx2::sidebar::EnumContext::EvaluateMatch(std::vector<sfx2::sidebar::EnumContext>) Change-Id: I14314d526a5306530d0381ca8bf6ab150d3dd5a0 diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx index 1dec8ca..2eff3cf 100644 --- a/include/sfx2/sidebar/EnumContext.hxx +++ b/include/sfx2/sidebar/EnumContext.hxx @@ -142,10 +142,6 @@ public: */ sal_Int32 EvaluateMatch (const EnumContext& rOther) const; - /** Return the best match against the given list of contexts. - */ - sal_Int32 EvaluateMatch (const ::std::vector<EnumContext>& rOthers) const; - static Application GetApplicationEnum (const ::rtl::OUString& rsApplicationName); static const ::rtl::OUString& GetApplicationName (const Application eApplication); diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx index c5c9ae3..df0d43c 100644 --- a/sfx2/source/sidebar/Context.cxx +++ b/sfx2/source/sidebar/Context.cxx @@ -69,30 +69,6 @@ sal_Int32 Context::EvaluateMatch ( -sal_Int32 Context::EvaluateMatch (const ::std::vector<Context>& rOthers) const -{ - sal_Int32 nBestMatch (NoMatch); - - for (::std::vector<Context>::const_iterator - iContext(rOthers.begin()), - iEnd(rOthers.end()); - iContext!=iEnd; - ++iContext) - { - const sal_Int32 nMatch (EvaluateMatch(*iContext)); - if (nMatch < nBestMatch) - { - if (nMatch == OptimalMatch) - { - // We will find no better match so stop searching. - return OptimalMatch; - } - nBestMatch = nMatch; - } - } - return nBestMatch; -} - diff --git a/sfx2/source/sidebar/Context.hxx b/sfx2/source/sidebar/Context.hxx index f2cabed..12ca19b 100644 --- a/sfx2/source/sidebar/Context.hxx +++ b/sfx2/source/sidebar/Context.hxx @@ -52,10 +52,6 @@ public: */ sal_Int32 EvaluateMatch (const Context& rOther) const; - /** Return the best match against the given list of contexts. - */ - sal_Int32 EvaluateMatch (const ::std::vector<Context>& rOthers) const; - bool operator== (const Context& rOther) const; bool operator!= (const Context& rOther) const; }; diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx index 5d7a337..07ea96c 100644 --- a/sfx2/source/sidebar/EnumContext.cxx +++ b/sfx2/source/sidebar/EnumContext.cxx @@ -310,34 +310,6 @@ sal_Int32 EnumContext::EvaluateMatch ( } - - -sal_Int32 EnumContext::EvaluateMatch (const ::std::vector<EnumContext>& rOthers) const -{ - sal_Int32 nBestMatch (NoMatch); - - for (::std::vector<EnumContext>::const_iterator - iContext(rOthers.begin()), - iEnd(rOthers.end()); - iContext!=iEnd; - ++iContext) - { - const sal_Int32 nMatch (EvaluateMatch(*iContext)); - if (nMatch < nBestMatch) - { - if (nMatch == OptimalMatch) - { - // We will find no better match so stop searching. - return OptimalMatch; - } - nBestMatch = nMatch; - } - } - return nBestMatch; -} - - - } } // end of namespace sfx2::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index ea96b61..9541d5c 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -323,10 +323,8 @@ sd::presenter::PresenterCanvas::copyRect(com::sun::star::uno::Reference<com::sun sdr::overlay::OverlayRectangle::setSecondPosition(basegfx::B2DPoint const&) sdr::table::Cell::getName() sdr::table::SdrTableObj::getRowCount() const -sfx2::sidebar::Context::EvaluateMatch(std::vector<sfx2::sidebar::Context, std::allocator<sfx2::sidebar::Context> > const&) const sfx2::sidebar::ContextList::IsEmpty() sfx2::sidebar::Deck::PrintWindowTree(std::vector<sfx2::sidebar::Panel*, std::allocator<sfx2::sidebar::Panel*> > const&) -sfx2::sidebar::EnumContext::EvaluateMatch(std::vector<sfx2::sidebar::EnumContext, std::allocator<sfx2::sidebar::EnumContext> > const&) const sfx2::sidebar::EnumContext::GetContext() const sfx2::sidebar::Paint::Set(sfx2::sidebar::Paint const&) sfx2::sidebar::Panel::PrintWindowTree() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits