From c81eddbb20c84280aa64c712e34c829380b24527 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Thu, 21 Jan 2016 18:48:57 +0100 Subject: lotuswordpro: Clean after we use constructor feature 18f1eb7b0c3536817572eeb481591418a7eab3da was pushed sooner, so just few more additions. Change-Id: If8e8082959fc049947986ca6faf329ea9436062a --- lotuswordpro/Library_lwpft.mk | 1 - .../source/filter/LotusWordProImportFilter.cxx | 46 ++++++++-------------- lotuswordpro/source/filter/genericfilter.cxx | 15 ------- 3 files changed, 16 insertions(+), 46 deletions(-) delete mode 100644 lotuswordpro/source/filter/genericfilter.cxx (limited to 'lotuswordpro') diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk index 1ed04839310e..f86e9dec5be6 100644 --- a/lotuswordpro/Library_lwpft.mk +++ b/lotuswordpro/Library_lwpft.mk @@ -47,7 +47,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\ lotuswordpro/source/filter/benobj \ lotuswordpro/source/filter/benval \ lotuswordpro/source/filter/explode \ - lotuswordpro/source/filter/genericfilter \ lotuswordpro/source/filter/localtime \ lotuswordpro/source/filter/LotusWordProImportFilter \ lotuswordpro/source/filter/lwp9reader \ diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index 90017a5a3c71..ce78c60e5faa 100644 --- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx +++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx @@ -18,15 +18,11 @@ */ #include -#include -#include #include -#include #include #include -#include +#include #include -#include #include #include #include @@ -39,23 +35,15 @@ using namespace com::sun::star; using com::sun::star::uno::Sequence; -using com::sun::star::lang::XComponent; using com::sun::star::uno::Any; using com::sun::star::uno::UNO_QUERY; -using com::sun::star::uno::XInterface; using com::sun::star::uno::Exception; using com::sun::star::uno::RuntimeException; using com::sun::star::io::XInputStream; -using com::sun::star::lang::XMultiServiceFactory; using com::sun::star::beans::PropertyValue; -using com::sun::star::document::XFilter; -using com::sun::star::document::XExtendedFilterDetection; using com::sun::star::ucb::XCommandEnvironment; - using com::sun::star::document::XImporter; -using com::sun::star::xml::sax::XAttributeList; using com::sun::star::xml::sax::XDocumentHandler; -using com::sun::star::xml::sax::XParser; // W o r d P r o static const sal_Int8 header[] = { 0x57, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f }; @@ -97,14 +85,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportLWP(const OUString &rURL return ( ReadWordproFile(aFileStream, xHandler) == 0 ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -LotusWordProImportFilter_get_implementation( - css::uno::XComponentContext *context, - css::uno::Sequence const &) - { - return cppu::acquire(new LotusWordProImportFilter(context)); - } - sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< css::beans::PropertyValue >& aDescriptor ) throw (RuntimeException, std::exception) { @@ -190,24 +170,30 @@ void SAL_CALL LotusWordProImportFilter::initialize( const Sequence< Any >& aArgu } // XServiceInfo -OUString SAL_CALL LotusWordProImportFilter::getImplementationName( ) +OUString SAL_CALL LotusWordProImportFilter::getImplementationName() throw (RuntimeException, std::exception) { - return OUString ( "com.sun.star.comp.Writer.LotusWordProImportFilter" ); + return OUString("com.sun.star.comp.Writer.LotusWordProImportFilter"); } -sal_Bool SAL_CALL LotusWordProImportFilter::supportsService( const OUString& rServiceName ) + +sal_Bool SAL_CALL LotusWordProImportFilter::supportsService(const OUString& rServiceName) throw (RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } -Sequence< OUString > SAL_CALL LotusWordProImportFilter::getSupportedServiceNames( ) + +Sequence SAL_CALL LotusWordProImportFilter::getSupportedServiceNames() throw (RuntimeException, std::exception) { - Sequence < OUString > aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ImportFilter"; - pArray[1] = "com.sun.star.document.ExtendedTypeDetection"; - return aRet; + return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" }; +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +LotusWordProImportFilter_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence const &) +{ + return cppu::acquire(new LotusWordProImportFilter(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx deleted file mode 100644 index 837ba1a282a8..000000000000 --- a/lotuswordpro/source/filter/genericfilter.cxx +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#include -#include -#include -#include - -#include "LotusWordProImportFilter.hxx" - -using namespace ::cppu; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit