summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-08-23 10:10:21 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-08-23 12:29:34 +0300
commit85bee97305cc4b411c7dccbba6e4157f7985bb74 (patch)
treee55710775d4203513a072bfdde0a8fa8484cfa16 /svtools
parentb0eea6c310e187af5b9580a29d0f25c320fbc190 (diff)
Work around limitation in the debug version of the MSVC std::lower_bound
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx4
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx8
2 files changed, 5 insertions, 7 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index cf486bba5149..e533159c6071 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 2f9cffd3089b..5a8790897aef 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();
}
};