[Libreoffice-commits] core.git: 7 commits - writerperfect/Library_wpftcalc.mk writerperfect/Library_wpftdraw.mk writerperfect/Library_wpftimpress.mk writerperfect/Library_wpftwriter.mk writerperfect/qa writerperfect/source

David Tardon dtardon at redhat.com
Mon Feb 8 09:22:04 UTC 2016


 writerperfect/Library_wpftcalc.mk                             |    1 
 writerperfect/Library_wpftdraw.mk                             |    1 
 writerperfect/Library_wpftimpress.mk                          |    1 
 writerperfect/Library_wpftwriter.mk                           |    1 
 writerperfect/qa/unit/DirectoryStreamTest.cxx                 |    2 
 writerperfect/source/calc/MSWorksCalcImportFilter.cxx         |   43 +---
 writerperfect/source/calc/MSWorksCalcImportFilter.hxx         |   10 
 writerperfect/source/calc/MWAWCalcImportFilter.cxx            |   41 +--
 writerperfect/source/calc/MWAWCalcImportFilter.hxx            |   10 
 writerperfect/source/calc/NumbersImportFilter.cxx             |   41 +--
 writerperfect/source/calc/NumbersImportFilter.hxx             |   10 
 writerperfect/source/calc/wpftcalc.component                  |   11 -
 writerperfect/source/calc/wpftcalc_genericfilter.cxx          |   68 ------
 writerperfect/source/draw/CDRImportFilter.cxx                 |   41 +--
 writerperfect/source/draw/CDRImportFilter.hxx                 |   10 
 writerperfect/source/draw/CMXImportFilter.cxx                 |   41 +--
 writerperfect/source/draw/CMXImportFilter.hxx                 |   10 
 writerperfect/source/draw/FreehandImportFilter.cxx            |   41 +--
 writerperfect/source/draw/FreehandImportFilter.hxx            |   10 
 writerperfect/source/draw/MSPUBImportFilter.cxx               |   43 +---
 writerperfect/source/draw/MSPUBImportFilter.hxx               |   10 
 writerperfect/source/draw/MWAWDrawImportFilter.cxx            |   41 +--
 writerperfect/source/draw/MWAWDrawImportFilter.hxx            |   10 
 writerperfect/source/draw/PageMakerImportFilter.cxx           |   41 +--
 writerperfect/source/draw/PageMakerImportFilter.hxx           |   10 
 writerperfect/source/draw/VisioImportFilter.cxx               |   41 +--
 writerperfect/source/draw/VisioImportFilter.hxx               |   10 
 writerperfect/source/draw/WPGImportFilter.cxx                 |   41 +--
 writerperfect/source/draw/WPGImportFilter.hxx                 |   10 
 writerperfect/source/draw/wpftdraw.component                  |   26 +-
 writerperfect/source/draw/wpftdraw_genericfilter.cxx          |  103 ----------
 writerperfect/source/impress/KeynoteImportFilter.cxx          |   39 +--
 writerperfect/source/impress/KeynoteImportFilter.hxx          |   13 -
 writerperfect/source/impress/MWAWPresentationImportFilter.cxx |   39 +--
 writerperfect/source/impress/wpftimpress.component            |    8 
 writerperfect/source/impress/wpftimpress_genericfilter.cxx    |   59 -----
 writerperfect/source/writer/AbiWordImportFilter.cxx           |   43 +---
 writerperfect/source/writer/AbiWordImportFilter.hxx           |   10 
 writerperfect/source/writer/EBookImportFilter.cxx             |   43 +---
 writerperfect/source/writer/EBookImportFilter.hxx             |   10 
 writerperfect/source/writer/MSWorksImportFilter.cxx           |   43 +---
 writerperfect/source/writer/MSWorksImportFilter.hxx           |   10 
 writerperfect/source/writer/MWAWImportFilter.cxx              |   41 +--
 writerperfect/source/writer/MWAWImportFilter.hxx              |   10 
 writerperfect/source/writer/PagesImportFilter.cxx             |   41 +--
 writerperfect/source/writer/PagesImportFilter.hxx             |   10 
 writerperfect/source/writer/WordPerfectImportFilter.cxx       |   55 +----
 writerperfect/source/writer/WordPerfectImportFilter.hxx       |   13 -
 writerperfect/source/writer/wpftwriter.component              |   20 +
 writerperfect/source/writer/wpftwriter_genericfilter.cxx      |   88 --------
 50 files changed, 360 insertions(+), 1014 deletions(-)

New commits:
commit 41b4e7a0a5ca13b1971fad51ce6fef881dcfbf1a
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:47:12 2016 +0100

    wpftdraw: use service constructor
    
    Change-Id: I4bc9bc2bd9fe3429701160db408303cd0b0c9714

diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx
index 0c697bd7..9b0a0dd 100644
--- a/writerperfect/source/draw/CDRImportFilter.cxx
+++ b/writerperfect/source/draw/CDRImportFilter.cxx
@@ -43,37 +43,27 @@ bool CDRImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStri
     return false;
 }
 
-OUString CDRImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.CDRImportFilter");
-}
-
-Sequence< OUString > CDRImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL CDRImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return CDRImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.CDRImportFilter");
 }
+
 sal_Bool SAL_CALL CDRImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL CDRImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return CDRImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx
index 0d89de9..d6adcc1 100644
--- a/writerperfect/source/draw/CMXImportFilter.cxx
+++ b/writerperfect/source/draw/CMXImportFilter.cxx
@@ -43,37 +43,27 @@ bool CMXImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStri
     return false;
 }
 
-OUString CMXImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.CMXImportFilter");
-}
-
-Sequence< OUString > CMXImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.document.ImportFilter";
-    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL CMXImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return CMXImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.CMXImportFilter");
 }
+
 sal_Bool SAL_CALL CMXImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL CMXImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return CMXImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] = "com.sun.star.document.ImportFilter";
+    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx
index 0427c90..6ec07fbe 100644
--- a/writerperfect/source/draw/FreehandImportFilter.cxx
+++ b/writerperfect/source/draw/FreehandImportFilter.cxx
@@ -39,37 +39,27 @@ bool FreehandImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O
     return false;
 }
 
