Kaydet (Commit) 7dabd705 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS mbaqfixes (1.2.24); FILE MERGED

2004/02/27 08:52:41 as 1.2.24.1: #115454# notify listener everytimes
üst de0f1353
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: loaddispatcher.cxx,v $ * $RCSfile: loaddispatcher.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: kz $ $Date: 2004-01-28 14:29:18 $ * last change: $Author: hr $ $Date: 2004-03-08 16:16:39 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -157,26 +157,29 @@ void SAL_CALL LoadDispatcher::dispatchWithNotification(const css::util::URL& ...@@ -157,26 +157,29 @@ void SAL_CALL LoadDispatcher::dispatchWithNotification(const css::util::URL&
// OK ... now the internal loader seems to be useable for new requests // OK ... now the internal loader seems to be useable for new requests
// and our owner frame seems to be valid for such operations. // and our owner frame seems to be valid for such operations.
// Initialize it with all new but needed properties and start the loading. // Initialize it with all new but needed properties and start the loading.
css::uno::Reference< css::lang::XComponent > xComponent;
try try
{ {
m_aLoader.initializeLoading(aURL.Complete, lArguments, xBaseFrame, m_sTarget, m_nSearchFlags, (LoadEnv::EFeature)(LoadEnv::E_ALLOW_CONTENTHANDLER | LoadEnv::E_WORK_WITH_UI)); m_aLoader.initializeLoading(aURL.Complete, lArguments, xBaseFrame, m_sTarget, m_nSearchFlags, (LoadEnv::EFeature)(LoadEnv::E_ALLOW_CONTENTHANDLER | LoadEnv::E_WORK_WITH_UI));
m_aLoader.startLoading(); m_aLoader.startLoading();
m_aLoader.waitWhileLoading(); // wait for ever!
xComponent = m_aLoader.getTargetComponent();
// TODO thinking about asynchronous operations and listener support
} }
catch(const LoadEnvException&) catch(const LoadEnvException&)
{ xComponent.clear(); }
if (xListener.is())
{ {
if (xListener.is()) if (xComponent.is())
xListener->dispatchFinished(
css::frame::DispatchResultEvent(xThis, css::frame::DispatchResultState::SUCCESS, css::uno::Any()));
else
xListener->dispatchFinished( xListener->dispatchFinished(
css::frame::DispatchResultEvent(xThis, css::frame::DispatchResultState::FAILURE, css::uno::Any())); css::frame::DispatchResultEvent(xThis, css::frame::DispatchResultState::FAILURE, css::uno::Any()));
} }
/*TODO implement listener support inside LoadEnv member ... */
// But dont wait for the results here.
// In case loading will be synchronous, the listener will be notified immediatly.
// In case it will be asynchronous such event will occure next time.
// But we block further requests on THIS dispatch object, till our internal
// used loader isnt still in progress any longer.
aReadLock.unlock(); aReadLock.unlock();
// <- SAFE ---------------------------------- // <- SAFE ----------------------------------
} }
......
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