Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi there,

I removed a little bit of unused code (unusedcode.easy).

This is my first contribution. This and any other is of course made available under the MPL/LGPLv3+.

Regards,
Petr
From 445f0c71e523f06f42f622d401b8d9af22b159d3 Mon Sep 17 00:00:00 2001
From: Petr Vorel <petr.vorel@gmail.com>
Date: Fri, 17 Feb 2012 18:07:24 +0100
Subject: [PATCH] Remove unused code.

---
 .../source/plugin/inc/plugin/unx/plugcon.hxx       |    3 --
 extensions/source/plugin/unx/plugcon.cxx           |   17 --------------
 l10ntools/inc/export.hxx                           |    2 -
 l10ntools/source/export.cxx                        |   23 --------------------
 linguistic/source/spelldsp.cxx                     |   15 -------------
 unusedcode.easy                                    |    5 ----
 vcl/inc/vcl/button.hxx                             |    1 -
 vcl/source/control/button.cxx                      |    6 -----
 8 files changed, 0 insertions(+), 72 deletions(-)

diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx 
b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index 86c0e70..8c7175f 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -184,9 +184,6 @@ public:
         LINK( this, PluginConnector, WorkOnNewMessageHdl ).
             Call( (Mediator*)this );
     }
-
-    ConnectorInstance* getInstance( NPP );
-    ConnectorInstance* getInstanceById( sal_uInt32 );
 };
 
 enum CommandAtoms
diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx
index c178c47..1a44624 100644
--- a/extensions/source/plugin/unx/plugcon.cxx
+++ b/extensions/source/plugin/unx/plugcon.cxx
@@ -59,23 +59,6 @@ sal_uInt32 PluginConnector::GetNPPID( NPP instance )
     return UnknownNPPID;
 }
 
-ConnectorInstance* PluginConnector::getInstance( NPP instance )
-{
-    size_t nLen = m_aInstances.size();
-    for( size_t i=0; i <nLen; i++ )
-    {
-        ConnectorInstance* pInst = m_aInstances[i];
-        if( pInst->instance == instance )
-            return pInst;
-    }
-    return NULL;
-}
-
-ConnectorInstance* PluginConnector::getInstanceById( sal_uInt32 nInstanceID )
-{
-    return nInstanceID < static_cast<sal_uInt32>(m_aInstances.size()) ? m_aInstances[ nInstanceID 
] : NULL;
-}
-
 struct PtrStruct
 {
     char* pData;
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index c669a3b..97c5bf1 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -166,8 +166,6 @@ public:
 
     rtl::OString sPForm;
 
-    void Dump();
-
     ResData(const rtl::OString &rPF, const rtl::OString &rGId)
             :
             nWidth( 0 ),
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 6a43da8..3c0bff9 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -201,29 +201,6 @@ int GetError()
 // class ResData
 //
 
-void ResData::Dump(){
-    printf("**************\nResData\n");
-    printf("sPForm = %s , sResTyp = %s , sId = %s , sGId = %s , sHelpId = %s\n",
-        sPForm.getStr(), sResTyp.getStr(), sId.getStr(),
-        sGId.getStr(), sHelpId.getStr());
-
-    rtl::OString a("*pStringList");
-    rtl::OString b("*pUIEntries");
-    rtl::OString c("*pFilterList");
-    rtl::OString d("*pItemList");
-    rtl::OString e("*pPairedList");
-    rtl::OString f("sText");
-
-    Export::DumpMap( f , sText );
-
-    if( pStringList )   Export::DumpExportList( a , *pStringList );
-    if( pUIEntries )    Export::DumpExportList( b , *pUIEntries );
-    if( pFilterList )   Export::DumpExportList( c , *pFilterList );
-    if( pItemList )     Export::DumpExportList( d , *pItemList );
-    if( pPairedList )   Export::DumpExportList( e , *pPairedList );
-    printf("\n");
-}
-
 /*****************************************************************************/
 sal_Bool ResData::SetId( const rtl::OString& rId, sal_uInt16 nLevel )
 /*****************************************************************************/
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index d809e9e..cf5a854 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -81,7 +81,6 @@ public:
     void    Append( const OUString &rNew );
     void    Append( const std::vector< OUString > &rNew );
     void    Append( const Sequence< OUString > &rNew );
-    void    Remove( const OUString &rText );
     Sequence< OUString >    GetSequence() const;
 };
 
@@ -164,20 +163,6 @@ Sequence< OUString > ProposalList::GetSequence() const
     return aRes;
 }
 
-void ProposalList::Remove( const OUString &rText )
-{
-    size_t nLen = aVec.size();
-    for (size_t i = 0;  i < nLen;  ++i)
-    {
-        OUString &rEntry = aVec[i];
-        if (rEntry == rText)
-        {
-            rEntry = OUString();
-            break;  // there should be only one matching entry
-        }
-    }
-}
-
 sal_Bool SvcListHasLanguage(
         const LangSvcEntries_Spell &rEntry,
         LanguageType nLanguage )
diff --git a/unusedcode.easy b/unusedcode.easy
index 90d0de7..43a51a8 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -54,13 +54,8 @@ ORegKey::acquireKey(void*)
 OutputDevice::LogicToPixel(PolyPolygon const&, MapMode const&) const
 OutputDevice::PixelToLogic(PolyPolygon const&, MapMode const&) const
 ParagraphStyleManager::get(WPXString const&) const
-PluginConnector::getInstance(_NPP*)
-PluginConnector::getInstanceById(unsigned int)
 PopupMenu::SetSelectedEntry(unsigned short)
 PropBrwMgr::GetChildWindowId()
-ProposalList::Remove(rtl::OUString const&)
-PushButton::GetSymbolAlign() const
-ResData::Dump()
 SalGraphics::DrawBitmap(SalTwoRect const*, SalBitmap const&, unsigned int, OutputDevice const*)
 SalGraphics::DrawNativeControlText(unsigned int, unsigned int, Rectangle const&, unsigned int, 
ImplControlValue const&, rtl::OUString const&, OutputDevice const*)
 SalGraphics::drawAlphaBitmap(SalTwoRect const&, SalBitmap const&, SalBitmap const&)
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 85f3f54..2cda341 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -176,7 +176,6 @@ public:
     void            SetSymbol( SymbolType eSymbol );
     SymbolType      GetSymbol() const { return meSymbol; }
     void            SetSymbolAlign( SymbolAlign eAlign );
-    SymbolAlign     GetSymbolAlign() const;
 
     void            SetDropDown( sal_uInt16 nStyle );
     sal_uInt16          GetDropDown() const { return mnDDStyle; }
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 9af4551..2b2f383 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1624,12 +1624,6 @@ void PushButton::SetSymbolAlign( SymbolAlign eAlign )
 }
 
 // -----------------------------------------------------------------------
-SymbolAlign PushButton::GetSymbolAlign() const
-{
-    return ImplGetSymbolAlign();
-}
-
-// -----------------------------------------------------------------------
 
 void PushButton::SetDropDown( sal_uInt16 nStyle )
 {
-- 
1.7.9


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.