-OUString FreehandImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.FreehandImportFilter");
-}
-
-Sequence< OUString > FreehandImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL FreehandImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return FreehandImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.FreehandImportFilter");
 }
+
 sal_Bool SAL_CALL FreehandImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL FreehandImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return FreehandImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx
index 9205895..5f56c6b 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.cxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.cxx
@@ -39,37 +39,27 @@ bool MSPUBImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUSt
     return false;
 }
 
-OUString MSPUBImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.MSPUBImportFilter");
-}
-
-Sequence< OUString > MSPUBImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL MSPUBImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MSPUBImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.MSPUBImportFilter");
 }
+
 sal_Bool SAL_CALL MSPUBImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MSPUBImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MSPUBImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
index deae4b5..4d994be 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
@@ -93,37 +93,27 @@ void MWAWDrawImportFilter::doRegisterHandlers(OdgGenerator &rGenerator)
     rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
 }
 
-OUString MWAWDrawImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.MWAWDrawImportFilter");
-}
-
-Sequence< OUString > MWAWDrawImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL MWAWDrawImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MWAWDrawImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.MWAWDrawImportFilter");
 }
+
 sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MWAWDrawImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx
index a644aeb..fd00e2d 100644
--- a/writerperfect/source/draw/PageMakerImportFilter.cxx
+++ b/writerperfect/source/draw/PageMakerImportFilter.cxx
@@ -41,37 +41,27 @@ bool PageMakerImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput,
     return false;
 }
 
-OUString PageMakerImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("org.libreoffice.comp.Draw.PageMakerImportFilter");
-}
-
-Sequence< OUString > PageMakerImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence< OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.document.ImportFilter";
-    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL PageMakerImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return PageMakerImportFilter_getImplementationName();
+    return OUString("org.libreoffice.comp.Draw.PageMakerImportFilter");
 }
+
 sal_Bool SAL_CALL PageMakerImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL PageMakerImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return PageMakerImportFilter_getSupportedServiceNames();
+    Sequence< OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] = "com.sun.star.document.ImportFilter";
+    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx
index 904dddd..e4ee797 100644
--- a/writerperfect/source/draw/VisioImportFilter.cxx
+++ b/writerperfect/source/draw/VisioImportFilter.cxx
@@ -39,37 +39,27 @@ bool VisioImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUSt
     return false;
 }
 
-OUString VisioImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.VisioImportFilter");
-}
-
-Sequence< OUString > VisioImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL VisioImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return VisioImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.VisioImportFilter");
 }
+
 sal_Bool SAL_CALL VisioImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL VisioImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return VisioImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx
index f4e6251..0280b3c 100644
--- a/writerperfect/source/draw/WPGImportFilter.cxx
+++ b/writerperfect/source/draw/WPGImportFilter.cxx
@@ -46,37 +46,27 @@ bool WPGImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStri
     return false;
 }
 
-OUString WPGImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Draw.WPGImportFilter");
-}
-
-Sequence< OUString > WPGImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
 // XServiceInfo
 OUString SAL_CALL WPGImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return WPGImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Draw.WPGImportFilter");
 }
+
 sal_Bool SAL_CALL WPGImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL WPGImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return WPGImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 extern "C"
diff --git a/writerperfect/source/draw/wpftdraw.component b/writerperfect/source/draw/wpftdraw.component
index b1054ff..c153539 100644
--- a/writerperfect/source/draw/wpftdraw.component
+++ b/writerperfect/source/draw/wpftdraw.component
@@ -8,7 +8,7 @@
  *
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="wpftdraw" xmlns="http://openoffice.org/2010/uno-components">
+    xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.Draw.CDRImportFilter"
       constructor="com_sun_star_comp_Draw_CDRImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
diff --git a/writerperfect/source/draw/wpftdraw_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
deleted file mode 100644
index af3b147..0000000
--- a/writerperfect/source/draw/wpftdraw_genericfilter.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* genericfilter: mostly generic code for registering the filter */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#include "sal/config.h"
-
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implementationentry.hxx"
-#include "sal/types.h"
-
-#include "CDRImportFilter.hxx"
-#include "CMXImportFilter.hxx"
-#include "MSPUBImportFilter.hxx"
-#include "MWAWDrawImportFilter.hxx"
-#include "PageMakerImportFilter.hxx"
-#include "FreehandImportFilter.hxx"
-#include "VisioImportFilter.hxx"
-#include "WPGImportFilter.hxx"
-
-namespace
-{
-
-static cppu::ImplementationEntry const services[] =
-{
-    {
-        &CDRImportFilter_createInstance, &CDRImportFilter_getImplementationName,
-        &CDRImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &CMXImportFilter_createInstance, &CMXImportFilter_getImplementationName,
-        &CMXImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &FreehandImportFilter_createInstance,
-        &FreehandImportFilter_getImplementationName,
-        &FreehandImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &PageMakerImportFilter_createInstance,
-        &PageMakerImportFilter_getImplementationName,
-        &PageMakerImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MSPUBImportFilter_createInstance,
-        &MSPUBImportFilter_getImplementationName,
-        &MSPUBImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MWAWDrawImportFilter_createInstance,
-        &MWAWDrawImportFilter_getImplementationName,
-        &MWAWDrawImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &VisioImportFilter_createInstance,
-        &VisioImportFilter_getImplementationName,
-        &VisioImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &WPGImportFilter_createInstance, &WPGImportFilter_getImplementationName,
-        &WPGImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftdraw_component_getFactory(
-    char const *pImplName, void *pServiceManager, void *pRegistryKey)
-{
-    return cppu::component_getFactoryHelper(
-               pImplName, pServiceManager, pRegistryKey, services);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4830f981e078bbaf1bf845bd310a8cb27d164432
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:37:56 2016 +0100

    wpftwriter: use service constructor
    
    Change-Id: I217988ca09b40af7cb2b3b28ea7c2af6a9db12d0

diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk
index 8557991..9ec43c4 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -70,7 +70,6 @@ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
 	writerperfect/source/writer/MWAWImportFilter \
 	writerperfect/source/writer/PagesImportFilter \
 	writerperfect/source/writer/WordPerfectImportFilter \
-	writerperfect/source/writer/wpftwriter_genericfilter \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx
index 2a84e0a..7c5f2ae 100644
--- a/writerperfect/source/writer/AbiWordImportFilter.cxx
+++ b/writerperfect/source/writer/AbiWordImportFilter.cxx
@@ -40,43 +40,36 @@ bool AbiWordImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OU
     return false;
 }
 
-OUString AbiWordImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Writer.AbiWordImportFilter");
-}
-
-Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL AbiWordImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new AbiWordImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL AbiWordImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return AbiWordImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Writer.AbiWordImportFilter");
 }
+
 sal_Bool SAL_CALL AbiWordImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL AbiWordImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return AbiWordImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Writer_AbiWordImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new AbiWordImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/AbiWordImportFilter.hxx b/writerperfect/source/writer/AbiWordImportFilter.hxx
index cf2a510..d756015 100644
--- a/writerperfect/source/writer/AbiWordImportFilter.hxx
+++ b/writerperfect/source/writer/AbiWordImportFilter.hxx
@@ -39,16 +39,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdtGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString AbiWordImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL AbiWordImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
index 25d533f..b98ae59 100644
--- a/writerperfect/source/writer/EBookImportFilter.cxx
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
@@ -92,43 +92,36 @@ bool EBookImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUSt
     return !rTypeName.isEmpty();
 }
 
