diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-18 10:15:03 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-18 10:15:03 +0000 |
commit | c7e172b2d9036c788fe00552ded841340d115033 (patch) | |
tree | 314db633a1a15d67bc0616d1f91f1c49baac6ebc /framework/source/dispatch | |
parent | f0df8f0fe26e24841900810361b56518a2d3621c (diff) |
CWS-TOOLING: integrate CWS mba32issues02
2009-09-17 mb93783 merge commit
2009-09-03 tb121644 #i104748 - slot unification to .uno:PasteSpecial
2009-09-01 mba #101455#: code simplification
2009-08-31 mb93783 iso locales for norwegian builds are nb and nn, not no
2009-08-25 mba merge to m55
2009-07-29 mba cleanup after rebase
2009-07-29 mba #i103200#: wrong order of first and last name in CJK UI
2009-07-27 mba adding dictionary changes from broken svn CWS
2009-07-27 mba adding dictionary changes from broken svn CWS
2009-07-27 mba apply patch from broken svn CWS
Diffstat (limited to 'framework/source/dispatch')
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 22 | ||||
-rw-r--r-- | framework/source/dispatch/dispatchprovider.cxx | 37 | ||||
-rw-r--r-- | framework/source/dispatch/menudispatcher.cxx | 20 |
3 files changed, 33 insertions, 46 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 44eaa2062497..25b80650e81a 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -48,6 +48,7 @@ #include <com/sun/star/frame/CommandGroup.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/awt/XTopWindow.hpp> +#include <com/sun/star/document/XActionLockable.hpp> #include "com/sun/star/beans/XFastPropertySet.hpp" #include <toolkit/helper/vclunohelper.hxx> @@ -171,7 +172,7 @@ void SAL_CALL CloseDispatcher::removeStatusListener(const css::uno::Reference< c //----------------------------------------------- void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& aURL , - const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/, + const css::uno::Sequence< css::beans::PropertyValue >& lArguments, const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException) { @@ -236,7 +237,20 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& aWriteLock.unlock(); // <- SAFE ---------------------------------- - m_aAsyncCallback.Post(0); + sal_Bool bIsSynchron = sal_False; + for (sal_Int32 nArgs=0; nArgs<lArguments.getLength(); nArgs++ ) + { + if ( lArguments[nArgs].Name.equalsAscii("SynchronMode") ) + { + lArguments[nArgs].Value >>= bIsSynchron; + break; + } + } + + if ( bIsSynchron ) + impl_asyncCallback(0); + else + m_aAsyncCallback.Post(0); } //----------------------------------------------- @@ -540,6 +554,10 @@ sal_Bool CloseDispatcher::implts_establishBackingMode() if (!xFrame.is()) return sal_False; + css::uno::Reference < css::document::XActionLockable > xLock( xFrame, css::uno::UNO_QUERY ); + if ( xLock.is() && xLock->isActionLocked() ) + return sal_False; + css::uno::Reference< css::awt::XWindow > xContainerWindow = xFrame->getContainerWindow(); css::uno::Sequence< css::uno::Any > lArgs(1); lArgs[0] <<= xContainerWindow; diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index 392e5574d82d..a4b330bab2b3 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -47,7 +47,7 @@ #include <pattern/window.hxx> #include <threadhelp/transactionguard.hxx> #include <threadhelp/readguard.hxx> -#include <threadhelp/writeguard.hxx>
+#include <threadhelp/writeguard.hxx> #include <dispatchcommands.h> #include <protocols.h> #include <services.h> @@ -224,24 +224,13 @@ css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL Disp return lDispatcher; } -//_________________________________________________________________________________________________________________
-
-::sal_Bool lcl_isCloseDispatch (const css::util::URL& aURL)
-{
- return (
- (aURL.Complete.equals(CMD_UNO_CLOSEDOC )) || - (aURL.Complete.equals(CMD_UNO_CLOSEWIN )) || - (aURL.Complete.equals(CMD_UNO_CLOSEFRAME))
- ); -}
- -//_________________________________________________________________________________________________________________
-
-::sal_Bool lcl_isStartModuleDispatch (const css::util::URL& aURL)
-{
- return (aURL.Complete.equals(CMD_UNO_SHOWSTARTMODULE));
-}
-
+//_________________________________________________________________________________________________________________ + +::sal_Bool lcl_isStartModuleDispatch (const css::util::URL& aURL) +{ + return (aURL.Complete.equals(CMD_UNO_SHOWSTARTMODULE)); +} + //_________________________________________________________________________________________________________________ /** @@ -296,10 +285,10 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryDeskt if (sTargetFrameName==SPECIALTARGET_DEFAULT) { if (implts_isLoadableContent(aURL)) - xDispatcher = implts_getOrCreateDispatchHelper( E_DEFAULTDISPATCHER, xDesktop );
-
- if (lcl_isStartModuleDispatch(aURL))
- xDispatcher = implts_getOrCreateDispatchHelper( E_STARTMODULEDISPATCHER, xDesktop );
+ xDispatcher = implts_getOrCreateDispatchHelper( E_DEFAULTDISPATCHER, xDesktop ); + + if (lcl_isStartModuleDispatch(aURL)) + xDispatcher = implts_getOrCreateDispatchHelper( E_STARTMODULEDISPATCHER, xDesktop ); } //----------------------------------------------------------------------------------------------------- @@ -772,7 +761,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat CloseDispatcher* pDispatcher = new CloseDispatcher( xFactory, xOwner, sTarget ); xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY ); } - break;
+ break; case E_STARTMODULEDISPATCHER : { diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index a17f830a1b7e..1e715f58fddc 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -445,26 +445,6 @@ sal_Bool MenuDispatcher::impldbg_checkParameter_MenuDispatcher( const uno::R } //***************************************************************************************************************** -// We don't know anything about right values of aURL and seqArguments! -// Check valid references only. -sal_Bool MenuDispatcher::impldbg_checkParameter_dispatch( const URL& aURL , - const Sequence< PropertyValue >& seqArguments) -{ - // Set default return value. - sal_Bool bOK = sal_True; - // Check parameter. - if ( - ( &aURL == NULL ) || - ( &seqArguments == NULL ) - ) - { - bOK = sal_False ; - } - // Return result of check. - return bOK ; -} - -//***************************************************************************************************************** // We need a valid URL. What is meaning with "register for nothing"?! // xControl must correct to - nobody can advised otherwise! sal_Bool MenuDispatcher::impldbg_checkParameter_addStatusListener( const uno::Reference< XStatusListener >& xControl, |