From 875c997c7da116402509d0bd75e8c15a66a40529 Mon Sep 17 00:00:00 2001 From: Jean-Noël Rouvignac Date: Wed, 6 Feb 2013 14:47:47 +0100 Subject: fdo#39446 - Bloat Removal. Removing uncallable code with callcatcher Removed several unused methods. Could not remove ScVbaFormat::getAddIndent() and ScVbaFormat::setAddIndent(com::sun::star::uno::Any const&) because it breaks compilation (they are implementing pure virtual methods). Should Test::test1Table1Page() really be removed? (test class) Conflicts: unusedcode.easy Change-Id: I98a761f66f28e3a82661c10a5fa1dc7e109fff2f --- editeng/inc/editeng/editobj.hxx | 2 - editeng/source/editeng/editobj.cxx | 10 ---- l10ntools/inc/po.hxx | 1 - l10ntools/source/po.cxx | 7 --- sfx2/inc/sfx2/templateabstractview.hxx | 2 - sfx2/source/control/templateabstractview.cxx | 5 -- tools/inc/tools/line.hxx | 1 - tools/source/generic/line.cxx | 57 ---------------------- unusedcode.easy | 14 +----- vcl/inc/outfont.hxx | 2 - vcl/inc/vcl/settings.hxx | 1 - vcl/inc/vcl/svapp.hxx | 1 - vcl/source/app/settings.cxx | 6 --- vcl/source/app/svapp.cxx | 6 --- vcl/source/gdi/outdev3.cxx | 8 --- .../inc/resourcemodel/WW8ResourceModel.hxx | 2 - writerfilter/source/resourcemodel/util.cxx | 20 -------- writerfilter/source/rtftok/rtfsprm.cxx | 7 --- writerfilter/source/rtftok/rtfsprm.hxx | 1 - .../xmlsec/mscrypt/sanextension_mscryptimpl.cxx | 26 ---------- .../source/xmlsec/nss/sanextension_nssimpl.cxx | 26 ---------- 21 files changed, 1 insertion(+), 204 deletions(-) diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index 271a39b2c84f..bfce8fdf7aa3 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -96,14 +96,12 @@ public: void GetCharAttribs( sal_uInt16 nPara, std::vector& rLst ) const; bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); - bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); bool IsFieldObject() const; const SvxFieldItem* GetField() const; bool HasField( sal_Int32 nType = com::sun::star::text::textfield::Type::UNSPECIFIED ) const; const SfxItemSet& GetParaAttribs(size_t nPara) const; - void SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs); void GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const; void SetStyleSheet(size_t nPara, const String& rName, const SfxStyleFamily& eFamily); diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 34b91b771fdb..ea12ecab4c23 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -266,21 +266,11 @@ const SfxItemSet& EditTextObject::GetParaAttribs(size_t nPara) const return mpImpl->GetParaAttribs(nPara); } -void EditTextObject::SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs) -{ - mpImpl->SetParaAttribs(nPara, rAttribs); -} - bool EditTextObject::RemoveCharAttribs( sal_uInt16 nWhich ) { return mpImpl->RemoveCharAttribs(nWhich); } -bool EditTextObject::RemoveParaAttribs( sal_uInt16 nWhich ) -{ - return mpImpl->RemoveParaAttribs(nWhich); -} - void EditTextObject::GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const { mpImpl->GetStyleSheet(nPara, rName, eFamily); diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx index a84b5a0a58a2..f3f6d6db8c69 100644 --- a/l10ntools/inc/po.hxx +++ b/l10ntools/inc/po.hxx @@ -89,7 +89,6 @@ public: friend class PoOfstream; friend class PoIfstream; - PoHeader(); PoHeader( const OString& rExtSrc ); PoHeader( std::ifstream& rOldPo ); ~PoHeader(); diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 23506adb2265..90b7f79eefa5 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -631,13 +631,6 @@ namespace } } -//Default Constructor -PoHeader::PoHeader() - : m_pGenPo( 0 ) - , m_bIsInitialized( false ) -{ -} - //Template Constructor PoHeader::PoHeader( const OString& rExtSrc ) : m_pGenPo( new GenPoEntry() ) diff --git a/sfx2/inc/sfx2/templateabstractview.hxx b/sfx2/inc/sfx2/templateabstractview.hxx index a5fef712b8b2..90dba099f375 100644 --- a/sfx2/inc/sfx2/templateabstractview.hxx +++ b/sfx2/inc/sfx2/templateabstractview.hxx @@ -100,8 +100,6 @@ public: void deselectOverlayItems (); - void deselectOverlayItem (const sal_uInt16 nItemId); - void sortOverlayItems (const boost::function &func); diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 0679e634ae2d..737f087a0018 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -163,11 +163,6 @@ void TemplateAbstractView::deselectOverlayItems() mpItemView->deselectItems(); } -void TemplateAbstractView::deselectOverlayItem(const sal_uInt16 nItemId) -{ - mpItemView->deselectItem(nItemId); -} - void TemplateAbstractView::sortOverlayItems(const boost::function &func) { diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx index fba5e214e078..e1b62ffd00f8 100644 --- a/tools/inc/tools/line.hxx +++ b/tools/inc/tools/line.hxx @@ -49,7 +49,6 @@ public: sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const; sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const; - sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const; double GetDistance( const double& rPtX, const double& rPtY ) const; double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); } diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx index 4c7e69123f92..11bf510bd057 100644 --- a/tools/source/generic/line.cxx +++ b/tools/source/generic/line.cxx @@ -98,63 +98,6 @@ sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double& return bOk; } -sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const -{ - const sal_Bool bStartInside = rRect.IsInside( maStart ); - const sal_Bool bEndInside = rRect.IsInside( maEnd ); - sal_Bool bRet = sal_True; - - if( bStartInside && bEndInside ) - { - // line completely inside rect - rIntersection.maStart = maStart; - rIntersection.maEnd = maEnd; - } - else - { - // calculate intersections - const Point aTL( rRect.TopLeft() ), aTR( rRect.TopRight() ); - const Point aBR( rRect.BottomRight() ), aBL( rRect.BottomLeft() ); - Point aIntersect1, aIntersect2; - Point* pCurIntersection = &aIntersect1; - - if( Intersection( Line( aTL, aTR ), *pCurIntersection ) ) - pCurIntersection = &aIntersect2; - - if( Intersection( Line( aTR, aBR ), *pCurIntersection ) ) - pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL; - - if( pCurIntersection && Intersection( Line( aBR, aBL ), *pCurIntersection ) ) - pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL; - - if( pCurIntersection && Intersection( Line( aBL, aTL ), *pCurIntersection ) ) - pCurIntersection = ( pCurIntersection == &aIntersect1 ) ? &aIntersect2 : NULL; - - if( !pCurIntersection ) - { - // two intersections - rIntersection.maStart = aIntersect1; - rIntersection.maEnd = aIntersect2; - } - else if( pCurIntersection == &aIntersect2 ) - { - // one intersection - rIntersection.maStart = aIntersect1; - - if( ( maStart != aIntersect1 ) && bStartInside ) - rIntersection.maEnd = maStart; - else if( ( maEnd != aIntersect1 ) && bEndInside ) - rIntersection.maEnd = maEnd; - else - rIntersection.maEnd = rIntersection.maStart; - } - else - bRet = sal_False; - } - - return bRet; -} - double Line::GetDistance( const double& rPtX, const double& rPtY ) const { double fDist; diff --git a/unusedcode.easy b/unusedcode.easy index 6055f324478d..73ee6b513a05 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,10 +1,3 @@ -Application::GetDisplayScreenName(unsigned int) -EditTextObject::RemoveParaAttribs(unsigned short) -EditTextObject::SetParaAttribs(unsigned long, SfxItemSet const&) -FontSelectPattern::FontSelectPattern(PhysicalFontFace const&, Size const&, float, int, bool) -Line::Intersection(Rectangle const&, Line&) const -PoHeader::PoHeader() -SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char) ScFiltersTest::testColorScaleODS() ScFiltersTest::testColorScaleXLSX() ScVbaFormat::getAddIndent() @@ -13,7 +6,6 @@ StyleSettings::GetPersonaFooter() const TemplateAbstractView::deselectOverlayItem(unsigned short) Test::test1Table1Page() TextEngine::GetLeftMargin() const -XclExpPivotCache::GetFieldAcc(rtl::OUString const&) apitest::XCellRangesQuery::testQueryFormulaCells() apitest::XDataPilotDescriptor::testGetHiddenFields() apitest::XDataPilotFieldGrouping::testCreateDateGroup() @@ -41,14 +33,10 @@ connectivity::file::OStatement_Base::reset() connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, unsigned char) connectivity::sdbcx::OGroup::OGroup(unsigned char) jfw_plugin::VendorBase::createInstance() -oox::drawingml::TextListStyle::dump() const -oox::xls::BiffDrawingObjectBase::BiffDrawingObjectBase(oox::xls::WorksheetHelper const&) -sc_apitest::main() +oox::drawingml::TextListStyle::dump() const # Only used in debug mode sd::LeftDrawPaneShell::RegisterInterface(SfxModule*) sd::LeftImpressPaneShell::RegisterInterface(SfxModule*) sd::ToolPanelPaneShell::RegisterInterface(SfxModule*) sd::ViewShellBase::CreateInstance(SfxViewFrame*, SfxViewShell*) test::BootstrapFixtureBase::getPathFromWorkdir(char const*) test::BootstrapFixtureBase::getURLFromWorkdir(char const*) -writerfilter::logger(std::basic_string, std::allocator >, std::basic_string, std::allocator >) -writerfilter::rtftok::RTFSprms::swap(writerfilter::rtftok::RTFSprms&) diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 53ec90991bc7..1bf500d41fc4 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -191,8 +191,6 @@ class FontSelectPattern : public FontSelectPatternAttributes public: FontSelectPattern( const Font&, const String& rSearchName, const Size&, float fExactHeight ); - FontSelectPattern( const PhysicalFontFace&, const Size&, - float fExactHeight, int nOrientation, bool bVertical ); public: // TODO: change to private const PhysicalFontFace* mpFontData; // a matching PhysicalFontFace object diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 1866bac60af5..b0ef1d5ee0d5 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -867,7 +867,6 @@ public: { CopyData(); mpData->maFrameStyle = rStyle; } const BitmapEx GetPersonaHeader() const; - const BitmapEx GetPersonaFooter() const; void SetStandardStyles(); diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index f4c415bbb8b2..364316827bb7 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -287,7 +287,6 @@ public: static unsigned int GetDisplayBuiltInScreen(); // Practically, this means - Get the screen we should run a presentation on. static unsigned int GetDisplayExternalScreen(); - SAL_DLLPRIVATE static rtl::OUString GetDisplayScreenName( unsigned int nScreen ); static const LocaleDataWrapper& GetAppLocaleDataWrapper(); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 4f41add760e4..3749e56377c8 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -766,12 +766,6 @@ const BitmapEx StyleSettings::GetPersonaHeader() const return mpData->maPersonaHeaderBitmap; } -const BitmapEx StyleSettings::GetPersonaFooter() const -{ - setupPersonaHeaderFooter( PERSONA_FOOTER, mpData->maPersonaHeaderFooter, mpData->maPersonaFooterBitmap ); - return mpData->maPersonaFooterBitmap; -} - // ----------------------------------------------------------------------- void StyleSettings::SetStandardStyles() diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 9536aab985d3..9e67117dc6b0 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1224,12 +1224,6 @@ unsigned int Application::GetScreenCount() return pSys ? pSys->GetDisplayScreenCount() : 0; } -rtl::OUString Application::GetDisplayScreenName( unsigned int nScreen ) -{ - SalSystem* pSys = ImplGetSalSystem(); - return pSys ? pSys->GetDisplayScreenName( nScreen ) : rtl::OUString(); -} - bool Application::IsUnifiedDisplay() { SalSystem* pSys = ImplGetSalSystem(); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 1364fcfb8c6f..94a737d8dab8 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2172,14 +2172,6 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const PhysicalFontFace // NOTE: no normalization for width/height/orientation } -FontSelectPattern::FontSelectPattern( const PhysicalFontFace& rFontData, - const Size& rSize, float fExactHeight, int nOrientation, bool bVertical ) - : FontSelectPatternAttributes(rFontData, rSize, fExactHeight, nOrientation, bVertical) - , mpFontData( &rFontData ) - , mpFontEntry( NULL ) -{ -} - void FontSelectPattern::copyAttributes(const FontSelectPatternAttributes &rAttributes) { static_cast(*this) = rAttributes; diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 06a66d9bb2c3..886d2f637ea9 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -398,8 +398,6 @@ protected: /** Creates handler for a stream. */ - void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC logger(string prefix, string message); - void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth & o, const char * name, writerfilter::Reference::Pointer_t props); void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth & o, const char * name, sal_uInt32 n); void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth & /*o*/, const char * /*name*/, diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/resourcemodel/util.cxx index ecb338f6adac..4ca436510d27 100644 --- a/writerfilter/source/resourcemodel/util.cxx +++ b/writerfilter/source/resourcemodel/util.cxx @@ -35,26 +35,6 @@ namespace writerfilter { using namespace com::sun::star; using namespace std; -using text::TextContentAnchorType; - -static string & logger_file() -{ - static string _logger_file = string(getenv("TEMP")?getenv("TEMP"):"/tmp") + "/writerfilter.ooxml.tmp"; - return _logger_file; -} - -static ofstream & logger_stream() -{ - static ofstream _logger_stream(logger_file().c_str()); - return _logger_stream; -} - - -void logger(string prefix, string message) -{ - logger_stream() << prefix << ":" << message << endl; - logger_stream().flush(); -} string xmlify(const string & str) { diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index ed25dafe490f..1c3c5a517f68 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -192,13 +192,6 @@ RTFSprms& RTFSprms::operator=(const RTFSprms& rOther) return *this; } -void RTFSprms::swap(RTFSprms& rOther) -{ - boost::intrusive_ptr pTmp = rOther.m_pSprms; - rOther.m_pSprms = m_pSprms; - m_pSprms = pTmp; -} - void RTFSprms::clear() { if (m_pSprms->m_nRefCount == 1) diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx index 58955c4cd339..1ae83dc57dfb 100644 --- a/writerfilter/source/rtftok/rtfsprm.hxx +++ b/writerfilter/source/rtftok/rtfsprm.hxx @@ -71,7 +71,6 @@ namespace writerfilter { bool erase(Id nKeyword); /// Removes elements, which are already in the reference set. void deduplicate(RTFSprms& rReference); - void swap(RTFSprms& rOther); size_t size() const { return m_pSprms->size(); } bool empty() const { return m_pSprms->empty(); } Entry_t& back() { return m_pSprms->back(); } diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx index 1e291f244f24..1fa81720f00f 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx @@ -132,30 +132,4 @@ sal_Bool SAL_CALL SanExtensionImpl :: isCritical() throw( ::com::sun::star::uno: return m_Entries; } -//Helper method -void SanExtensionImpl :: setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, sal_Bool critical ) { - unsigned int i ; - if( value != NULL && vlen != 0 ) { - Sequence< sal_Int8 > extnv( vlen ) ; - for( i = 0; i < vlen ; i ++ ) - extnv[i] = *( value + i ) ; - - m_xExtnValue = extnv ; - } else { - m_xExtnValue = Sequence(); - } - - if( id != NULL && idlen != 0 ) { - Sequence< sal_Int8 > extnId( idlen ) ; - for( i = 0; i < idlen ; i ++ ) - extnId[i] = *( id + i ) ; - - m_xExtnId = extnId ; - } else { - m_xExtnId = Sequence(); - } - - m_critical = critical ; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx index e3de5fbcbbaa..e9ac78e694ac 100644 --- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx @@ -195,30 +195,4 @@ namespace { } -//Helper method -void SanExtensionImpl :: setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, sal_Bool critical ) { - unsigned int i ; - if( value != NULL && vlen != 0 ) { - Sequence< sal_Int8 > extnv( vlen ) ; - for( i = 0; i < vlen ; i ++ ) - extnv[i] = *( value + i ) ; - - m_xExtnValue = extnv ; - } else { - m_xExtnValue = Sequence(); - } - - if( id != NULL && idlen != 0 ) { - Sequence< sal_Int8 > extnId( idlen ) ; - for( i = 0; i < idlen ; i ++ ) - extnId[i] = *( id + i ) ; - - m_xExtnId = extnId ; - } else { - m_xExtnId = Sequence(); - } - - m_critical = critical ; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3