[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis' - uui/source

Mihai Varga mihai.mv13 at gmail.com
Sat Jun 28 02:40:28 PDT 2014


 uui/source/iahndl-authentication.cxx |   10 +++++-----
 uui/source/iahndl.cxx                |   12 +++++++-----
 uui/source/iahndl.hxx                |    4 +---
 3 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit cddadb328acc6c98ad931c166a6723a587ce6bf2
Author: Mihai Varga <mihai.mv13 at gmail.com>
Date:   Sat Jun 28 12:39:02 2014 +0300

    Request handlers
    
    Change-Id: I96f3cb7ed85c773c11a3f96e0c0a5b28a1ce1570

diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index d1c2393..dff5bc8 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -746,12 +746,12 @@ UUIInteractionHelper::handlePasswordRequest(
 }
 
 bool
-UUIInteractionHelper::handleAuthFallbackRequest(
-    uno::Reference< task::XInteractionRequest > const & rRequest)
+UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions,
+        OUString & url )
 {
-    Window * pParent = getParentProperty();
-    AuthFallbackDlg *dlg = new AuthFallbackDlg(pParent, "instructions", "url");
-    dlg->Execute( );
+    Window * pParent = getParentProperty( );
+    AuthFallbackDlg *dlg = new AuthFallbackDlg( pParent, instructions, url );
+    int retCode = dlg->Execute( );
     return true;
 }
 
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 6f7f26c..8ca931a 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -42,6 +42,7 @@
 #include <com/sun/star/task/XInteractionHandler2.hpp>
 #include <com/sun/star/task/XInteractionRequest.hpp>
 #include <com/sun/star/task/XInteractionRetry.hpp>
+#include <com/sun/star/ucb/AuthenticationFallbackRequest.hpp>
 #include <com/sun/star/ucb/InteractiveAppException.hpp>
 #include <com/sun/star/ucb/InteractiveLockingLockedException.hpp>
 #include <com/sun/star/ucb/InteractiveLockingNotLockedException.hpp>
@@ -447,10 +448,6 @@ UUIInteractionHelper::handleRequest_impl(
 
         uno::Any aAnyRequest(rRequest->getRequest());
 
-        // TODO delete
-        if ( handleAuthFallbackRequest( rRequest ) )
-            return true;
-
         script::ModuleSizeExceededRequest aModSizeException;
         if (aAnyRequest >>= aModSizeException )
         {
@@ -831,8 +828,13 @@ UUIInteractionHelper::handleRequest_impl(
 
         if (!bObtainErrorStringOnly)
         {
-            if ( handleAuthFallbackRequest( rRequest ) )
+            ucb::AuthenticationFallbackRequest anAuthFallbackRequest;
+            if ( aAnyRequest >>= anAuthFallbackRequest )
+            {
+                handleAuthFallbackRequest( anAuthFallbackRequest.instructions,
+                        anAuthFallbackRequest.url );
                 return true;
+            }
 
             if ( handleAuthenticationRequest( rRequest ) )
                 return true;
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index fad1d23..ac211f9 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -302,9 +302,7 @@ private:
             ) const;
 
     bool
-    handleAuthFallbackRequest(
-        com::sun::star::uno::Reference<
-            com::sun::star::task::XInteractionRequest > const & rRequest);
+    handleAuthFallbackRequest( OUString & instructions, OUString & url);
 };
 
 class ErrorResource: private Resource


More information about the Libreoffice-commits mailing list