bump product version to 6.4.0.3
[LibreOffice.git] / scripting / source / dlgprov / DialogModelProvider.hxx
blob7f938bc90ad14b54e905ca4fba72f4fea11ac06a
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 #ifndef INCLUDED_SCRIPTING_SOURCE_DLGPROV_DIALOGMODELPROVIDER_HXX
21 #define INCLUDED_SCRIPTING_SOURCE_DLGPROV_DIALOGMODELPROVIDER_HXX
23 #include <sal/config.h>
24 #include <cppuhelper/factory.hxx>
25 #include <cppuhelper/implbase.hxx>
26 #include <com/sun/star/lang/XInitialization.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
31 /// anonymous implementation namespace
32 namespace dlgprov{
34 class DialogModelProvider:
35 public ::cppu::WeakImplHelper<
36 css::lang::XInitialization,
37 css::container::XNameContainer,
38 css::beans::XPropertySet,
39 css::lang::XServiceInfo>
41 public:
42 explicit DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const & context);
43 private:
44 // css::lang::XInitialization:
45 virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) override;
47 // css::container::XElementAccess:
48 virtual css::uno::Type SAL_CALL getElementType() override;
49 virtual sal_Bool SAL_CALL hasElements() override;
51 // css::container::XNameAccess:
52 virtual css::uno::Any SAL_CALL getByName(const OUString & aName) override;
53 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
54 virtual sal_Bool SAL_CALL hasByName(const OUString & aName) override;
56 // css::container::XNameReplace:
57 virtual void SAL_CALL replaceByName(const OUString & aName, const css::uno::Any & aElement) override;
59 // css::container::XNameContainer:
60 virtual void SAL_CALL insertByName(const OUString & aName, const css::uno::Any & aElement) override;
61 virtual void SAL_CALL removeByName(const OUString & Name) override;
63 // css::lang::XServiceInfo:
64 virtual OUString SAL_CALL getImplementationName() override;
65 virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) override;
66 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
68 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
69 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
70 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
71 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
72 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
73 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
74 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
76 private:
77 DialogModelProvider(const DialogModelProvider &) = delete;
78 DialogModelProvider& operator=(const DialogModelProvider &) = delete;
80 // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {}
82 css::uno::Reference< css::uno::XComponentContext > m_xContext;
83 css::uno::Reference< css::container::XNameContainer> m_xDialogModel;
84 css::uno::Reference< css::beans::XPropertySet> m_xDialogModelProp;
86 } // closing anonymous implementation namespace
88 #endif // INCLUDED_SCRIPTING_SOURCE_DLGPROV_DIALOGMODELPROVIDER_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */