[Libreoffice-commits] .: 2 commits - connectivity/source svtools/source

Tor Lillqvist tml at kemper.freedesktop.org
Thu Sep 15 03:15:20 PDT 2011


 connectivity/source/manager/mdrivermanager.cxx |   20 ++++----------------
 svtools/source/table/tablecontrol_impl.cxx     |    2 --
 2 files changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 1a8349eee3a45e884a811276b8e253143eb37b48
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Sep 15 13:12:56 2011 +0300

    Drop leftover unused temp variable

diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index e533159..188b329 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2391,8 +2391,6 @@ namespace svt { namespace table
 
         long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
 
-        MutableColumnMetrics aOrdinateColumn(ordinate+1, ordinate+1);
-
         ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
             m_aColumnWidths.begin(),
             m_aColumnWidths.end(),
commit eab413f96302b75a8dddd73db613ad1c3f0a2551
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Sep 15 12:57:10 2011 +0300

    Make this compile with MSVC and _DEBUG

diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index be2df41..261d020 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -235,21 +235,6 @@ Any SAL_CALL ODriverEnumeration::nextElement(  ) throw(NoSuchElementException, W
     };
 
     /// and STL argorithm compatible predicate comparing a DriverAccess' impl name to a string
-    struct CompareDriverAccessToName : public ::std::binary_function< DriverAccess, ::rtl::OUString, bool >
-    {
-        //.................................................................
-        bool operator()( const DriverAccess& lhs, const ::rtl::OUString& rhs )
-        {
-            return lhs.sImplementationName < rhs ? true : false;
-        }
-        //.................................................................
-        bool operator()( const ::rtl::OUString& lhs, const DriverAccess& rhs )
-        {
-            return lhs < rhs.sImplementationName ? true : false;
-        }
-    };
-
-    /// and STL argorithm compatible predicate comparing a DriverAccess' impl name to a string
     struct EqualDriverAccessToName : public ::std::binary_function< DriverAccess, ::rtl::OUString, bool >
     {
         ::rtl::OUString m_sImplName;
@@ -393,9 +378,12 @@ void OSDBCDriverManager::initializeDriverPrecedence()
 
         for ( ; ( pDriverOrder < pDriverOrderEnd ) && ( aNoPrefDriversStart != m_aDriversBS.end() ); ++pDriverOrder )
         {
+            DriverAccess driver_order;
+            driver_order.sImplementationName = *pDriverOrder;
+
             // look for the impl name in the DriverAccess array
             ::std::pair< DriverAccessArrayIterator, DriverAccessArrayIterator > aPos =
-                ::std::equal_range( aNoPrefDriversStart, m_aDriversBS.end(), *pDriverOrder, CompareDriverAccessToName() );
+                ::std::equal_range( aNoPrefDriversStart, m_aDriversBS.end(), driver_order, CompareDriverAccessByName() );
 
             if ( aPos.first != aPos.second )
             {   // we have a DriverAccess with this impl name


More information about the Libreoffice-commits mailing list