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_ADDIN_HXX 25 #define SC_ADDIN_HXX 26 27 #include <com/sun/star/sheet/XAddIn.hpp> 28 #include <com/sun/star/lang/XServiceName.hpp> 29 #include <com/sun/star/lang/XServiceInfo.hpp> 30 #include <stardiv/starcalc/test/XTestAddIn.hpp> 31 32 #include <cppuhelper/implbase4.hxx> // helper for implementations 33 34 35 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> ScTestAddIn_CreateInstance( 36 const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& ); 37 38 39 class ScTestAddIn : public cppu::WeakImplHelper4< 40 com::sun::star::sheet::XAddIn, 41 stardiv::starcalc::test::XTestAddIn, 42 com::sun::star::lang::XServiceName, 43 com::sun::star::lang::XServiceInfo > 44 { 45 private: 46 com::sun::star::uno::Reference<com::sun::star::sheet::XVolatileResult> xAlphaResult; //! Test 47 com::sun::star::uno::Reference<com::sun::star::sheet::XVolatileResult> xNumResult; //! Test 48 com::sun::star::lang::Locale aFuncLoc; 49 50 public: 51 ScTestAddIn(); 52 virtual ~ScTestAddIn(); 53 54 // SMART_UNO_DECLARATION( ScTestAddIn, UsrObject ); 55 // friend Reflection * ScTestAddIn_getReflection(); 56 // virtual BOOL queryInterface( Uik, XInterfaceRef& ); 57 // virtual XIdlClassRef getIdlClass(void); 58 59 static UString getImplementationName_Static(); 60 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); 61 62 // XAddIn 63 virtual ::rtl::OUString SAL_CALL getProgrammaticFuntionName( const ::rtl::OUString& aDisplayName ); 64 virtual ::rtl::OUString SAL_CALL getDisplayFunctionName( const ::rtl::OUString& aProgrammaticName ); 65 virtual ::rtl::OUString SAL_CALL getFunctionDescription( const ::rtl::OUString& aProgrammaticName ); 66 virtual ::rtl::OUString SAL_CALL getDisplayArgumentName( const ::rtl::OUString& aProgrammaticFunctionName, sal_Int32 nArgument ); 67 virtual ::rtl::OUString SAL_CALL getArgumentDescription( const ::rtl::OUString& aProgrammaticFunctionName, sal_Int32 nArgument ); 68 virtual ::rtl::OUString SAL_CALL getProgrammaticCategoryName( const ::rtl::OUString& aProgrammaticFunctionName ); 69 virtual ::rtl::OUString SAL_CALL getDisplayCategoryName( const ::rtl::OUString& aProgrammaticFunctionName ); 70 71 // XLocalizable 72 virtual void SAL_CALL setLocale( const ::com::sun::star::lang::Locale& eLocale ); 73 virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ); 74 75 // XTestAddIn 76 virtual sal_Int32 SAL_CALL countParams( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArgs ); 77 virtual double SAL_CALL addOne( double fValue ); 78 virtual ::rtl::OUString SAL_CALL repeatStr( const ::rtl::OUString& aStr, sal_Int32 nCount ); 79 virtual ::rtl::OUString SAL_CALL getDateString( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCaller, double fValue ); 80 virtual sal_Int32 SAL_CALL getColorValue( const ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >& xRange ); 81 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL transpose( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aMatrix ); 82 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > > SAL_CALL transposeInt( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > >& aMatrix ); 83 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XVolatileResult > SAL_CALL callAsync( const ::rtl::OUString& aString ); 84 virtual ::rtl::OUString SAL_CALL repeatMultiple( sal_Int32 nCount, const ::com::sun::star::uno::Any& aFirst, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aFollow ); 85 virtual ::com::sun::star::uno::Any SAL_CALL getStrOrVal( sal_Int32 nFlag ); 86 87 // XServiceName 88 virtual ::rtl::OUString SAL_CALL getServiceName( ); 89 90 // XServiceInfo 91 virtual ::rtl::OUString SAL_CALL getImplementationName( ); 92 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ); 93 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ); 94 }; 95 96 97 #endif 98