Kaydet (Commit) 357a6f6b authored tarafından Mario J. Rugiero's avatar Mario J. Rugiero Kaydeden (comit) Noel Grandin

Replace a local functor and bind2nd by a lambda in formula.

Change-Id: Ied06b3f167c566d754d32708eaec4a354f7ee663
Reviewed-on: https://gerrit.libreoffice.org/19848Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst e589f187
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#include <com/sun/star/sheet/FormulaMapGroup.hpp> #include <com/sun/star/sheet/FormulaMapGroup.hpp>
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp> #include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <boost/ref.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <map> #include <map>
...@@ -454,17 +453,6 @@ void FormulaDlg_Impl::DeleteArgs() ...@@ -454,17 +453,6 @@ void FormulaDlg_Impl::DeleteArgs()
::std::vector< OUString>().swap(m_aArguments); ::std::vector< OUString>().swap(m_aArguments);
nArgs = 0; 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) sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
{ {
...@@ -540,7 +528,9 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos) ...@@ -540,7 +528,9 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
bFlag = false; bFlag = false;
nFuncPos = nPrevFuncPos; 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 ) if( bIsFunction && m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::SPACES].Token.OpCode != eOp )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment