[Libreoffice-commits] .: 7 commits - comphelper/inc comphelper/source sot/inc svtools/source unotools/inc unotools/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Nov 17 06:20:05 PST 2010


 comphelper/inc/comphelper/locale.hxx                           |   55 -
 comphelper/inc/comphelper/propertycontainerhelper.hxx          |    2 
 comphelper/inc/comphelper/stl_types.hxx                        |    4 
 comphelper/source/container/IndexedPropertyValuesContainer.cxx |    2 
 comphelper/source/misc/locale.cxx                              |  334 ----------
 comphelper/source/misc/uieventslogger.cxx                      |    1 
 comphelper/source/property/genericpropertyset.cxx              |    3 
 sot/inc/sot/exchange.hxx                                       |    4 
 svtools/source/control/roadmap.cxx                             |    2 
 svtools/source/control/scriptedtext.cxx                        |    2 
 unotools/inc/unotools/atom.hxx                                 |    2 
 unotools/source/config/compatibility.cxx                       |    2 
 unotools/source/config/dynamicmenuoptions.cxx                  |    2 
 unotools/source/config/historyoptions.cxx                      |    5 
 14 files changed, 420 deletions(-)

New commits:
commit a512301015886c56a64a1f62c9a943feaf1d6dca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 13:13:07 2010 +0000

    drop unused methods

diff --git a/comphelper/inc/comphelper/locale.hxx b/comphelper/inc/comphelper/locale.hxx
index 5b99127..23e4af3 100644
--- a/comphelper/inc/comphelper/locale.hxx
+++ b/comphelper/inc/comphelper/locale.hxx
@@ -70,40 +70,8 @@ class COMPHELPER_DLLPUBLIC Locale
         
         /** @short some predefined Locale objects. */
         static const Locale EN_US();
-        static const Locale EN();
-        static const Locale DE_DE();
-        static const Locale DE_CH();
-        static const Locale DE_AT();
-        static const Locale AR();
-        static const Locale CA();
-        static const Locale CS();
-        static const Locale DA();
-        static const Locale EL();
-        static const Locale ES();
-        static const Locale FI();
-        static const Locale FR();
-        static const Locale HE();
-        static const Locale HI_IN();
-        static const Locale HU();
-        static const Locale IT();
-        static const Locale JA();
-        static const Locale KO();
-        static const Locale NL();
-        static const Locale PL();
-        static const Locale PT();
-        static const Locale PT_BR();
-        static const Locale RU();
-        static const Locale SK();
-        static const Locale SL();
-        static const Locale SV();
-        static const Locale TH();
-        static const Locale TR();
         static const Locale X_DEFAULT();
-        static const Locale X_COMMENT();
-        static const Locale X_TRANSLATE();
         static const Locale X_NOTRANSLATE();
-        static const Locale ZH_CN();
-        static const Locale ZH_TW();
                             
     //-------------------------------------------
     // types
@@ -381,29 +349,6 @@ class COMPHELPER_DLLPUBLIC Locale
             throw(MalFormedLocaleException);
             
         //---------------------------------------
