Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / scripting / source / dlgprov / DialogModelProvider.hxx
blobd9a41ef64e8603658deda918f91c979ce8b9d8ab
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <sal/config.h>
23 #include <cppuhelper/factory.hxx>
24 #include <cppuhelper/implbase.hxx>
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>
30 /// anonymous implementation namespace
31 namespace dlgprov{
33 class DialogModelProvider:
34 public ::cppu::WeakImplHelper<
35 css::lang::XInitialization,
36 css::container::XNameContainer,
37 css::beans::XPropertySet,
38 css::lang::XServiceInfo>
40 public:
41 explicit DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const & context);
42 private:
43 // css::lang::XInitialization:
44 virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) override;
46 // css::container::XElementAccess:
47 virtual css::uno::Type SAL_CALL getElementType() override;
48 virtual sal_Bool SAL_CALL hasElements() override;
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;
55 // css::container::XNameReplace:
56 virtual void SAL_CALL replaceByName(const OUString & aName, const css::uno::Any & aElement) override;
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;
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;
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;
75 private:
76 DialogModelProvider(const DialogModelProvider &) = delete;
77 DialogModelProvider& operator=(const DialogModelProvider &) = delete;
79 // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {}
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;
85 } // closing anonymous implementation namespace
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */