summaryrefslogtreecommitdiff
path: root/sw/inc/ndhints.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-31 15:52:38 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-31 20:26:45 +0200
commit43377e09d86dfcf800270a4c469ea5bd373392c6 (patch)
tree59f87eaabb523a9d168aaa3ef5e1bfb61c21c6fe /sw/inc/ndhints.hxx
parent4623c603bde7678004fe6019f9d9e4b816a3d6c6 (diff)
fix some problems in previous STL conversion:
- use o3tl::find_partialorder_ptrequals to allow multiple hints on same position - GetPos must not dereference its argument - unused IsEquals Change-Id: I274203be96ff90d1e9a46bab17fd00355514a4fa
Diffstat (limited to 'sw/inc/ndhints.hxx')
-rw-r--r--sw/inc/ndhints.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 75df3f74ca17..154c95763740 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -75,13 +75,15 @@ struct CompareSwpHtStart
{
bool operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const;
};
-class SwpHtStart : public o3tl::sorted_vector<SwTxtAttr*, CompareSwpHtStart> {};
+class SwpHtStart : public o3tl::sorted_vector<SwTxtAttr*, CompareSwpHtStart,
+ o3tl::find_partialorder_ptrequals<SwTxtAttr*, CompareSwpHtStart> > {};
struct CompareSwpHtEnd
{
bool operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const;
};
-class SwpHtEnd : public o3tl::sorted_vector<SwTxtAttr*, CompareSwpHtEnd> {};
+class SwpHtEnd : public o3tl::sorted_vector<SwTxtAttr*, CompareSwpHtEnd,
+ o3tl::find_partialorder_ptrequals<SwTxtAttr*, CompareSwpHtEnd> > {};
// Class SwpHintsArr
@@ -212,7 +214,8 @@ SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
inline sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
{
- SwpHtStart::const_iterator it = m_HintStarts.find( (SwTxtAttr*)pHt );
+ SwpHtStart::const_iterator const it =
+ m_HintStarts.find(const_cast<SwTxtAttr*>(pHt));
if ( it == m_HintStarts.end() )
{
return USHRT_MAX;