[Libreoffice-commits] core.git: editeng/inc editeng/source l10ntools/inc l10ntools/source sfx2/inc sfx2/source tools/inc tools/source unusedcode.easy vcl/inc vcl/source writerfilter/inc writerfilter/source xmlsecurity/source

Jean-Noël Rouvignac jn.rouvignac at gmail.com
Wed Feb 27 06:40:47 PST 2013


 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 -
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx            |    2 
 writerfilter/source/resourcemodel/util.cxx                     |   20 ---
 writerfilter/source/rtftok/rtfsprm.cxx                         |    7 -
 writerfilter/source/rtftok/rtfsprm.hxx                         |    1 
 xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx |   26 ----
 xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx         |   26 ----
 21 files changed, 1 insertion(+), 204 deletions(-)

New commits:
commit 875c997c7da116402509d0bd75e8c15a66a40529
Author: Jean-Noël Rouvignac <jn.rouvignac at gmail.com>
Date:   Wed Feb 6 14:47:47 2013 +0100

    fdo#39446 - Bloat Removal. Removing uncallable code with callcatcher
    
    Removed several unused methods.
    
    Could not remove ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() and ScVbaFormat<ooo::vba::excel::XStyle>::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

diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index 271a39b..bfce8fd 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<EECharAttrib>& 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 34b91b7..ea12eca 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 a84b5a0..f3f6d6d 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 23506ad..90b7f79 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 a5fef71..90dba09 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<bool (const ThumbnailViewItem*,
                                                        const ThumbnailViewItem*) > &func);
 
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 0679e63..737f087 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<bool (const ThumbnailViewItem*,
                                                                         const ThumbnailViewItem*) > &func)
 {
diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx
index fba5e21..e1b62ff 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 4c7e691..11bf510 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 6055f32..73ee6b5 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<ooo::vba::excel::XStyle>::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<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-writerfilter::rtftok::RTFSprms::swap(writerfilter::rtftok::RTFSprms&)
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 53ec909..1bf500d 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 1866bac..b0ef1d5 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 f4c415b..3643168 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 4f41add..3749e56 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 9536aab..9e67117 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 1364fcf..94a737d 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<FontSelectPatternAttributes&>(*this) = rAttributes;
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index 06a66d9..886d2f6 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<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
     void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
     void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/resourcemodel/util.cxx
index ecb338f..4ca4365 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 ed25daf..1c3c5a5 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<RTFSprmsImpl> 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 58955c4..1ae83dc 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 1e291f2..1fa8172 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<sal_Int8>();
-    }
-
-    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<sal_Int8>();
-    }
-
-    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 e3de5fb..e9ac78e 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<sal_Int8>();
-    }
-
-    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<sal_Int8>();
-    }
-
-    m_critical = critical ;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list