Kaydet (Commit) 80138cb6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up scfilt_component_getFactory

Change-Id: I1f1be2cdc10e6ec386cc5d2e71c1e189a987df56
üst 5dc41015
......@@ -221,6 +221,7 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/orcus/interface \
sc/source/filter/orcus/orcusfiltersimpl \
sc/source/filter/orcus/xmlcontext \
sc/source/filter/services \
))
ifeq ($(SYSTEM_ZLIB),YES)
......
......@@ -52,7 +52,6 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
#include <cppuhelper/implementationentry.hxx>
#define DEBUG_XL_ENCRYPTION 0
......@@ -1162,7 +1161,7 @@ OUString XclExpXmlStream::implGetImplementationName() const
}
Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames() throw()
Sequence< OUString > XlsxExport_getSupportedServiceNames()
{
Sequence< OUString > aSeq( 2 );
aSeq[0] = "com.sun.star.document.ExportFilter";
......@@ -1170,48 +1169,9 @@ Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames() throw()
return aSeq;
}
Reference< XInterface > SAL_CALL XlsxExport_createInstance(const Reference< XComponentContext > & rCC ) throw( Exception )
Reference< XInterface > SAL_CALL XlsxExport_create(const Reference< XComponentContext > & rCC )
{
return (cppu::OWeakObject*) new XclExpXmlStream( rCC );
}
namespace oox { namespace xls {
OUString SAL_CALL ExcelFilter_getImplementationName() throw();
Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames() throw();
Reference< XInterface > SAL_CALL ExcelFilter_createInstance(
const Reference< XComponentContext >& rxContext ) throw( Exception );
} }
#ifdef __cplusplus
extern "C"
{
#endif
// ------------------------
// - component_getFactory -
// ------------------------
::cppu::ImplementationEntry entries [] =
{
{
XlsxExport_createInstance, XlsxExport_getImplementationName,
XlsxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
0, 0
},
{
oox::xls::ExcelFilter_createInstance, oox::xls::ExcelFilter_getImplementationName,
oox::xls::ExcelFilter_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
0, 0
},
{ 0, 0, 0, 0, 0, 0 }
};
SAL_DLLPUBLIC_EXPORT void* SAL_CALL scfilt_component_getFactory( const sal_Char* pImplName, XMultiServiceFactory* pServiceManager, XRegistryKey* pRegistryKey )
{
return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries );
}
#ifdef __cplusplus
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -70,6 +70,13 @@ private:
virtual OUString implGetImplementationName() const;
};
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();
} // namespace xls
} // namespace oox
......
......@@ -381,6 +381,13 @@ private:
XclExpXmlPathToStateMap maOpenedStreamMap;
};
css::uno::Reference< css::uno::XInterface > SAL_CALL XlsxExport_create(
css::uno::Reference< css::uno::XComponentContext > const & context);
OUString SAL_CALL XlsxExport_getImplementationName();
css::uno::Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames();
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -73,12 +73,12 @@ void ExcelFilterBase::unregisterWorkbookGlobals()
// ============================================================================
OUString SAL_CALL ExcelFilter_getImplementationName() throw()
OUString ExcelFilter_getImplementationName()
{
return OUString( "com.sun.star.comp.oox.xls.ExcelFilter" );
}
Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames() throw()
Sequence< OUString > ExcelFilter_getSupportedServiceNames()
{
Sequence< OUString > aSeq( 2 );
aSeq[ 0 ] = "com.sun.star.document.ImportFilter";
......@@ -86,8 +86,8 @@ Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames() throw()
return aSeq;
}
Reference< XInterface > SAL_CALL ExcelFilter_createInstance(
const Reference< XComponentContext >& rxContext ) throw( Exception )
Reference< XInterface > ExcelFilter_create(
const Reference< XComponentContext >& rxContext )
{
return static_cast< ::cppu::OWeakObject* >( new ExcelFilter( rxContext ) );
}
......
/* -*- 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 "sal/config.h"
#include "cppuhelper/factory.hxx"
#include "cppuhelper/implementationentry.hxx"
#include "sal/types.h"
#include "excelfilter.hxx"
#include "xestream.hxx"
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL scfilt_component_getFactory(
char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
static cppu::ImplementationEntry const services[] = {
{ XlsxExport_create, XlsxExport_getImplementationName,
XlsxExport_getSupportedServiceNames,
cppu::createSingleComponentFactory, 0, 0 },
{ oox::xls::ExcelFilter_create,
oox::xls::ExcelFilter_getImplementationName,
oox::xls::ExcelFilter_getSupportedServiceNames,
cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
return cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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