diff options
author | Stephan Bergmann <sb@openoffice.org> | 2001-07-31 09:07:00 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2001-07-31 09:07:00 +0000 |
commit | ea9ea07e790f83063dc26a9c07025232053a24b5 (patch) | |
tree | 8e3919852db0785a924bb8f0ca0b97d5b9428112 /framework | |
parent | 46a9af39d90a979a3570586c9ac3f2b18ffde619 (diff) |
#88408# Added temporary solution to start sync client dialog.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/dispatch/dispatchprovider.hxx | 8 | ||||
-rw-r--r-- | framework/source/dispatch/dispatchprovider.cxx | 55 |
2 files changed, 58 insertions, 5 deletions
diff --git a/framework/inc/dispatch/dispatchprovider.hxx b/framework/inc/dispatch/dispatchprovider.hxx index fee75c9685c6..41300bdb4c59 100644 --- a/framework/inc/dispatch/dispatchprovider.hxx +++ b/framework/inc/dispatch/dispatchprovider.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatchprovider.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: as $ $Date: 2001-07-20 08:08:45 $ + * last change: $Author: sb $ $Date: 2001-07-31 10:06:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -152,7 +152,8 @@ enum EDispatchHelper E_CREATEDISPATCHER , E_BLANKDISPATCHER , E_SELFDISPATCHER , - E_PLUGINDISPATCHER + E_PLUGINDISPATCHER, + E_SYNCDISPATCHER }; //_________________________________________________________________________________________________________________ @@ -250,6 +251,7 @@ class DispatchProvider : // interfaces css::uno::Reference< css::frame::XDispatch > m_xBlankDispatcher ; css::uno::Reference< css::frame::XDispatch > m_xSelfDispatcher ; css::uno::Reference< css::frame::XDispatch > m_xPlugInDispatcher ; + css::uno::Reference< css::frame::XDispatch > m_xSyncDispatcher; }; // class DispatchProvider diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index 77aaca75da43..a21ce10df608 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatchprovider.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: as $ $Date: 2001-07-25 12:54:35 $ + * last change: $Author: sb $ $Date: 2001-07-31 10:07:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -123,10 +123,30 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #endif +#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_ +#include <com/sun/star/uno/Exception.hpp> +#endif + //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#ifndef _OSL_DIAGNOSE_H_ +#include <osl/diagnose.h> +#endif + +#ifndef _RTL_STRING_H_ +#include <rtl/string.h> +#endif + +#ifndef _RTL_USTRING_H_ +#include <rtl/ustring.h> +#endif + +#ifndef _RTL_USTRING_HXX_ +#include <rtl/ustring.hxx> +#endif + #ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> #endif @@ -248,6 +268,10 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL DispatchProvider::queryDis aReadLock.unlock(); /* UNSAFE AREA --------------------------------------------------------------------------------------------- */ + if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( + "private:factory/sync"))) + return implts_getOrCreateDispatchHelper(E_SYNCDISPATCHER); + if( xOwner.is() == sal_True ) { // Classify target of this dispatch call to find right dispatch helper! @@ -525,6 +549,8 @@ void SAL_CALL DispatchProvider::disposing( const css::lang::EventObject& aEvent m_xSelfDispatcher = css::uno::Reference< css::frame::XDispatch >() ; m_xAppDispatchProvider = css::uno::Reference< css::frame::XDispatchProvider >() ; + m_xSyncDispatcher = 0; + // Forget all other references too. m_xFactory = css::uno::Reference< css::lang::XMultiServiceFactory >(); m_xFrame = css::uno::WeakReference< css::frame::XFrame >() ; @@ -641,6 +667,31 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat LOG_WARNING( "DispatchProvider::implts_getOrCreateDispatchHelper( E_PLUGINDISPATCHER )", "Not implemented yet!" ) } break; + + case E_SYNCDISPATCHER: + if (!m_xSyncDispatcher.is()) + { + LOG_ASSERT2( m_xFactory.is()==sal_False, "DispatchProvider::getOrCreateDispatchHelper( E_SYNCDISPATCHER )", "unexpected situation") + if (m_xFactory.is()) + try + { + m_xSyncDispatcher + = css::uno::Reference< + css::frame::XDispatch >( + m_xFactory-> + createInstance( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.syncaccess.ui.Dispatch"))), + css::uno::UNO_QUERY); + } + catch (css::uno::Exception const &) + { + LOG_ERROR( "DispatchProvider::getOrCreateDispatchHelper( E_SYNCDISPATCHER )", "unexpected situation") + } + } + xDispatchHelper = m_xSyncDispatcher; + break; } } return xDispatchHelper; |