diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/Library_lwpft.mk | 1 | ||||
-rw-r--r-- | lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 46 | ||||
-rw-r--r-- | lotuswordpro/source/filter/genericfilter.cxx | 15 |
3 files changed, 16 insertions, 46 deletions
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 <com/sun/star/io/XInputStream.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#include <com/sun/star/xml/sax/XParser.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/uno/Reference.hxx> -#include <comphelper/processfactory.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/supportsservice.hxx> -#include <osl/diagnose.h> #include <rtl/tencinfo.h> #include <sal/macros.h> #include <tools/stream.hxx> @@ -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<css::uno::Any> 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<OUString> 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<css::uno::Any> 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 <osl/mutex.hxx> -#include <osl/thread.h> -#include <cppuhelper/factory.hxx> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - -#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: */ |