Branch data Line data Source code
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 : : #ifndef _FRAMEWORK_SCRIPT_PROTOCOLHANDLER_SCRIPTING_CONTEXT_HXX_
21 : : #define _FRAMEWORK_SCRIPT_PROTOCOLHANDLER_SCRIPTING_CONTEXT_HXX_
22 : :
23 : :
24 : : #include <osl/mutex.hxx>
25 : : #include <rtl/ustring.hxx>
26 : : #include <cppuhelper/implbase1.hxx>
27 : : #include <comphelper/uno3.hxx>
28 : : #include <comphelper/propertycontainer.hxx>
29 : : #include <comphelper/proparrhlp.hxx>
30 : :
31 : : #include <cppuhelper/implbase1.hxx>
32 : : #include <cppuhelper/weak.hxx>
33 : : #include <com/sun/star/lang/XServiceInfo.hpp>
34 : : #include <com/sun/star/uno/RuntimeException.hpp>
35 : : #include <com/sun/star/uno/RuntimeException.hpp>
36 : : #include <com/sun/star/beans/XPropertySet.hpp>
37 : : #include <comphelper/broadcasthelper.hxx>
38 : :
39 : : namespace css = ::com::sun::star;
40 : :
41 : : namespace func_provider
42 : : {
43 : :
44 : : //Typedefs
45 : : //=============================================================================
46 : : //typedef ::cppu::WeakImplHelper1< css::beans::XPropertySet > ScriptingContextImpl_BASE;
47 : :
48 : : class ScriptingContext : public ::comphelper::OMutexAndBroadcastHelper, public ::comphelper::OPropertyContainer,
49 : : public ::comphelper::OPropertyArrayUsageHelper< ScriptingContext >, public css::lang::XTypeProvider, public ::cppu::OWeakObject
50 : : {
51 : :
52 : : public:
53 : : ScriptingContext( const css::uno::Reference< css::uno::XComponentContext > & xContext );
54 : : ~ScriptingContext();
55 : : // XInterface
56 : :
57 : 0 : css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType )
58 : : throw( css::uno::RuntimeException )
59 : : {
60 [ # # ]: 0 : css::uno::Any aRet( OPropertySetHelper::queryInterface( rType ) );
61 [ # # ][ # # ]: 0 : return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
62 : : }
63 : 0 : void SAL_CALL acquire() throw() { ::cppu::OWeakObject::acquire(); }
64 : 0 : void SAL_CALL release() throw() { ::cppu::OWeakObject::release(); }
65 : : // XPropertySet
66 : : virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( )
67 : : throw ( css::uno::RuntimeException );
68 : : //XTypeProvider
69 : : DECLARE_XTYPEPROVIDER( )
70 : :
71 : : protected:
72 : :
73 : : // OPropertySetHelper
74 : : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper( );
75 : :
76 : : // OPropertyArrayUsageHelper
77 : : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
78 : : private:
79 : : css::uno::Reference< css::uno::XComponentContext > m_xContext;
80 : :
81 : :
82 : : };
83 : : } // func_provider
84 : : #endif //_FRAMEWORK_SCRIPT_PROVIDER_XFUNCTIONPROVIDER_HXX_
85 : :
86 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|