[Libreoffice-commits] .: connectivity/source svx/source ucb/source

Fridrich Strba fridrich at kemper.freedesktop.org
Tue Feb 8 09:01:39 PST 2011


 connectivity/source/commontools/TSortIndex.cxx      |    5 +++--
 connectivity/source/commontools/TTableHelper.cxx    |    4 +++-
 connectivity/source/drivers/ado/AColumn.cxx         |    8 +++++---
 connectivity/source/drivers/ado/AColumns.cxx        |    8 +++++---
 connectivity/source/drivers/ado/AConnection.cxx     |    8 +++++---
 connectivity/source/drivers/hsqldb/HDriver.cxx      |   10 ++++++----
 connectivity/source/drivers/hsqldb/HStorageMap.cxx  |   10 ++++++----
 connectivity/source/drivers/odbcbase/OResultSet.cxx |    4 +++-
 connectivity/source/manager/mdrivermanager.cxx      |    9 +++++----
 svx/source/form/formcontroller.cxx                  |   11 ++++++-----
 ucb/source/ucp/odma/odma_provider.cxx               |    6 ++++--
 11 files changed, 51 insertions(+), 32 deletions(-)

New commits:
commit 7b5eac17dd870e89525fea5390c343ffebd5cb47
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Feb 8 17:39:27 2011 +0100

    Port stuff to our private implementation of SGI extensions

diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 31fe65d..730b844 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -30,7 +30,8 @@
 #include "precompiled_connectivity.hxx"
 #include "TSortIndex.hxx"
 #include <algorithm>
-#include <functional>
+
+#include <o3tl/compat_functional.hxx>
 
 using namespace connectivity;
 //------------------------------------------------------------------
@@ -95,7 +96,7 @@ struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::v
     ::std::transform(m_aKeyValues.begin()
                     ,m_aKeyValues.end()
                     ,::std::back_inserter(pKeySet->get())
-                    ,::std::select1st<TIntValuePairVector::value_type>());
+                    ,::o3tl::select1st<TIntValuePairVector::value_type>());
     pKeySet->setFrozen();
     return pKeySet;
 }
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 367f388..3462579 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -45,6 +45,8 @@
 #include <unotools/sharedunocomponent.hxx>
 #include "TConnection.hxx"
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace ::comphelper;
 using namespace connectivity;
 using namespace ::com::sun::star::uno;
@@ -302,7 +304,7 @@ void OTableHelper::refreshColumns()
             aSortedColumns.begin(),
             aSortedColumns.end(),
             ::std::insert_iterator< TStringVector >( aVector, aVector.begin() ),
-            ::std::select2nd< ::std::map< OrdinalPosition, ::rtl::OUString >::value_type >()
+            ::o3tl::select2nd< ::std::map< OrdinalPosition, ::rtl::OUString >::value_type >()
         );
     }
 
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 6c8bad7..d2b7b1d 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -38,6 +38,8 @@
 #include <comphelper/types.hxx>
 #include "ado/ACatalog.hxx"
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace ::comphelper;
 
 using namespace connectivity::ado;
@@ -225,11 +227,11 @@ void OAdoColumn::fillPropertyValues()
             ::comphelper::TStringMixEqualFunctor aCase(sal_False);
             OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
                                                             pTypeInfoMap->end(),
