summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2016-01-21 18:48:57 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2016-01-22 05:18:07 +0100
commitc81eddbb20c84280aa64c712e34c829380b24527 (patch)
tree57bcd9c81e39ea7b95b5a03949dd6aedeb9ef1c9 /lotuswordpro
parentacd3ebefccd0b4570100c426574d83cfa9464f20 (diff)
lotuswordpro: Clean after we use constructor feature
18f1eb7b0c3536817572eeb481591418a7eab3da was pushed sooner, so just few more additions. Change-Id: If8e8082959fc049947986ca6faf329ea9436062a
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/Library_lwpft.mk1
-rw-r--r--lotuswordpro/source/filter/LotusWordProImportFilter.cxx46
-rw-r--r--lotuswordpro/source/filter/genericfilter.cxx15
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: */