1*6998d047SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*6998d047SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*6998d047SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*6998d047SAndrew Rist * distributed with this work for additional information 6*6998d047SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*6998d047SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*6998d047SAndrew Rist * "License"); you may not use this file except in compliance 9*6998d047SAndrew Rist * with the License. You may obtain a copy of the License at 10*6998d047SAndrew Rist * 11*6998d047SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*6998d047SAndrew Rist * 13*6998d047SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*6998d047SAndrew Rist * software distributed under the License is distributed on an 15*6998d047SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*6998d047SAndrew Rist * KIND, either express or implied. See the License for the 17*6998d047SAndrew Rist * specific language governing permissions and limitations 18*6998d047SAndrew Rist * under the License. 19*6998d047SAndrew Rist * 20*6998d047SAndrew Rist *************************************************************/ 21*6998d047SAndrew Rist 22*6998d047SAndrew Rist 23cdf0e10cSrcweir #include "sal/config.h" 24cdf0e10cSrcweir #include "cppuhelper/factory.hxx" 25cdf0e10cSrcweir #include "cppuhelper/implbase4.hxx" 26cdf0e10cSrcweir #include "com/sun/star/lang/XInitialization.hpp" 27cdf0e10cSrcweir #include "com/sun/star/container/XNameContainer.hpp" 28cdf0e10cSrcweir #include "com/sun/star/lang/XServiceInfo.hpp" 29cdf0e10cSrcweir #include "com/sun/star/beans/XPropertySet.hpp" 30cdf0e10cSrcweir 31cdf0e10cSrcweir /// anonymous implementation namespace 32cdf0e10cSrcweir namespace dlgprov{ 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace css = ::com::sun::star; 35cdf0e10cSrcweir 36cdf0e10cSrcweir class DialogModelProvider: 37cdf0e10cSrcweir public ::cppu::WeakImplHelper4< 38cdf0e10cSrcweir css::lang::XInitialization, 39cdf0e10cSrcweir css::container::XNameContainer, 40cdf0e10cSrcweir css::beans::XPropertySet, 41cdf0e10cSrcweir css::lang::XServiceInfo> 42cdf0e10cSrcweir { 43cdf0e10cSrcweir public: 44cdf0e10cSrcweir explicit DialogModelProvider(css::uno::Reference< css::uno::XComponentContext > const & context); 45cdf0e10cSrcweir private: 46cdf0e10cSrcweir // ::com::sun::star::lang::XInitialization: 47cdf0e10cSrcweir virtual void SAL_CALL initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception); 48cdf0e10cSrcweir 49cdf0e10cSrcweir // ::com::sun::star::container::XElementAccess: 50cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); 51cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException); 52cdf0e10cSrcweir 53cdf0e10cSrcweir // ::com::sun::star::container::XNameAccess: 54cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName(const ::rtl::OUString & aName) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException); 55cdf0e10cSrcweir virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (css::uno::RuntimeException); 56cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL hasByName(const ::rtl::OUString & aName) throw (css::uno::RuntimeException); 57cdf0e10cSrcweir 58cdf0e10cSrcweir // ::com::sun::star::container::XNameReplace: 59cdf0e10cSrcweir 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); 60cdf0e10cSrcweir 61cdf0e10cSrcweir // ::com::sun::star::container::XNameContainer: 62cdf0e10cSrcweir 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); 63cdf0e10cSrcweir virtual void SAL_CALL removeByName(const ::rtl::OUString & Name) throw (css::uno::RuntimeException, css::container::NoSuchElementException, css::lang::WrappedTargetException); 64cdf0e10cSrcweir 65cdf0e10cSrcweir // ::com::sun::star::lang::XServiceInfo: 66cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); 67cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString & ServiceName) throw (css::uno::RuntimeException); 68cdf0e10cSrcweir virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); 69cdf0e10cSrcweir 70cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException); 71cdf0e10cSrcweir 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); 72cdf0e10cSrcweir 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); 73cdf0e10cSrcweir 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); 74cdf0e10cSrcweir 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); 75cdf0e10cSrcweir 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); 76cdf0e10cSrcweir 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); 77cdf0e10cSrcweir 78cdf0e10cSrcweir private: 79cdf0e10cSrcweir DialogModelProvider(const DialogModelProvider &); // not defined 80cdf0e10cSrcweir DialogModelProvider& operator=(const DialogModelProvider &); // not defined 81cdf0e10cSrcweir 82cdf0e10cSrcweir // destructor is private and will be called indirectly by the release call virtual ~DialogModelProvider() {} 83cdf0e10cSrcweir 84cdf0e10cSrcweir css::uno::Reference< css::uno::XComponentContext > m_xContext; 85cdf0e10cSrcweir css::uno::Reference< css::container::XNameContainer> m_xDialogModel; 86cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet> m_xDialogModelProp; 87cdf0e10cSrcweir }; 88cdf0e10cSrcweir } // closing anonymous implementation namespace 89