-OUString EBookImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("org.libreoffice.comp.Writer.EBookImportFilter");
-}
-
-Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL EBookImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new EBookImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL EBookImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return EBookImportFilter_getImplementationName();
+    return OUString("org.libreoffice.comp.Writer.EBookImportFilter");
 }
+
 sal_Bool SAL_CALL EBookImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL EBookImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return EBookImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+org_libreoffice_comp_Writer_EBookImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new EBookImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/EBookImportFilter.hxx b/writerperfect/source/writer/EBookImportFilter.hxx
index d17e9a4..66ff677 100644
--- a/writerperfect/source/writer/EBookImportFilter.hxx
+++ b/writerperfect/source/writer/EBookImportFilter.hxx
@@ -39,16 +39,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdtGenerator &rGenerator, utl::MediaDescriptor &rDescriptor) override;
 };
 
-OUString EBookImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL EBookImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index bd168d0..06d2474 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -105,43 +105,36 @@ void MSWorksImportFilter::doRegisterHandlers(OdtGenerator &rGenerator)
     rGenerator.registerEmbeddedObjectHandler("image/wks-ods", &handleEmbeddedWKSObject);
 }
 
-OUString MSWorksImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Writer.MSWorksImportFilter");
-}
-
-Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL MSWorksImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MSWorksImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MSWorksImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MSWorksImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Writer.MSWorksImportFilter");
 }
+
 sal_Bool SAL_CALL MSWorksImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MSWorksImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MSWorksImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Writer_MSWorksImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MSWorksImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx
index 0bd39d3..ee99f3c 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
@@ -40,16 +40,6 @@ private:
     virtual void doRegisterHandlers(OdtGenerator &rGenerator) override;
 };
 
-OUString MSWorksImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MSWorksImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index ee4e78b..8c7dceb 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -93,43 +93,36 @@ void MWAWImportFilter::doRegisterHandlers(OdtGenerator &rGenerator)
     rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
 }
 
-OUString MWAWImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Writer.MWAWImportFilter");
-}
-
-Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL MWAWImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MWAWImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MWAWImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MWAWImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Writer.MWAWImportFilter");
 }
+
 sal_Bool SAL_CALL MWAWImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MWAWImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MWAWImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Writer_MWAWImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MWAWImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/MWAWImportFilter.hxx b/writerperfect/source/writer/MWAWImportFilter.hxx
index 308ccee..b88ed78 100644
--- a/writerperfect/source/writer/MWAWImportFilter.hxx
+++ b/writerperfect/source/writer/MWAWImportFilter.hxx
@@ -40,16 +40,6 @@ private:
     virtual void doRegisterHandlers(OdtGenerator &rGenerator) override;
 };
 
-OUString MWAWImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MWAWImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/PagesImportFilter.cxx b/writerperfect/source/writer/PagesImportFilter.cxx
index 3942aa0..997922e 100644
--- a/writerperfect/source/writer/PagesImportFilter.cxx
+++ b/writerperfect/source/writer/PagesImportFilter.cxx
@@ -45,43 +45,36 @@ bool PagesImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUSt
     return false;
 }
 
-OUString PagesImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("org.libreoffice.comp.Writer.PagesImportFilter");
-}
-
-Sequence< OUString > SAL_CALL PagesImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL PagesImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new PagesImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL PagesImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return PagesImportFilter_getImplementationName();
+    return OUString("org.libreoffice.comp.Writer.PagesImportFilter");
 }
+
 sal_Bool SAL_CALL PagesImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL PagesImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return PagesImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+org_libreoffice_comp_Writer_PagesImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new PagesImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/PagesImportFilter.hxx b/writerperfect/source/writer/PagesImportFilter.hxx
index 85adb8a..ce68915 100644
--- a/writerperfect/source/writer/PagesImportFilter.hxx
+++ b/writerperfect/source/writer/PagesImportFilter.hxx
@@ -38,16 +38,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdtGenerator &rGenerator, utl::MediaDescriptor &rDescriptor) override;
 };
 
-OUString PagesImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL PagesImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL PagesImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index d7edfd6..8253665 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -240,43 +240,28 @@ throw (Exception, RuntimeException, std::exception)
         }
     }
 }
-OUString WordPerfectImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Writer.WordPerfectImportFilter");
-}
-
-Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL WordPerfectImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new WordPerfectImportFilter(rContext));
-}
 
 // XServiceInfo
 OUString SAL_CALL WordPerfectImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return WordPerfectImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Writer.WordPerfectImportFilter");
 }
+
 sal_Bool SAL_CALL WordPerfectImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL WordPerfectImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return WordPerfectImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
 }
 
 
@@ -352,12 +337,11 @@ throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
     }
 }
 
-
 // XServiceInfo
 OUString SAL_CALL WordPerfectImportFilterDialog::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return WordPerfectImportFilterDialog_getImplementationName();
+    return OUString("com.sun.star.comp.Writer.WordPerfectImportFilterDialog");
 }
 
 sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService(const OUString &rServiceName)
@@ -369,26 +353,17 @@ throw (RuntimeException, std::exception)
 Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return WordPerfectImportFilterDialog_getSupportedServiceNames();
-}
-
-OUString WordPerfectImportFilterDialog_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Writer.WordPerfectImportFilterDialog");
-}
-
-Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames()
-throw (RuntimeException)
-{
     Sequence < OUString > aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance(const Reference< XComponentContext > &)
-throw(Exception)
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
 {
-    return static_cast<cppu::OWeakObject *>(new WordPerfectImportFilterDialog);
+    return cppu::acquire(new WordPerfectImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx
index 749aaf5..09e1aa9 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx
@@ -130,19 +130,6 @@ public:
 
 };
 
-OUString WordPerfectImportFilterDialog_getImplementationName()
-throw (css::uno::RuntimeException);
-
-bool SAL_CALL WordPerfectImportFilterDialog_supportsService(const OUString &ServiceName)
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL WordPerfectImportFilterDialog_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/wpftwriter.component b/writerperfect/source/writer/wpftwriter.component
index eaf751a..4c5f37f 100644
--- a/writerperfect/source/writer/wpftwriter.component
+++ b/writerperfect/source/writer/wpftwriter.component
@@ -17,28 +17,34 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="wpftwriter" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.Writer.AbiWordImportFilter">
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.Writer.AbiWordImportFilter"
+      constructor="com_sun_star_comp_Writer_AbiWordImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter">
+  <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter"
+      constructor="com_sun_star_comp_Writer_MSWorksImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Writer.MWAWImportFilter">
+  <implementation name="com.sun.star.comp.Writer.MWAWImportFilter"
+      constructor="com_sun_star_comp_Writer_MWAWImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter">
+  <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter"
+      constructor="com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation">
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
     <service name="com.sun.star.document.ImportFilter"/>
   </implementation>
-  <implementation name="org.libreoffice.comp.Writer.EBookImportFilter">
+  <implementation name="org.libreoffice.comp.Writer.EBookImportFilter"
+      constructor="org_libreoffice_comp_Writer_EBookImportFilter_get_implementation">
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
     <service name="com.sun.star.document.ImportFilter"/>
   </implementation>
-  <implementation name="org.libreoffice.comp.Writer.PagesImportFilter">
+  <implementation name="org.libreoffice.comp.Writer.PagesImportFilter"
+      constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation">
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
     <service name="com.sun.star.document.ImportFilter"/>
   </implementation>
diff --git a/writerperfect/source/writer/wpftwriter_genericfilter.cxx b/writerperfect/source/writer/wpftwriter_genericfilter.cxx
deleted file mode 100644
index 6841117..0000000
--- a/writerperfect/source/writer/wpftwriter_genericfilter.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* genericfilter: mostly generic code for registering the filter
- */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- * Portions of this code Copyright 2000 by Sun Microsystems, Inc.
- * Rest is Copyright (C) 2002 William Lachance (wlach at interlog.com)
- */
-#include "sal/config.h"
-
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implementationentry.hxx"
-#include "sal/types.h"
-
-#include "AbiWordImportFilter.hxx"
-#include "EBookImportFilter.hxx"
-#include "WordPerfectImportFilter.hxx"
-#include "MSWorksImportFilter.hxx"
-#include "MWAWImportFilter.hxx"
-#include "PagesImportFilter.hxx"
-
-namespace
-{
-
-static cppu::ImplementationEntry const services[] =
-{
-    {
-        &AbiWordImportFilter_createInstance, &AbiWordImportFilter_getImplementationName,
-        &AbiWordImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &WordPerfectImportFilter_createInstance, &WordPerfectImportFilter_getImplementationName,
-        &WordPerfectImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MSWorksImportFilter_createInstance, &MSWorksImportFilter_getImplementationName,
-        &MSWorksImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MWAWImportFilter_createInstance, &MWAWImportFilter_getImplementationName,
-        &MWAWImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &EBookImportFilter_createInstance, &EBookImportFilter_getImplementationName,
-        &EBookImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &PagesImportFilter_createInstance, &PagesImportFilter_getImplementationName,
-        &PagesImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftwriter_component_getFactory(
-    char const *pImplName, void *pServiceManager, void *pRegistryKey)
-{
-    return cppu::component_getFactoryHelper(
-               pImplName, pServiceManager, pRegistryKey, services);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 9332b254c1b96ad030106b79a52dc8915b70091f
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:29:04 2016 +0100

    wpftcalc: use service constructor
    
    Change-Id: Ic93e932c89b7962243e84aa50431d0e8deb1b499

diff --git a/writerperfect/Library_wpftcalc.mk b/writerperfect/Library_wpftcalc.mk
index 18cc378..1672e63 100644
--- a/writerperfect/Library_wpftcalc.mk
+++ b/writerperfect/Library_wpftcalc.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Library_add_exception_objects,wpftcalc,\
 	writerperfect/source/calc/MSWorksCalcImportFilter \
 	writerperfect/source/calc/MWAWCalcImportFilter \
 	writerperfect/source/calc/NumbersImportFilter \
-	writerperfect/source/calc/wpftcalc_genericfilter \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index c179414..1d88c05 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -109,43 +109,36 @@ void MSWorksCalcImportFilter::doRegisterHandlers(OdsGenerator &)
 {
 }
 
-OUString MSWorksCalcImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Calc.MSWorksCalcImportFilter");
-}
-
-Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL MSWorksCalcImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MSWorksCalcImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MSWorksCalcImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MSWorksCalcImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Calc.MSWorksCalcImportFilter");
 }
+
 sal_Bool SAL_CALL MSWorksCalcImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MSWorksCalcImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Calc_MSWorksCalcImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MSWorksCalcImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
index 31462c3..8eda909 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
@@ -40,16 +40,6 @@ private:
     virtual void doRegisterHandlers(OdsGenerator &rGenerator) override;
 };
 
-OUString MSWorksCalcImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MSWorksCalcImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.cxx b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
index ee0d646..c1034b1 100644
--- a/writerperfect/source/calc/MWAWCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
@@ -101,43 +101,36 @@ void MWAWCalcImportFilter::doRegisterHandlers(OdsGenerator &rGenerator)
     rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
 }
 
-OUString MWAWCalcImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Calc.MWAWCalcImportFilter");
-}
-
-Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL MWAWCalcImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MWAWCalcImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MWAWCalcImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MWAWCalcImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Calc.MWAWCalcImportFilter");
 }
