diff -urNpw @sw/source/ui/uno/swdetect.cxx sw/source/ui/uno/swdetect.cxx --- @sw/source/ui/uno/swdetect.cxx 2007-11-26 17:21:04.000000000 +0800 +++ sw/source/ui/uno/swdetect.cxx 2007-12-04 16:36:56.000000000 +0800 @@ -101,6 +101,7 @@ #include #include #include +#include #ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX #include @@ -159,6 +160,7 @@ SwFilterDetect::~SwFilterDetect() sal_Int32 nIndexOfReadOnlyFlag = -1; sal_Int32 nIndexOfTemplateFlag = -1; sal_Int32 nIndexOfDocumentTitle = -1; + sal_Int32 nIndexOfInteractionHandler = -1; for( sal_Int32 nProperty=0; nProperty>= xInteraction; + nIndexOfInteractionHandler = nProperty; + } else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RapairPackage")) ) lDescriptor[nProperty].Value >>= bRepairPackage; else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) ) @@ -322,8 +327,12 @@ SwFilterDetect::~SwFilterDetect() { // repair either not allowed or not successful NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); + xInteraction->handle( pNotifyRequest ); uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + ::comphelper::OInteractionHandlerWrapper* pHandler = new ::comphelper::OInteractionHandlerWrapper( xInteraction ); + if ( nIndexOfInteractionHandler != -1 ) + lDescriptor[nIndexOfInteractionHandler].Value <<= ( REFERENCE< XInteractionHandler > )pHandler; + aMedium.SetError( ERRCODE_ABORT ); } }