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 ) throw ( css::lang::IllegalArgumentException );
45     virtual ~ScVbaUserForm();
46     // XUserForm
47     virtual void SAL_CALL RePaint(  ) throw (css::uno::RuntimeException);
48     virtual void SAL_CALL Show(  ) throw (css::uno::RuntimeException);
49     virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
50     virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
51     virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
52     virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
53     virtual double SAL_CALL getInnerWidth() throw (::com::sun::star::uno::RuntimeException);
54     virtual void SAL_CALL setInnerWidth( double fInnerWidth ) throw (::com::sun::star::uno::RuntimeException);
55     virtual double SAL_CALL getInnerHeight() throw (::com::sun::star::uno::RuntimeException);
56     virtual void SAL_CALL setInnerHeight( double fInnerHeight ) throw (::com::sun::star::uno::RuntimeException);
57     virtual void SAL_CALL Hide(  ) throw (css::uno::RuntimeException);
58     virtual void SAL_CALL UnloadObject(  ) throw (css::uno::RuntimeException);
59     virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ) throw (css::uno::RuntimeException);
60     // XIntrospection
61     virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection(  ) throw (css::uno::RuntimeException);
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 ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
63     virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
64     virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
65     //XHelperInterface
66     virtual rtl::OUString& getServiceImplName();
67     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
68 };
69 #endif
70