summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-05 08:03:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-05 11:29:54 +0000
commit9866efe3e5a670bab54d931be31e1989aeb382a7 (patch)
tree64b1365a7f1e38b8babdfccee8db100af922ab73 /forms
parent4b4c9184279c2cb5998348b09e084b295de1c8aa (diff)
loplugin:constantparam
Change-Id: I821ed77a6c6014c9a82d31a4b117ed6f1b4abf18 Reviewed-on: https://gerrit.libreoffice.org/23832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx27
-rw-r--r--forms/source/component/DatabaseForm.hxx2
2 files changed, 13 insertions, 16 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index e44e90eb29e1..393f0e5bd641 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -185,7 +185,7 @@ void OFormSubmitResetThread::processEvent(
bool _bSubmit)
{
if (_bSubmit)
- static_cast<ODatabaseForm *>(pCompImpl)->submit_impl(_rControl, *static_cast<const css::awt::MouseEvent*>(_pEvt), true);
+ static_cast<ODatabaseForm *>(pCompImpl)->submit_impl(_rControl, *static_cast<const css::awt::MouseEvent*>(_pEvt));
else
static_cast<ODatabaseForm *>(pCompImpl)->reset_impl(true);
}
@@ -2118,7 +2118,7 @@ void SAL_CALL ODatabaseForm::submit( const Reference<XControl>& Control,
{
// direct call without any approving by the listeners
aGuard.clear();
- submit_impl( Control, MouseEvt, true );
+ submit_impl( Control, MouseEvt );
}
}
@@ -2152,24 +2152,21 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor
} // if (xDisp.is())
}
-void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::awt::MouseEvent& MouseEvt, bool _bAproveByListeners)
+void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::awt::MouseEvent& MouseEvt)
{
- if (_bAproveByListeners)
+ ::comphelper::OInterfaceIteratorHelper2 aIter(m_aSubmitListeners);
+ EventObject aEvt(static_cast<XWeak*>(this));
+ bool bCanceled = false;
+ while (aIter.hasMoreElements() && !bCanceled)
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aSubmitListeners);
- EventObject aEvt(static_cast<XWeak*>(this));
- bool bCanceled = false;
- while (aIter.hasMoreElements() && !bCanceled)
- {
- if (!static_cast<XSubmitListener*>(aIter.next())->approveSubmit(aEvt))
- bCanceled = true;
- }
-
- if (bCanceled)
- return;
+ if (!static_cast<XSubmitListener*>(aIter.next())->approveSubmit(aEvt))
+ bCanceled = true;
}
+ if (bCanceled)
+ return;
+
FormSubmitEncoding eSubmitEncoding;
FormSubmitMethod eSubmitMethod;
OUString aURLStr;
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index f51f9993a75b..415fb24fb8d9 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -461,7 +461,7 @@ private:
void reload_impl(bool bMoveToFirst,
const css::uno::Reference< css::task::XInteractionHandler >& _rxCompletionHandler = css::uno::Reference< css::task::XInteractionHandler >())
throw(css::uno::RuntimeException, std::exception);
- void submit_impl(const css::uno::Reference< css::awt::XControl>& Control, const css::awt::MouseEvent& MouseEvt, bool _bAproveByListeners);
+ void submit_impl(const css::uno::Reference< css::awt::XControl>& Control, const css::awt::MouseEvent& MouseEvt);
void reset_impl(bool _bAproveByListeners);
bool implEnsureConnection();