1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_CONFUNO_HXX 29 #define SC_CONFUNO_HXX 30 31 #include <svl/itemprop.hxx> 32 #include <svl/lstner.hxx> 33 #include <com/sun/star/lang/XServiceInfo.hpp> 34 #include <com/sun/star/beans/XPropertySet.hpp> 35 #include <cppuhelper/implbase2.hxx> 36 37 class ScDocShell; 38 39 class ScDocumentConfiguration : public cppu::WeakImplHelper2< 40 com::sun::star::beans::XPropertySet, 41 com::sun::star::lang::XServiceInfo>, 42 public SfxListener 43 { 44 private: 45 ScDocShell* pDocShell; 46 SfxItemPropertySet aPropSet; 47 48 public: 49 ScDocumentConfiguration(ScDocShell* pDocShell); 50 virtual ~ScDocumentConfiguration(); 51 52 // SfxListener 53 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 54 55 // XPropertySet 56 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 57 SAL_CALL getPropertySetInfo() 58 throw(::com::sun::star::uno::RuntimeException); 59 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 60 const ::com::sun::star::uno::Any& aValue ) 61 throw(::com::sun::star::beans::UnknownPropertyException, 62 ::com::sun::star::beans::PropertyVetoException, 63 ::com::sun::star::lang::IllegalArgumentException, 64 ::com::sun::star::lang::WrappedTargetException, 65 ::com::sun::star::uno::RuntimeException); 66 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 67 const ::rtl::OUString& PropertyName ) 68 throw(::com::sun::star::beans::UnknownPropertyException, 69 ::com::sun::star::lang::WrappedTargetException, 70 ::com::sun::star::uno::RuntimeException); 71 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 72 const ::com::sun::star::uno::Reference< 73 ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 74 throw(::com::sun::star::beans::UnknownPropertyException, 75 ::com::sun::star::lang::WrappedTargetException, 76 ::com::sun::star::uno::RuntimeException); 77 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 78 const ::com::sun::star::uno::Reference< 79 ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 80 throw(::com::sun::star::beans::UnknownPropertyException, 81 ::com::sun::star::lang::WrappedTargetException, 82 ::com::sun::star::uno::RuntimeException); 83 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 84 const ::com::sun::star::uno::Reference< 85 ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 86 throw(::com::sun::star::beans::UnknownPropertyException, 87 ::com::sun::star::lang::WrappedTargetException, 88 ::com::sun::star::uno::RuntimeException); 89 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 90 const ::com::sun::star::uno::Reference< 91 ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 92 throw(::com::sun::star::beans::UnknownPropertyException, 93 ::com::sun::star::lang::WrappedTargetException, 94 ::com::sun::star::uno::RuntimeException); 95 96 // XServiceInfo 97 virtual ::rtl::OUString SAL_CALL getImplementationName() 98 throw(::com::sun::star::uno::RuntimeException); 99 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 100 throw(::com::sun::star::uno::RuntimeException); 101 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 102 throw(::com::sun::star::uno::RuntimeException); 103 }; 104 105 106 #endif 107 108