bump product version to 4.2.0.1
[LibreOffice.git] / include / sfx2 / sfxmodelfactory.hxx
blob70cfcf5b1507da2a3f9953c116e40a2283e66c82
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_SFX2_SFXMODELFACTORY_HXX
21 #define INCLUDED_SFX2_SFXMODELFACTORY_HXX
23 #include <sfx2/dllapi.h>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
28 //........................................................................
29 namespace sfx2
31 //........................................................................
33 #define SFXMODEL_STANDARD (sal_uInt64)(0x0000)
34 #define SFXMODEL_EMBEDDED_OBJECT (sal_uInt64)(0x0001)
35 #define SFXMODEL_DISABLE_EMBEDDED_SCRIPTS (sal_uInt64)(0x0002)
36 #define SFXMODEL_DISABLE_DOCUMENT_RECOVERY (sal_uInt64)(0x0004)
38 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( SAL_CALL * SfxModelFactoryFunc ) (
39 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
40 const sal_uInt64 _nCreationFlags
43 //====================================================================
44 //= createSfxModelFactory
45 //====================================================================
46 /** creates a XSingleServiceFactory which can be used to created instances
47 of classes derived from SfxBaseModel
49 In opposite to the default implementations from module cppuhelper, this
50 factory evaluates certain creation arguments (passed to createInstanceWithArguments)
51 and passes them to the factory function of the derived class.
53 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >
54 SFX2_DLLPUBLIC createSfxModelFactory(
55 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceFactory,
56 const OUString& _rImplementationName,
57 const SfxModelFactoryFunc _pComponentFactoryFunc,
58 const ::com::sun::star::uno::Sequence< OUString >& _rServiceNames
61 //........................................................................
62 } // namespace sfx2
63 //........................................................................
65 #endif // INCLUDED_SFX2_SFXMODELFACTORY_HXX
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */