sc/Library_scfilt.mk | 1 sc/source/filter/inc/excelfilter.hxx | 7 ---- sc/source/filter/inc/ooxformulaparser.hxx | 7 ---- sc/source/filter/oox/excelfilter.cxx | 30 ++++++-------------- sc/source/filter/oox/ooxformulaparser.cxx | 33 +++++++++------------- sc/source/filter/services.cxx | 44 ------------------------------ sc/util/scfilt.component | 8 +++-- 7 files changed, 29 insertions(+), 101 deletions(-)
New commits: commit 6242ea42a417cf7791c6c731cb6f1d87d21c0610 Author: Stephan Bergmann <[email protected]> Date: Wed Mar 11 12:23:37 2015 +0100 Clean up previous commit Change-Id: Ie64d47123200c23a1aa2c0a81135b265d09c0f63 diff --git a/sc/source/filter/inc/excelfilter.hxx b/sc/source/filter/inc/excelfilter.hxx index fbeea5e..0d131e9 100644 --- a/sc/source/filter/inc/excelfilter.hxx +++ b/sc/source/filter/inc/excelfilter.hxx @@ -58,10 +58,6 @@ private: WorkbookGlobals* mpBookGlob; }; -OUString SAL_CALL ExcelFilter_getImplementationName(); - -css::uno::Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames(); - } // namespace xls } // namespace oox diff --git a/sc/source/filter/inc/ooxformulaparser.hxx b/sc/source/filter/inc/ooxformulaparser.hxx index 8626476..e45bcb5 100644 --- a/sc/source/filter/inc/ooxformulaparser.hxx +++ b/sc/source/filter/inc/ooxformulaparser.hxx @@ -91,10 +91,6 @@ private: ParserImplRef mxParserImpl; /// Implementation of import parser. }; -OUString SAL_CALL OOXMLFormulaParser_getImplementationName(); - -css::uno::Sequence< OUString > SAL_CALL OOXMLFormulaParser_getSupportedServiceNames(); - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx index 00ff2bc..bf30b68 100644 --- a/sc/source/filter/oox/excelfilter.cxx +++ b/sc/source/filter/oox/excelfilter.cxx @@ -42,19 +42,6 @@ using namespace ::oox::core; using ::oox::drawingml::table::TableStyleListPtr; -OUString ExcelFilter_getImplementationName() -{ - return OUString( "com.sun.star.comp.oox.xls.ExcelFilter" ); -} - -Sequence< OUString > ExcelFilter_getSupportedServiceNames() -{ - Sequence< OUString > aSeq( 2 ); - aSeq[ 0 ] = "com.sun.star.document.ImportFilter"; - aSeq[ 1 ] = "com.sun.star.document.ExportFilter"; - return aSeq; -} - ExcelFilter::ExcelFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : XmlFilterBase( rxContext ), mpBookGlob( 0 ) @@ -190,7 +177,7 @@ sal_Bool SAL_CALL ExcelFilter::filter( const ::com::sun::star::uno::Sequence< :: OUString ExcelFilter::implGetImplementationName() const { - return ExcelFilter_getImplementationName(); + return OUString( "com.sun.star.comp.oox.xls.ExcelFilter" ); } } // namespace xls diff --git a/sc/source/filter/oox/ooxformulaparser.cxx b/sc/source/filter/oox/ooxformulaparser.cxx index a466a10..d681c9c 100644 --- a/sc/source/filter/oox/ooxformulaparser.cxx +++ b/sc/source/filter/oox/ooxformulaparser.cxx @@ -99,18 +99,6 @@ const FunctionInfo* OOXMLFormulaParserImpl::resolveBadFuncName( const OUString& return 0; } -Sequence< OUString > OOXMLFormulaParser_getSupportedServiceNames() -{ - Sequence< OUString > aServiceNames( 1 ); - aServiceNames[ 0 ] = "com.sun.star.sheet.FilterFormulaParser"; - return aServiceNames; -} - -OUString OOXMLFormulaParser_getImplementationName() -{ - return OUString( "com.sun.star.comp.oox.xls.FormulaParser"); -} - OOXMLFormulaParser::OOXMLFormulaParser() { } @@ -122,7 +110,7 @@ OOXMLFormulaParser::~OOXMLFormulaParser() // com.sun.star.lang.XServiceInfo interface ----------------------------------- OUString SAL_CALL OOXMLFormulaParser::getImplementationName() throw( RuntimeException, std::exception ) { - return OOXMLFormulaParser_getImplementationName(); + return OUString( "com.sun.star.comp.oox.xls.FormulaParser"); } sal_Bool SAL_CALL OOXMLFormulaParser::supportsService( const OUString& rService ) throw( RuntimeException, std::exception ) @@ -132,7 +120,9 @@ sal_Bool SAL_CALL OOXMLFormulaParser::supportsService( const OUString& rService Sequence< OUString > SAL_CALL OOXMLFormulaParser::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - return OOXMLFormulaParser_getSupportedServiceNames(); + Sequence< OUString > aServiceNames( 1 ); + aServiceNames[ 0 ] = "com.sun.star.sheet.FilterFormulaParser"; + return aServiceNames; } // com.sun.star.lang.XInitialization interface -------------------------------- diff --git a/sc/util/scfilt.component b/sc/util/scfilt.component index 3333e16..42227f4 100644 --- a/sc/util/scfilt.component +++ b/sc/util/scfilt.component @@ -18,7 +18,7 @@ --> <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" - prefix="scfilt" xmlns="http://openoffice.org/2010/uno-components"> + xmlns="http://openoffice.org/2010/uno-components"> <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"/> commit 7fab8924d53001e43f9a4656ee79134f398a2016 Author: Chris Sherlock <[email protected]> Date: Thu Mar 5 19:47:27 2015 +1100 sc: use constructor syntax in scfilt.component Change-Id: I673c8daabb6438f833571b0c70df1e73e6b8d273 Signed-off-by: Stephan Bergmann <[email protected]> diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk index d19b379..fab1700 100644 --- a/sc/Library_scfilt.mk +++ b/sc/Library_scfilt.mk @@ -218,7 +218,6 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\ sc/source/filter/oox/worksheetfragment \ sc/source/filter/oox/worksheethelper \ sc/source/filter/oox/worksheetsettings \ - sc/source/filter/services \ )) ifeq ($(ENABLE_ORCUS),TRUE) diff --git a/sc/source/filter/inc/excelfilter.hxx b/sc/source/filter/inc/excelfilter.hxx index ae5cfad..fbeea5e 100644 --- a/sc/source/filter/inc/excelfilter.hxx +++ b/sc/source/filter/inc/excelfilter.hxx @@ -58,9 +58,6 @@ private: 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(); css::uno::Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames(); diff --git a/sc/source/filter/inc/ooxformulaparser.hxx b/sc/source/filter/inc/ooxformulaparser.hxx index d9df8c1..8626476 100644 --- a/sc/source/filter/inc/ooxformulaparser.hxx +++ b/sc/source/filter/inc/ooxformulaparser.hxx @@ -91,9 +91,6 @@ private: 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(); css::uno::Sequence< OUString > SAL_CALL OOXMLFormulaParser_getSupportedServiceNames(); diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx index 35199e4..00ff2bc 100644 --- a/sc/source/filter/oox/excelfilter.cxx +++ b/sc/source/filter/oox/excelfilter.cxx @@ -55,12 +55,6 @@ Sequence< OUString > ExcelFilter_getSupportedServiceNames() 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 ) : XmlFilterBase( rxContext ), mpBookGlob( 0 ) @@ -202,4 +196,13 @@ OUString ExcelFilter::implGetImplementationName() const } // namespace xls } // 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: */ diff --git a/sc/source/filter/oox/ooxformulaparser.cxx b/sc/source/filter/oox/ooxformulaparser.cxx index 2132899..a466a10 100644 --- a/sc/source/filter/oox/ooxformulaparser.cxx +++ b/sc/source/filter/oox/ooxformulaparser.cxx @@ -111,11 +111,6 @@ OUString OOXMLFormulaParser_getImplementationName() 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() { } @@ -180,4 +175,14 @@ OUString SAL_CALL OOXMLFormulaParser::printFormula( } // namespace xls } // 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: */ diff --git a/sc/source/filter/services.cxx b/sc/source/filter/services.cxx deleted file mode 100644 index 75f8cc4..0000000 --- a/sc/source/filter/services.cxx +++ /dev/null @@ -1,44 +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 . - */ - - -#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: */ diff --git a/sc/util/scfilt.component b/sc/util/scfilt.component index a44d847..3333e16 100644 --- a/sc/util/scfilt.component +++ b/sc/util/scfilt.component @@ -19,11 +19,13 @@ <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" 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.ExportFilter"/> </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"/> </implementation> </component> _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
