1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SCRIPTING_SOURCE_BASPROV_BASMETHNODE_HXX
21 #define INCLUDED_SCRIPTING_SOURCE_BASPROV_BASMETHNODE_HXX
23 #include "bcholder.hxx"
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/script/XInvocation.hpp>
26 #include <com/sun/star/script/browse/XBrowseNode.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <comphelper/proparrhlp.hxx>
29 #include <comphelper/propertycontainer.hxx>
30 #include <comphelper/uno3.hxx>
31 #include <cppuhelper/implbase.hxx>
41 // class BasicMethodNodeImpl
44 typedef ::cppu::WeakImplHelper
<
45 css::script::browse::XBrowseNode
,
46 css::script::XInvocation
> BasicMethodNodeImpl_BASE
;
48 class BasicMethodNodeImpl
: public BasicMethodNodeImpl_BASE
,
49 public ::scripting_helper::OMutexHolder
,
50 public ::scripting_helper::OBroadcastHelperHolder
,
51 public ::comphelper::OPropertyContainer
,
52 public ::comphelper::OPropertyArrayUsageHelper
< BasicMethodNodeImpl
>
55 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
56 OUString m_sScriptingContext
;
66 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper( ) override
;
68 // OPropertyArrayUsageHelper
69 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( ) const override
;
72 BasicMethodNodeImpl( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
,
73 const OUString
& sScriptingContext
,
74 SbMethod
* pMethod
, bool isAppScript
);
75 virtual ~BasicMethodNodeImpl() override
;
81 DECLARE_XTYPEPROVIDER()
84 virtual OUString SAL_CALL
getName( ) override
;
85 virtual css::uno::Sequence
< css::uno::Reference
< css::script::browse::XBrowseNode
> > SAL_CALL
getChildNodes( ) override
;
86 virtual sal_Bool SAL_CALL
hasChildNodes( ) override
;
87 virtual sal_Int16 SAL_CALL
getType( ) override
;
90 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
93 virtual css::uno::Reference
< css::beans::XIntrospectionAccess
> SAL_CALL
getIntrospection( ) override
;
94 virtual css::uno::Any SAL_CALL
invoke(
95 const OUString
& aFunctionName
,
96 const css::uno::Sequence
< css::uno::Any
>& aParams
,
97 css::uno::Sequence
< sal_Int16
>& aOutParamIndex
,
98 css::uno::Sequence
< css::uno::Any
>& aOutParam
) override
;
99 virtual void SAL_CALL
setValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
100 virtual css::uno::Any SAL_CALL
getValue( const OUString
& aPropertyName
) override
;
101 virtual sal_Bool SAL_CALL
hasMethod( const OUString
& aName
) override
;
102 virtual sal_Bool SAL_CALL
hasProperty( const OUString
& aName
) override
;
106 } // namespace basprov
109 #endif // INCLUDED_SCRIPTING_SOURCE_BASPROV_BASMETHNODE_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */