1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SC_ADDRUNO_HXX 25 #define SC_ADDRUNO_HXX 26 27 #include <com/sun/star/lang/XServiceInfo.hpp> 28 #include <com/sun/star/beans/XPropertySet.hpp> 29 #include <cppuhelper/implbase2.hxx> 30 #include <svl/lstner.hxx> 31 #include "global.hxx" 32 #include "address.hxx" 33 34 35 class ScAddressConversionObj : public ::cppu::WeakImplHelper2< 36 ::com::sun::star::beans::XPropertySet, 37 ::com::sun::star::lang::XServiceInfo >, 38 public SfxListener 39 { 40 private: 41 ScDocShell* pDocShell; 42 ScRange aRange; 43 sal_Int32 nRefSheet; 44 sal_Bool bIsRange; 45 46 sal_Bool ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv = ::formula::FormulaGrammar::CONV_OOO ); 47 48 public: 49 50 ScAddressConversionObj(ScDocShell* pDocSh, sal_Bool bForRange); 51 virtual ~ScAddressConversionObj(); 52 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 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 59 const ::com::sun::star::uno::Any& aValue ); 60 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 61 const ::rtl::OUString& PropertyName ); 62 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 63 const ::com::sun::star::uno::Reference< 64 ::com::sun::star::beans::XPropertyChangeListener >& xListener ); 65 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 66 const ::com::sun::star::uno::Reference< 67 ::com::sun::star::beans::XPropertyChangeListener >& aListener ); 68 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 69 const ::com::sun::star::uno::Reference< 70 ::com::sun::star::beans::XVetoableChangeListener >& aListener ); 71 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 72 const ::com::sun::star::uno::Reference< 73 ::com::sun::star::beans::XVetoableChangeListener >& aListener ); 74 75 // XServiceInfo 76 virtual ::rtl::OUString SAL_CALL getImplementationName(); 77 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ); 78 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(); 79 }; 80 81 #endif 82