1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef SC_APPLUNO_HXX 29*cdf0e10cSrcweir #define SC_APPLUNO_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <svl/itemprop.hxx> 32*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/sheet/XRecentFunctions.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/sheet/XFunctionDescriptions.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 38*cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 39*cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir class ScFunctionDescriptionObj; 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 46*cdf0e10cSrcweir ScSpreadsheetSettings_CreateInstance( 47*cdf0e10cSrcweir const com::sun::star::uno::Reference< 48*cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 49*cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 50*cdf0e10cSrcweir ScRecentFunctionsObj_CreateInstance( 51*cdf0e10cSrcweir const com::sun::star::uno::Reference< 52*cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 53*cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 54*cdf0e10cSrcweir ScFunctionListObj_CreateInstance( 55*cdf0e10cSrcweir const com::sun::star::uno::Reference< 56*cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir class ScSpreadsheetSettings : public cppu::WeakImplHelper2< 60*cdf0e10cSrcweir com::sun::star::beans::XPropertySet, 61*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 62*cdf0e10cSrcweir { 63*cdf0e10cSrcweir private: 64*cdf0e10cSrcweir SfxItemPropertySet aPropSet; 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir public: 67*cdf0e10cSrcweir ScSpreadsheetSettings(); 68*cdf0e10cSrcweir virtual ~ScSpreadsheetSettings(); 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 71*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir // XPropertySet 74*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 75*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 76*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 77*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 78*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 79*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 80*cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 81*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 82*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 83*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 84*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 85*cdf0e10cSrcweir const ::rtl::OUString& PropertyName ) 86*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 87*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 88*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 89*cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 90*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 91*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 92*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 93*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 94*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 95*cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 96*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 97*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 98*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 99*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 100*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 101*cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 102*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 103*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 104*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 105*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 106*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 107*cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 108*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 109*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 110*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 111*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 112*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir // XServiceInfo 115*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 116*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 117*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 118*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 119*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 120*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 121*cdf0e10cSrcweir }; 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir class ScRecentFunctionsObj : public cppu::WeakImplHelper2< 125*cdf0e10cSrcweir com::sun::star::sheet::XRecentFunctions, 126*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 127*cdf0e10cSrcweir { 128*cdf0e10cSrcweir public: 129*cdf0e10cSrcweir ScRecentFunctionsObj(); 130*cdf0e10cSrcweir virtual ~ScRecentFunctionsObj(); 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 133*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir // XRecentFunctions 136*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getRecentFunctionIds() 137*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 138*cdf0e10cSrcweir virtual void SAL_CALL setRecentFunctionIds( const ::com::sun::star::uno::Sequence< 139*cdf0e10cSrcweir sal_Int32 >& aRecentFunctionIds ) 140*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 141*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getMaxRecentFunctions() 142*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir // XServiceInfo 145*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 146*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 147*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 148*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 149*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 150*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 151*cdf0e10cSrcweir }; 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir class ScFunctionListObj : public cppu::WeakImplHelper4< 155*cdf0e10cSrcweir com::sun::star::sheet::XFunctionDescriptions, 156*cdf0e10cSrcweir com::sun::star::container::XEnumerationAccess, 157*cdf0e10cSrcweir com::sun::star::container::XNameAccess, 158*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo> 159*cdf0e10cSrcweir { 160*cdf0e10cSrcweir public: 161*cdf0e10cSrcweir ScFunctionListObj(); 162*cdf0e10cSrcweir virtual ~ScFunctionListObj(); 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(); 165*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir // XFunctionDescriptions 168*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL 169*cdf0e10cSrcweir getById( sal_Int32 nId ) 170*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 171*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir // XNameAccess 174*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 175*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 176*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 177*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 178*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() 179*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 180*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 181*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir // XIndexAccess 184*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 185*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 186*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 187*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 188*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir // XEnumerationAccess 191*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 192*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir // XElementAccess 195*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 196*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 197*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir // XServiceInfo 200*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 201*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 202*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 203*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 204*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 205*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 206*cdf0e10cSrcweir }; 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir #endif 211*cdf0e10cSrcweir 212