Kaydet (Commit) 7fab8924 authored tarafından Chris Sherlock's avatar Chris Sherlock Kaydeden (comit) Stephan Bergmann

sc: use constructor syntax in scfilt.component

Change-Id: I673c8daabb6438f833571b0c70df1e73e6b8d273
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 50d961eb
...@@ -218,7 +218,6 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\ ...@@ -218,7 +218,6 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/oox/worksheetfragment \ sc/source/filter/oox/worksheetfragment \
sc/source/filter/oox/worksheethelper \ sc/source/filter/oox/worksheethelper \
sc/source/filter/oox/worksheetsettings \ sc/source/filter/oox/worksheetsettings \
sc/source/filter/services \
)) ))
ifeq ($(ENABLE_ORCUS),TRUE) ifeq ($(ENABLE_ORCUS),TRUE)
......
...@@ -58,9 +58,6 @@ private: ...@@ -58,9 +58,6 @@ private:
WorkbookGlobals* mpBookGlob; WorkbookGlobals* mpBookGlob;
}; };
css::uno::Reference< css::uno::XInterface > SAL_CALL ExcelFilter_create(
css::uno::Reference< css::uno::XComponentContext > const & context);
OUString SAL_CALL ExcelFilter_getImplementationName(); OUString SAL_CALL ExcelFilter_getImplementationName();
css::uno::Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames(); css::uno::Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames();
......
...@@ -91,9 +91,6 @@ private: ...@@ -91,9 +91,6 @@ private:
ParserImplRef mxParserImpl; /// Implementation of import parser. ParserImplRef mxParserImpl; /// Implementation of import parser.
}; };
css::uno::Reference< css::uno::XInterface > SAL_CALL OOXMLFormulaParser_create(
css::uno::Reference< css::uno::XComponentContext > const & context);
OUString SAL_CALL OOXMLFormulaParser_getImplementationName(); OUString SAL_CALL OOXMLFormulaParser_getImplementationName();
css::uno::Sequence< OUString > SAL_CALL OOXMLFormulaParser_getSupportedServiceNames(); css::uno::Sequence< OUString > SAL_CALL OOXMLFormulaParser_getSupportedServiceNames();
......
...@@ -55,12 +55,6 @@ Sequence< OUString > ExcelFilter_getSupportedServiceNames() ...@@ -55,12 +55,6 @@ Sequence< OUString > ExcelFilter_getSupportedServiceNames()
return aSeq; return aSeq;
} }
Reference< XInterface > ExcelFilter_create(
const Reference< XComponentContext >& rxContext )
{
return static_cast< ::cppu::OWeakObject* >( new ExcelFilter( rxContext ) );
}
ExcelFilter::ExcelFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : ExcelFilter::ExcelFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
XmlFilterBase( rxContext ), XmlFilterBase( rxContext ),
mpBookGlob( 0 ) mpBookGlob( 0 )
...@@ -202,4 +196,13 @@ OUString ExcelFilter::implGetImplementationName() const ...@@ -202,4 +196,13 @@ OUString ExcelFilter::implGetImplementationName() const
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_comp_oox_xls_ExcelFilter_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new oox::xls::ExcelFilter(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -111,11 +111,6 @@ OUString OOXMLFormulaParser_getImplementationName() ...@@ -111,11 +111,6 @@ OUString OOXMLFormulaParser_getImplementationName()
return OUString( "com.sun.star.comp.oox.xls.FormulaParser"); return OUString( "com.sun.star.comp.oox.xls.FormulaParser");
} }
Reference< XInterface > OOXMLFormulaParser_create( const Reference< XComponentContext >& )
{
return static_cast< ::cppu::OWeakObject* >( new OOXMLFormulaParser );
}
OOXMLFormulaParser::OOXMLFormulaParser() OOXMLFormulaParser::OOXMLFormulaParser()
{ {
} }
...@@ -180,4 +175,14 @@ OUString SAL_CALL OOXMLFormulaParser::printFormula( ...@@ -180,4 +175,14 @@ OUString SAL_CALL OOXMLFormulaParser::printFormula(
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_comp_oox_xls_FormulaParser_get_implementation(::com::sun::star::uno::XComponentContext*,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new oox::xls::OOXMLFormulaParser());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <sal/types.h>
#include "excelfilter.hxx"
#include "ooxformulaparser.hxx"
#define IMPLEMENTATION_ENTRY( className ) \
{ &className##_create, &className##_getImplementationName, &className##_getSupportedServiceNames, ::cppu::createSingleComponentFactory, 0, 0 }
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL scfilt_component_getFactory(
char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
static cppu::ImplementationEntry const services[] = {
IMPLEMENTATION_ENTRY( oox::xls::ExcelFilter ),
IMPLEMENTATION_ENTRY( oox::xls::OOXMLFormulaParser ),
{ 0, 0, 0, 0, 0, 0 }
};
return cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -19,11 +19,13 @@ ...@@ -19,11 +19,13 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="scfilt" xmlns="http://openoffice.org/2010/uno-components"> prefix="scfilt" xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.oox.xls.ExcelFilter"> <implementation name="com.sun.star.comp.oox.xls.ExcelFilter"
constructor="com_sun_star_comp_oox_xls_ExcelFilter_get_implementation">
<service name="com.sun.star.document.ImportFilter"/> <service name="com.sun.star.document.ImportFilter"/>
<service name="com.sun.star.document.ExportFilter"/> <service name="com.sun.star.document.ExportFilter"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.oox.xls.FormulaParser"> <implementation name="com.sun.star.comp.oox.xls.FormulaParser"
constructor="com_sun_star_comp_oox_xls_FormulaParser_get_implementation">
<service name="com.sun.star.sheet.FilterFormulaParser"/> <service name="com.sun.star.sheet.FilterFormulaParser"/>
</implementation> </implementation>
</component> </component>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment