[Libreoffice-commits] .: 2 commits - unotools/source

Takeshi Abe tabe at kemper.freedesktop.org
Sat May 5 08:20:22 PDT 2012


 unotools/source/config/bootstrap.cxx       |    6 -
 unotools/source/config/cmdoptions.cxx      |    4 
 unotools/source/config/fontcfg.cxx         |    3 
 unotools/source/config/internaloptions.cxx |  131 -----------------------------
 unotools/source/config/misccfg.cxx         |    5 -
 unotools/source/config/securityoptions.cxx |    1 
 unotools/source/config/startoptions.cxx    |    1 
 unotools/source/config/viewoptions.cxx     |    7 -
 unotools/source/i18n/calendarwrapper.cxx   |    1 
 unotools/source/misc/atom.cxx              |    1 
 unotools/source/ucbhelper/tempfile.cxx     |    1 
 11 files changed, 161 deletions(-)

New commits:
commit 91353a76690b581056235770ad8ed5ba6ce7f327
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun May 6 00:19:44 2012 +0900

    nuke dead code
    
    Change-Id: Ic7110a2d589c5be60c2beae1fa8c9e7ed6d63c04

diff --git a/unotools/source/config/internaloptions.cxx b/unotools/source/config/internaloptions.cxx
index 3976d18..1d70060 100644
--- a/unotools/source/config/internaloptions.cxx
+++ b/unotools/source/config/internaloptions.cxx
@@ -64,63 +64,12 @@ using namespace ::com::sun::star::beans ;
 #define FIXPROPERTYNAME_SENDCRASHMAIL       OUString(RTL_CONSTASCII_USTRINGPARAM("SendCrashMail"            ))
 #define FIXPROPERTYNAME_USEMAILUI           OUString(RTL_CONSTASCII_USTRINGPARAM("UseMailUI"                ))
 #define FIXPROPERTYNAME_CURRENTTEMPURL      OUString(RTL_CONSTASCII_USTRINGPARAM("CurrentTempURL"           ))
-//#define FIXPROPERTYNAME_REMOVEMENUENTRYCLOSE           OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveMenuEntryClose"))
-//#define FIXPROPERTYNAME_REMOVEMENUENTRYBACKTOWEBTOP    OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveMenuEntryBackToWebtop"))
-//#define FIXPROPERTYNAME_REMOVEMENUENTRYNEWWEBTOP       OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveMenuEntryNewWebtop"))
-//#define FIXPROPERTYNAME_REMOVEMENUENTRYLOGOUT          OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveMenuEntryLogout"))
 
 #define FIXPROPERTYHANDLE_SLOTCFG           0
 #define FIXPROPERTYHANDLE_SENDCRASHMAIL     1
 #define FIXPROPERTYHANDLE_USEMAILUI         2
 #define FIXPROPERTYHANDLE_CURRENTTEMPURL    3
-//#define FIXPROPERTYHANDLE_REMOVEMENUENTRYCLOSE   3
-//#define FIXPROPERTYHANDLE_REMOVEMENUENTRYBACKTOWEBTOP         4
-//#define FIXPROPERTYHANDLE_REMOVEMENUENTRYNEWWEBTOP         5
-//#define FIXPROPERTYHANDLE_REMOVEMENUENTRYLOGOUT         6
-
-#define FIXPROPERTYCOUNT                    4
-/*
-#define PROPERTYNAME_RECOVERYLIST           OUString(RTL_CONSTASCII_USTRINGPARAM("RecoveryList"             ))
-#define PROPERTYNAME_URL                    OUString(RTL_CONSTASCII_USTRINGPARAM("OrgURL"                   ))
-#define PROPERTYNAME_FILTER                 OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName"               ))
-#define PROPERTYNAME_TEMPNAME               OUString(RTL_CONSTASCII_USTRINGPARAM("TempURL"                  ))
-
-#define OFFSET_URL                          0
-#define OFFSET_FILTER                       1
-#define OFFSET_TEMPNAME                     2
-*/
-#define PATHDELIMITER                       OUString(RTL_CONSTASCII_USTRINGPARAM("/"                        ))
-#define FIXR                                OUString(RTL_CONSTASCII_USTRINGPARAM("r"                        ))
 
