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_ADDRUNO_HXX 29 #define SC_ADDRUNO_HXX 30 31 #include <com/sun/star/lang/XServiceInfo.hpp> 32 #include <com/sun/star/beans/XPropertySet.hpp> 33 #include <cppuhelper/implbase2.hxx> 34 #include <svl/lstner.hxx> 35 #include "global.hxx" 36 #include "address.hxx" 37 38 39 class ScAddressConversionObj : 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 ScRange aRange; 47 sal_Int32 nRefSheet; 48 sal_Bool bIsRange; 49 50 sal_Bool ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv = ::formula::FormulaGrammar::CONV_OOO ); 51 52 public: 53 54 ScAddressConversionObj(ScDocShell* pDocSh, sal_Bool bForRange); 55 virtual ~ScAddressConversionObj(); 56 57 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 58 59 // XPropertySet 60 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 61 SAL_CALL getPropertySetInfo() 62 throw(::com::sun::star::uno::RuntimeException); 63 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 64 const ::com::sun::star::uno::Any& aValue ) 65 throw(::com::sun::star::beans::UnknownPropertyException, 66 ::com::sun::star::beans::PropertyVetoException, 67 ::com::sun::star::lang::IllegalArgumentException, 68 ::com::sun::star::lang::WrappedTargetException, 69 ::com::sun::star::uno::RuntimeException); 70 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 71 const ::rtl::OUString& PropertyName ) 72 throw(::com::sun::star::beans::UnknownPropertyException, 73 ::com::sun::star::lang::WrappedTargetException, 74 ::com::sun::star::uno::RuntimeException); 75 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 76 const ::com::sun::star::uno::Reference< 77 ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 78 throw(::com::sun::star::beans::UnknownPropertyException, 79 ::com::sun::star::lang::WrappedTargetException, 80 ::com::sun::star::uno::RuntimeException); 81 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 82 const ::com::sun::star::uno::Reference< 83 ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 84 throw(::com::sun::star::beans::UnknownPropertyException, 85 ::com::sun::star::lang::WrappedTargetException, 86 ::com::sun::star::uno::RuntimeException); 87 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 88 const ::com::sun::star::uno::Reference< 89 ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 90 throw(::com::sun::star::beans::UnknownPropertyException, 91 ::com::sun::star::lang::WrappedTargetException, 92 ::com::sun::star::uno::RuntimeException); 93 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 94 const ::com::sun::star::uno::Reference< 95 ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 96 throw(::com::sun::star::beans::UnknownPropertyException, 97 ::com::sun::star::lang::WrappedTargetException, 98 ::com::sun::star::uno::RuntimeException); 99 100 // XServiceInfo 101 virtual ::rtl::OUString SAL_CALL getImplementationName() 102 throw(::com::sun::star::uno::RuntimeException); 103 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 104 throw(::com::sun::star::uno::RuntimeException); 105 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 106 throw(::com::sun::star::uno::RuntimeException); 107 }; 108 109 #endif 110 111