summaryrefslogtreecommitdiff
path: root/writerperfect/source
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-02-08 08:47:12 +0100
committerDavid Tardon <dtardon@redhat.com>2016-02-08 09:37:17 +0100
commit41b4e7a0a5ca13b1971fad51ce6fef881dcfbf1a (patch)
treec0f9222256b2b3ba9739b29e595e61f78fac1e28 /writerperfect/source
parent4830f981e078bbaf1bf845bd310a8cb27d164432 (diff)
wpftdraw: use service constructor
Change-Id: I4bc9bc2bd9fe3429701160db408303cd0b0c9714
Diffstat (limited to 'writerperfect/source')
-rw-r--r--writerperfect/source/draw/CDRImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/CMXImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/FreehandImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/MSPUBImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/MWAWDrawImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/PageMakerImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/VisioImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/WPGImportFilter.cxx26
-rw-r--r--writerperfect/source/draw/wpftdraw.component2
-rw-r--r--writerperfect/source/draw/wpftdraw_genericfilter.cxx103
10 files changed, 65 insertions, 248 deletions
diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx
index 0c697bd772f3..9b0a0ddfc186 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 0d89de95f052..d6adcc1166fe 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 0427c907d6a3..6ec07fbe51c0 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 920589564aa6..5f56c6b2632d 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 deae4b5251c9..4d994befc708 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 a644aeb4f7ed..fd00e2d4d646 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 904ddddefa86..e4ee797a6420 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 f4e6251f6d99..0280b3c1e5b9 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 b1054ffd6c2d..c1535394a02a 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 af3b14761b85..000000000000
--- 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: */