diff options
Diffstat (limited to 'framework/source/dispatch/closedispatcher.cxx')
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 22 |
1 files changed, 20 insertions, 2 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; |