tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / include / comphelper / processfactory.hxx
blob7dba64eeea29f124a3ff523b35098e3d54de41d0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
21 #define INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <comphelper/comphelperdllapi.h>
26 namespace com::sun::star::lang {
27 class XMultiServiceFactory;
29 namespace com::sun::star::uno { class XComponentContext; }
31 namespace comphelper
34 /**
35 * This function set the process service factory.
37 COMPHELPER_DLLPUBLIC void setProcessServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMgr);
39 /**
40 * This function gets the process service factory.
42 * If no service factory is set the function throws a RuntimeException.
44 COMPHELPER_DLLPUBLIC css::uno::Reference< css::lang::XMultiServiceFactory > getProcessServiceFactory();
46 /** Obtains a component context from a service factory.
48 Throws a RuntimeException if no component context can be obtained.
50 @param factory may be null
51 @return may be null
53 COMPHELPER_DLLPUBLIC
54 css::uno::Reference< css::uno::XComponentContext >
55 getComponentContext(
56 css::uno::Reference< css::lang::XMultiServiceFactory >
57 const & factory);
59 /**
60 * This function gets the process service factory's default component context.
62 * Throws a RuntimeException if no component context can be obtained.
64 COMPHELPER_DLLPUBLIC
65 const css::uno::Reference< css::uno::XComponentContext > &
66 getProcessComponentContext();
70 #endif // INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */