Line data Source code
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 : #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"
26 :
27 : /// anonymous implementation namespace
28 : namespace dlgprov{
29 :
30 0 : class DialogModelProvider:
31 : public ::cppu::WeakImplHelper4<
32 : css::lang::XInitialization,
33 : css::container::XNameContainer,
34 : css::beans::XPropertySet,
35 : css::lang::XServiceInfo>
36 : {
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);
42 :
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);
46 :
47 : // ::com::sun::star::container::XNameAccess:
48 : virtual ::com::sun::star::uno::Any SAL_CALL getByName(const ::rtl::OUString & aName) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
49 : virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (css::uno::RuntimeException);
50 : virtual ::sal_Bool SAL_CALL hasByName(const ::rtl::OUString & aName) throw (css::uno::RuntimeException);
51 :
52 : // ::com::sun::star::container::XNameReplace:
53 : virtual void SAL_CALL replaceByName(const ::rtl::OUString & aName, const ::com::sun::star::uno::Any & aElement) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
54 :
55 : // ::com::sun::star::container::XNameContainer:
56 : virtual void SAL_CALL insertByName(const ::rtl::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 ::rtl::OUString & Name) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException);
58 :
59 : // ::com::sun::star::lang::XServiceInfo:
60 : virtual ::rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
61 : virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString & ServiceName) throw (css::uno::RuntimeException);
62 : virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
63 :
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 ::rtl::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 ::rtl::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 ::rtl::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 ::rtl::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 ::rtl::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 ::rtl::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);
71 :
72 : private:
73 : DialogModelProvider(const DialogModelProvider &); // not defined
74 : DialogModelProvider& operator=(const DialogModelProvider &); // not defined
75 :
76 : // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {}
77 :
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;
81 : };
82 : } // closing anonymous implementation namespace
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|