[PATCH] unusedcode.easy: Removed unused code

Alexander Bergmann myaddons at gmx.de
Fri Feb 10 06:29:06 PST 2012


---
 l10ntools/inc/export.hxx           |    1 -
 l10ntools/source/merge.cxx         |   16 --------
 tools/inc/tools/multisel.hxx       |    2 -
 tools/source/memtools/multisel.cxx |   45 -----------------------
 unusedcode.easy                    |   11 ------
 vcl/inc/vcl/field.hxx              |    3 --
 vcl/inc/vcl/metaact.hxx            |    3 --
 vcl/inc/vcl/morebtn.hxx            |    1 -
 vcl/inc/vcl/msgbox.hxx             |    1 -
 vcl/inc/vcl/settings.hxx           |    2 -
 vcl/source/app/settings.cxx        |   68 ------------------------------------
 vcl/source/control/field.cxx       |   20 ----------
 vcl/source/control/morebtn.cxx     |   17 ---------
 vcl/source/gdi/metaact.cxx         |   19 ----------
 vcl/source/window/msgbox.cxx       |    8 ----
 15 files changed, 0 insertions(+), 217 deletions(-)

diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index e6d0057..fd87484 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -463,7 +463,6 @@ class MergeDataFile
             const rtl::OString &nLang, const rtl::OString &rTEXT,
             const rtl::OString &rQHTEXT, const rtl::OString &rTITLE,
             const rtl::OString &sFilename, bool bCaseSensitive);
-        rtl::OString Dump();
     public:
         explicit MergeDataFile(const rtl::OString &rFileName,
             const rtl::OString& rFile, bool bErrLog, bool bCaseSensitive = false);
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e078e30..511ccc7 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -236,22 +236,6 @@ MergeDataFile::~MergeDataFile()
         delete aI->second;
 }
 
