diff options
Diffstat (limited to '')
-rw-r--r-- | nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/Registration.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/Registration.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/Registration.java new file mode 100644 index 000000000..157f4963f --- /dev/null +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/Registration.java @@ -0,0 +1,38 @@ +/* -*- 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/. + */ + +package com.sun.star.comp.Calc.NLPSolver; + +import com.sun.star.lib.uno.helper.Factory; +import com.sun.star.lang.XSingleComponentFactory; + +public final class Registration { + + private static final String[] m_serviceNames = { + "com.sun.star.beans.PropertySet", + "com.sun.star.sheet.Solver" + }; + + public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) + { + XSingleComponentFactory xFactory = null; + + if ( sImplementationName.equals( "com.sun.star.comp.Calc.NLPSolver.DEPSSolverImpl" ) ) + xFactory = Factory.createComponentFactory( com.sun.star.comp.Calc.NLPSolver.DEPSSolverImpl.class, + m_serviceNames ); + if ( sImplementationName.equals( "com.sun.star.comp.Calc.NLPSolver.SCOSolverImpl" ) ) + xFactory = Factory.createComponentFactory( com.sun.star.comp.Calc.NLPSolver.SCOSolverImpl.class, + m_serviceNames ); + + return xFactory; + } + private Registration() {} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |