sync master with lastest vba changes
[ooovba.git] / reportdesign / source / ui / misc / rptuiservices.cxx
blob0f65521edd3fc6436a86f257bc68076d5f20278d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rptuiservices.cxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include "precompiled_reportdesign.hxx"
31 #include <cppuhelper/factory.hxx>
32 #include <osl/diagnose.h>
33 #include <cppuhelper/implementationentry.hxx>
34 #include "ReportController.hxx"
35 #include "toolboxcontroller.hxx"
36 #include "statusbarcontroller.hxx"
37 #include "DefaultInspection.hxx"
38 #include "ReportComponentHandler.hxx"
39 #include "GeometryHandler.hxx"
40 #include "DataProviderHandler.hxx"
42 /********************************************************************************************/
44 using namespace ::rptui;
45 using namespace ::com::sun::star::uno;
46 using namespace ::com::sun::star::lang;
47 using namespace ::com::sun::star::registry;
49 //***************************************************************************************
51 // registry functions
52 namespace
55 cppu::ImplementationEntry entries[] = {
56 { &OReportController::create, &OReportController::getImplementationName_Static, &OReportController::getSupportedServiceNames_Static,
57 &cppu::createSingleComponentFactory, 0, 0 },
58 { &OToolboxController::create, &OToolboxController::getImplementationName_Static, &OToolboxController::getSupportedServiceNames_Static,
59 &cppu::createSingleComponentFactory, 0, 0 },
60 { &OStatusbarController::create, &OStatusbarController::getImplementationName_Static, &OStatusbarController::getSupportedServiceNames_Static,
61 &cppu::createSingleComponentFactory, 0, 0 },
62 { &DefaultComponentInspectorModel::create, &DefaultComponentInspectorModel::getImplementationName_Static, &DefaultComponentInspectorModel::getSupportedServiceNames_static,
63 &cppu::createSingleComponentFactory, 0, 0 },
64 { &ReportComponentHandler::create, &ReportComponentHandler::getImplementationName_Static, &ReportComponentHandler::getSupportedServiceNames_static,
65 &cppu::createSingleComponentFactory, 0, 0 },
66 { &GeometryHandler::create, &GeometryHandler::getImplementationName_Static, &GeometryHandler::getSupportedServiceNames_static,
67 &cppu::createSingleComponentFactory, 0, 0 },
68 { &DataProviderHandler::create, &DataProviderHandler::getImplementationName_Static, &DataProviderHandler::getSupportedServiceNames_static,
69 &cppu::createSingleComponentFactory, 0, 0 },
70 { 0, 0, 0, 0, 0, 0 }
74 extern "C" void * SAL_CALL component_getFactory(
75 char const * implName, void * serviceManager, void * registryKey)
77 return cppu::component_getFactoryHelper(
78 implName, serviceManager, registryKey, entries);
81 extern "C" void SAL_CALL component_getImplementationEnvironment(
82 char const ** envTypeName, uno_Environment **)
84 *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
87 extern "C" sal_Bool SAL_CALL component_writeInfo(
88 void * serviceManager, void * registryKey)
90 return cppu::component_writeInfoHelper(
91 serviceManager, registryKey, entries);