summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-31 18:01:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-31 18:11:30 +0200
commit5658600001a41c536cc1497eb7419512cb1353d8 (patch)
tree70560a8994203c23fe2080c1a3951b40ee59906a
parent779831307fe3da5f2226925972452c9aedeb67a8 (diff)
No need for two Excel filter services
The reason to have both export-only XclExpXmlStream ("com.sun.star.comp.oox.ExcelFilterExport") and im-/export oox::xls::ExcelFilter ("com.sun.star.comp.oox.xls.ExcelFilter"), where the latter uses the former to implement export, appears to be historic. Get rid of the former service, but keep it as an independent C++ class for now (still also deriving from XmlFilterBase)---this can likely be cleaned up by somebdoy versed in those XmlFilterBase details. With the last use (in oox::xls::ExcelFilter, to instantiate XclExpXmlStream) of the recently introduced com.sun.star.oox.ExcelFilterExport new-style service gone now, remove that service again. Change-Id: Id3adacd293cbe4390242827615f074d4bbe9d85a
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/oox/ExcelFilterExport.idl37
-rw-r--r--sc/source/filter/excel/xestream.cxx23
-rw-r--r--sc/source/filter/inc/xestream.hxx7
-rw-r--r--sc/source/filter/oox/excelfilter.cxx4
-rw-r--r--sc/source/filter/services.cxx4
-rw-r--r--sc/util/scfilt.component3
7 files changed, 3 insertions, 76 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 5b03b7684014..fc4ba305c32f 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -258,7 +258,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/mozilla,\
MozillaBootstrap \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/oox,\
- ExcelFilterExport \
PowerPointExport \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/packages/manifest,\
diff --git a/offapi/com/sun/star/oox/ExcelFilterExport.idl b/offapi/com/sun/star/oox/ExcelFilterExport.idl
deleted file mode 100644
index cb74aa80c070..000000000000
--- a/offapi/com/sun/star/oox/ExcelFilterExport.idl
+++ /dev/null
@@ -1,37 +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 .
- */
-
-#ifndef __com_sun_star_oox_ExcelFilterExport_idl__
-#define __com_sun_star_oox_ExcelFilterExport_idl__
-
-#include <com/sun/star/document/XExporter.idl>
-
-
-module com { module sun { module star { module oox {
-
-/**
- @since LibreOffice 4.2
-*/
-service ExcelFilterExport : com::sun::star::document::XExporter;
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 178da4ed2d05..550753a76b18 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1141,15 +1141,6 @@ bool XclExpXmlStream::exportDocument() throw()
return true;
}
-//////////////////////////////////////////////////////////////////////////
-// UNO stuff so that the filter is registered
-//////////////////////////////////////////////////////////////////////////
-
-OUString XlsxExport_getImplementationName()
-{
- return OUString( "com.sun.star.comp.oox.ExcelFilterExport" );
-}
-
::oox::ole::VbaProject* XclExpXmlStream::implCreateVbaProject() const
{
return new ::oox::xls::ExcelVbaProject( getComponentContext(), Reference< XSpreadsheetDocument >( getModel(), UNO_QUERY ) );
@@ -1160,18 +1151,4 @@ OUString XclExpXmlStream::implGetImplementationName() const
return OUString( "TODO" );
}
-
-Sequence< OUString > XlsxExport_getSupportedServiceNames()
-{
- Sequence< OUString > aSeq( 2 );
- aSeq[0] = "com.sun.star.document.ExportFilter";
- aSeq[1] = "com.sun.star.oox.ExcelFilterExport";
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL XlsxExport_create(const Reference< XComponentContext > & rCC )
-{
- return (cppu::OWeakObject*) new XclExpXmlStream( rCC );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index aed9dde78f5a..0ac31d4617f1 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -381,13 +381,6 @@ 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: */
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index 81ec4148e6b7..9980b2bb842b 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -29,6 +29,7 @@
#include "stylesbuffer.hxx"
#include "themebuffer.hxx"
#include "workbookfragment.hxx"
+#include "xestream.hxx"
namespace oox {
namespace xls {
@@ -167,7 +168,8 @@ sal_Bool SAL_CALL ExcelFilter::filter( const ::com::sun::star::uno::Sequence< ::
if ( isExportFilter() )
{
- Reference< XExporter > xExporter = css::oox::ExcelFilterExport::create( getComponentContext() );
+ Reference< XExporter > xExporter(
+ new XclExpXmlStream( getComponentContext() ) );
Reference< XComponent > xDocument( getModel(), UNO_QUERY );
Reference< XFilter > xFilter( xExporter, UNO_QUERY );
diff --git a/sc/source/filter/services.cxx b/sc/source/filter/services.cxx
index 33a01840d2b9..2b350424e455 100644
--- a/sc/source/filter/services.cxx
+++ b/sc/source/filter/services.cxx
@@ -24,15 +24,11 @@
#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,
diff --git a/sc/util/scfilt.component b/sc/util/scfilt.component
index 6834ce1578ec..c4b37285877e 100644
--- a/sc/util/scfilt.component
+++ b/sc/util/scfilt.component
@@ -19,9 +19,6 @@
<component loader="com.sun.star.loader.SharedLibrary" prefix="scfilt"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.oox.ExcelFilterExport">
- <service name="com.sun.star.oox.ExcelFilterExport"/>
- </implementation>
<implementation name="com.sun.star.comp.oox.xls.ExcelFilter">
<service name="com.sun.star.document.ImportFilter"/>
<service name="com.sun.star.document.ExportFilter"/>