diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-23 10:49:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-23 10:49:30 +0100 |
commit | 23e818d4f5cb6dff4c2238fa42a38496a9a85255 (patch) | |
tree | b8613d117497286df89a049bf849e5426c7b772e /uui | |
parent | 2c5f02539d8e1ae079b2ee68838024865610b6d8 (diff) |
AmbigousFilterRequest is only ever extracted, never created
Change-Id: I79c669c1635192199d6ef135e1ab9b48a9e7e63a
Diffstat (limited to 'uui')
-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 |
4 files changed, 0 insertions, 131 deletions
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); |