-//_________________________________________________________________________________________________________________
-//  private declarations!
-//_________________________________________________________________________________________________________________
-/*
-struct tIMPL_RecoveryEntry
-{
-    OUString    sURL        ;
-    OUString    sFilter     ;
-    OUString    sTempName   ;
-
-    tIMPL_RecoveryEntry()
-    {
-        sURL        =   OUString();
-        sFilter     =   OUString();
-        sTempName   =   OUString();
-    }
-
-    tIMPL_RecoveryEntry(    const   OUString&   sNewURL         ,
-                            const   OUString&   sNewFilter      ,
-                            const   OUString&   sNewTempName    )
-    {
-        sURL        =   sNewURL         ;
-        sFilter     =   sNewFilter      ;
-        sTempName   =   sNewTempName    ;
-    }
-};
-
-typedef deque< tIMPL_RecoveryEntry > tIMPL_RecoveryStack;
-*/
 class SvtInternalOptions_Impl : public ConfigItem
 {
     //-------------------------------------------------------------------------------------------------------------
@@ -137,7 +86,6 @@ class SvtInternalOptions_Impl : public ConfigItem
         sal_Bool                m_bSendCrashMail    ;   /// cache "SendCrashMail" of Internal section
         sal_Bool                m_bUseMailUI;
         OUString                m_aCurrentTempURL   ;
-    //  tIMPL_RecoveryStack     m_aRecoveryList     ;   /// cache "RecoveryList" of Internal section
     //-------------------------------------------------------------------------------------------------------------
     //  public methods
     //-------------------------------------------------------------------------------------------------------------
@@ -216,15 +164,6 @@ class SvtInternalOptions_Impl : public ConfigItem
 
         OUString    GetCurrentTempURL() const { return m_aCurrentTempURL; }
         void        SetCurrentTempURL( const OUString& aNewCurrentTempURL );
-/*
-        void        PushRecoveryItem    (   const   OUString&   sURL        ,
-                                            const   OUString&   sFilter     ,
-                                             const  OUString&   sTempName   );
-        void        PopRecoveryItem     (           OUString&   sURL        ,
-                                                    OUString&   sFilter     ,
-                                                    OUString&   sTempName   );
-        sal_Bool    IsRecoveryListEmpty (                                   ) const;
-*/
     //-------------------------------------------------------------------------------------------------------------
     //  private methods
     //-------------------------------------------------------------------------------------------------------------
@@ -322,49 +261,6 @@ void SvtInternalOptions_Impl::Commit()
     pValues[0] <<= m_aCurrentTempURL;
 
     PutProperties( aNames, aValues );
-
-/*
-    // Write set of dynamic properties then.
-    ClearNodeSet( PROPERTYNAME_RECOVERYLIST );
-
-    tIMPL_RecoveryEntry         aItem                   ;
-    OUString                    sNode                   ;
-    Sequence< PropertyValue >   seqPropertyValues( 3 )  ;   // Every node in set has 3 sub-nodes!( url, filter, tempname )
-
-    // Copy list entries to save-list and write it to configuration.
-
-    sal_uInt32 nCount = m_aRecoveryList.size();
-    for( sal_uInt32 nItem=0; nItem<nCount; ++nItem )
-    {
-        aItem = m_aRecoveryList.top();
-        m_aRecoveryList.pop();
-        sNode = PROPERTYNAME_RECOVERYLIST + PATHDELIMITER + FIXR + OUString::valueOf( (sal_Int32)nItem ) + PATHDELIMITER;
-        seqPropertyValues[OFFSET_URL        ].Name  =   sNode + PROPERTYNAME_URL        ;
-        seqPropertyValues[OFFSET_FILTER     ].Name  =   sNode + PROPERTYNAME_FILTER     ;
-        seqPropertyValues[OFFSET_TEMPNAME   ].Name  =   sNode + PROPERTYNAME_TEMPNAME   ;
-        seqPropertyValues[OFFSET_URL        ].Value <<= aItem.sURL                      ;
-        seqPropertyValues[OFFSET_FILTER     ].Value <<= aItem.sFilter                   ;
-        seqPropertyValues[OFFSET_TEMPNAME   ].Value <<= aItem.sTempName                 ;
-
-        SetSetProperties( PROPERTYNAME_RECOVERYLIST, seqPropertyValues );
-    }
-
-    tIMPL_RecoveryStack::iterator iRecovery = m_aRecoveryList.begin();
-    for ( sal_uInt32 nItem=0; iRecovery != m_aRecoveryList.end(); ++nItem, ++iRecovery)
-    {
-        aItem = *iRecovery;
-        sNode = PROPERTYNAME_RECOVERYLIST + PATHDELIMITER + FIXR +
-            OUString::valueOf( (sal_Int32)nItem ) + PATHDELIMITER;
-        seqPropertyValues[OFFSET_URL        ].Name  =   sNode + PROPERTYNAME_URL        ;
-        seqPropertyValues[OFFSET_FILTER     ].Name  =   sNode + PROPERTYNAME_FILTER     ;
-        seqPropertyValues[OFFSET_TEMPNAME   ].Name  =   sNode + PROPERTYNAME_TEMPNAME   ;
-        seqPropertyValues[OFFSET_URL        ].Value <<= iRecovery->sURL                 ;
-        seqPropertyValues[OFFSET_FILTER     ].Value <<= iRecovery->sFilter              ;
-        seqPropertyValues[OFFSET_TEMPNAME   ].Value <<= iRecovery->sTempName            ;
-        SetSetProperties( PROPERTYNAME_RECOVERYLIST, seqPropertyValues );
-    }
-
-    */
 }
 
 //*****************************************************************************************************************
