Kaydet (Commit) bc01bc63 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Less indent level.

üst 0bacaf4e
......@@ -693,32 +693,34 @@ void SAL_CALL ImplEventAttacherManager::attach(sal_Int32 nIndex, const Reference
AttachedObject_Impl & rCurObj = aCurrentPosition->aObjList.back();
rCurObj.aAttachedListenerSeq = Sequence< Reference< XEventListener > >( aCurrentPosition->aEventList.size() );
if (!aCurrentPosition->aEventList.empty())
if (aCurrentPosition->aEventList.empty())
return;
Sequence<com::sun::star::script::EventListener> aEvents(aCurrentPosition->aEventList.size());
std::deque<ScriptEventDescriptor>::iterator itr = aCurrentPosition->aEventList.begin();
std::deque<ScriptEventDescriptor>::iterator itrEnd = aCurrentPosition->aEventList.end();
::com::sun::star::script::EventListener* p = aEvents.getArray();
size_t i = 0;
for (; itr != itrEnd; ++itr)
{
Sequence<com::sun::star::script::EventListener> aEvents(aCurrentPosition->aEventList.size());
std::deque<ScriptEventDescriptor>::iterator itr = aCurrentPosition->aEventList.begin();
std::deque<ScriptEventDescriptor>::iterator itrEnd = aCurrentPosition->aEventList.end();
::com::sun::star::script::EventListener* p = aEvents.getArray();
size_t i = 0;
for (; itr != itrEnd; ++itr)
{
com::sun::star::script::EventListener aListener;
aListener.AllListener =
new AttacherAllListener_Impl(this, itr->ScriptType, itr->ScriptCode);
aListener.Helper = rCurObj.aHelper;
aListener.ListenerType = itr->ListenerType;
aListener.EventMethod = itr->EventMethod;
aListener.AddListenerParam = itr->AddListenerParam;
p[i++] = aListener;
}
com::sun::star::script::EventListener aListener;
aListener.AllListener =
new AttacherAllListener_Impl(this, itr->ScriptType, itr->ScriptCode);
aListener.Helper = rCurObj.aHelper;
aListener.ListenerType = itr->ListenerType;
aListener.EventMethod = itr->EventMethod;
aListener.AddListenerParam = itr->AddListenerParam;
p[i++] = aListener;
}
try
{
rCurObj.aAttachedListenerSeq = xAttacher->attachMultipleEventListeners(rCurObj.xTarget, aEvents);
}
catch (const Exception&)
{
}
try
{
rCurObj.aAttachedListenerSeq =
xAttacher->attachMultipleEventListeners(rCurObj.xTarget, aEvents);
}
catch (const Exception&)
{
// Fail gracefully.
}
}
......
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