-                                                            ::std::compose1(
+                                                            ::o3tl::compose1(
                                                             ::std::bind2nd(aCase, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VarBinary"))),
-                                                                ::std::compose1(
+                                                                ::o3tl::compose1(
                                                                     ::std::mem_fun(&OExtendedTypeInfo::getDBName),
-                                                                    ::std::select2nd<OTypeInfoMap::value_type>())
+                                                                    ::o3tl::select2nd<OTypeInfoMap::value_type>())
                                                                 )
 
                                                     );
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 9b2c82f..dc23087 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -44,6 +44,8 @@
 #endif
 #include "resource/ado_res.hrc"
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace connectivity::ado;
 using namespace connectivity;
 using namespace comphelper;
@@ -95,11 +97,11 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString&, const Referenc
     // search for typeinfo where the typename is equal sTypeName
     OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
                                                         pTypeInfoMap->end(),
-                                                        ::std::compose1(
+                                                        ::o3tl::compose1(
                                                             ::std::bind2nd(aCase, sTypeName),
-                                                            ::std::compose1(
+                                                            ::o3tl::compose1(
                                                                 ::std::mem_fun(&OExtendedTypeInfo::getDBName),
-                                                                ::std::select2nd<OTypeInfoMap::value_type>())
+                                                                ::o3tl::select2nd<OTypeInfoMap::value_type>())
                                                             )
     
                                                 );
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 6f42c36..7636fe9 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -44,6 +44,8 @@
 #include <osl/file.hxx>
 #include "resource/ado_res.hrc"
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace dbtools;
 using namespace connectivity::ado;
 using namespace com::sun::star::uno;
@@ -605,11 +607,11 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
         // search for typeinfo where the typename is equal _sTypeName
         OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(),
                                                             _rTypeInfo.end(),
-                                                            ::std::compose1(
+                                                            ::o3tl::compose1(
                                                                 ::std::bind2nd(aCase, _sTypeName),
-                                                                ::std::compose1(
+                                                                ::o3tl::compose1(
                                                                     ::std::mem_fun(&OExtendedTypeInfo::getDBName),
-                                                                    ::std::select2nd<OTypeInfoMap::value_type>())
+                                                                    ::o3tl::select2nd<OTypeInfoMap::value_type>())
                                                                 )
                                                             );
         if(aFind != _rTypeInfo.end())
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 735d94a..753faa9 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -57,6 +57,8 @@
 #include "resource/hsqldb_res.hrc"
 #include "resource/sharedresources.hxx"
 
+#include <o3tl/compat_functional.hxx>
+
 //........................................................................
 namespace connectivity
 {
@@ -573,9 +575,9 @@ namespace connectivity
             if ( xStorage.is() )
             {
                 ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage);
-                TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1(
+                TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1(
                                 ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey)
-                                ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >())));
+                                ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >())));
                 if ( i != m_aConnections.end() )
                     shutdownConnection(i);
             }
@@ -609,9 +611,9 @@ namespace connectivity
         ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage);
         if ( sKey.getLength() )
         {
-            TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1(
+            TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1(
                             ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey)
-                            ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >())));
+                            ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >())));
             OSL_ENSURE( i != m_aConnections.end(), "ODriverDelegator::preCommit: they're committing a storage which I do not know!" );
             if ( i != m_aConnections.end() )
             {
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 72722d5..01bbc81 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -37,6 +37,8 @@
 #include "diagnose_ex.h"
 #include <osl/thread.h>
 
+#include <o3tl/compat_functional.hxx>
+
 //........................................................................
 namespace connectivity
 {
@@ -185,9 +187,9 @@ namespace connectivity
             TStorages& rMap = lcl_getStorageMap();
             // check if the storage is already in our map
             TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
-                                        ::std::compose1(
+                                        ::o3tl::compose1(
                                             ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage)
-                                            ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>())))
+                                            ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>())))
                     );
             if ( aFind == rMap.end() )
             {
@@ -216,9 +218,9 @@ namespace connectivity
             TStorages& rMap = lcl_getStorageMap();
             // check if the storage is already in our map
             TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
-                                        ::std::compose1(
+                                        ::o3tl::compose1(
                                             ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage)
-                                            ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>())))
+                                            ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>())))
                     );
             if ( aFind != rMap.end() )
                 sKey = aFind->first;
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 455c1ac..8abf895 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -48,6 +48,8 @@
 #include "diagnose_ex.h"
 #include <rtl/logfile.hxx>
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace ::comphelper;
 using namespace connectivity;
 using namespace connectivity::odbc;