+
 sal_Bool SAL_CALL MWAWCalcImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MWAWCalcImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Calc_MWAWCalcImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MWAWCalcImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.hxx b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
index 2a8be14..5b24292 100644
--- a/writerperfect/source/calc/MWAWCalcImportFilter.hxx
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
@@ -40,16 +40,6 @@ private:
     virtual void doRegisterHandlers(OdsGenerator &rGenerator) override;
 };
 
-OUString MWAWCalcImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MWAWCalcImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/NumbersImportFilter.cxx b/writerperfect/source/calc/NumbersImportFilter.cxx
index ba8cf0e..cf24f8a 100644
--- a/writerperfect/source/calc/NumbersImportFilter.cxx
+++ b/writerperfect/source/calc/NumbersImportFilter.cxx
@@ -49,43 +49,36 @@ void NumbersImportFilter::doRegisterHandlers(OdsGenerator &)
 {
 }
 
-OUString NumbersImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("org.libreoffice.comp.Calc.NumbersImportFilter");
-}
-
-Sequence< OUString > SAL_CALL NumbersImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL NumbersImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new NumbersImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL NumbersImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return NumbersImportFilter_getImplementationName();
+    return OUString("org.libreoffice.comp.Calc.NumbersImportFilter");
 }
+
 sal_Bool SAL_CALL NumbersImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
 {
     return cppu::supportsService(this, rServiceName);
 }
+
 Sequence< OUString > SAL_CALL NumbersImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return NumbersImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+org_libreoffice_comp_Calc_NumbersImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new NumbersImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/NumbersImportFilter.hxx b/writerperfect/source/calc/NumbersImportFilter.hxx
index 508643b..f12226f 100644
--- a/writerperfect/source/calc/NumbersImportFilter.hxx
+++ b/writerperfect/source/calc/NumbersImportFilter.hxx
@@ -39,16 +39,6 @@ private:
     virtual void doRegisterHandlers(OdsGenerator &rGenerator) override;
 };
 
-OUString NumbersImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL NumbersImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL NumbersImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/calc/wpftcalc.component b/writerperfect/source/calc/wpftcalc.component
index 9216b33..117ec1f 100644
--- a/writerperfect/source/calc/wpftcalc.component
+++ b/writerperfect/source/calc/wpftcalc.component
@@ -8,16 +8,19 @@
  *
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="wpftcalc" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.Calc.MSWorksCalcImportFilter">
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.Calc.MSWorksCalcImportFilter" 
+      constructor="com_sun_star_comp_Calc_MSWorksCalcImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Calc.MWAWCalcImportFilter">
+  <implementation name="com.sun.star.comp.Calc.MWAWCalcImportFilter"
+      constructor="com_sun_star_comp_Calc_MWAWCalcImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="org.libreoffice.comp.Calc.NumbersImportFilter">
+  <implementation name="org.libreoffice.comp.Calc.NumbersImportFilter"
+      constructor="org_libreoffice_comp_Calc_NumbersImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
diff --git a/writerperfect/source/calc/wpftcalc_genericfilter.cxx b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
deleted file mode 100644
index 87296a0..0000000
--- a/writerperfect/source/calc/wpftcalc_genericfilter.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* genericfilter: mostly generic code for registering the filter */
-
-/* "This product is not manufactured, approved, or supported by
- * Corel Corporation or Corel Corporation Limited."
- */
-
-#include "sal/config.h"
-
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implementationentry.hxx"
-#include "sal/types.h"
-
-#include "MSWorksCalcImportFilter.hxx"
-#include "MWAWCalcImportFilter.hxx"
-#include "NumbersImportFilter.hxx"
-
-namespace
-{
-
-static cppu::ImplementationEntry const services[] =
-{
-    {
-        &MSWorksCalcImportFilter_createInstance, &MSWorksCalcImportFilter_getImplementationName,
-        &MSWorksCalcImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MWAWCalcImportFilter_createInstance, &MWAWCalcImportFilter_getImplementationName,
-        &MWAWCalcImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &NumbersImportFilter_createInstance, &NumbersImportFilter_getImplementationName,
-        &NumbersImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftcalc_component_getFactory(
-    char const *pImplName, void *pServiceManager, void *pRegistryKey)
-{
-    return cppu::component_getFactoryHelper(
-               pImplName, pServiceManager, pRegistryKey, services);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit eff6d8213665c7b955fddadc1f446c76b0074924
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:15:27 2016 +0100

    wpftimpress: use service constructor
    
    Change-Id: Ic53703b68b816eafe598f70df46aaa11b452b4f7

diff --git a/writerperfect/Library_wpftimpress.mk b/writerperfect/Library_wpftimpress.mk
index 3d35aa7..116b72a 100644
--- a/writerperfect/Library_wpftimpress.mk
+++ b/writerperfect/Library_wpftimpress.mk
@@ -57,7 +57,6 @@ $(eval $(call gb_Library_use_externals,wpftimpress,\
 $(eval $(call gb_Library_add_exception_objects,wpftimpress,\
 	writerperfect/source/impress/KeynoteImportFilter \
 	writerperfect/source/impress/MWAWPresentationImportFilter \
-	writerperfect/source/impress/wpftimpress_genericfilter \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
index 312f7a4..c54091cd 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
@@ -238,33 +238,11 @@ throw(css::uno::RuntimeException, std::exception)
     return sTypeName;
 }
 
-OUString KeynoteImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("org.libreoffice.comp.Impress.KeynoteImportFilter");
-}
-
-Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.document.ImportFilter";
-    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL KeynoteImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new KeynoteImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL KeynoteImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return KeynoteImportFilter_getImplementationName();
+    return OUString("org.libreoffice.comp.Impress.KeynoteImportFilter");
 }
 
 sal_Bool SAL_CALL KeynoteImportFilter::supportsService(const OUString &rServiceName)
@@ -276,7 +254,20 @@ throw (RuntimeException, std::exception)
 Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return KeynoteImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] = "com.sun.star.document.ImportFilter";
+    pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+org_libreoffice_comp_Impress_KeynoteImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new KeynoteImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/impress/KeynoteImportFilter.hxx b/writerperfect/source/impress/KeynoteImportFilter.hxx
index 69daf68..e4c8800 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.hxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.hxx
@@ -41,19 +41,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdpGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString KeynoteImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-bool SAL_CALL KeynoteImportFilter_supportsService(const OUString &ServiceName)
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL KeynoteImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
index 68c9b3b..5027df4 100644
--- a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
+++ b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
@@ -78,33 +78,11 @@ void MWAWPresentationImportFilter::doRegisterHandlers(OdpGenerator &rGenerator)
     rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
 }
 
-OUString MWAWPresentationImportFilter_getImplementationName()
-throw (RuntimeException)
-{
-    return OUString("com.sun.star.comp.Impress.MWAWPresentationImportFilter");
-}
-
-Sequence< OUString > SAL_CALL MWAWPresentationImportFilter_getSupportedServiceNames()
-throw (RuntimeException)
-{
-    Sequence < OUString > aRet(2);
-    OUString *pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
-}
-
-Reference< XInterface > SAL_CALL MWAWPresentationImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MWAWPresentationImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MWAWPresentationImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
 {
-    return MWAWPresentationImportFilter_getImplementationName();
+    return OUString("com.sun.star.comp.Impress.MWAWPresentationImportFilter");
 }
 sal_Bool SAL_CALL MWAWPresentationImportFilter::supportsService(const OUString &rServiceName)
 throw (RuntimeException, std::exception)
@@ -114,7 +92,20 @@ throw (RuntimeException, std::exception)
 Sequence< OUString > SAL_CALL MWAWPresentationImportFilter::getSupportedServiceNames()
 throw (RuntimeException, std::exception)
 {
-    return MWAWPresentationImportFilter_getSupportedServiceNames();
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Impress_MWAWPresentationImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MWAWPresentationImportFilter(context));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/impress/wpftimpress.component b/writerperfect/source/impress/wpftimpress.component
index 58d00cc..5413c9a 100644
--- a/writerperfect/source/impress/wpftimpress.component
+++ b/writerperfect/source/impress/wpftimpress.component
@@ -8,12 +8,14 @@
  *
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="wpftimpress" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="org.libreoffice.comp.Impress.KeynoteImportFilter">
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="org.libreoffice.comp.Impress.KeynoteImportFilter"
+      constructor="org_libreoffice_comp_Impress_KeynoteImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Impress.MWAWPresentationImportFilter">
+  <implementation name="com.sun.star.comp.Impress.MWAWPresentationImportFilter"
+      constructor="com_sun_star_comp_Impress_MWAWPresentationImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
diff --git a/writerperfect/source/impress/wpftimpress_genericfilter.cxx b/writerperfect/source/impress/wpftimpress_genericfilter.cxx
deleted file mode 100644
index 2f50025..0000000
--- a/writerperfect/source/impress/wpftimpress_genericfilter.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* genericfilter: mostly generic code for registering the filter */
-
-#include "sal/config.h"
-
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implementationentry.hxx"
-#include "sal/types.h"
-
-#include "KeynoteImportFilter.hxx"
-#include "MWAWPresentationImportFilter.hxx"
-
-namespace
-{
-
-static cppu::ImplementationEntry const services[] =
-{
-    {
-        &KeynoteImportFilter_createInstance, &KeynoteImportFilter_getImplementationName,
-        &KeynoteImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    {
-        &MWAWPresentationImportFilter_createInstance,
-        &MWAWPresentationImportFilter_getImplementationName,
-        &MWAWPresentationImportFilter_getSupportedServiceNames,
-        &cppu::createSingleComponentFactory, nullptr, 0
-    },
-    { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftimpress_component_getFactory(
-    char const *pImplName, void *pServiceManager, void *pRegistryKey)
-{
-    return cppu::component_getFactoryHelper(
-               pImplName, pServiceManager, pRegistryKey, services);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3af1b7f59340e5b82e65680d157d0ea16cdc3c81
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:47:22 2016 +0100

    drop unused include
    
    Change-Id: Ia0d9568ee33cab8498946a535baa6edb4ae28796

diff --git a/writerperfect/Library_wpftdraw.mk b/writerperfect/Library_wpftdraw.mk
index 1e57fcd..b6927db 100644
--- a/writerperfect/Library_wpftdraw.mk
+++ b/writerperfect/Library_wpftdraw.mk
@@ -71,7 +71,6 @@ $(eval $(call gb_Library_add_exception_objects,wpftdraw,\
 	writerperfect/source/draw/PageMakerImportFilter \
 	writerperfect/source/draw/VisioImportFilter \
 	writerperfect/source/draw/WPGImportFilter \
-	writerperfect/source/draw/wpftdraw_genericfilter \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx
index 7a9c833..0c697bd7 100644
--- a/writerperfect/source/draw/CDRImportFilter.cxx
+++ b/writerperfect/source/draw/CDRImportFilter.cxx
@@ -49,7 +49,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.CDRImportFilter");
 }
 
-Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames()
+Sequence< OUString > CDRImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -59,12 +59,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL CDRImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new CDRImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL CDRImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -82,4 +76,13 @@ throw (RuntimeException, std::exception)
     return CDRImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_CDRImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new CDRImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx
index f28301d..28c20c7 100644
--- a/writerperfect/source/draw/CDRImportFilter.hxx
+++ b/writerperfect/source/draw/CDRImportFilter.hxx
@@ -39,16 +39,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString CDRImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL CDRImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx
index 9f034eb..0d89de9 100644
--- a/writerperfect/source/draw/CMXImportFilter.cxx
+++ b/writerperfect/source/draw/CMXImportFilter.cxx
@@ -49,7 +49,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.CMXImportFilter");
 }
 
-Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames()
+Sequence< OUString > CMXImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -59,12 +59,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL CMXImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new CMXImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL CMXImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -82,4 +76,13 @@ throw (RuntimeException, std::exception)
     return CMXImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_CMXImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new CMXImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx
index d5dbe8a..62c6a4b 100644
--- a/writerperfect/source/draw/CMXImportFilter.hxx
+++ b/writerperfect/source/draw/CMXImportFilter.hxx
@@ -39,16 +39,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString CMXImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL CMXImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx
index 941be25..0427c90 100644
--- a/writerperfect/source/draw/FreehandImportFilter.cxx
+++ b/writerperfect/source/draw/FreehandImportFilter.cxx
@@ -45,7 +45,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.FreehandImportFilter");
 }
 
-Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames()
+Sequence< OUString > FreehandImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -55,12 +55,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL FreehandImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new FreehandImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL FreehandImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -78,4 +72,13 @@ throw (RuntimeException, std::exception)
     return FreehandImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_FreehandImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new FreehandImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/FreehandImportFilter.hxx b/writerperfect/source/draw/FreehandImportFilter.hxx
index 3a84a52..c277ff8 100644
--- a/writerperfect/source/draw/FreehandImportFilter.hxx
+++ b/writerperfect/source/draw/FreehandImportFilter.hxx
@@ -36,16 +36,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString FreehandImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL FreehandImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx
index 6d96a0d..9205895 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.cxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.cxx
@@ -16,8 +16,6 @@
 
 #include "MSPUBImportFilter.hxx"
 
-#include <iostream>
-
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::Exception;
 using com::sun::star::uno::RuntimeException;
@@ -47,7 +45,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.MSPUBImportFilter");
 }
 
-Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames()
+Sequence< OUString > MSPUBImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -57,12 +55,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL MSPUBImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MSPUBImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MSPUBImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -80,4 +72,13 @@ throw (RuntimeException, std::exception)
     return MSPUBImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_MSPUBImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MSPUBImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/MSPUBImportFilter.hxx b/writerperfect/source/draw/MSPUBImportFilter.hxx
index 4394bae..c644ba0 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.hxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.hxx
@@ -36,16 +36,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString MSPUBImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MSPUBImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
index ed9947f..deae4b5 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
@@ -99,7 +99,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.MWAWDrawImportFilter");
 }
 
-Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames()
+Sequence< OUString > MWAWDrawImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -109,12 +109,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL MWAWDrawImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new MWAWDrawImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL MWAWDrawImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -132,4 +126,13 @@ throw (RuntimeException, std::exception)
     return MWAWDrawImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_MWAWDrawImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new MWAWDrawImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.hxx b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
index 3b46502..0578be0 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.hxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
@@ -40,16 +40,6 @@ private:
     virtual void doRegisterHandlers(OdgGenerator &rGenerator) override;
 };
 
-OUString MWAWDrawImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL MWAWDrawImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx
index fe69182..a644aeb 100644
--- a/writerperfect/source/draw/PageMakerImportFilter.cxx
+++ b/writerperfect/source/draw/PageMakerImportFilter.cxx
@@ -47,7 +47,7 @@ throw (RuntimeException)
     return OUString("org.libreoffice.comp.Draw.PageMakerImportFilter");
 }
 
-Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames()
+Sequence< OUString > PageMakerImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence< OUString > aRet(2);
@@ -57,12 +57,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL PageMakerImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new PageMakerImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL PageMakerImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -80,4 +74,13 @@ throw (RuntimeException, std::exception)
     return PageMakerImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+org_libreoffice_comp_Draw_PageMakerImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new PageMakerImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/PageMakerImportFilter.hxx b/writerperfect/source/draw/PageMakerImportFilter.hxx
index f6ecc4c..edf6cf6 100644
--- a/writerperfect/source/draw/PageMakerImportFilter.hxx
+++ b/writerperfect/source/draw/PageMakerImportFilter.hxx
@@ -36,16 +36,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString PageMakerImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL PageMakerImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx
index 923cca6..904dddd 100644
--- a/writerperfect/source/draw/VisioImportFilter.cxx
+++ b/writerperfect/source/draw/VisioImportFilter.cxx
@@ -45,7 +45,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.VisioImportFilter");
 }
 
-Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames()
+Sequence< OUString > VisioImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -55,12 +55,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL VisioImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new VisioImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL VisioImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -78,4 +72,13 @@ throw (RuntimeException, std::exception)
     return VisioImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_VisioImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new VisioImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx
index 391c987..9f51616 100644
--- a/writerperfect/source/draw/VisioImportFilter.hxx
+++ b/writerperfect/source/draw/VisioImportFilter.hxx
@@ -36,16 +36,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString VisioImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL VisioImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx
index 165c53d..f4e6251 100644
--- a/writerperfect/source/draw/WPGImportFilter.cxx
+++ b/writerperfect/source/draw/WPGImportFilter.cxx
@@ -52,7 +52,7 @@ throw (RuntimeException)
     return OUString("com.sun.star.comp.Draw.WPGImportFilter");
 }
 
-Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames()
+Sequence< OUString > WPGImportFilter_getSupportedServiceNames()
 throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
@@ -62,12 +62,6 @@ throw (RuntimeException)
     return aRet;
 }
 
