summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authordcvb <sdfgh@sdfg.com>2017-07-06 10:04:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-06 20:22:05 +0200
commit1dea7fb6be5f1ba64f680e3ad885afa1c99030bf (patch)
tree01a6dc2d1dc57cf97074b72d053db0349d34a1fe /editeng
parent432f766892478f4693ca830e7d07bd195637fae0 (diff)
make binary functor unary, related tdf#108782
PropertyValueEqualFunctor was only used as unary functor with std::bind2nd Change-Id: Ic91e49de360e04ec5250f2d63f49163a8e7c7b92 Reviewed-on: https://gerrit.libreoffice.org/39624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index e607d30a6a4f..2fca44ce48c3 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -64,14 +64,17 @@ namespace accessibility
{
typedef std::vector< beans::PropertyValue > PropertyValueVector;
- class PropertyValueEqualFunctor : public std::binary_function< beans::PropertyValue, beans::PropertyValue, bool >
+ class PropertyValueEqualFunctor
{
+ const beans::PropertyValue& m_rPValue;
+
public:
- PropertyValueEqualFunctor()
+ explicit PropertyValueEqualFunctor(const beans::PropertyValue& rPValue)
+ : m_rPValue(rPValue)
{}
- bool operator() ( const beans::PropertyValue& lhs, const beans::PropertyValue& rhs ) const
+ bool operator() ( const beans::PropertyValue& rhs ) const
{
- return ( lhs.Name == rhs.Name && lhs.Value == rhs.Value );
+ return ( m_rPValue.Name == rhs.Name && m_rPValue.Value == rhs.Value );
}
};
sal_Unicode const cNewLine(0x0a);
@@ -915,7 +918,7 @@ namespace accessibility
{
const beans::PropertyValue* pItr = aSeq.getConstArray();
const beans::PropertyValue* pEnd = pItr + aSeq.getLength();
- const beans::PropertyValue* pFind = std::find_if( pItr, pEnd, std::bind2nd( PropertyValueEqualFunctor(), std::cref( *aItr ) ) );
+ const beans::PropertyValue* pFind = std::find_if( pItr, pEnd, PropertyValueEqualFunctor(*aItr) );
if ( pFind != pEnd )
{
aIntersectionVec.push_back( *pFind );
@@ -953,7 +956,7 @@ namespace accessibility
{
const beans::PropertyValue* pItr = aIntersectionSeq.getConstArray();
const beans::PropertyValue* pEnd = pItr + aIntersectionSeq.getLength();
- bool bNone = std::none_of( pItr, pEnd, std::bind2nd( PropertyValueEqualFunctor(), std::cref( pDefAttr[i] ) ) );
+ bool bNone = std::none_of( pItr, pEnd, PropertyValueEqualFunctor( pDefAttr[i] ) );
if ( bNone && pDefAttr[i].Handle != 0)
{
aDiffVec.push_back( pDefAttr[i] );