diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-05 15:58:18 +0800 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-05 18:21:07 +0400 |
commit | e99c70d2687ec6768070bc3ed7ee73ed9bbad196 (patch) | |
tree | 2e9114612a3cd4f10a13f51189c538c9e9b81391 | |
parent | Fixed cppcheck messages about rethrowing copy of exception. (diff) | |
download | core-e99c70d2687ec6768070bc3ed7ee73ed9bbad196.tar.gz core-e99c70d2687ec6768070bc3ed7ee73ed9bbad196.zip |
Remove unused code
-rw-r--r-- | sc/inc/dociter.hxx | 1 | ||||
-rw-r--r-- | sc/inc/dpshttab.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/dociter.cxx | 27 | ||||
-rw-r--r-- | sc/source/core/data/dpshttab.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLStylesImportHelper.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLStylesImportHelper.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/datauno.cxx | 12 | ||||
-rw-r--r-- | svtools/inc/svtools/scrwin.hxx | 9 | ||||
-rw-r--r-- | svtools/source/control/scrwin.cxx | 72 | ||||
-rw-r--r-- | unusedcode.easy | 13 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbacolorformat.cxx | 6 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbacolorformat.hxx | 1 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbalineformat.cxx | 6 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbalineformat.hxx | 1 |
14 files changed, 1 insertions, 175 deletions
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 7ea23a529d83..febd04159752 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -475,7 +475,6 @@ public: bool bSTotal = false, bool bTextAsZero = false ); ~ScHorizontalValueIterator(); - void GetCurNumFmtInfo( short& nType, sal_uLong& nIndex ); /// Does NOT reset rValue if no value found! bool GetNext( double& rValue, sal_uInt16& rErr ); }; diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx index 825513547df3..7264f0cdbdc3 100644 --- a/sc/inc/dpshttab.hxx +++ b/sc/inc/dpshttab.hxx @@ -87,7 +87,6 @@ public: * returned. */ sal_uLong CheckSourceRange() const; - long GetCacheId() const; private: mutable ScRange maSourceRange; diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index a01d9f4ecfdd..86a4d7c923ed 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1908,33 +1908,6 @@ bool ScHorizontalValueIterator::GetNext( double& rValue, sal_uInt16& rErr ) return bFound; } -void ScHorizontalValueIterator::GetCurNumFmtInfo( short& nType, sal_uLong& nIndex ) -{ - if (!bNumValid) - { - const ScColumn* pCol = &(pDoc->maTabs[nCurTab])->aCol[nCurCol]; - nNumFmtIndex = pCol->GetNumberFormat( nCurRow ); - if ( (nNumFmtIndex % SV_COUNTRY_LANGUAGE_OFFSET) == 0 ) - { - const ScBaseCell* pCell; - SCSIZE nCurIndex; - if ( pCol->Search( nCurRow, nCurIndex ) ) - pCell = pCol->maItems[nCurIndex].pCell; - else - pCell = NULL; - if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) - ((const ScFormulaCell*)pCell)->GetFormatInfo( nNumFmtType, nNumFmtIndex ); - else - nNumFmtType = pDoc->GetFormatTable()->GetType( nNumFmtIndex ); - } - else - nNumFmtType = pDoc->GetFormatTable()->GetType( nNumFmtIndex ); - bNumValid = true; - } - nType = nNumFmtType; - nIndex = nNumFmtIndex; -} - //------------------------------------------------------------------------------- ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB nTable, diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 40a0d439e5da..941e6292990d 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -325,11 +325,6 @@ const ScDPCache* ScSheetSourceDesc::CreateCache() const return rCaches.getCache(GetSourceRange()); } -long ScSheetSourceDesc::GetCacheId() const -{ - return -1; -} - sal_uLong ScSheetSourceDesc::CheckSourceRange() const { if (!mpDoc) diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx index 9610eaa60526..471e5310a919 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx @@ -215,22 +215,6 @@ void ScMyStyleRanges::SetStylesToRanges(const list<ScRange>& rRanges, rImport.SetStyleToRange(*itr, pStyleName, nCellType, pCurrency); } -void ScMyStyleRanges::SetStylesToRanges(ScRangeList* pList, - const rtl::OUString* pStyleName, const sal_Int16 nCellType, - const rtl::OUString* pCurrency, ScXMLImport& rImport) -{ - for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i) - rImport.SetStyleToRange( *(*pList)[i], pStyleName, nCellType, pCurrency ); -} - -void ScMyStyleRanges::SetStylesToRanges(ScRangeListRef xList, - const rtl::OUString* pStyleName, const sal_Int16 nCellType, - const rtl::OUString* pCurrency, ScXMLImport& rImport) -{ - for (size_t i = 0, nCount = xList->size(); i < nCount; ++i) - rImport.SetStyleToRange( *(*xList)[i], pStyleName, nCellType, pCurrency ); -} - void ScMyStyleRanges::SetStylesToRanges(const rtl::OUString* pStyleName, ScXMLImport& rImport) { if (mpNumberList) diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index 2d4eab985498..3f8b90b65232 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -108,12 +108,6 @@ class ScMyStyleRanges : public SvRefBase void SetStylesToRanges(const ::std::list<ScRange>& rList, const rtl::OUString* pStyleName, const sal_Int16 nCellType, const rtl::OUString* pCurrency, ScXMLImport& rImport); - void SetStylesToRanges(ScRangeList* pList, - const rtl::OUString* pStyleName, const sal_Int16 nCellType, - const rtl::OUString* pCurrency, ScXMLImport& rImport); - void SetStylesToRanges(ScRangeListRef xList, - const rtl::OUString* pStyleName, const sal_Int16 nCellType, - const rtl::OUString* pCurrency, ScXMLImport& rImport); public: ScMyStyleRanges(); ~ScMyStyleRanges(); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 3695f1440425..125ac54ad5ed 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -607,18 +607,6 @@ ScSubTotalDescriptorBase::~ScSubTotalDescriptorBase() { } -// GetData/PutData hier nur wegen NewInstance-Krempel implementiert... - -void ScSubTotalDescriptorBase::GetData( ScSubTotalParam& /* rParam */ ) const -{ - OSL_FAIL("ScSubTotalDescriptorBase::GetData soll nicht gerufen werden"); -} - -void ScSubTotalDescriptorBase::PutData( const ScSubTotalParam& /* rParam */ ) -{ - OSL_FAIL("ScSubTotalDescriptorBase::PutData soll nicht gerufen werden"); -} - // XSubTotalDesctiptor ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 nIndex) diff --git a/svtools/inc/svtools/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx index f81b60d446de..f38ec0161464 100644 --- a/svtools/inc/svtools/scrwin.hxx +++ b/svtools/inc/svtools/scrwin.hxx @@ -75,8 +75,6 @@ private: public: ScrollableWindow( Window* pParent, WinBits nBits = 0, ScrollableWindowFlags = SCRWIN_DEFAULT ); - ScrollableWindow( Window* pParent, const ResId& rId, - ScrollableWindowFlags = SCRWIN_DEFAULT ); virtual void Resize(); virtual void Command( const CommandEvent& rCEvt ); @@ -92,16 +90,11 @@ public: void SetTotalSize( const Size& rNewSize ); Size GetTotalSize() { return PixelToLogic( aTotPixSz ); } - void SetVisibleSize( const Size& rNewSize ); - sal_Bool MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy = sal_False ); + sal_Bool MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy = sal_False ); Rectangle GetVisibleArea() const; - void SetLineSize( sal_uLong nHorz, sal_uLong nVert ); using Window::Scroll; virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 ); - void ScrollLines( long nLinesX, long nLinesY ); - void ScrollPages( long nPagesX, sal_uLong nOverlapX, - long nPagesY, sal_uLong nOverlapY ); private: SVT_DLLPRIVATE Size GetOutputSizePixel() const; diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index e14e0670a437..a60833b5a2fb 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -60,18 +60,6 @@ ScrollableWindow::ScrollableWindow( Window* pParent, WinBits nBits, ImpInitialize( nFlags ); } -//------------------------------------------------------------------- - -ScrollableWindow::ScrollableWindow( Window* pParent, const ResId& rId, - ScrollableWindowFlags nFlags ) : - Window( pParent, rId ), - aVScroll( this, WinBits(WB_VSCROLL | WB_DRAG) ), - aHScroll( this, WinBits(WB_HSCROLL | WB_DRAG) ), - aCornerWin( this ) -{ - ImpInitialize( nFlags ); -} - // ----------------------------------------------------------------------- void ScrollableWindow::Command( const CommandEvent& rCEvt ) @@ -341,37 +329,6 @@ void ScrollableWindow::SetTotalSize( const Size& rNewSize ) //------------------------------------------------------------------- -void ScrollableWindow::SetVisibleSize( const Size& rNewSize ) -{ - // get the rectangle, we wish to view - Rectangle aWish( Point(0, 0), LogicToPixel(rNewSize) ); - - // get maximum rectangle for us from our parent-window (subst our border!) - Rectangle aMax( Point(0, 0), GetParent()->GetOutputSizePixel() ); - aMax.Left() -= ( Window::GetSizePixel().Width() - - Window::GetOutputSizePixel().Width() ); - aMax.Bottom() -= (Window::GetSizePixel().Height() - - Window::GetOutputSizePixel().Height()); - - Size aWill( aWish.GetIntersection(aMax).GetSize() ); - sal_Bool bHScroll = sal_False; - const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); - if ( aWill.Width() < aWish.GetSize().Width() ) - { bHScroll = sal_True; - aWill.Height() = - Min( aWill.Height()+nScrSize, aMax.GetSize().Height() ); - } - if ( aWill.Height() < aWish.GetSize().Height() ) - aWill.Width() = - Min( aWill.Width()+nScrSize, aMax.GetSize().Width() ); - if ( !bHScroll && (aWill.Width() < aWish.GetSize().Width()) ) - aWill.Height() = - Min( aWill.Height()+nScrSize, aMax.GetSize().Height() ); - Window::SetOutputSizePixel( aWill ); -} - -//------------------------------------------------------------------- - sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy ) { Rectangle aTarget; @@ -464,17 +421,6 @@ Rectangle ScrollableWindow::GetVisibleArea() const //------------------------------------------------------------------- -void ScrollableWindow::SetLineSize( sal_uLong nHorz, sal_uLong nVert ) -{ - Size aPixSz( LogicToPixel( Size(nHorz, nVert) ) ); - nColumnPixW = aPixSz.Width(); - nLinePixH = aPixSz.Height(); - aVScroll.SetLineSize( nLinePixH ); - aHScroll.SetLineSize( nColumnPixW ); -} - -//------------------------------------------------------------------- - void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 ) { if ( !bScrolling ) @@ -550,23 +496,5 @@ void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 ) } } -//------------------------------------------------------------------- - -void ScrollableWindow::ScrollLines( long nLinesX, long nLinesY ) -{ - Size aDelta( PixelToLogic( Size( nColumnPixW, nLinePixH ) ) ); - Scroll( aDelta.Width()*nLinesX, aDelta.Height()*nLinesY ); -} - -//------------------------------------------------------------------- - -void ScrollableWindow::ScrollPages( long nPagesX, sal_uLong nOverlapX, - long nPagesY, sal_uLong nOverlapY ) -{ - Size aOutSz( GetVisibleArea().GetSize() ); - Scroll( nPagesX * aOutSz.Width() + (nPagesX>0 ? 1 : -1) * nOverlapX, - nPagesY * aOutSz.Height() + (nPagesY>0 ? 1 : -1) * nOverlapY ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index 6800b9eaee81..48f9415d0044 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -168,10 +168,7 @@ ScHTMLColOffset::Remove(unsigned long const&, unsigned short) ScHTMLColOffset_SAR::Replace(unsigned long const&, unsigned short) ScHTMLColOffset_SAR::Replace(unsigned long const*, unsigned short, unsigned short) ScHTMLColOffset_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*) -ScHorizontalValueIterator::GetCurNumFmtInfo(short&, unsigned long&) ScMyCellInfo::ScMyCellInfo() -ScMyStyleRanges::SetStylesToRanges(ScRangeList*, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport&) -ScMyStyleRanges::SetStylesToRanges(ScRangeListRef, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport&) ScNameDefDlg::LinkStubEdModifyHdl(void*, void*) ScNamedRangeObj::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>) ScOutputData::DrawEditParam::getEngineWidth(ScFieldEditEngine*) const @@ -183,11 +180,8 @@ ScRTFColTwips_SAR::Replace(unsigned long const&, unsigned short) ScRTFColTwips_SAR::Replace(unsigned long const*, unsigned short, unsigned short) ScRTFColTwips_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*) ScRangeData::ScRangeData(unsigned short) -ScSheetSourceDesc::GetCacheId() const ScSimpleRangeList::Range::contains(ScSimpleRangeList::Range const&) const ScStringCell::ScStringCell() -ScSubTotalDescriptorBase::GetData(ScSubTotalParam&) const -ScSubTotalDescriptorBase::PutData(ScSubTotalParam const&) ScUserList::end() ScUserList::end() const ScValidationEntries_Impl::Insert(ScValidationData* const&, unsigned short&) @@ -196,22 +190,15 @@ ScValidationEntries_Impl::Insert(ScValidationEntries_Impl const*, unsigned short ScValidationEntries_Impl::Remove(ScValidationData* const&, unsigned short) ScValidationEntries_Impl::Remove(unsigned short, unsigned short) ScValueCell::ScValueCell() -ScVbaColorFormat::setColorFormat(short) ScVbaFormat<ooo::vba::excel::XRange>::getXServiceInfo() ScVbaFormat<ooo::vba::excel::XRange>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&) ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::getXServiceInfo() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) ScVbaFormat<ooo::vba::excel::XStyle>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&) -ScVbaLineFormat::calculateArrowheadSize() const ScaList::Insert(void*, unsigned int) ScrollBarBox::ScrollBarBox(Window*, ResId const&) ScrollableWindow::MakeVisible(Rectangle const&, unsigned char) -ScrollableWindow::ScrollLines(long, long) -ScrollableWindow::ScrollPages(long, unsigned long, long, unsigned long) -ScrollableWindow::ScrollableWindow(Window*, ResId const&, unsigned short) -ScrollableWindow::SetLineSize(unsigned long, unsigned long) -ScrollableWindow::SetVisibleSize(Size const&) SdFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) SectReprArr::Insert(SectRepr* const&, unsigned short&) SectReprArr::Insert(SectRepr* const*, unsigned short) diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx index 19cf96e71135..1764adae7672 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.cxx +++ b/vbahelper/source/vbahelper/vbacolorformat.cxx @@ -63,12 +63,6 @@ ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< XHelperInterface >& xP } } -void -ScVbaColorFormat::setColorFormat( sal_Int16 _ntype ) -{ - m_nColorFormatType = _ntype; -} - // Attribute sal_Int32 SAL_CALL ScVbaColorFormat::getRGB() throw (uno::RuntimeException) diff --git a/vbahelper/source/vbahelper/vbacolorformat.hxx b/vbahelper/source/vbahelper/vbacolorformat.hxx index c0e023dc5ce7..351012f88c2a 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.hxx +++ b/vbahelper/source/vbahelper/vbacolorformat.hxx @@ -111,7 +111,6 @@ private: protected: virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); - void setColorFormat( sal_Int16 nType ); public: ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType ); diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx index 4a66960763dc..2366f7705c7e 100644 --- a/vbahelper/source/vbahelper/vbalineformat.cxx +++ b/vbahelper/source/vbahelper/vbalineformat.cxx @@ -45,12 +45,6 @@ ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& } sal_Int32 -ScVbaLineFormat::calculateArrowheadSize() const -{ - return 0; -} - -sal_Int32 ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName ) { sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone; diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx index 4e74ae827227..330fe8af54fc 100644 --- a/vbahelper/source/vbahelper/vbalineformat.hxx +++ b/vbahelper/source/vbahelper/vbalineformat.hxx @@ -47,7 +47,6 @@ protected: virtual css::uno::Sequence<rtl::OUString> getServiceNames(); sal_Int32 convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName ); rtl::OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException); - sal_Int32 calculateArrowheadSize() const; public: ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape ); |