1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: MasterScriptProviderFactory.hxx,v $
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 "rtl/ustring.hxx"
31 #include "rtl/ref.hxx"
32 #include <cppuhelper/implbase2.hxx>
34 #include <com/sun/star/uno/XComponentContext.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/uno/RuntimeException.hpp>
37 #include <com/sun/star/registry/XRegistryKey.hpp>
39 #include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
40 #include <com/sun/star/script/provider/XScriptProvider.hpp>
42 #include "ActiveMSPList.hxx"
44 namespace func_provider
47 #define css ::com::sun::star
49 class MasterScriptProviderFactory
:
50 public ::cppu::WeakImplHelper2
<
51 css::script::provider::XScriptProviderFactory
,
52 css::lang::XServiceInfo
>
56 mutable rtl::Reference
< ActiveMSPList
> m_MSPList
;
58 const css::uno::Reference
< css::uno::XComponentContext
> m_xComponentContext
;
60 const rtl::Reference
< ActiveMSPList
> & getActiveMSPList() const;
63 virtual ~MasterScriptProviderFactory();
66 MasterScriptProviderFactory(
67 css::uno::Reference
< css::uno::XComponentContext
> const & xComponentContext
);
70 virtual ::rtl::OUString SAL_CALL
getImplementationName()
71 throw ( css::uno::RuntimeException
);
73 virtual sal_Bool SAL_CALL
74 supportsService( ::rtl::OUString
const & serviceName
)
75 throw ( css::uno::RuntimeException
);
77 virtual css::uno::Sequence
< ::rtl::OUString
> SAL_CALL
78 getSupportedServiceNames()
79 throw ( css::uno::RuntimeException
);
81 // XScriptProviderFactory
82 virtual css::uno::Reference
< css::script::provider::XScriptProvider
>
83 SAL_CALL
createScriptProvider( const css::uno::Any
& context
)
84 throw ( css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
88 } // namespace func_provider