filter/Library_textfd.mk | 1 filter/source/textfilterdetect/fdcomp.cxx | 36 ------------------------ filter/source/textfilterdetect/filterdetect.cxx | 13 ++++---- filter/source/textfilterdetect/textfd.component | 8 +++-- solenv/bin/native-code.py | 3 +- 5 files changed, 14 insertions(+), 47 deletions(-)
New commits: commit a2b197ff1f7676c2314a312fa8f40c6bf8871c7c Author: Chris Sherlock <chris.sherl...@collabora.com> Date: Wed Feb 18 21:04:24 2015 +1100 filter: use constructor for filter module Change-Id: I466fe67d7f7144a50bdf15f42f1d7f8dfb107418 diff --git a/filter/Library_textfd.mk b/filter/Library_textfd.mk index ef470b7..d5ecb7b 100644 --- a/filter/Library_textfd.mk +++ b/filter/Library_textfd.mk @@ -30,7 +30,6 @@ $(eval $(call gb_Library_use_libraries,textfd,\ )) $(eval $(call gb_Library_add_exception_objects,textfd,\ - filter/source/textfilterdetect/fdcomp \ filter/source/textfilterdetect/filterdetect \ )) diff --git a/filter/source/textfilterdetect/fdcomp.cxx b/filter/source/textfilterdetect/fdcomp.cxx deleted file mode 100644 index 61266bc..0000000 --- a/filter/source/textfilterdetect/fdcomp.cxx +++ /dev/null @@ -1,36 +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/. - */ - -#include "sal/config.h" - -#include "cppuhelper/factory.hxx" -#include "cppuhelper/implementationentry.hxx" -#include "sal/types.h" - -#include "filterdetect.hxx" - -namespace { - -static cppu::ImplementationEntry const services[] = { - { &PlainTextFilterDetect_createInstance, &PlainTextFilterDetect_getImplementationName, - &PlainTextFilterDetect_getSupportedServiceNames, - &cppu::createSingleComponentFactory, 0, 0 }, - { 0, 0, 0, 0, 0, 0 } -}; - -} - -extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL textfd_component_getFactory( - char const * pImplName, void * pServiceManager, void * pRegistryKey) -{ - return cppu::component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, services); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx index 0b7ae1f..aff3126 100644 --- a/filter/source/textfilterdetect/filterdetect.cxx +++ b/filter/source/textfilterdetect/filterdetect.cxx @@ -188,12 +188,6 @@ uno::Sequence<OUString> PlainTextFilterDetect_getSupportedServiceNames() return aRet; } -uno::Reference<uno::XInterface> PlainTextFilterDetect_createInstance( - const uno::Reference<uno::XComponentContext> & rCxt) -{ - return (cppu::OWeakObject*) new PlainTextFilterDetect(rCxt); -} - // XServiceInfo OUString SAL_CALL PlainTextFilterDetect::getImplementationName() throw (uno::RuntimeException, std::exception) @@ -213,4 +207,11 @@ uno::Sequence<OUString> SAL_CALL PlainTextFilterDetect::getSupportedServiceNames return PlainTextFilterDetect_getSupportedServiceNames(); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new PlainTextFilterDetect(component)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/textfilterdetect/textfd.component b/filter/source/textfilterdetect/textfd.component index 0b0d722..da668435 100644 --- a/filter/source/textfilterdetect/textfd.component +++ b/filter/source/textfilterdetect/textfd.component @@ -9,7 +9,9 @@ <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" prefix="textfd" xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.filters.PlainTextFilterDetect"> - <service name="com.sun.star.document.ExtendedTypeDetection"/> - </implementation> + <implementation name="com.sun.star.comp.filters.PlainTextFilterDetect" + constructor="com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + <service name="com.sun.star.comp.filters.PlainTextFilterDetect"/> + </implementation> </component> diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 929eafb..e265333 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -211,10 +211,11 @@ writer_factory_list = [ ("libswdlo.a", "swd_component_getFactory"), ("libswlo.a", "sw_component_getFactory"), ("libwriterfilterlo.a", "writerfilter_component_getFactory"), - ("libtextfdlo.a", "textfd_component_getFactory"), ] writer_constructor_list = [ +# filter/source/textfilterdetect/textfd.component + "com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation" ] factory_map = { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits