xref: /aoo42x/main/sc/source/ui/vba/vbaoleobject.hxx (revision 38d50f7b)
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_OLEOBJECT_HXX
24 #define SC_VBA_OLEOBJECT_HXX
25 
26 #include <cppuhelper/implbase1.hxx>
27 #include <com/sun/star/drawing/XControlShape.hpp>
28 #include <ooo/vba/excel/XOLEObject.hpp>
29 #include <ooo/vba/msforms/XControl.hpp>
30 
31 #include <vbahelper/vbahelperinterface.hxx>
32 
33 typedef InheritedHelperInterfaceImpl1< ov::excel::XOLEObject > OLEObjectImpl_BASE;
34 
35 class ScVbaOLEObject : public OLEObjectImpl_BASE
36 {
37 protected:
38     css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
39 	virtual rtl::OUString& getServiceImplName();
40 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
41     css::uno::Reference< ov::msforms::XControl> m_xControl;
42 public:
43     ScVbaOLEObject( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
44             css::uno::Reference< css::drawing::XControlShape > xControlShape );
45 
46     // XOLEObject Attributes
47     virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getObject() throw (css::uno::RuntimeException);
48     virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
49     virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (css::uno::RuntimeException);
50     virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
51     virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
52     virtual double SAL_CALL getLeft() throw (css::uno::RuntimeException);
53     virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
54     virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
55     virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
56     virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException);
57     virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException);
58     virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException);
59     virtual void SAL_CALL setWidth( double _width ) throw (css::uno::RuntimeException);
60 
61 };
62 #endif //SC_VBA_OLEOBJECT_HXX
63 
64