bump product version to 4.1.6.2
[LibreOffice.git] / scripting / source / dlgprov / DialogModelProvider.hxx
blob4d9256a35f145eefb8947b1515ba3b3f1ee23397
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 .
19 #include "sal/config.h"
20 #include "cppuhelper/factory.hxx"
21 #include "cppuhelper/implbase4.hxx"
22 #include "com/sun/star/lang/XInitialization.hpp"
23 #include "com/sun/star/container/XNameContainer.hpp"
24 #include "com/sun/star/lang/XServiceInfo.hpp"
25 #include "com/sun/star/beans/XPropertySet.hpp"
27 /// anonymous implementation namespace
28 namespace dlgprov{
30 class DialogModelProvider:
31 public ::cppu::WeakImplHelper4<
32 css::lang::XInitialization,
33 css::container::XNameContainer,
34 css::beans::XPropertySet,
35 css::lang::XServiceInfo>
37 public:
38 explicit DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const & context);
39 private:
40 // ::com::sun::star::lang::XInitialization:
41 virtual void SAL_CALL initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception);
43 // ::com::sun::star::container::XElementAccess:
44 virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
45 virtual ::sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
47 // ::com::sun::star::container::XNameAccess:
48 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const OUString & aName) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
49 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() throw (css::uno::RuntimeException);
50 virtual ::sal_Bool SAL_CALL hasByName(const OUString & aName) throw (css::uno::RuntimeException);
52 // ::com::sun::star::container::XNameReplace:
53 virtual void SAL_CALL replaceByName(const OUString & aName, const ::com::sun::star::uno::Any & aElement) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
55 // ::com::sun::star::container::XNameContainer:
56 virtual void SAL_CALL insertByName(const OUString & aName, const ::com::sun::star::uno::Any & aElement) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::container::ElementExistException, css::lang::WrappedTargetException);
57 virtual void SAL_CALL removeByName(const OUString & Name) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
59 // ::com::sun::star::lang::XServiceInfo:
60 virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
61 virtual ::sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (css::uno::RuntimeException);
62 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
64 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
65 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
66 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
67 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
68 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
69 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
70 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
72 private:
73 DialogModelProvider(const DialogModelProvider &); // not defined
74 DialogModelProvider& operator=(const DialogModelProvider &); // not defined
76 // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {}
78 css::uno::Reference< css::uno::XComponentContext > m_xContext;
79 css::uno::Reference< css::container::XNameContainer> m_xDialogModel;
80 css::uno::Reference< css::beans::XPropertySet> m_xDialogModelProp;
82 } // closing anonymous implementation namespace
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */