diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-05-31 18:01:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-05-31 18:11:30 +0200 |
commit | 5658600001a41c536cc1497eb7419512cb1353d8 (patch) | |
tree | 70560a8994203c23fe2080c1a3951b40ee59906a /sc/source/filter | |
parent | 779831307fe3da5f2226925972452c9aedeb67a8 (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
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 23 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 7 | ||||
-rw-r--r-- | sc/source/filter/oox/excelfilter.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/services.cxx | 4 |
4 files changed, 3 insertions, 35 deletions
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, |