diff options
author | David Tardon <dtardon@redhat.com> | 2016-02-08 08:37:56 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-02-08 09:37:16 +0100 |
commit | 4830f981e078bbaf1bf845bd310a8cb27d164432 (patch) | |
tree | fa4f302b29c27ecee223dfdbae680713be860ce1 /writerperfect/source/writer | |
parent | 9332b254c1b96ad030106b79a52dc8915b70091f (diff) |
wpftwriter: use service constructor
Change-Id: I217988ca09b40af7cb2b3b28ea7c2af6a9db12d0
Diffstat (limited to 'writerperfect/source/writer')
-rw-r--r-- | writerperfect/source/writer/AbiWordImportFilter.cxx | 41 | ||||
-rw-r--r-- | writerperfect/source/writer/AbiWordImportFilter.hxx | 10 | ||||
-rw-r--r-- | writerperfect/source/writer/EBookImportFilter.cxx | 41 | ||||
-rw-r--r-- | writerperfect/source/writer/EBookImportFilter.hxx | 10 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.cxx | 41 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.hxx | 10 | ||||
-rw-r--r-- | writerperfect/source/writer/MWAWImportFilter.cxx | 41 | ||||
-rw-r--r-- | writerperfect/source/writer/MWAWImportFilter.hxx | 10 | ||||
-rw-r--r-- | writerperfect/source/writer/PagesImportFilter.cxx | 41 | ||||
-rw-r--r-- | writerperfect/source/writer/PagesImportFilter.hxx | 10 | ||||
-rw-r--r-- | writerperfect/source/writer/WordPerfectImportFilter.cxx | 55 | ||||
-rw-r--r-- | writerperfect/source/writer/WordPerfectImportFilter.hxx | 13 | ||||
-rw-r--r-- | writerperfect/source/writer/wpftwriter.component | 20 | ||||
-rw-r--r-- | writerperfect/source/writer/wpftwriter_genericfilter.cxx | 88 |
14 files changed, 113 insertions, 318 deletions
diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx index 2a84e0a60cee..7c5f2ae5442d 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 cf2a5103779c..d756015f3fac 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 25d533fcfdb2..b98ae59d2521 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 d17e9a481bc1..66ff6779b563 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 bd168d03989e..06d2474467a4 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 0bd39d303f7b..ee99f3cda437 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 ee4e78b3540a..8c7dcebb22c4 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 308ccee7369a..b88ed78c6b41 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 3942aa0984b8..997922ebe297 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 85adb8a3acc6..ce68915e3c55 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 d7edfd6e8ae5..8253665c57a6 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 749aaf56d453..09e1aa977d37 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 eaf751a1003d..4c5f37fa4ceb 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 68411178d437..000000000000 --- 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@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: */ |