LibreOffice Module svx (master) 1
fmservs.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <com/sun/star/container/XSet.hpp>
23#include <com/sun/star/lang/XSingleServiceFactory.hpp>
24#include <com/sun/star/lang/XMultiServiceFactory.hpp>
25#include <fmservs.hxx>
26
27using namespace com::sun::star;
28
29#define REGISTER_SERVICE(ImplName, ServiceName) \
30 sString = (ServiceName); \
31 xSingleFactory = ::cppu::createSingleFactory(xServiceFactory, \
32 OUString(), ImplName##_NewInstance_Impl, \
33 uno::Sequence< OUString>(&sString, 1)); \
34 if (xSingleFactory.is()) \
35 xSet->insert(uno::Any(xSingleFactory));
36
37namespace svxform
38{
40 {
41 uno::Reference< lang::XMultiServiceFactory > xServiceFactory = ::comphelper::getProcessServiceFactory();
42 uno::Reference< container::XSet > xSet(xServiceFactory, uno::UNO_QUERY);
43 if (!xSet.is())
44 return;
45
46 uno::Reference< lang::XSingleServiceFactory > xSingleFactory;
47
48 OUString sString;
49
50
51 // FormController
52 REGISTER_SERVICE( FormController, "com.sun.star.form.runtime.FormController" );
53 REGISTER_SERVICE( LegacyFormController, "com.sun.star.form.FormController" );
54
55
56 // FormController - register selfaware service
57 xSingleFactory = ::cppu::createSingleFactory( xServiceFactory,
61 );
62 if ( xSingleFactory.is() )
63 xSet->insert( uno::Any( xSingleFactory ) );
64
65
66 // DBGridControl
70 };
71
72}
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define REGISTER_SERVICE(ImplName, ServiceName)
Definition: fmservs.cxx:29
constexpr OUStringLiteral FM_CONTROL_GRIDCONTROL
Definition: fmservs.hxx:52
constexpr OUStringLiteral FM_CONTROL_GRID
Definition: fmservs.hxx:51
constexpr OUStringLiteral FM_SUN_CONTROL_GRIDCONTROL
Definition: fmservs.hxx:77
class FmSearchEngine - Impl class for FmSearchDialog
OUString OAddConditionDialog_GetImplementationName()
Reference< XInterface > OAddConditionDialog_Create(const Reference< XMultiServiceFactory > &_rxORB)
void ImplSmartRegisterUnoServices()
Definition: fmservs.cxx:39
Sequence< OUString > OAddConditionDialog_GetSupportedServiceNames()