@@ -1150,7 +1152,7 @@ Any SAL_CALL OResultSet::getBookmark(  ) throw( SQLException,  RuntimeException)
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
     TBookmarkPosMap::iterator aFind = ::std::find_if(m_aPosToBookmarks.begin(),m_aPosToBookmarks.end(),
-        ::std::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),m_nRowPos),::std::select2nd<TBookmarkPosMap::value_type>()));
+        ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),m_nRowPos),::o3tl::select2nd<TBookmarkPosMap::value_type>()));
 
     if ( aFind == m_aPosToBookmarks.end() )
     {
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 2ce0fa0..fccc363 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -46,7 +46,8 @@
 #include <osl/diagnose.h>
 
 #include <algorithm>
-#include <functional>
+
+#include <o3tl/compat_functional.hxx>
 
 namespace drivermanager
 {
@@ -142,7 +143,7 @@ Any SAL_CALL ODriverEnumeration::nextElement(  ) throw(NoSuchElementException, W
         }
     };
 
-    typedef ::std::unary_compose< ExtractDriverFromAccess, EnsureDriver > ExtractAfterLoad_BASE;
+    typedef ::o3tl::unary_compose< ExtractDriverFromAccess, EnsureDriver > ExtractAfterLoad_BASE;
     /// an STL functor which loads a driver described by a DriverAccess, and extracts the SdbcDriver
     struct ExtractAfterLoad : public ExtractAfterLoad_BASE
     {
@@ -676,7 +677,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const ::rtl::OUStri
             aFind = ::std::find_if(
                 m_aDriversBS.begin(),		// begin of search range
                 m_aDriversBS.end(),			// end of search range
-                std::unary_compose< AcceptsURL, ExtractAfterLoad >( AcceptsURL( _rURL ), ExtractAfterLoad() )
+                o3tl::unary_compose< AcceptsURL, ExtractAfterLoad >( AcceptsURL( _rURL ), ExtractAfterLoad() )
                                             // compose two functors: extract the driver from the access, then ask the resulting driver for acceptance
             );
         } // if ( m_aDriversBS.find(sDriverFactoryName ) == m_aDriversBS.end() )
@@ -697,7 +698,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const ::rtl::OUStri
         DriverCollectionIterator aPos = ::std::find_if(
             m_aDriversRT.begin(),		// begin of search range
             m_aDriversRT.end(),			// end of search range
-            std::unary_compose< AcceptsURL, ExtractDriverFromCollectionElement >( AcceptsURL( _rURL ), ExtractDriverFromCollectionElement() )
+            o3tl::unary_compose< AcceptsURL, ExtractDriverFromCollectionElement >( AcceptsURL( _rURL ), ExtractDriverFromCollectionElement() )
                                         // compose two functors: extract the driver from the access, then ask the resulting driver for acceptance
         );
 
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index dd638ca..87725e9 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -94,7 +94,8 @@
 #include <rtl/logfile.hxx>
 
 #include <algorithm>
-#include <functional>
+
+#include <o3tl/compat_functional.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::comphelper;
@@ -522,7 +523,7 @@ struct UpdateAllListeners : public ::std::unary_function< Reference< XDispatch >
     bool operator()( const Reference< XDispatch >& _rxDispatcher ) const
     {
         static_cast< ::svx::OSingleFeatureDispatcher* >( _rxDispatcher.get() )->updateAllListeners();
-        // the return is a dummy only so we can use this struct in a std::compose1 call
+        // the return is a dummy only so we can use this struct in a o3tl::compose1 call
         return true;
     }
 };
@@ -2651,9 +2652,9 @@ void FormController::updateAllDispatchers() const
     ::std::for_each(
         m_aFeatureDispatchers.begin(),
         m_aFeatureDispatchers.end(),
-        ::std::compose1(
+        ::o3tl::compose1(
             UpdateAllListeners(),
-            ::std::select2nd< DispatcherContainer::value_type >()
+            ::o3tl::select2nd< DispatcherContainer::value_type >()
         )
     );
 }
@@ -4107,7 +4108,7 @@ void SAL_CALL FormController::invalidateAllFeatures(  ) throw (RuntimeException)
         m_aFeatureDispatchers.begin(),
         m_aFeatureDispatchers.end(),
         aInterceptedFeatures.getArray(),
-        ::std::select1st< DispatcherContainer::value_type >()
+        ::o3tl::select1st< DispatcherContainer::value_type >()
     );
 
     aGuard.clear();
diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx
index 7d2216a..b52d7df 100644
--- a/ucb/source/ucp/odma/odma_provider.cxx
+++ b/ucb/source/ucp/odma/odma_provider.cxx
@@ -44,6 +44,8 @@
 #include <algorithm>
 #include <osl/file.hxx>
 
+#include <o3tl/compat_functional.hxx>
+
 using namespace com::sun::star;
 using namespace odma;
 
@@ -505,9 +507,9 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
     ::rtl::Reference<ContentProperties> aReturn;
     ContentsMap::const_iterator aFind = ::std::find_if(	m_aContents.begin(),
                                                         m_aContents.end(),
-                                                        ::std::compose1(
+                                                        ::o3tl::compose1(
                                                             ::std::bind2nd(_aFunctor,_sName),
-                                                            ::std::select2nd<ContentsMap::value_type>()
+                                                            ::o3tl::select2nd<ContentsMap::value_type>()
                                                         )
                                                     );
     if(aFind != m_aContents.end())


More information about the Libreoffice-commits mailing list