LibreOffice Module scripting (master) 1
DialogModelProvider.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 <sal/config.h>
25#include <com/sun/star/lang/XInitialization.hpp>
26#include <com/sun/star/container/XNameContainer.hpp>
27#include <com/sun/star/lang/XServiceInfo.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
29
31namespace dlgprov{
32
34 public ::cppu::WeakImplHelper<
35 css::lang::XInitialization,
36 css::container::XNameContainer,
37 css::beans::XPropertySet,
38 css::lang::XServiceInfo>
39{
40public:
41 explicit DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const & context);
42private:
43 // css::lang::XInitialization:
44 virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) override;
45
46 // css::container::XElementAccess:
47 virtual css::uno::Type SAL_CALL getElementType() override;
48 virtual sal_Bool SAL_CALL hasElements() override;
49
50 // css::container::XNameAccess:
51 virtual css::uno::Any SAL_CALL getByName(const OUString & aName) override;
52 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
53 virtual sal_Bool SAL_CALL hasByName(const OUString & aName) override;
54
55 // css::container::XNameReplace:
56 virtual void SAL_CALL replaceByName(const OUString & aName, const css::uno::Any & aElement) override;
57
58 // css::container::XNameContainer:
59 virtual void SAL_CALL insertByName(const OUString & aName, const css::uno::Any & aElement) override;
60 virtual void SAL_CALL removeByName(const OUString & Name) override;
61
62 // css::lang::XServiceInfo:
63 virtual OUString SAL_CALL getImplementationName() override;
64 virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) override;
65 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
66
67 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
68 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
69 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
70 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
71 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
72 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
73 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
74
75private:
78
79 // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {}
80
81 css::uno::Reference< css::uno::XComponentContext > m_xContext;
82 css::uno::Reference< css::container::XNameContainer> m_xDialogModel;
83 css::uno::Reference< css::beans::XPropertySet> m_xDialogModelProp;
84};
85} // closing anonymous implementation namespace
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
DialogModelProvider(const DialogModelProvider &)=delete
DialogModelProvider & operator=(const DialogModelProvider &)=delete
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Reference< css::container::XNameContainer > m_xDialogModel
css::uno::Reference< css::beans::XPropertySet > m_xDialogModelProp
virtual void SAL_CALL removeByName(const OUString &Name) override
DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const &context)
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
anonymous implementation namespace
unsigned char sal_Bool