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