summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorMario J. Rugiero <mrugiero@gmail.com>2015-11-08 22:40:27 -0300
committerNoel Grandin <noelgrandin@gmail.com>2015-11-09 06:09:05 +0000
commit357a6f6ba23245c6fe84d888edc7ad0d01a831b8 (patch)
tree515c0b8bf05d4ce815bc651e76b9e4d17ac6e345 /formula
parente589f187e47bf2d5a9bf8e96e050189b7782cb77 (diff)
Replace a local functor and bind2nd by a lambda in formula.
Change-Id: Ied06b3f167c566d754d32708eaec4a354f7ee663 Reviewed-on: https://gerrit.libreoffice.org/19848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/formula.cxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 831d54bda8b8..0af8a12d73aa 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -58,7 +58,6 @@
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <boost/ref.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <map>
@@ -454,17 +453,6 @@ void FormulaDlg_Impl::DeleteArgs()
::std::vector< OUString>().swap(m_aArguments);
nArgs = 0;
}
-namespace
-{
- // comparing two property instances
- struct OpCodeCompare : public ::std::binary_function< sheet::FormulaOpCodeMapEntry, sal_Int32 , bool >
- {
- bool operator() (const sheet::FormulaOpCodeMapEntry& x, sal_Int32 y) const
- {
- return x.Token.OpCode == y;
- }
- };
-}
sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
{
@@ -540,7 +528,9 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
bFlag = false;
nFuncPos = nPrevFuncPos;
}
- bool bIsFunction = ::std::find_if(m_aFunctionOpCodes.getConstArray(),m_pFunctionOpCodesEnd,::std::bind2nd(OpCodeCompare(),boost::cref(eOp))) != m_pFunctionOpCodesEnd;
+ bool bIsFunction = ::std::find_if(m_aFunctionOpCodes.getConstArray(),
+ m_pFunctionOpCodesEnd,
+ [&eOp](const sheet::FormulaOpCodeMapEntry& aEntry) { return aEntry.Token.OpCode == eOp; } ) != m_pFunctionOpCodesEnd;
if( bIsFunction && m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::SPACES].Token.OpCode != eOp )
{