ucb/source/ucp/webdav-curl/webdavcontent.cxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 44c58b178206ba9926b76b7eb47253e0c906ee1c
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Oct 6 16:43:49 2021 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Nov 1 18:22:06 2021 +0100

    ucb: webdav-curl: fix exception in Content::queryInterface()
    
    This was refactored in webdav-neon by commit
    c2ca6fabd1afc3fc07001721c2069d3c8db7000a but it turns out that here the
    m_xSMgr doesn't exist anyway since commit
    317b5bdadebc5560d38da4c9dd6d68c64a93b9a8 so just use m_xContext.
    
    Change-Id: I5c190d6e562ddd095fd6f8c8400ee4a7b7d5a5a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123177
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index f001c442ab4c..b14bd419bf3f 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -286,14 +286,8 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type 
& rType )
     {
         try
         {
-            uno::Reference< beans::XPropertySet > const xProps(
-                m_xContext, uno::UNO_QUERY_THROW );
-            uno::Reference< uno::XComponentContext > xCtx;
-            xCtx.set( xProps->getPropertyValue( "DefaultContext" ),
-                uno::UNO_QUERY_THROW );
-
             uno::Reference< task::XInteractionHandler > xIH(
-                task::PasswordContainerInteractionHandler::create( xCtx ) );
+                task::PasswordContainerInteractionHandler::create(m_xContext) 
);
 
             // Supply a command env to isFolder() that contains an interaction
             // handler that uses the password container service to obtain
@@ -301,7 +295,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type 
& rType )
 
             uno::Reference< ucb::XCommandEnvironment > xCmdEnv(
                 ucb::CommandEnvironment::create(
-                   xCtx,
+                   m_xContext,
                    xIH,
                    uno::Reference< ucb::XProgressHandler >() ) );
 

Reply via email to