LibreOffice Module scripting (master) 1
basmethnode.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <bcholder.hxx>
23#include <com/sun/star/beans/XPropertySetInfo.hpp>
24#include <com/sun/star/script/XInvocation.hpp>
25#include <com/sun/star/script/browse/XBrowseNode.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
29#include <comphelper/uno3.hxx>
32
33
34class SbMethod;
35
36
37namespace basprov
38{
39
40
41
42
43 typedef ::cppu::WeakImplHelper<
44 css::script::browse::XBrowseNode,
45 css::script::XInvocation > BasicMethodNodeImpl_BASE;
46
48 public cppu::BaseMutex,
51 public ::comphelper::OPropertyArrayUsageHelper< BasicMethodNodeImpl >
52 {
53 private:
54 css::uno::Reference< css::uno::XComponentContext > m_xContext;
58
59 // properties
60 OUString m_sURI;
62
63 protected:
64 // OPropertySetHelper
65 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper( ) override;
66
67 // OPropertyArrayUsageHelper
68 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
69
70 public:
71 BasicMethodNodeImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
72 OUString sScriptingContext,
73 SbMethod* pMethod, bool isAppScript );
74 virtual ~BasicMethodNodeImpl() override;
75
76 // XInterface
78
79 // XTypeProvider
80 DECLARE_XTYPEPROVIDER()
81
82 // XBrowseNode
83 virtual OUString SAL_CALL getName( ) override;
84 virtual css::uno::Sequence< css::uno::Reference< css::script::browse::XBrowseNode > > SAL_CALL getChildNodes( ) override;
85 virtual sal_Bool SAL_CALL hasChildNodes( ) override;
86 virtual sal_Int16 SAL_CALL getType( ) override;
87
88 // XPropertySet
89 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
90
91 // XInvocation
92 virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) override;
93 virtual css::uno::Any SAL_CALL invoke(
94 const OUString& aFunctionName,
95 const css::uno::Sequence< css::uno::Any >& aParams,
96 css::uno::Sequence< sal_Int16 >& aOutParamIndex,
97 css::uno::Sequence< css::uno::Any >& aOutParam ) override;
98 virtual void SAL_CALL setValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
99 virtual css::uno::Any SAL_CALL getValue( const OUString& aPropertyName ) override;
100 virtual sal_Bool SAL_CALL hasMethod( const OUString& aName ) override;
101 virtual sal_Bool SAL_CALL hasProperty( const OUString& aName ) override;
102 };
103
104
105} // namespace basprov
106
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL hasProperty(const OUString &aName) override
virtual void SAL_CALL setValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Sequence< css::uno::Reference< css::script::browse::XBrowseNode > > SAL_CALL getChildNodes() override
virtual css::uno::Any SAL_CALL invoke(const OUString &aFunctionName, const css::uno::Sequence< css::uno::Any > &aParams, css::uno::Sequence< sal_Int16 > &aOutParamIndex, css::uno::Sequence< css::uno::Any > &aOutParam) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
BasicMethodNodeImpl(const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString sScriptingContext, SbMethod *pMethod, bool isAppScript)
Definition: basmethnode.cxx:60
virtual sal_Bool SAL_CALL hasMethod(const OUString &aName) override
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: basmethnode.hxx:54
virtual sal_Int16 SAL_CALL getType() override
virtual css::uno::Any SAL_CALL getValue(const OUString &aPropertyName) override
virtual sal_Bool SAL_CALL hasChildNodes() override
virtual OUString SAL_CALL getName() override
virtual ~BasicMethodNodeImpl() override
Definition: basmethnode.cxx:98
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
::cppu::WeakImplHelper< css::script::browse::XBrowseNode, css::script::XInvocation > BasicMethodNodeImpl_BASE
Definition: basmethnode.hxx:45
unsigned char sal_Bool
#define DECLARE_XINTERFACE()