1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_APPLUNO_HXX 25cdf0e10cSrcweir #define SC_APPLUNO_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svl/itemprop.hxx> 28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 29cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 30cdf0e10cSrcweir #include <com/sun/star/sheet/XRecentFunctions.hpp> 31cdf0e10cSrcweir #include <com/sun/star/sheet/XFunctionDescriptions.hpp> 32cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 33cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 34cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 35cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx> 36cdf0e10cSrcweir 37cdf0e10cSrcweir class ScFunctionDescriptionObj; 38cdf0e10cSrcweir 39cdf0e10cSrcweir 40cdf0e10cSrcweir 41cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 42cdf0e10cSrcweir ScSpreadsheetSettings_CreateInstance( 43cdf0e10cSrcweir const com::sun::star::uno::Reference< 44cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 45cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 46cdf0e10cSrcweir ScRecentFunctionsObj_CreateInstance( 47cdf0e10cSrcweir const com::sun::star::uno::Reference< 48cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 49cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 50cdf0e10cSrcweir ScFunctionListObj_CreateInstance( 51cdf0e10cSrcweir const com::sun::star::uno::Reference< 52cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir class ScSpreadsheetSettings : public cppu::WeakImplHelper2< 56cdf0e10cSrcweir com::sun::star::beans::XPropertySet, 57cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 58cdf0e10cSrcweir { 59cdf0e10cSrcweir private: 60cdf0e10cSrcweir SfxItemPropertySet aPropSet; 61cdf0e10cSrcweir 62cdf0e10cSrcweir public: 63cdf0e10cSrcweir ScSpreadsheetSettings(); 64cdf0e10cSrcweir virtual ~ScSpreadsheetSettings(); 65cdf0e10cSrcweir 66cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 67cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 68cdf0e10cSrcweir 69cdf0e10cSrcweir // XPropertySet 70cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 71cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 72cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 73cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 74cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 75cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 76cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 77cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 78cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 79cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 80cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 81cdf0e10cSrcweir const ::rtl::OUString& PropertyName ) 82cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 83cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 84cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 85cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 86cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 87cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 88cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 89cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 90cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 91cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 92cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 93cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 94cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 95cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 96cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 97cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 98cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 99cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 100cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 101cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 102cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 103cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 104cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 105cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 106cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 107cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 108cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir 110cdf0e10cSrcweir // XServiceInfo 111cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 112cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 113cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 114cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 116cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 117cdf0e10cSrcweir }; 118cdf0e10cSrcweir 119cdf0e10cSrcweir 120cdf0e10cSrcweir class ScRecentFunctionsObj : public cppu::WeakImplHelper2< 121cdf0e10cSrcweir com::sun::star::sheet::XRecentFunctions, 122cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 123cdf0e10cSrcweir { 124cdf0e10cSrcweir public: 125cdf0e10cSrcweir ScRecentFunctionsObj(); 126cdf0e10cSrcweir virtual ~ScRecentFunctionsObj(); 127cdf0e10cSrcweir 128cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 129cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 130cdf0e10cSrcweir 131cdf0e10cSrcweir // XRecentFunctions 132cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getRecentFunctionIds() 133cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 134cdf0e10cSrcweir virtual void SAL_CALL setRecentFunctionIds( const ::com::sun::star::uno::Sequence< 135cdf0e10cSrcweir sal_Int32 >& aRecentFunctionIds ) 136cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 137cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getMaxRecentFunctions() 138cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 139cdf0e10cSrcweir 140cdf0e10cSrcweir // XServiceInfo 141cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 142cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 144cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 145cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 146cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 147cdf0e10cSrcweir }; 148cdf0e10cSrcweir 149cdf0e10cSrcweir 150cdf0e10cSrcweir class ScFunctionListObj : public cppu::WeakImplHelper4< 151cdf0e10cSrcweir com::sun::star::sheet::XFunctionDescriptions, 152cdf0e10cSrcweir com::sun::star::container::XEnumerationAccess, 153cdf0e10cSrcweir com::sun::star::container::XNameAccess, 154cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 155cdf0e10cSrcweir { 156cdf0e10cSrcweir public: 157cdf0e10cSrcweir ScFunctionListObj(); 158cdf0e10cSrcweir virtual ~ScFunctionListObj(); 159cdf0e10cSrcweir 160cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 161cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 162cdf0e10cSrcweir 163cdf0e10cSrcweir // XFunctionDescriptions 164cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL 165cdf0e10cSrcweir getById( sal_Int32 nId ) 166cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 167cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 168cdf0e10cSrcweir 169cdf0e10cSrcweir // XNameAccess 170cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 171cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 172cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 173cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 174cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() 175cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 176cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 177cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 178cdf0e10cSrcweir 179cdf0e10cSrcweir // XIndexAccess 180cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 181cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 182cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 183cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 184cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 185cdf0e10cSrcweir 186cdf0e10cSrcweir // XEnumerationAccess 187cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 188cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 189cdf0e10cSrcweir 190cdf0e10cSrcweir // XElementAccess 191cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 192cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 193cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 194cdf0e10cSrcweir 195cdf0e10cSrcweir // XServiceInfo 196cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 197cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 198cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 199cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 200cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 201cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 202cdf0e10cSrcweir }; 203cdf0e10cSrcweir 204cdf0e10cSrcweir 205cdf0e10cSrcweir 206cdf0e10cSrcweir #endif 207cdf0e10cSrcweir 208