-rtl::OString MergeDataFile::Dump()
-{
-    rtl::OString sRet(RTL_CONSTASCII_STRINGPARAM("MergeDataFile\n"));
-
-    printf("MergeDataFile\n");
-    MergeDataHashMap::const_iterator idbg;
-    for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg )
-    {
-        printf("aMap[ %s ] = ",idbg->first.getStr());
-        idbg->second->Dump();
-        printf("\n");
-    }
-    printf("\n");
-    return sRet;
-}
-
 std::vector<rtl::OString> MergeDataFile::GetLanguages()
 {
     return std::vector<rtl::OString>(aLanguageSet.begin(),aLanguageSet.end());
diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index 20f1c63..8410019 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -91,7 +91,6 @@ public:
     void            SetTotalRange( const Range& rTotRange );
     void            Insert( long nIndex, long nCount = 1 );
     void            Remove( long nIndex );
-    void            Append( long nCount = 1 );
 
     const Range&    GetTotalRange() const { return aTotRange; }
     sal_Bool            IsCurValid() const { return bCurValid; }
@@ -99,7 +98,6 @@ public:
     long            FirstSelected( sal_Bool bInverse = sal_False );
     long            LastSelected();
     long            NextSelected();
-    long            PrevSelected();
 
     size_t          GetRangeCount() const { return aSels.size(); }
     const Range&    GetRange( size_t nRange ) const {
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 3853fe4..fd61bcb 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -521,21 +521,6 @@ void MultiSelection::Remove( long nIndex )
 
 // -----------------------------------------------------------------------
 
-void MultiSelection::Append( long nCount )
-{
-    long nPrevLast = aTotRange.Max();
-    aTotRange.Max() += nCount;
-    if ( bSelectNew )
-    {
-        nSelCount += nCount;
-        aSels.push_back( new Range( nPrevLast+1, nPrevLast + nCount ) );
-        if ( aSels.size() > 1 )
-            ImplMergeSubSelections( aSels.size() - 2, aSels.size() );
-    }
-}
-
-// -----------------------------------------------------------------------
-
 long MultiSelection::ImplFwdUnselected()
 {
     if ( !bCurValid )
@@ -637,36 +622,6 @@ long MultiSelection::NextSelected()
 
 // -----------------------------------------------------------------------
 
-long MultiSelection::PrevSelected()
-{
-    if ( !bCurValid )
-        return SFX_ENDOFSELECTION;
-
-    if ( bInverseCur )
-    {
-        --nCurIndex;
-        return ImplBwdUnselected();
-    }
-    else
-    {
-        // is the previous index in the current sub selection too?
-        if ( nCurIndex > aSels[ nCurSubSel ]->Min() )
-            return --nCurIndex;
-
-        // are there previous sub selections?
-        if ( nCurSubSel > 0 )
-        {
-            --nCurSubSel;
-            return nCurIndex = aSels[ nCurSubSel ]->Max();
-        }
-
-        // we are at the beginning!
-        return SFX_ENDOFSELECTION;
-    }
-}
-
-// -----------------------------------------------------------------------
-
 void MultiSelection::SetTotalRange( const Range& rTotRange )
 {
     aTotRange = rTotRange;
diff --git a/unusedcode.easy b/unusedcode.easy
index b316e28..538f909 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -87,21 +87,10 @@ MailDispatcher::removeListener(rtl::Reference<IMailDispatcherListener>)
 Matrix3d::Inverse() const
 Matrix3d::Matrix3d()
 MenuBar::MenuBar(ResId const&)
-MergeDataFile::Dump()
-MessBox::MessBox(unsigned short)
-MetaAction::IsEqual(MetaAction const&) const
-MetaCommentAction::MetaCommentAction(unsigned char const*, unsigned int)
-MetricBox::RemoveValue(long, FieldUnit)
-MetricField::ConvertValue(long, unsigned short, FieldUnit, MapUnit)
-MiscSettings::SetDisablePrinting(unsigned char)
-MiscSettings::SetEnableATToolSupport(unsigned char)
-MoreButton::RemoveWindow(Window*)
 MultiLineEdit::GetHScrollBar() const
 MultiLineEdit::GetLeftMargin() const
 MultiLineEdit::GetTextLines() const
 MultiLineEdit::IsFocusSelectionHideEnabled() const
-MultiSelection::Append(long)
-MultiSelection::PrevSelected()
 NativeNumberWrapper::isValidNatNum(com::sun::star::lang::Locale const&, short) const
 NfCurrencyEntry::NfCurrencyEntry()
 NotificationSettings::CopyData()
diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index 970c81d..9f0b320 100644
--- a/vcl/inc/vcl/field.hxx
+++ b/vcl/inc/vcl/field.hxx
@@ -574,8 +574,6 @@ public:
     static sal_Int64        ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
                                           FieldUnit eInUnit, FieldUnit eOutUnit );
     static sal_Int64        ConvertValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
-                                          FieldUnit eInUnit, MapUnit eOutUnit );
-    static sal_Int64        ConvertValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
                                           MapUnit eInUnit, FieldUnit eOutUnit );
 
     // for backwards compatibility
@@ -768,7 +766,6 @@ public:
 
     void                    InsertValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE,
                                          sal_uInt16 nPos = COMBOBOX_APPEND );