@@ -382,14 +278,6 @@ void SvtInternalOptions_Impl::SetCurrentTempURL( const OUString& aNewCurrentTemp
 //*****************************************************************************************************************
 Sequence< OUString > SvtInternalOptions_Impl::impl_GetPropertyNames()
 {
-    /*
-    // First get ALL names of current existing list items in configuration!
-    Sequence< OUString > seqRecoveryItems = GetNodeNames( PROPERTYNAME_RECOVERYLIST );
-    // Get information about list counts ...
-    sal_Int32 nRecoveryCount = seqRecoveryItems.getLength();
-    // ... and create a property list with right size! (+2...for fix properties!) (*3 ... = sub nodes for every set node!)
-    Sequence< OUString > seqProperties( FIXPROPERTYCOUNT + (nRecoveryCount*3) );
-    */
     Sequence< OUString > seqProperties(4);
 
     // Add names of fix properties to list.
@@ -397,25 +285,6 @@ Sequence< OUString > SvtInternalOptions_Impl::impl_GetPropertyNames()
     seqProperties[FIXPROPERTYHANDLE_SENDCRASHMAIL   ]   =   FIXPROPERTYNAME_SENDCRASHMAIL   ;
     seqProperties[FIXPROPERTYHANDLE_USEMAILUI       ]   =   FIXPROPERTYNAME_USEMAILUI       ;
     seqProperties[FIXPROPERTYHANDLE_CURRENTTEMPURL  ]   =   FIXPROPERTYNAME_CURRENTTEMPURL  ;
-//    seqProperties[FIXPROPERTYHANDLE_REMOVEMENUENTRYCLOSE        ]   =   FIXPROPERTYNAME_REMOVEMENUENTRYCLOSE;
-//    seqProperties[FIXPROPERTYHANDLE_REMOVEMENUENTRYBACKTOWEBTOP ]   =   FIXPROPERTYNAME_REMOVEMENUENTRYBACKTOWEBTOP;
-//    seqProperties[FIXPROPERTYHANDLE_REMOVEMENUENTRYNEWWEBTOP    ]   =   FIXPROPERTYNAME_REMOVEMENUENTRYNEWWEBTOP;
-//    seqProperties[FIXPROPERTYHANDLE_REMOVEMENUENTRYLOGOUT       ]   =   FIXPROPERTYNAME_REMOVEMENUENTRYLOGOUT;
-/*
-    sal_uInt32 nPosition = FIXPROPERTYCOUNT;
-    // Add names for recovery list to list.
-    // 3 subkeys for every item!
-    // nPosition is the start point of an list item, nItem an index into right list of node names!
-    for( sal_Int32 nItem=0; nItem<nRecoveryCount; ++nItem )
-    {
-        seqProperties[nPosition] = PROPERTYNAME_RECOVERYLIST + PATHDELIMITER + seqRecoveryItems[nItem] + PATHDELIMITER + PROPERTYNAME_URL       ;
-        ++nPosition;
-        seqProperties[nPosition] = PROPERTYNAME_RECOVERYLIST + PATHDELIMITER + seqRecoveryItems[nItem] + PATHDELIMITER + PROPERTYNAME_FILTER    ;
-        ++nPosition;
-        seqProperties[nPosition] = PROPERTYNAME_RECOVERYLIST + PATHDELIMITER + seqRecoveryItems[nItem] + PATHDELIMITER + PROPERTYNAME_TEMPNAME  ;
-        ++nPosition;
-    }
-*/
     // Return result.
     return seqProperties;
 }
commit e3b0f50966caa8be33a51974b6dccf6a5913bd1f
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun May 6 00:16:50 2012 +0900

    removed unused defines
    
    Change-Id: Ibb6141776fc3a418095b7184c7dacfba70dd7238

diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 94c8c2e..07ae774 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -59,18 +59,12 @@
 #define BOOTSTRAP_ITEM_BASEINSTALLATION     "BRAND_BASE_DIR"
 #define BOOTSTRAP_ITEM_USERINSTALLATION     "UserInstallation"
 
-#define BOOTSTRAP_ITEM_SHAREDIR             "SharedDataDir"
 #define BOOTSTRAP_ITEM_USERDIR              "UserDataDir"
 
 #define BOOTSTRAP_DEFAULT_BASEINSTALL       "$SYSBINDIR/.."
 
-#define BOOTSTRAP_DIRNAME_SHAREDIR          "share"
 #define BOOTSTRAP_DIRNAME_USERDIR           "user"
 
-#define VERSIONFILE_SECTION                 "Versions"
-
-#define SETUP_DATA_NAME                     SAL_CONFIGFILE("setup")
-#define SETUP_ITEM_ALLUSERS                 "ALLUSERS"
 // ---------------------------------------------------------------------------------------
 typedef char const * AsciiString;
 // ---------------------------------------------------------------------------------------
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index 5a2bf0a..d4e99b6 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -55,10 +55,6 @@ using namespace ::com::sun::star::beans ;
 
 #define PROPERTYNAME_CMD                                OUString(RTL_CONSTASCII_USTRINGPARAM("Command"                  ))
 
-#define PROPERTYCOUNT                                   1
-
-#define OFFSET_CMD                                      0
-
 // Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map
 struct OUStringHashCode
 {
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 91aa696..cd11d80 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -46,9 +46,6 @@
 #include <list>
 #include <algorithm>
 
-#define DEFAULTFONT_CONFIGNODE "VCL/DefaultFonts"
-#define SUBSTFONT_CONFIGNODE "VCL/FontSubstitutions"
-
 using namespace utl;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx
index 17b0999..6df28b3 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -39,11 +39,6 @@
 #include <rtl/logfile.hxx>
 #include "itemholder1.hxx"
 
-#define DEFAULT_TAB 2000
-
-#define DEF_INCH    2540L
-#define DEF_RELTWIP 1440L
-
 using namespace com::sun::star::uno;
 
 using ::rtl::OUString;
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index c8d65e2..01e1abd 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -58,7 +58,6 @@ using namespace ::com::sun::star::uno   ;
 
 #define ROOTNODE_SECURITY               OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Security/Scripting"))
 #define DEFAULT_SECUREURL               Sequence< OUString >()
-#define DEFAULT_SECLEVEL                3
 #define DEFAULT_TRUSTEDAUTHORS          Sequence< SvtSecurityOptions::Certificate >()
 
 // xmlsec05 depricated
diff --git a/unotools/source/config/startoptions.cxx b/unotools/source/config/startoptions.cxx
index 18653e3..aed86b2 100644
--- a/unotools/source/config/startoptions.cxx
+++ b/unotools/source/config/startoptions.cxx
@@ -42,7 +42,6 @@ using namespace ::osl                   ;
 using namespace ::com::sun::star::uno   ;
 
 #define DEFAULT_SHOWINTRO               sal_True
-#define DEFAULT_CONNECTIONURL           OUString()
 
 #define ROOTNODE_START                  OUString(RTL_CONSTASCII_USTRINGPARAM("Setup/Office" ))
 #define PROPERTYNAME_SHOWINTRO          OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupShowIntro" ))
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 0ec236d..112ffbb 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -61,8 +61,6 @@ namespace css = ::com::sun::star;
     #define CONST_ASCII(SASCIIVALUE)            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SASCIIVALUE))
 #endif
 
-#define PATHSEPERATOR                           CONST_ASCII("/")
-
 #define PACKAGE_VIEWS                           CONST_ASCII("org.openoffice.Office.Views")
 
 #define LIST_DIALOGS                            CONST_ASCII("Dialogs"   )
@@ -75,11 +73,6 @@ namespace css = ::com::sun::star;
 #define PROPERTY_VISIBLE                        CONST_ASCII("Visible"    )
 #define PROPERTY_USERDATA                       CONST_ASCII("UserData"   )
 
-#define PROPCOUNT_DIALOGS                       1
-#define PROPCOUNT_TABDIALOGS                    2
-#define PROPCOUNT_TABPAGES                      1
-#define PROPCOUNT_WINDOWS                       2
-
 #define DEFAULT_WINDOWSTATE                     ::rtl::OUString()
 #define DEFAULT_USERDATA                        css::uno::Sequence< css::beans::NamedValue >()
 #define DEFAULT_PAGEID                          0
diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx
index ad78142..ee685b0 100644
--- a/unotools/source/i18n/calendarwrapper.cxx
+++ b/unotools/source/i18n/calendarwrapper.cxx
@@ -35,7 +35,6 @@
 #include <com/sun/star/i18n/CalendarFieldIndex.hpp>
 #include <com/sun/star/i18n/XCalendar3.hpp>
 
-#define CALENDAR_LIBRARYNAME "i18n"
 #define CALENDAR_SERVICENAME "com.sun.star.i18n.LocaleCalendar"
 
 using namespace ::com::sun::star;
diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx
index a5093a9..5cfd143 100644
--- a/unotools/source/misc/atom.cxx
+++ b/unotools/source/misc/atom.cxx
@@ -32,7 +32,6 @@
 using namespace utl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
-#define NMSP_UTIL ::com::sun::star::util
 
 AtomProvider::AtomProvider()
 {
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index cf16a4b..21578d9 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -132,7 +132,6 @@ umask(old_mode);
     return bSuccess;
 }
 
-#define TMPNAME_SIZE  ( 1 + 5 + 5 + 4 + 1 )
 String ConstructTempDir_Impl( const String* pParent )
 {
     String aName;


More information about the Libreoffice-commits mailing list