diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-29 10:11:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-29 10:11:53 +0200 |
commit | b55166d266f31caf7bd85e54a59c7e8b49204b16 (patch) | |
tree | f4d98e90c214a6e588e2b4e22c05b9c0f44309aa /sc | |
parent | 39fd37f39db37a83c4a1491d68518e721b04fc5f (diff) |
Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index b5ec70bdba6a..94c29dcc50dd 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -410,19 +410,32 @@ void SAL_CALL ScCellFieldsObj::refresh( ) if (mpRefreshListeners) { // Call all listeners. - std::vector< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElementsAsVector()); - if (!aListeners.empty()) + uno::Sequence< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElements()); + sal_uInt32 nLength(aListeners.getLength()); + if (nLength) { - lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); - for (auto & x : aListeners) + const uno::Reference< uno::XInterface >* pInterfaces = aListeners.getConstArray(); + if (pInterfaces) { - try - { - static_cast< util::XRefreshListener* >(x.get())->refreshed(aEvent); - } - catch(uno::RuntimeException&) + lang::EventObject aEvent; + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); + sal_uInt32 i(0); + while (i < nLength) { + try + { + while(i < nLength) + { + static_cast< util::XRefreshListener* >(pInterfaces->get())->refreshed(aEvent); + ++pInterfaces; + ++i; + } + } + catch(uno::RuntimeException&) + { + ++pInterfaces; + ++i; + } } } } @@ -577,19 +590,32 @@ void SAL_CALL ScHeaderFieldsObj::refresh( ) if (mpRefreshListeners) { // Call all listeners. - std::vector< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElementsAsVector()); - if (!aListeners.empty()) + uno::Sequence< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElements()); + sal_uInt32 nLength(aListeners.getLength()); + if (nLength) { - lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); - for (auto & x : aListeners) + const uno::Reference< uno::XInterface >* pInterfaces = aListeners.getConstArray(); + if (pInterfaces) { - try - { - static_cast< util::XRefreshListener* >(x.get())->refreshed(aEvent); - } - catch(uno::RuntimeException&) + lang::EventObject aEvent; + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); + sal_uInt32 i(0); + while (i < nLength) { + try + { + while(i < nLength) + { + static_cast< util::XRefreshListener* >(pInterfaces->get())->refreshed(aEvent); + ++pInterfaces; + ++i; + } + } + catch(uno::RuntimeException&) + { + ++pInterfaces; + ++i; + } } } } |