diff options
-rw-r--r-- | framework/inc/interaction/quietinteraction.hxx | 1 | ||||
-rw-r--r-- | framework/inc/pch/precompiled_fwk.hxx | 1 | ||||
-rw-r--r-- | framework/source/interaction/quietinteraction.cxx | 12 | ||||
-rw-r--r-- | framework/source/services/desktop.cxx | 12 | ||||
-rw-r--r-- | include/framework/interaction.hxx | 1 | ||||
-rw-r--r-- | uui/inc/pch/precompiled_uui.hxx | 1 | ||||
-rw-r--r-- | uui/source/iahndl-filter.cxx | 122 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 3 | ||||
-rw-r--r-- | uui/source/iahndl.hxx | 5 |
9 files changed, 1 insertions, 157 deletions
diff --git a/framework/inc/interaction/quietinteraction.hxx b/framework/inc/interaction/quietinteraction.hxx index c2dbeaa7126c..0a990f4600a7 100644 --- a/framework/inc/interaction/quietinteraction.hxx +++ b/framework/inc/interaction/quietinteraction.hxx @@ -38,7 +38,6 @@ namespace framework{ But it can be used to intercept problems e.g. during loading of documents. In current implementation we solve conflicts for following situations only: - - AmbigousFilterRequest - InteractiveIOException - InteractiveAugmentedIOException All other requests will be aborted. diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx index 31e5c4faec27..c37deaf69d9c 100644 --- a/framework/inc/pch/precompiled_fwk.hxx +++ b/framework/inc/pch/precompiled_fwk.hxx @@ -82,7 +82,6 @@ #include <com/sun/star/container/XNameReplace.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/document/FilterOptionsRequest.hpp> #include <com/sun/star/document/LockedDocumentRequest.hpp> #include <com/sun/star/document/MacroExecMode.hpp> diff --git a/framework/source/interaction/quietinteraction.cxx b/framework/source/interaction/quietinteraction.cxx index 680fe0922e51..3b27f1815d4d 100644 --- a/framework/source/interaction/quietinteraction.cxx +++ b/framework/source/interaction/quietinteraction.cxx @@ -25,7 +25,6 @@ #include <com/sun/star/task/XInteractionApprove.hpp> #include <com/sun/star/document/XInteractionFilterSelect.hpp> #include <com/sun/star/document/XInteractionFilterOptions.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/document/FilterOptionsRequest.hpp> #include <com/sun/star/task/ErrorCodeRequest.hpp> @@ -81,20 +80,9 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI // differ between abortable interactions (error, unknown filter ...) // and other ones (ambigous but not unknown filter ...) css::task::ErrorCodeRequest aErrorCodeRequest; - css::document::AmbigousFilterRequest aAmbigousFilterRequest; css::document::LockedDocumentRequest aLockedDocumentRequest; css::document::FilterOptionsRequest aFilterOptionsRequest; - if (aRequest>>=aAmbigousFilterRequest) - { - if (xFilter.is()) - { - // user selected filter wins every time! - xFilter->setFilter( aAmbigousFilterRequest.SelectedFilter ); - xFilter->select(); - } - } - else if( aRequest >>= aErrorCodeRequest ) { // warnings can be ignored => approve diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 10bb545f1464..781ce634e8a7 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/task/XInteractionAbort.hpp> #include <com/sun/star/task/XInteractionApprove.hpp> #include <com/sun/star/document/XInteractionFilterSelect.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/task/ErrorCodeRequest.hpp> #include <com/sun/star/ucb/InteractiveIOException.hpp> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> @@ -1220,16 +1219,7 @@ void SAL_CALL Desktop::handle( const css::uno::Reference< css::task::XInteractio // differ between abortable interactions (error, unknown filter ...) // and other ones (ambigous but not unknown filter ...) css::task::ErrorCodeRequest aErrorCodeRequest; - css::document::AmbigousFilterRequest aAmbigousFilterRequest; - if( aRequest >>= aAmbigousFilterRequest ) - { - if( xFilterSelect.is() ) - { - xFilterSelect->setFilter( aAmbigousFilterRequest.SelectedFilter ); // user selected filter wins! - xFilterSelect->select(); - } - } - else if( aRequest >>= aErrorCodeRequest ) + if( aRequest >>= aErrorCodeRequest ) { bool bWarning = ((aErrorCodeRequest.ErrCode & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK); if (xApprove.is() && bWarning) diff --git a/include/framework/interaction.hxx b/include/framework/interaction.hxx index 415f7a7c9f97..aa43a855ed36 100644 --- a/include/framework/interaction.hxx +++ b/include/framework/interaction.hxx @@ -28,7 +28,6 @@ #include <com/sun/star/task/XInteractionRetry.hpp> #include <com/sun/star/document/XInteractionFilterSelect.hpp> #include <com/sun/star/document/NoSuchFilterRequest.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/uno/RuntimeException.hpp> #include <rtl/ustring.hxx> diff --git a/uui/inc/pch/precompiled_uui.hxx b/uui/inc/pch/precompiled_uui.hxx index cc81635e45b3..d8f029e4fb5f 100644 --- a/uui/inc/pch/precompiled_uui.hxx +++ b/uui/inc/pch/precompiled_uui.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/container/XContainerQuery.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/document/BrokenPackageRequest.hpp> #include <com/sun/star/document/ChangedByOthersRequest.hpp> #include <com/sun/star/document/FilterOptionsRequest.hpp> diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index d8f574e46a7b..c43f0183fd8c 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -20,7 +20,6 @@ #include <com/sun/star/beans/XPropertyAccess.hpp> #include <com/sun/star/container/XContainerQuery.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/document/AmbigousFilterRequest.hpp> #include <com/sun/star/document/FilterOptionsRequest.hpp> #include <com/sun/star/document/NoSuchFilterRequest.hpp> #include <com/sun/star/document/XImporter.hpp> @@ -190,109 +189,6 @@ handleNoSuchFilterRequest_( } void -handleAmbigousFilterRequest_( - Window * pParent, - uno::Reference< uno::XComponentContext > const & xContext, - document::AmbigousFilterRequest const & rRequest, - uno::Sequence< - uno::Reference< - task::XInteractionContinuation > > const & rContinuations) -{ - uno::Reference< task::XInteractionAbort > xAbort; - uno::Reference< document::XInteractionFilterSelect > xFilterTransport; - getContinuations(rContinuations, &xAbort, &xFilterTransport); - - uui::FilterNameList lNames; - - uno::Reference< container::XNameContainer > xFilterContainer; - try - { - xFilterContainer.set( xContext->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.document.FilterFactory"), xContext ), - uno::UNO_QUERY ); - } - catch ( uno::Exception & ) - { - } - - if( xFilterContainer.is() ) - { - uno::Any aPackedSet ; - uno::Sequence< beans::PropertyValue > lProps ; - sal_Int32 nStep ; - uui::FilterNamePair aPair ; - - try - { - aPackedSet = xFilterContainer->getByName( rRequest.SelectedFilter ); - } - catch(const container::NoSuchElementException&) - { - aPackedSet.clear(); - } - aPackedSet >>= lProps; - for( nStep=0; nStep<lProps.getLength(); ++nStep ) - { - if( lProps[nStep].Name.equalsAscii("UIName") ) - { - OUString sTemp; - lProps[nStep].Value >>= sTemp; - aPair.sUI = sTemp; - aPair.sInternal = rRequest.SelectedFilter; - lNames.push_back( aPair ); - break; - } - } - - try - { - aPackedSet = xFilterContainer->getByName( rRequest.DetectedFilter ); - } - catch(const container::NoSuchElementException&) - { - aPackedSet.clear(); - } - aPackedSet >>= lProps; - for( nStep=0; nStep<lProps.getLength(); ++nStep ) - { - if( lProps[nStep].Name.equalsAscii("UIName") ) - { - OUString sTemp; - lProps[nStep].Value >>= sTemp; - aPair.sUI = sTemp; - aPair.sInternal = rRequest.DetectedFilter; - lNames.push_back( aPair ); - break; - } - } - } - - if( xAbort.is() && xFilterTransport.is() ) - { - if( lNames.size() < 1 ) - { - xAbort->select(); - } - else - { - OUString sFilter; - executeFilterDialog( pParent, - rRequest.URL, - lNames, - sFilter ); - - if( !sFilter.isEmpty() ) - { - xFilterTransport->setFilter( sFilter ); - xFilterTransport->select(); - } - else - xAbort->select(); - } - } -} - -void handleFilterOptionsRequest_( uno::Reference< uno::XComponentContext > const & xContext, document::FilterOptionsRequest const & rRequest, @@ -412,24 +308,6 @@ UUIInteractionHelper::handleNoSuchFilterRequest( } bool -UUIInteractionHelper::handleAmbigousFilterRequest( - uno::Reference< task::XInteractionRequest > const & rRequest) -{ - uno::Any aAnyRequest(rRequest->getRequest()); - - document::AmbigousFilterRequest aAmbigousFilterRequest; - if (aAnyRequest >>= aAmbigousFilterRequest) - { - handleAmbigousFilterRequest_(getParentProperty(), - m_xContext, - aAmbigousFilterRequest, - rRequest->getContinuations()); - return true; - } - return false; -} - -bool UUIInteractionHelper::handleFilterOptionsRequest( uno::Reference< task::XInteractionRequest > const & rRequest) { diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 89a45d2d6a07..d80904b33da6 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -852,9 +852,6 @@ UUIInteractionHelper::handleRequest_impl( if ( handleNoSuchFilterRequest( rRequest ) ) return true; - if ( handleAmbigousFilterRequest( rRequest ) ) - return true; - if ( handleFilterOptionsRequest( rRequest ) ) return true; diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index 3333e87a7b07..efbee64016d7 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -217,11 +217,6 @@ private: com::sun::star::task::XInteractionRequest > const & rRequest); bool - handleAmbigousFilterRequest( - com::sun::star::uno::Reference< - com::sun::star::task::XInteractionRequest > const & rRequest); - - bool handleFilterOptionsRequest( com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > const & rRequest); |