-        /** @short      search for the next possible fallback locale.
-        
-            @descr      Instead of getFallback(vector<>, string) this method
-                        uses the given locale and decide by using an algorithm
-                        which locale can be the next possible one.
-                        
-                        Algorithm:
-                        - if locale has country return language only
-                        - if locale different "en-US" return "en-US"
-                        - if locale "en-US" return "en"
-                        
-            @param      aLocale [in/out]!
-                        the incoming value will be used to start
-                        search for a possible fallback ...
-                        and in case such fallback was found this parameter
-                        will be used for return too.
-
-            @return     TRUE if the parameter aLocale contains a new fallback value;
-                        FALSE otherwise.                        
-         */
-        static sal_Bool getFallback(Locale& aLocale);            
-
-        //---------------------------------------
         /** @short      assign elements of another locale
                         to this instance.
                         
diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx
index e08f5aa..7f190d6 100644
--- a/comphelper/source/misc/locale.cxx
+++ b/comphelper/source/misc/locale.cxx
@@ -54,15 +54,6 @@ const Locale Locale::X_DEFAULT()
 }
 
 //-----------------------------------------------
-const Locale Locale::EN()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
 const Locale Locale::EN_US()
 {
     static Locale aLocale(
@@ -72,267 +63,6 @@ const Locale Locale::EN_US()
 }
 
 //-----------------------------------------------
-const Locale Locale::DE_DE()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::DE_CH()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CH")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::DE_AT()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AT")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::AR()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ar")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::CA()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ca")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::CS()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cs")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::DA()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("da")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::EL()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("el")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::ES()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("es")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::FI()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fi")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::FR()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fr")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::HE()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("he")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::HI_IN()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hi")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::HU()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hu")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::IT()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("it")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::JA()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ja")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::KO()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ko")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::NL()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nl")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::PL()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pl")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::PT()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::PT_BR()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pt")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BR")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::RU()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ru")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::SK()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sk")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::SL()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sl")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::SV()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sv")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::TH()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("th")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::TR()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tr")),
-                    ::rtl::OUString());
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::X_COMMENT()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("comment")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::X_TRANSLATE()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("translate")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
 const Locale Locale::X_NOTRANSLATE()
 {
     static Locale aLocale(
@@ -342,24 +72,6 @@ const Locale Locale::X_NOTRANSLATE()
 }
 
 //-----------------------------------------------
-const Locale Locale::ZH_CN()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CN")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
-const Locale Locale::ZH_TW()
-{
-    static Locale aLocale(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zh")),
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TW")));
-    return aLocale;                    
-}
-
-//-----------------------------------------------
 Locale::Locale(const ::rtl::OUString& sISO)
     throw(Locale::MalFormedLocaleException)
 {
@@ -612,52 +324,6 @@ sal_Bool Locale::similar(const Locale& aComparable) const
 }
 
 //-----------------------------------------------
-sal_Bool Locale::getFallback(Locale& aLocale)
-{
-    // a)
-    // this was our last fallback!
-    // break any further calls to this method ...
-    if (aLocale.equals(X_NOTRANSLATE()))
-        return sal_False;
-
-    // b)
-    // switch from X_DEFAULT to X_NOTRANSLATE
-    // next time we will go to a)
-    if (aLocale.equals(X_DEFAULT()))
-    {
-        aLocale = X_NOTRANSLATE();
-        return sal_True;
-    }
-
-    // c)
-    // switch from EN to X_DEFAULT
-    // next time we will go to b)
-    if (aLocale.equals(EN()))
-    {
-        aLocale = X_DEFAULT();
-        return sal_True;
-    }
-
-    // d) remove country from incoming locale
-    //    e.g. "de-DE" => "de" or "en-US" => "en"!
-    if (aLocale.getCountry().getLength())
-    {
-        aLocale.setCountry(::rtl::OUString());
-        return sal_True;
-    }
-    
-    // e) "en-US" possible?
-    if (!aLocale.equals(EN_US()))
-    {
-        aLocale = EN_US();
-        return sal_True;
-    }
-
-    // f) no more fallbacks    
-    return sal_False;
-}            
-
-//-----------------------------------------------
 void  Locale::operator=(const Locale& rCopy)
 {
     // Take over these values without checking ...
commit 33913a0485655e2bd38f8bda3171202a8965ff5e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 12:14:38 2010 +0000

    unused header

diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
index 6c5a147..4ee59da 100644
--- a/comphelper/source/misc/uieventslogger.cxx
+++ b/comphelper/source/misc/uieventslogger.cxx
@@ -29,7 +29,6 @@
 #include "precompiled_comphelper.hxx"
 
 #include <comphelper/uieventslogger.hxx>
-#include <boost/shared_ptr.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
 #include <com/sun/star/frame/XTerminateListener.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
commit da3cb99c4d74e7179a50d5d4b5ee404ad4158916
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 11:55:14 2010 +0000

    micro-optimize, drop unused headers and lose some unused symbols

diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 6e4ccb7..18ca6db 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -39,9 +39,6 @@
 #include <comphelper/stl_types.hxx>
 #include <osl/mutex.hxx>
 #include <rtl/uuid.h>
-#include <boost/mem_fn.hpp>
-#include <boost/bind.hpp>
-#include <boost/utility.hpp>
 
 ///////////////////////////////////////////////////////////////////////
 
commit f3f789e4b5accf325f1a6bfa6dd3dc590023d3d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 09:51:16 2010 +0000

    remove archaic SGI header guards

diff --git a/sot/inc/sot/exchange.hxx b/sot/inc/sot/exchange.hxx
index 5a72c79..eaea8ae 100644
--- a/sot/inc/sot/exchange.hxx
+++ b/sot/inc/sot/exchange.hxx
@@ -29,12 +29,8 @@
 #ifndef _SOT_EXCHANGE_HXX
 #define _SOT_EXCHANGE_HXX
 
-#ifndef __SGI_STL_LIST
 #include <list>
-#endif
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 #include <tools/string.hxx>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/datatransfer/DataFlavor.hpp>
commit 111a7d10fde1ba8737b4e3cd104d8fce2ce97f19
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 09:50:57 2010 +0000

    remove archaic SGI header guards

diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index c26fbdd..41672d2 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -34,9 +34,7 @@
 #define _STRING_HXX
 #endif
 
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 
 #include <algorithm>
 #include <vcl/bitmap.hxx>
diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index ff07eff..096cce2 100644
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -30,9 +30,7 @@
 #include "precompiled_svtools.hxx"
 #include "scriptedtext.hxx"
 
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 #include <rtl/ustring.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/font.hxx>
commit 4b2977baa565a0edd8f91747952cf706f62a69e6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 09:49:09 2010 +0000

    remove archaic SGI header guards

diff --git a/unotools/inc/unotools/atom.hxx b/unotools/inc/unotools/atom.hxx
index cfd3727..47a5d9d 100644
--- a/unotools/inc/unotools/atom.hxx
+++ b/unotools/inc/unotools/atom.hxx
@@ -34,9 +34,7 @@
 #include <cppuhelper/implbase1.hxx>
 
 #include <hash_map>
-#ifndef __SGI_STL_LIST
 #include <list>
-#endif
 #include <com/sun/star/util/XAtomServer.hpp>
 
 #define INVALID_ATOM 0
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index e039ed8..1ad448b 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -41,9 +41,7 @@
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 
 #include <itemholder1.hxx>
 
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index b9f565c..b13f570 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -37,9 +37,7 @@
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 
 #include <itemholder1.hxx>
 
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 5aba5f1..1a227a3 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -37,13 +37,8 @@
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
-#ifndef __SGI_STL_DEQUE
 #include <deque>
-#endif
-
-#ifndef __SGI_STL_ALGORITHM
 #include <algorithm>
-#endif
 
 #include <rtl/logfile.hxx>
 #include "itemholder1.hxx"
commit 2e3fe36c4fa205018ad41701d120d0ac4eb647b4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 09:46:02 2010 +0000

    remove archaic SGI header guards

diff --git a/comphelper/inc/comphelper/propertycontainerhelper.hxx b/comphelper/inc/comphelper/propertycontainerhelper.hxx
index cfb095f..e69347c 100644
--- a/comphelper/inc/comphelper/propertycontainerhelper.hxx
+++ b/comphelper/inc/comphelper/propertycontainerhelper.hxx
@@ -32,9 +32,7 @@
 #include <cppuhelper/propshlp.hxx>
 #include <com/sun/star/uno/Type.hxx>
 #include <com/sun/star/beans/Property.hpp>
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 #include "comphelper/comphelperdllapi.h"
 
 //.........................................................................
diff --git a/comphelper/inc/comphelper/stl_types.hxx b/comphelper/inc/comphelper/stl_types.hxx
index 36eb57a..1fc2b06 100644
--- a/comphelper/inc/comphelper/stl_types.hxx
+++ b/comphelper/inc/comphelper/stl_types.hxx
@@ -28,8 +28,6 @@
 #ifndef _COMPHELPER_STLTYPES_HXX_
 #define _COMPHELPER_STLTYPES_HXX_
 
-#if !defined(__SGI_STL_VECTOR_H) || !defined(__SGI_STL_MAP_H) || !defined(__SGI_STL_MULTIMAP_H)
-
 #include <vector>
 #include <map>
 
@@ -277,8 +275,6 @@ OutputIter intersperse(
     typedef ::std::set< valuetype, comparefct > classname;  \
     DECLARE_STL_ITERATORS(classname)                        \
 
-#endif
-
 #endif  // _COMPHELPER_STLTYPES_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 9cf477c..6687488 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -39,9 +39,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 
 
-#ifndef __SGI_STL_VECTOR
 #include <vector>
-#endif
 
 using namespace com::sun::star;
 


More information about the Libreoffice-commits mailing list