diff -pur fileaccess/source/FileAccess.cxx fileaccess/source/FileAccess.cxx --- fileaccess/source/FileAccess.cxx 2008-04-11 13:39:26.000000000 +0200 +++ fileaccess/source/FileAccess.cxx 2008-06-06 20:47:42.000000000 +0200 @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include #include @@ -104,7 +106,12 @@ class OFileAccess : public FileAccessHel public: OFileAccess( const Reference< XMultiServiceFactory > & xSMgr ) - : mxSMgr( xSMgr), mpEnvironment( NULL ) {} + : mxSMgr( xSMgr), mpEnvironment( NULL ) + { + Reference< XInteractionHandler > xInteractionHandler; + mxEnvironment = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), + Reference< XProgressHandler >() ); + } // Methods virtual void SAL_CALL copy( const ::rtl::OUString& SourceURL, const ::rtl::OUString& DestURL ) throw(::com::sun::star::ucb::CommandAbortedException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); diff -pur fileaccess/source/makefile.mk fileaccess/source/makefile.mk --- fileaccess/source/makefile.mk 2008-04-11 13:39:44.000000000 +0200 +++ fileaccess/source/makefile.mk 2008-06-06 20:48:22.000000000 +0200 @@ -57,6 +57,7 @@ SHL1STDLIBS= \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(VOSLIB) \ + $(COMPHELPERLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ diff -pur unotools/source/ucbhelper/ucbhelper.cxx unotools/source/ucbhelper/ucbhelper.cxx --- unotools/source/ucbhelper/ucbhelper.cxx 2008-04-11 15:35:38.000000000 +0200 +++ unotools/source/ucbhelper/ucbhelper.cxx 2008-06-06 20:43:57.000000000 +0200 @@ -52,13 +52,12 @@ #include #include #include -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIODEXCEPTION_HPP_ #include -#endif #include #include #include #include +#include #include #include @@ -149,7 +148,12 @@ sal_Bool UCBContentHelper::IsDocument( c try { - Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); + uno::Reference< XInteractionHandler > xInteractionHandler; + + Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), + new CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), + uno::Reference< XProgressHandler >() ) ); + bRet = aCnt.isDocument(); } catch( ::com::sun::star::ucb::CommandAbortedException& ) diff -pur ucb/source/ucp/webdav/DAVResourceAccess.cxx ucb/source/ucp/webdav/DAVResourceAccess.cxx --- ucb/source/ucp/webdav/DAVResourceAccess.cxx 2008-06-09 18:47:08.000000000 +0200 +++ ucb/source/ucp/webdav/DAVResourceAccess.cxx 2008-06-09 18:14:48.000000000 +0200 @@ -70,7 +70,10 @@ int DAVAuthListener_Impl::authenticate( xIH = m_xEnv->getInteractionHandler(); if ( !xIH.is() ) + { + fprintf( stderr, "Uh-oh, no interaction handler (again)!\n" ); return -1; + } // #102871# - Supply username and password from previous try. // Password container service depends on this! diff -pur sfx2/inc/sfx2/docfile.hxx sfx2/inc/sfx2/docfile.hxx --- sfx2/inc/sfx2/docfile.hxx 2008-06-09 18:47:08.000000000 +0200 +++ sfx2/inc/sfx2/docfile.hxx 2008-06-06 19:52:19.000000000 +0200 @@ -152,7 +152,7 @@ public: void UseInteractionHandler( BOOL ); ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > - GetInteractionHandler(); + GetInteractionHandler() const; void setStreamToLoadFrom(const com::sun::star::uno::Reference& xInputStream,sal_Bool bIsReadOnly ) { m_xInputStreamToLoadFrom = xInputStream; m_bIsReadOnly = bIsReadOnly; } diff -pur sfx2/source/doc/docfile.cxx sfx2/source/doc/docfile.cxx --- sfx2/source/doc/docfile.cxx 2008-06-09 18:47:08.000000000 +0200 +++ sfx2/source/doc/docfile.cxx 2008-06-06 19:54:56.000000000 +0200 @@ -424,7 +424,7 @@ Reference < XContent > SfxMedium::GetCon Reference < ::com::sun::star::ucb::XContent > xContent; Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv; - Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = ((SfxMedium*)this)->GetInteractionHandler(); + Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler(); if ( xInteractionHandler.is() ) xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), Reference< ::com::sun::star::ucb::XProgressHandler >() ); @@ -800,8 +800,14 @@ sal_Bool SfxMedium::SupportsActiveStream return sal_True; ::ucbhelper::Content aTmpContent; - Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; - if ( ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, aTmpContent ) ) + Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv; + + Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler(); + if ( xInteractionHandler.is() ) + xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), + Reference< ::com::sun::star::ucb::XProgressHandler >() ); + + if ( ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xEnv, aTmpContent ) ) { Any aAny = aTmpContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SupportsActiveStreaming" )) ); @@ -2565,7 +2571,7 @@ void SfxMedium::UseInteractionHandler( B //------------------------------------------------------------------ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > -SfxMedium::GetInteractionHandler() +SfxMedium::GetInteractionHandler() const { // if interaction isnt allowed explicitly ... return empty reference! if ( !pImp->bUseInteractionHandler )