[Libreoffice-commits] core.git: 2 commits - sc/Library_scfilt.mk sc/source

Stephan Bergmann sbergman at redhat.com
Thu May 30 10:02:10 PDT 2013


 sc/Library_scfilt.mk                 |    5 ++-
 sc/source/filter/excel/xestream.cxx  |   44 +-------------------------------
 sc/source/filter/inc/excelfilter.hxx |    7 +++++
 sc/source/filter/inc/xestream.hxx    |    7 +++++
 sc/source/filter/oox/excelfilter.cxx |    8 ++---
 sc/source/filter/services.cxx        |   47 +++++++++++++++++++++++++++++++++++
 6 files changed, 70 insertions(+), 48 deletions(-)

New commits:
commit 80138cb6330e4c6a516d571941f25d47afbee786
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 30 14:34:51 2013 +0200

    Clean up scfilt_component_getFactory
    
    Change-Id: I1f1be2cdc10e6ec386cc5d2e71c1e189a987df56

diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 318d69e..0374c7c 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -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)
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index cc4678f..178da4e 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -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: */
diff --git a/sc/source/filter/inc/excelfilter.hxx b/sc/source/filter/inc/excelfilter.hxx
index fc108c3..6423996 100644
--- a/sc/source/filter/inc/excelfilter.hxx
+++ b/sc/source/filter/inc/excelfilter.hxx
@@ -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
 
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 0ac31d4..aed9dde 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -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: */
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index e8414cb..630e9d2 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -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 ) );
 }
diff --git a/sc/source/filter/services.cxx b/sc/source/filter/services.cxx
new file mode 100644
index 0000000..33a0184
--- /dev/null
+++ b/sc/source/filter/services.cxx
@@ -0,0 +1,47 @@
+/* -*- 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: */
commit 5dc41015ed10d4b4bd0eaa59e8cd6c0b1b96cc04
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 30 14:31:25 2013 +0200

    Clean up for consistency
    
    Change-Id: Ib5de2c3d22b36c906a52f882a85a44e4330edb41

diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 014b833..318d69e 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -218,9 +218,9 @@ $(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/orcus/interface \
 	sc/source/filter/orcus/orcusfiltersimpl \
-        sc/source/filter/orcus/interface \
-        sc/source/filter/orcus/xmlcontext \
+	sc/source/filter/orcus/xmlcontext \
 ))
 
 ifeq ($(SYSTEM_ZLIB),YES)


More information about the Libreoffice-commits mailing list