-    void                    RemoveValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE );
     sal_Int64               GetValue( sal_uInt16 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
     sal_uInt16                  GetValuePos( sal_Int64 nValue,
                                          FieldUnit eInUnit = FUNIT_NONE ) const;
diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx
index 3c02e79..493389b 100644
--- a/vcl/inc/vcl/metaact.hxx
+++ b/vcl/inc/vcl/metaact.hxx
@@ -180,8 +180,6 @@ public:
     virtual void        Write( SvStream& rOStm, ImplMetaWriteData* pData );
     virtual void        Read( SvStream& rIStm, ImplMetaReadData* pData );
 
-    sal_Bool            IsEqual( const MetaAction& ) const;
-
     sal_uInt16              GetType() const { return mnType; }
     sal_uLong               GetRefCount() const { return mnRefCount; }
     void                ResetRefCount() { mnRefCount = 1; }
@@ -1502,7 +1500,6 @@ public:
                         MetaCommentAction( sal_Int32 nValue = 0L );
                         MetaCommentAction( const MetaCommentAction& rAct );
                         MetaCommentAction( const rtl::OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
-                        MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize );
 
     virtual void        Move( long nHorzMove, long nVertMove );
     virtual void        Scale( double fScaleX, double fScaleY );
diff --git a/vcl/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index e847984..04ae326 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -66,7 +66,6 @@ public:
     void                Click();
 
     void                AddWindow( Window* pWindow );
-    void                RemoveWindow( Window* pWindow );
 
     void                SetDelta( sal_uLong nNewDelta ) { mnDelta = nNewDelta; }
     sal_uLong               GetDelta() const { return mnDelta; }
diff --git a/vcl/inc/vcl/msgbox.hxx b/vcl/inc/vcl/msgbox.hxx
index 30fae20..fb960b8 100644
--- a/vcl/inc/vcl/msgbox.hxx
+++ b/vcl/inc/vcl/msgbox.hxx
@@ -83,7 +83,6 @@ protected:
 
 protected:
     SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
-                        MessBox( WindowType nType );
 
 public:
                         MessBox( Window* pParent, WinBits nStyle,
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 2494f4f..b4fa92a 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -990,9 +990,7 @@ public:
                                     MiscSettings( const MiscSettings& rSet );
                                     ~MiscSettings();
 
-    void                            SetEnableATToolSupport( sal_Bool bEnable );
     sal_Bool                            GetEnableATToolSupport() const;
-    void                            SetDisablePrinting( sal_Bool bEnable );
     sal_Bool                            GetDisablePrinting() const;
     void                            SetEnableLocalizedDecimalSep( sal_Bool bEnable );
     sal_Bool                            GetEnableLocalizedDecimalSep() const;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 2a3a5ca..c37a109 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1218,74 +1218,6 @@ sal_Bool MiscSettings::GetEnableATToolSupport() const
 
 // -----------------------------------------------------------------------
 
-void MiscSettings::SetDisablePrinting( sal_Bool bEnable )
-{
-    if ( bEnable != mpData->mnDisablePrinting )
-    {
-        vcl::SettingsConfigItem::get()->
-            setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DesktopManagement" ) ),
-                      rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisablePrinting" ) ),
-                      bEnable ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("false" )) );
-        mpData->mnDisablePrinting = bEnable ? 1 : 0;
-    }
-}
-
-// -----------------------------------------------------------------------
-
-void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable )
-{
-    if ( bEnable != mpData->mnEnableATT )
-    {
-        sal_Bool bDummy;
-        if( bEnable && !ImplInitAccessBridge(false, bDummy) )
-            return;
-
-#ifdef WNT
-        HKEY hkey;
-
-        // If the accessibility key in the Windows registry exists, change it synchronously
-        if( ERROR_SUCCESS == RegOpenKey(HKEY_CURRENT_USER,
-            "Software\\OpenOffice.org\\Accessibility\\AtToolSupport",
-            &hkey) )
-        {
-            DWORD dwType;
-            sal_uInt8 Data[6]; // possible values: "true", "false", 1, 0
-            DWORD cbData = sizeof(Data);
-
-            if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
-                NULL,   &dwType, Data, &cbData) )
-            {
-                switch (dwType)
-                {
-                    case REG_SZ:
-                        RegSetValueEx(hkey, "SupportAssistiveTechnology",
-                            0, dwType,
-                            bEnable ? (sal_uInt8 *) "true" : (sal_uInt8 *) "false",
-                            bEnable ? sizeof("true") : sizeof("false"));
-                        break;
-                    case REG_DWORD:
-                        ((DWORD *) Data)[0] = bEnable ? 1 : 0;
-                        RegSetValueEx(hkey, "SupportAssistiveTechnology",
-                            0, dwType, Data, sizeof(DWORD));
-                        break;
-                    default:
-                        // Unsupported registry type
-                        break;
-                }
-            }
-
-            RegCloseKey(hkey);
-        }
-
-#endif
-        vcl::SettingsConfigItem::get()->
-            setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Accessibility" ) ),
-                      rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableATToolSupport" ) ),
-                      bEnable ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("false" )) );
-        mpData->mnEnableATT = bEnable ? 1 : 0;
-    }
-}
-
 void MiscSettings::SetEnableLocalizedDecimalSep( sal_Bool bEnable )
 {
     CopyData();
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 823a70a..66176e8 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1246,16 +1246,6 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
 
 // -----------------------------------------------------------------------
 
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
-                                     FieldUnit eInUnit, MapUnit eOutUnit )
-{
-    return static_cast<sal_Int64>(
-        nonValueDoubleToValueDouble(
-            ConvertDoubleValue( nValue, nDigits, eInUnit, eOutUnit ) ) );
-}
-
-// -----------------------------------------------------------------------
-
 double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
                                         FieldUnit eInUnit, FieldUnit eOutUnit )
 {
@@ -2016,16 +2006,6 @@ void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_uInt16 nPo
 
 // -----------------------------------------------------------------------
 
-void MetricBox::RemoveValue( sal_Int64 nValue, FieldUnit eInUnit )
-{
-    // Umrechnen auf eingestellte Einheiten
-    nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
-                                        eInUnit, meUnit );
-    ComboBox::RemoveEntry( CreateFieldText( nValue ) );
-}
-
-// -----------------------------------------------------------------------
-
 sal_Int64 MetricBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
 {
     double nValue = 0;
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 51d2077..dde2151 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -215,23 +215,6 @@ void MoreButton::AddWindow( Window* pWindow )
 
 // -----------------------------------------------------------------------
 
-void MoreButton::RemoveWindow( Window* pWindow )
-{
-    if ( mpMBData->mpItemList ) {
-        for ( ImplMoreWindowList::iterator it = mpMBData->mpItemList->begin();
-              it < mpMBData->mpItemList->end();
-              ++it
-        ) {
-            if ( *it == pWindow ) {
-                mpMBData->mpItemList->erase( it );
-                break;
-            }
-        }
-    }
-}
-
-// -----------------------------------------------------------------------
-
 void MoreButton::SetText( const XubString& rText )
 {
     PushButton::SetText( rText );
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index f67c1cc..0572394 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -146,16 +146,6 @@ sal_Bool MetaAction::Compare( const MetaAction& ) const
 
 // ------------------------------------------------------------------------
 
-sal_Bool MetaAction::IsEqual( const MetaAction& rMetaAction ) const
-{
-    if ( mnType != rMetaAction.mnType )
-        return sal_False;
-    else
-        return Compare( rMetaAction );
-}
-
-// ------------------------------------------------------------------------
-
 void MetaAction::Write( SvStream& rOStm, ImplMetaWriteData* )
 {
     rOStm << mnType;
@@ -3988,15 +3978,6 @@ MetaCommentAction::MetaCommentAction( const rtl::OString& rComment, sal_Int32 nV
 
 // ------------------------------------------------------------------------
 
-MetaCommentAction::MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize ) :
-    MetaAction  ( META_COMMENT_ACTION ),
-    mnValue     ( 0L )
-{
-    ImplInitDynamicData( pData, nDataSize );
-}
-
-// ------------------------------------------------------------------------
-
 MetaCommentAction::~MetaCommentAction()
 {
     if ( mpData )
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 0efd972..4e5e796 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -156,14 +156,6 @@ void MessBox::ImplInitButtons()
 
 // -----------------------------------------------------------------------
 
-MessBox::MessBox( WindowType ) :
-    ButtonDialog( WINDOW_MESSBOX )
-{
-    ImplInitMessBoxData();
-}
-
-// -----------------------------------------------------------------------
-
 MessBox::MessBox( Window* pParent, WinBits nStyle,
                   const XubString& rTitle, const XubString& rMessage ) :
     ButtonDialog( WINDOW_MESSBOX ),
-- 
1.7.9



More information about the LibreOffice mailing list