diff --git a/formula/Library_for.mk b/formula/Library_for.mk index d3d86a4494b5..a646b4a9598a 100644 --- a/formula/Library_for.mk +++ b/formula/Library_for.mk @@ -41,7 +41,6 @@ $(eval $(call gb_Library_add_exception_objects,for,\ formula/source/core/api/FormulaCompiler \ formula/source/core/api/FormulaOpCodeMapperObj \ formula/source/core/api/grammar \ - formula/source/core/api/services \ formula/source/core/api/token \ formula/source/core/api/vectortoken \ formula/source/core/resource/core_resource \ diff --git a/formula/source/core/api/FormulaOpCodeMapperObj.cxx b/formula/source/core/api/FormulaOpCodeMapperObj.cxx index a22a1ff3d43d..a3ffe56cc8c9 100644 --- a/formula/source/core/api/FormulaOpCodeMapperObj.cxx +++ b/formula/source/core/api/FormulaOpCodeMapperObj.cxx @@ -81,32 +81,24 @@ SAL_CALL FormulaOpCodeMapperObj::getAvailableMappings( } OUString SAL_CALL FormulaOpCodeMapperObj::getImplementationName( ) -{ - return getImplementationName_Static(); -} - -OUString FormulaOpCodeMapperObj::getImplementationName_Static() { return "simple.formula.FormulaOpCodeMapperObj"; } uno::Sequence< OUString > SAL_CALL FormulaOpCodeMapperObj::getSupportedServiceNames( ) { - return getSupportedServiceNames_Static(); -} -uno::Sequence< OUString > FormulaOpCodeMapperObj::getSupportedServiceNames_Static() -{ - uno::Sequence aSeq { "com.sun.star.sheet.FormulaOpCodeMapper" }; - return aSeq; -} - -uno::Reference< uno::XInterface > FormulaOpCodeMapperObj::create( - uno::Reference< uno::XComponentContext > const & /*_xContext*/) -{ - return static_cast(new FormulaOpCodeMapperObj(std::make_unique())); + return { "com.sun.star.sheet.FormulaOpCodeMapper" }; } } // formula +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +simple_formula_FormulaOpCodeMapperObj( + css::uno::XComponentContext* , css::uno::Sequence const& ) +{ + return cppu::acquire( + new formula::FormulaOpCodeMapperObj(std::make_unique())); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/formula/source/core/api/services.cxx b/formula/source/core/api/services.cxx deleted file mode 100644 index 2e885fea41cd..000000000000 --- a/formula/source/core/api/services.cxx +++ /dev/null @@ -1,53 +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 -#include -#include -#include - -/********************************************************************************************/ - -using namespace ::formula; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; - - -// registry functions -namespace -{ - -cppu::ImplementationEntry const entries[] = { - { &FormulaOpCodeMapperObj::create, &FormulaOpCodeMapperObj::getImplementationName_Static, &FormulaOpCodeMapperObj::getSupportedServiceNames_Static, - &cppu::createSingleComponentFactory, nullptr, 0 }, - { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } -}; -} - -extern "C" -{ -SAL_DLLPUBLIC_EXPORT void * for_component_getFactory( - char const * implName, void * serviceManager, void * registryKey) -{ - return cppu::component_getFactoryHelper( - implName, serviceManager, registryKey, entries); -} -} // extern "C" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/formula/util/for.component b/formula/util/for.component index 5b6ecef20538..f906d5174eb6 100644 --- a/formula/util/for.component +++ b/formula/util/for.component @@ -18,8 +18,9 @@ --> - + xmlns="http://openoffice.org/2010/uno-components"> + diff --git a/include/formula/FormulaOpCodeMapperObj.hxx b/include/formula/FormulaOpCodeMapperObj.hxx index bd0595d438d9..c7b7a400f5c9 100644 --- a/include/formula/FormulaOpCodeMapperObj.hxx +++ b/include/formula/FormulaOpCodeMapperObj.hxx @@ -48,12 +48,8 @@ class FORMULA_DLLPUBLIC FormulaOpCodeMapperObj : public cppu::WeakImplHelper< css::lang::XServiceInfo > { ::std::unique_ptr m_pCompiler; -public: - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString> getSupportedServiceNames_Static(); - static css::uno::Reference< css::uno::XInterface > create(const css::uno::Reference< css::uno::XComponentContext >& _xContext); -protected: +public: FormulaOpCodeMapperObj(::std::unique_ptr && _pCompiler); virtual ~FormulaOpCodeMapperObj() override;