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

Tor Lillqvist tml at kemper.freedesktop.org
Tue Aug 23 02:31:29 PDT 2011


 fpicker/source/office/OfficeControlAccess.cxx |    2 ++
 svtools/source/table/tablecontrol_impl.cxx    |    4 +++-
 svtools/source/table/tablecontrol_impl.hxx    |    8 ++------
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 6c1e8719013b47ff3d3954173a17e49f3a361009
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 23 12:24:40 2011 +0300

    Avoid compilation error in dbgutil (_DEBUG) MSVC build
    
    Define _HAS_ITERATOR_DEBUGGING as 0 so that we don't use the debugging
    ordering predicates, which cause compilation errors thanks to the way
    we use std::equal_range(). In this case it seemed fairly hairy to fix
    that, so...

diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 50632bf..74bd77b 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -26,6 +26,8 @@
  *
  ************************************************************************/
 
+#define _HAS_ITERATOR_DEBUGGING 0
+
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_fpicker.hxx"
 
commit 85bee97305cc4b411c7dccbba6e4157f7985bb74
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 23 10:10:21 2011 +0300

    Work around limitation in the debug version of the MSVC std::lower_bound

diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index cf486bb..e533159 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2391,10 +2391,12 @@ 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(),
-            ordinate + 1,
+            MutableColumnMetrics(ordinate+1, ordinate+1),
             ColumnInfoPositionLess()
         );
         if ( lowerBound == m_aColumnWidths.end() )
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 2f9cffd..5a87908 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -72,13 +72,9 @@ namespace svt { namespace table
 
     struct ColumnInfoPositionLess
     {
-        bool operator()( MutableColumnMetrics const& i_colInfo, long const i_position )
+        bool operator()( MutableColumnMetrics const& i_lhs, MutableColumnMetrics const& i_rhs )
         {
-            return i_colInfo.getEnd() < i_position;
-        }
-        bool operator()( long const i_position, MutableColumnMetrics const& i_colInfo )
-        {
-            return i_position < i_colInfo.getStart();
+            return i_lhs.getEnd() < i_rhs.getStart();
         }
     };
 


More information about the Libreoffice-commits mailing list