You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/08 20:43:03 UTC

svn commit: r1480400 - /openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx

Author: hdu
Date: Wed May  8 18:43:02 2013
New Revision: 1480400

URL: http://svn.apache.org/r1480400
Log:
#i122208# force STL-wrappers around the vector<bool> magic in connectivity

neither boost nor libc++ like the bitvector specialization, so we
have to work around the deficiencies in that area using our vector
wrapper for now.

Modified:
    openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx

Modified: openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx?rev=1480400&r1=1480399&r2=1480400&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx (original)
+++ openoffice/branches/rejuvenate01/main/connectivity/source/commontools/dbtools.cxx Wed May  8 18:43:02 2013
@@ -1748,6 +1748,7 @@ sal_Bool implSetObject(	const Reference<
 }
 
 //..................................................................
+
 namespace
 {
     class OParameterWrapper : public ::cppu::WeakImplHelper1< XIndexAccess > 
@@ -1766,14 +1767,14 @@ namespace
         {
             if ( m_aSet.empty() )
                 return m_xSource->hasElements();
-            return ::std::count(m_aSet.begin(),m_aSet.end(),false) != 0;
+            return (::std::find(m_aSet.begin(),m_aSet.end(),false) != m_aSet.end());
         }
         // ::com::sun::star::container::XIndexAccess
         virtual sal_Int32 SAL_CALL getCount(  ) throw(RuntimeException)
         {
             if ( m_aSet.empty() )
                 return m_xSource->getCount();
-            return ::std::count(m_aSet.begin(),m_aSet.end(),false);
+            return std_bitset_count(m_aSet.begin(),m_aSet.end(),false);
         }
         virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
         {
@@ -1818,7 +1819,7 @@ void askForParameters(const Reference< X
 	Reference<XNameAccess>   xParamsAsNames(xParamsAsIndicies, UNO_QUERY);
 	sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
     ::std::bit_vector aNewParameterSet( _aParametersSet );
-    if ( nParamCount || ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
+    if ( nParamCount || std_bitset_count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
     {
         static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME));
         aNewParameterSet.resize(nParamCount ,false);