summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-05-15 08:04:48 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-05-15 08:04:48 +0000
commitb1e4bbabba3ef98c9a10a22c56ad1e9d892eee47 (patch)
tree5e454c7dc228d7014fa585fc54d86f4327aa581f /framework
parent58931ea7dd144ebe04dc82dec1a337571d1db61f (diff)
INTEGRATION: CWS oxtsysint01 (1.6.264); FILE MERGED
2008/04/15 13:26:23 dv 1.6.264.2: RESYNC: (1.6-1.7); FILE MERGED 2008/04/15 11:52:00 dv 1.6.264.1: #i85856# added XSynchronousDispatch interface for replacing loadComponentFromURL
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/loaddispatcher.cxx86
1 files changed, 56 insertions, 30 deletions
diff --git a/framework/source/dispatch/loaddispatcher.cxx b/framework/source/dispatch/loaddispatcher.cxx
index 1bda4ce1fdd3..dea86208af76 100644
--- a/framework/source/dispatch/loaddispatcher.cxx
+++ b/framework/source/dispatch/loaddispatcher.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: loaddispatcher.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
* This file is part of OpenOffice.org.
*
@@ -86,6 +86,54 @@ void SAL_CALL LoadDispatcher::dispatchWithNotification(const css::util::URL&
const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
throw(css::uno::RuntimeException)
{
+ impl_dispatch( aURL, lArguments, xListener );
+}
+
+/*-----------------------------------------------
+ 20.08.2003 09:16
+-----------------------------------------------*/
+void SAL_CALL LoadDispatcher::dispatch(const css::util::URL& aURL ,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments)
+ throw(css::uno::RuntimeException)
+{
+ impl_dispatch( aURL, lArguments, css::uno::Reference< css::frame::XDispatchResultListener >() );
+}
+
+/*-----------------------------------------------
+ 14.04.2008
+-----------------------------------------------*/
+css::uno::Any SAL_CALL LoadDispatcher::dispatchWithReturnValue( const css::util::URL& rURL,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments )
+ throw( css::uno::RuntimeException )
+{
+ return impl_dispatch( rURL, lArguments, css::uno::Reference< css::frame::XDispatchResultListener >());
+}
+
+/*-----------------------------------------------
+ 20.08.2003 10:48
+-----------------------------------------------*/
+void SAL_CALL LoadDispatcher::addStatusListener(const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/,
+ const css::util::URL& /*aURL*/ )
+ throw(css::uno::RuntimeException)
+{
+}
+
+/*-----------------------------------------------
+ 20.08.2003 10:49
+-----------------------------------------------*/
+void SAL_CALL LoadDispatcher::removeStatusListener(const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/,
+ const css::util::URL& /*aURL*/ )
+ throw(css::uno::RuntimeException)
+{
+}
+
+/*-----------------------------------------------
+ 20.08.2003 09:58
+-----------------------------------------------*/
+css::uno::Any LoadDispatcher::impl_dispatch( const css::util::URL& rURL,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
+ const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
+{
// Attention: May be nobody outside hold such temp. dispatch object alive (because
// the container in which we resists isnt implemented threadsafe but updated by a timer
// and clear our reference ...) we should hold us self alive!
@@ -120,7 +168,7 @@ void SAL_CALL LoadDispatcher::dispatchWithNotification(const css::util::URL&
css::uno::Reference< css::lang::XComponent > xComponent;
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( rURL.Complete, lArguments, xBaseFrame, m_sTarget, m_nSearchFlags, (LoadEnv::EFeature)(LoadEnv::E_ALLOW_CONTENTHANDLER | LoadEnv::E_WORK_WITH_UI));
m_aLoader.startLoading();
m_aLoader.waitWhileLoading(); // wait for ever!
xComponent = m_aLoader.getTargetComponent();
@@ -140,36 +188,14 @@ void SAL_CALL LoadDispatcher::dispatchWithNotification(const css::util::URL&
css::frame::DispatchResultEvent(xThis, css::frame::DispatchResultState::FAILURE, css::uno::Any()));
}
+ // return the model - like loadComponentFromURL()
+ css::uno::Any aRet;
+ if ( xComponent.is () )
+ aRet = css::uno::makeAny( xComponent );
+
aReadLock.unlock();
// <- SAFE ----------------------------------
-}
-
-/*-----------------------------------------------
- 20.08.2003 09:16
------------------------------------------------*/
-void SAL_CALL LoadDispatcher::dispatch(const css::util::URL& aURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& lArguments)
- throw(css::uno::RuntimeException)
-{
- dispatchWithNotification(aURL, lArguments, css::uno::Reference< css::frame::XDispatchResultListener >());
-}
-
-/*-----------------------------------------------
- 20.08.2003 10:48
------------------------------------------------*/
-void SAL_CALL LoadDispatcher::addStatusListener(const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/,
- const css::util::URL& /*aURL*/ )
- throw(css::uno::RuntimeException)
-{
-}
-
-/*-----------------------------------------------
- 20.08.2003 10:49
------------------------------------------------*/
-void SAL_CALL LoadDispatcher::removeStatusListener(const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/,
- const css::util::URL& /*aURL*/ )
- throw(css::uno::RuntimeException)
-{
+ return aRet;
}
} // namespace framework