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 #ifndef SC_VBA_USERFORM_HXX 24 #define SC_VBA_USERFORM_HXX 25 26 #include <cppuhelper/implbase1.hxx> 27 #include <ooo/vba/msforms/XUserForm.hpp> 28 #include <com/sun/star/awt/XDialog.hpp> 29 #include <com/sun/star/frame/XModel.hpp> 30 31 #include <vbahelper/vbahelperinterface.hxx> 32 #include "vbacontrol.hxx" 33 34 //typedef InheritedHelperInterfaceImpl1< ov::msforms::XUserForm > ScVbaUserForm_BASE; 35 typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XUserForm > ScVbaUserForm_BASE; 36 37 class ScVbaUserForm : public ScVbaUserForm_BASE 38 { 39 private: 40 css::uno::Reference< css::awt::XDialog > m_xDialog; 41 bool mbDispose; 42 protected: 43 public: 44 ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); 45 virtual ~ScVbaUserForm(); 46 // XUserForm 47 virtual void SAL_CALL RePaint( ); 48 virtual void SAL_CALL Show( ); 49 virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ); 50 virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ); 51 virtual ::rtl::OUString SAL_CALL getCaption(); 52 virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ); 53 virtual double SAL_CALL getInnerWidth(); 54 virtual void SAL_CALL setInnerWidth( double fInnerWidth ); 55 virtual double SAL_CALL getInnerHeight(); 56 virtual void SAL_CALL setInnerHeight( double fInnerHeight ); 57 virtual void SAL_CALL Hide( ); 58 virtual void SAL_CALL UnloadObject( ); 59 virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ); 60 // XIntrospection 61 virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ); 62 virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ); 63 virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ); 64 virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ); 65 //XHelperInterface 66 virtual rtl::OUString& getServiceImplName(); 67 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 68 }; 69 #endif 70