From 3d3293144b0e0d2d28136b1b2c7154d6352463b8 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Wed, 16 Oct 2013 19:25:05 -0300 Subject: fdo#54938: Adapt svtools and comphelper module ... to use cppu::supportsService and other pieces. Change-Id: I16893b3d31a8055acd214ff23d01e63d38fe0826 Signed-off-by: Stephan Bergmann --- oox/source/docprop/ooxmldocpropimport.cxx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'oox/source/docprop') diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index f4d3092e83ee..2361bd1ccd74 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -30,11 +30,11 @@ #include "oox/helper/helper.hxx" #include "docprophandler.hxx" +#include + namespace oox { namespace docprop { -// ============================================================================ - using namespace ::com::sun::star::beans; using namespace ::com::sun::star::document; using namespace ::com::sun::star::embed; @@ -43,9 +43,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; - -// ============================================================================ - OUString SAL_CALL DocumentPropertiesImport_getImplementationName() { return OUString( "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter" ); @@ -63,8 +60,6 @@ Reference< XInterface > SAL_CALL DocumentPropertiesImport_createInstance( const return static_cast< ::cppu::OWeakObject* >( new DocumentPropertiesImport( rxContext ) ); } -// ============================================================================ - namespace { Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxStorage, const OUString& rStreamType ) throw (RuntimeException) @@ -103,15 +98,12 @@ Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxSto } // namespace -// ============================================================================ - DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentContext >& rxContext ) : mxContext( rxContext ) { } // XServiceInfo - OUString SAL_CALL DocumentPropertiesImport::getImplementationName() throw (RuntimeException) { return DocumentPropertiesImport_getImplementationName(); @@ -119,11 +111,7 @@ OUString SAL_CALL DocumentPropertiesImport::getImplementationName() throw (Runti sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rServiceName ) throw (RuntimeException) { - Sequence< OUString > aServiceNames = DocumentPropertiesImport_getSupportedServiceNames(); - for( sal_Int32 nIndex = 0, nLength = aServiceNames.getLength(); nIndex < nLength; ++nIndex ) - if( aServiceNames[ nIndex ] == rServiceName ) - return sal_True; - return sal_False; + return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames() throw (RuntimeException) @@ -132,7 +120,6 @@ Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames } // XOOXMLDocumentPropertiesImporter - void SAL_CALL DocumentPropertiesImport::importProperties( const Reference< XStorage >& rxSource, const Reference< XDocumentProperties >& rxDocumentProperties ) throw (RuntimeException, IllegalArgumentException, SAXException, Exception) -- cgit