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 .
22 #include <com/sun/star/beans/XPropertySetInfo.hpp>
23 #include <com/sun/star/script/XInvocation.hpp>
24 #include <com/sun/star/script/browse/XBrowseNode.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <comphelper/compbase.hxx>
27 #include <comphelper/proparrhlp.hxx>
28 #include <comphelper/propertycontainer2.hxx>
29 #include <comphelper/uno3.hxx>
30 #include <cppuhelper/implbase.hxx>
42 typedef ::comphelper::WeakImplHelper
<
43 css::script::browse::XBrowseNode
,
44 css::script::XInvocation
> BasicMethodNodeImpl_BASE
;
46 class BasicMethodNodeImpl
: public BasicMethodNodeImpl_BASE
,
47 public ::comphelper::OPropertyContainer2
,
48 public ::comphelper::OPropertyArrayUsageHelper
< BasicMethodNodeImpl
>
51 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
52 OUString m_sScriptingContext
;
62 virtual ::cppu::IPropertyArrayHelper
& getInfoHelper( ) override
;
64 // OPropertyArrayUsageHelper
65 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( ) const override
;
68 BasicMethodNodeImpl( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
,
69 OUString sScriptingContext
,
70 SbMethod
* pMethod
, bool isAppScript
);
71 virtual ~BasicMethodNodeImpl() override
;
77 DECLARE_XTYPEPROVIDER()
80 virtual OUString SAL_CALL
getName( ) override
;
81 virtual css::uno::Sequence
< css::uno::Reference
< css::script::browse::XBrowseNode
> > SAL_CALL
getChildNodes( ) override
;
82 virtual sal_Bool SAL_CALL
hasChildNodes( ) override
;
83 virtual sal_Int16 SAL_CALL
getType( ) override
;
86 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
89 virtual css::uno::Reference
< css::beans::XIntrospectionAccess
> SAL_CALL
getIntrospection( ) override
;
90 virtual css::uno::Any SAL_CALL
invoke(
91 const OUString
& aFunctionName
,
92 const css::uno::Sequence
< css::uno::Any
>& aParams
,
93 css::uno::Sequence
< sal_Int16
>& aOutParamIndex
,
94 css::uno::Sequence
< css::uno::Any
>& aOutParam
) override
;
95 virtual void SAL_CALL
setValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
96 virtual css::uno::Any SAL_CALL
getValue( const OUString
& aPropertyName
) override
;
97 virtual sal_Bool SAL_CALL
hasMethod( const OUString
& aName
) override
;
98 virtual sal_Bool SAL_CALL
hasProperty( const OUString
& aName
) override
;
102 } // namespace basprov
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */