framework/source/dispatch/interceptionhelper.cxx |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 3b6fdf5eb0f6571383880e8c6af450a0e0069fca
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Thu Aug 30 11:23:05 2018 +0300
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Thu Aug 30 13:20:10 2018 +0300

    debug: let's disable dispatch interceptors for a while
    
    Also make a debug run of interceptor code during registration
    
    Change-Id: Ie7c59eda4ca4e7b12ecd5a0a296de0e87d3d005b

diff --git a/framework/source/dispatch/interceptionhelper.cxx 
b/framework/source/dispatch/interceptionhelper.cxx
old mode 100644
new mode 100755
index c7ef6cf62448..afc74ab8b03c
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -20,7 +20,7 @@
 #include <dispatch/interceptionhelper.hxx>
 
 #include <com/sun/star/frame/XInterceptorInfo.hpp>
-
+#include <com/sun/star/util/URLTransformer.hpp>
 #include <vcl/svapp.hxx>
 
 namespace framework{
@@ -74,7 +74,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL 
InterceptionHelper::queryD
     // c) No registered interceptor => use our direct slave.
     //    This helper exist by design and must be valid everytimes ...
     //    But to be more feature proof - we should check that .-)
-    if (!xInterceptor.is() && m_xSlave.is())
+    //if (!xInterceptor.is() && m_xSlave.is())
         xInterceptor = m_xSlave;
 
     aReadLock.clear();
@@ -103,6 +103,19 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL Inte
 void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const 
css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor)
     throw(css::uno::RuntimeException, std::exception)
 {
+    // testrun
+    {
+        css::uno::Reference<css::frame::XFrame> xOwner(m_xOwnerWeak.get(), 
css::uno::UNO_QUERY);
+        css::util::URL aTargetURL(".uno:Save", ".uno:Save", ".uno:", "", "", 
"", 0, "Save", "", "",
+                                  "");
+        /*aTargetURL.Complete = ".uno:Save";
+        css::uno::Reference<css::util::XURLTransformer> m_xUrlTransformer
+            = css::util::URLTransformer::create(xOwner);
+        if (m_xUrlTransformer.is())
+            m_xUrlTransformer->parseStrict(aTargetURL);*/
+        xInterceptor->queryDispatch(aTargetURL, OUString(), 0);
+    }
+
     // reject incorrect calls of this interface method
     css::uno::Reference< css::frame::XDispatchProvider > xThis(static_cast< 
::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
     if (!xInterceptor.is())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to