-Reference< XInterface > SAL_CALL WPGImportFilter_createInstance(const Reference< XComponentContext > &rContext)
-throw(Exception)
-{
-    return static_cast<cppu::OWeakObject *>(new WPGImportFilter(rContext));
-}
-
 // XServiceInfo
 OUString SAL_CALL WPGImportFilter::getImplementationName()
 throw (RuntimeException, std::exception)
@@ -85,4 +79,13 @@ throw (RuntimeException, std::exception)
     return WPGImportFilter_getSupportedServiceNames();
 }
 
+extern "C"
+SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
+com_sun_star_comp_Draw_WPGImportFilter_get_implementation(
+    css::uno::XComponentContext *const context,
+    const css::uno::Sequence<css::uno::Any> &)
+{
+    return cppu::acquire(new WPGImportFilter(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx
index 6f4e93b..f8b6f08 100644
--- a/writerperfect/source/draw/WPGImportFilter.hxx
+++ b/writerperfect/source/draw/WPGImportFilter.hxx
@@ -41,16 +41,6 @@ private:
     virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
 };
 
-OUString WPGImportFilter_getImplementationName()
-throw (css::uno::RuntimeException);
-
-css::uno::Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames()
-throw (css::uno::RuntimeException);
-
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL WPGImportFilter_createInstance(const css::uno::Reference< css::uno::XComponentContext > &rContext)
-throw (css::uno::Exception);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/wpftdraw.component b/writerperfect/source/draw/wpftdraw.component
index efc5673..b1054ff 100644
--- a/writerperfect/source/draw/wpftdraw.component
+++ b/writerperfect/source/draw/wpftdraw.component
@@ -9,35 +9,43 @@
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     prefix="wpftdraw" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.Draw.CDRImportFilter">
+  <implementation name="com.sun.star.comp.Draw.CDRImportFilter"
+      constructor="com_sun_star_comp_Draw_CDRImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.CMXImportFilter">
+  <implementation name="com.sun.star.comp.Draw.CMXImportFilter"
+      constructor="com_sun_star_comp_Draw_CMXImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.FreehandImportFilter">
+  <implementation name="com.sun.star.comp.Draw.FreehandImportFilter"
+      constructor="com_sun_star_comp_Draw_FreehandImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.MSPUBImportFilter">
+  <implementation name="com.sun.star.comp.Draw.MSPUBImportFilter"
+      constructor="com_sun_star_comp_Draw_MSPUBImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.MWAWDrawImportFilter">
+  <implementation name="com.sun.star.comp.Draw.MWAWDrawImportFilter"
+      constructor="com_sun_star_comp_Draw_MWAWDrawImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.VisioImportFilter">
+  <implementation name="com.sun.star.comp.Draw.VisioImportFilter"
+      constructor="com_sun_star_comp_Draw_VisioImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="com.sun.star.comp.Draw.WPGImportFilter">
+  <implementation name="com.sun.star.comp.Draw.WPGImportFilter"
+     constructor="com_sun_star_comp_Draw_WPGImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
-  <implementation name="org.libreoffice.comp.Draw.PageMakerImportFilter">
+  <implementation name="org.libreoffice.comp.Draw.PageMakerImportFilter"
+      constructor="org_libreoffice_comp_Draw_PageMakerImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
commit 0c62aa758f8804d778d43b91374065d79c7d00bb
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:51:27 2016 +0100

    these macros are not defined
    
    Change-Id: I881c2df8917dd7b5e172b0689fcb685d9f6128df

diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 98d9dea..c179414 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -124,8 +124,6 @@ throw (RuntimeException)
     pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
     return aRet;
 }
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
 
 Reference< XInterface > SAL_CALL MSWorksCalcImportFilter_createInstance(const Reference< XComponentContext > &rContext)
 throw(Exception)
diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx
index 2298d98..2a84e0a 100644
--- a/writerperfect/source/writer/AbiWordImportFilter.cxx
+++ b/writerperfect/source/writer/AbiWordImportFilter.cxx
@@ -55,8 +55,6 @@ throw (RuntimeException)
     pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
     return aRet;
 }
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
 
 Reference< XInterface > SAL_CALL AbiWordImportFilter_createInstance(const Reference< XComponentContext > &rContext)
 throw(Exception)
diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
index 73a9fbe..25d533f 100644
--- a/writerperfect/source/writer/EBookImportFilter.cxx
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
@@ -107,8 +107,6 @@ throw (RuntimeException)
     pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
     return aRet;
 }
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
 
 Reference< XInterface > SAL_CALL EBookImportFilter_createInstance(const Reference< XComponentContext > &rContext)
 throw(Exception)
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index f787d52..bd168d0 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -120,8 +120,6 @@ throw (RuntimeException)
     pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
     return aRet;
 }
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
 
 Reference< XInterface > SAL_CALL MSWorksImportFilter_createInstance(const Reference< XComponentContext > &rContext)
 throw(Exception)
commit eb10d8419447706446d70bac799f06a326f4c551
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Feb 8 08:14:29 2016 +0100

    astyle
    
    Change-Id: Ib9f4c6c4343dab9dd0959330f3a39fea319b4f4f

diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx
index a3c399b..8c4c704 100644
--- a/writerperfect/qa/unit/DirectoryStreamTest.cxx
+++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx
@@ -62,7 +62,7 @@ static const char g_aDirPath[] = "/writerperfect/qa/unit/data/stream/test.dir";
 static const char g_aNondirPath[] = "/writerperfect/qa/unit/data/stream/test.dir/mimetype";
 static const char g_aNonexistentPath[] = "/writerperfect/qa/unit/data/stream/foo/bar";
 
-static DirectoryStream* createForParent(const css::uno::Reference<css::ucb::XContent> &xContent)
+static DirectoryStream *createForParent(const css::uno::Reference<css::ucb::XContent> &xContent)
 {
     try
     {


More information about the Libreoffice-commits mailing list