[Libreoffice-commits] core.git: 2 commits - sc/Library_scd.mk sc/source sc/util
Stephan Bergmann
sbergman at redhat.com
Wed Mar 11 07:38:39 PDT 2015
sc/Library_scd.mk | 1
sc/source/ui/unoobj/detreg.cxx | 59 ------------------------------------
sc/source/ui/unoobj/exceldetect.cxx | 25 ++++-----------
sc/source/ui/unoobj/exceldetect.hxx | 6 ---
sc/source/ui/unoobj/scdetect.cxx | 18 +++-------
sc/source/ui/unoobj/scdetect.hxx | 9 -----
sc/util/scd.component | 8 +++-
7 files changed, 18 insertions(+), 108 deletions(-)
New commits:
commit b2f5850ba2a51635290fd74ed5b4ed2607530d42
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 11 14:21:34 2015 +0100
Clean up previous commit
Change-Id: Ibb7d689bd175959a195d27130db1a29d30f423bf
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index d7584ec..b8bddd8 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -29,7 +29,7 @@ ScExcelBiffDetect::~ScExcelBiffDetect() {}
OUString ScExcelBiffDetect::getImplementationName() throw (uno::RuntimeException, std::exception)
{
- return impl_getStaticImplementationName();
+ return OUString("com.sun.star.comp.calc.ExcelBiffFormatDetector");
}
sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) throw (uno::RuntimeException, std::exception)
@@ -39,7 +39,9 @@ sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) throw (uno:
uno::Sequence<OUString> ScExcelBiffDetect::getSupportedServiceNames() throw (uno::RuntimeException, std::exception)
{
- return impl_getStaticSupportedServiceNames();
+ uno::Sequence<OUString> aNames(1);
+ aNames[0] = "com.sun.star.frame.ExtendedTypeDetection";
+ return aNames;
}
namespace {
@@ -192,19 +194,6 @@ OUString ScExcelBiffDetect::detect( uno::Sequence<beans::PropertyValue>& lDescri
return aType;
}
-uno::Sequence<OUString> ScExcelBiffDetect::impl_getStaticSupportedServiceNames()
-{
- uno::Sequence<OUString> aNames(1);
- aNames[0] = "com.sun.star.frame.ExtendedTypeDetection";
- return aNames;
-}
-
-OUString ScExcelBiffDetect::impl_getStaticImplementationName()
-{
- return OUString("com.sun.star.comp.calc.ExcelBiffFormatDetector");
-}
-
-
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_comp_calc_ExcelBiffFormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
diff --git a/sc/source/ui/unoobj/exceldetect.hxx b/sc/source/ui/unoobj/exceldetect.hxx
index ff5c57c..9b70ea3 100644
--- a/sc/source/ui/unoobj/exceldetect.hxx
+++ b/sc/source/ui/unoobj/exceldetect.hxx
@@ -33,9 +33,6 @@ public:
// XExtendedFilterDetection
virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& lDescriptor )
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
- static com::sun::star::uno::Sequence<OUString> impl_getStaticSupportedServiceNames();
- static OUString impl_getStaticImplementationName();
};
#endif
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index a173ffc..8d29d6e 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -313,7 +313,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
OUString SAL_CALL ScFilterDetect::getImplementationName() throw (uno::RuntimeException, std::exception)
{
- return impl_getStaticImplementationName();
+ return OUString("com.sun.star.comp.calc.FormatDetector");
}
sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName )
@@ -325,21 +325,11 @@ sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName )
com::sun::star::uno::Sequence<OUString> ScFilterDetect::getSupportedServiceNames()
throw (uno::RuntimeException, std::exception)
{
- return impl_getStaticSupportedServiceNames();
-}
-
-uno::Sequence<OUString> ScFilterDetect::impl_getStaticSupportedServiceNames()
-{
uno::Sequence<OUString> seqServiceNames(1);
seqServiceNames.getArray()[0] = "com.sun.star.frame.ExtendedTypeDetection";
return seqServiceNames;
}
-OUString ScFilterDetect::impl_getStaticImplementationName()
-{
- return OUString("com.sun.star.comp.calc.FormatDetector");
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_comp_calc_FormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index 52cb9cf..2aae88c 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -47,10 +47,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- /* Helper for XServiceInfo */
- static com::sun::star::uno::Sequence<OUString> impl_getStaticSupportedServiceNames();
- static OUString impl_getStaticImplementationName();
-
// XExtendedFilterDetect
virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& lDescriptor )
diff --git a/sc/util/scd.component b/sc/util/scd.component
index 124ff02..15a38dd 100644
--- a/sc/util/scd.component
+++ b/sc/util/scd.component
@@ -18,7 +18,7 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="scd" xmlns="http://openoffice.org/2010/uno-components">
+ xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.calc.FormatDetector"
constructor="com_sun_star_comp_calc_FormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
commit 4653708b7161f0005e951e818756d804d9e44a34
Author: Chris Sherlock <chris.sherlock at collabora.com>
Date: Thu Mar 5 19:57:54 2015 +1100
sc: use constructor syntax in scd.component
Change-Id: I997701eb56ca13ff0806f7284e1634c755f06fd5
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/Library_scd.mk b/sc/Library_scd.mk
index 628c5c2..efd1be3 100644
--- a/sc/Library_scd.mk
+++ b/sc/Library_scd.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_Library_use_libraries,scd,\
))
$(eval $(call gb_Library_add_exception_objects,scd,\
- sc/source/ui/unoobj/detreg \
sc/source/ui/unoobj/scdetect \
sc/source/ui/unoobj/exceldetect \
))
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
deleted file mode 100644
index cc4941a..0000000
--- a/sc/source/ui/unoobj/detreg.cxx
+++ /dev/null
@@ -1,59 +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 "scdetect.hxx"
-#include "exceldetect.hxx"
-#include <cppuhelper/implementationentry.hxx>
-
-namespace {
-
-static const cppu::ImplementationEntry spServices[] =
-{
- {
- ScFilterDetect::impl_createInstance,
- ScFilterDetect::impl_getStaticImplementationName,
- ScFilterDetect::impl_getStaticSupportedServiceNames,
- cppu::createSingleComponentFactory,
- 0, 0
- },
-
- {
- ScExcelBiffDetect::impl_createInstance,
- ScExcelBiffDetect::impl_getStaticImplementationName,
- ScExcelBiffDetect::impl_getStaticSupportedServiceNames,
- cppu::createSingleComponentFactory,
- 0, 0
- },
-
- { 0, 0, 0, 0, 0, 0 }
-};
-
-}
-
-extern "C" {
-
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL scd_component_getFactory(
- const char* pImplName, void* pServiceManager, void* pRegistryKey )
-{
- return ::cppu::component_getFactoryHelper(pImplName, pServiceManager, pRegistryKey, spServices);
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index 40ea9be..d7584ec 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -204,11 +204,13 @@ OUString ScExcelBiffDetect::impl_getStaticImplementationName()
return OUString("com.sun.star.comp.calc.ExcelBiffFormatDetector");
}
-uno::Reference<uno::XInterface> ScExcelBiffDetect::impl_createInstance(
- const uno::Reference<uno::XComponentContext>& xContext )
- throw (com::sun::star::uno::Exception)
+
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_calc_ExcelBiffFormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject*>(new ScExcelBiffDetect(xContext));
+ return cppu::acquire(new ScExcelBiffDetect(context));
}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/exceldetect.hxx b/sc/source/ui/unoobj/exceldetect.hxx
index df95381..ff5c57c 100644
--- a/sc/source/ui/unoobj/exceldetect.hxx
+++ b/sc/source/ui/unoobj/exceldetect.hxx
@@ -36,9 +36,6 @@ public:
static com::sun::star::uno::Sequence<OUString> impl_getStaticSupportedServiceNames();
static OUString impl_getStaticImplementationName();
- static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
- impl_createInstance( const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext )
- throw (com::sun::star::uno::Exception);
};
#endif
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 63ff9a6..a173ffc 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -340,10 +340,12 @@ OUString ScFilterDetect::impl_getStaticImplementationName()
return OUString("com.sun.star.comp.calc.FormatDetector");
}
-uno::Reference<uno::XInterface> ScFilterDetect::impl_createInstance(
- const uno::Reference<uno::XComponentContext>& xContext ) throw (uno::Exception)
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_calc_FormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject*>(new ScFilterDetect(xContext));
+ return cppu::acquire(new ScFilterDetect(context));
}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index 097e4d2..52cb9cf 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -51,11 +51,6 @@ public:
static com::sun::star::uno::Sequence<OUString> impl_getStaticSupportedServiceNames();
static OUString impl_getStaticImplementationName();
- /* Helper for registry */
- static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
- impl_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext )
- throw (com::sun::star::uno::Exception);
-
// XExtendedFilterDetect
virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& lDescriptor )
diff --git a/sc/util/scd.component b/sc/util/scd.component
index bf10d4f..124ff02 100644
--- a/sc/util/scd.component
+++ b/sc/util/scd.component
@@ -19,10 +19,12 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="scd" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.calc.FormatDetector">
+ <implementation name="com.sun.star.comp.calc.FormatDetector"
+ constructor="com_sun_star_comp_calc_FormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
</implementation>
- <implementation name="com.sun.star.comp.calc.ExcelBiffFormatDetector">
+ <implementation name="com.sun.star.comp.calc.ExcelBiffFormatDetector"
+ constructor="com_sun_star_comp_calc_ExcelBiffFormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
</implementation>
</component>
More information about the Libreoffice-commits
mailing list