xref: /aoo42x/main/sc/source/ui/vba/vbachartobject.hxx (revision 7d1ce60b)
138d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
338d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
438d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
538d50f7bSAndrew Rist  * distributed with this work for additional information
638d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
738d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
838d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
938d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
1038d50f7bSAndrew Rist  *
1138d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
1238d50f7bSAndrew Rist  *
1338d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
1438d50f7bSAndrew Rist  * software distributed under the License is distributed on an
1538d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1638d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
1738d50f7bSAndrew Rist  * specific language governing permissions and limitations
1838d50f7bSAndrew Rist  * under the License.
1938d50f7bSAndrew Rist  *
2038d50f7bSAndrew Rist  *************************************************************/
2138d50f7bSAndrew Rist 
22cdf0e10cSrcweir #ifndef SC_VBA_CHARTOBJECT_HXX
23cdf0e10cSrcweir #define SC_VBA_CHARTOBJECT_HXX
24cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
25cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
26cdf0e10cSrcweir #include <com/sun/star/table/XTableChart.hpp>
27cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
28*7d1ce60bSWang Lei #include <com/sun/star/container/XNamedEx.hpp>
29cdf0e10cSrcweir #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
30cdf0e10cSrcweir #include <ooo/vba/excel/XChartObject.hpp>
31cdf0e10cSrcweir #include <vbahelper/vbahelperinterface.hxx>
32cdf0e10cSrcweir #include <memory>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class ScVbaChartObject : public ChartObjectImpl_BASE
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	css::uno::Reference< css::table::XTableChart  > xTableChart;
39cdf0e10cSrcweir 	css::uno::Reference< css::document::XEmbeddedObjectSupplier > xEmbeddedObjectSupplier;
40cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xPropertySet;
41cdf0e10cSrcweir 	css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier;
42cdf0e10cSrcweir 	css::uno::Reference< css::drawing::XDrawPage > xDrawPage;
43cdf0e10cSrcweir 	css::uno::Reference< css::drawing::XShape > xShape;
44*7d1ce60bSWang Lei 	css::uno::Reference< css::container::XNamedEx > xNamed;
45cdf0e10cSrcweir 	rtl::OUString sPersistName;
46cdf0e10cSrcweir 	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
47cdf0e10cSrcweir 	css::uno::Reference< css::container::XNamed > xNamedShape;
48cdf0e10cSrcweir 	rtl::OUString getPersistName();
49cdf0e10cSrcweir 	css::uno::Reference< css::drawing::XShape > setShape() throw ( css::script::BasicErrorException );
50cdf0e10cSrcweir public:
51cdf0e10cSrcweir 	ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
52cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
53cdf0e10cSrcweir 	virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw (css::uno::RuntimeException);
54cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
55cdf0e10cSrcweir 	virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException );
56cdf0e10cSrcweir 	virtual void Activate() throw ( css::script::BasicErrorException );
57cdf0e10cSrcweir 	// XHelperInterface
58cdf0e10cSrcweir 	virtual rtl::OUString& getServiceImplName();
59cdf0e10cSrcweir 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
60cdf0e10cSrcweir 	// non interface methods
61cdf0e10cSrcweir 	double getHeight();
62cdf0e10cSrcweir 	void setHeight( double _fheight ) throw ( css::script::BasicErrorException );
63cdf0e10cSrcweir 	double getWidth();
64cdf0e10cSrcweir 	void setWidth( double _fwidth ) throw ( css::script::BasicErrorException );
65cdf0e10cSrcweir 	double getLeft();
66cdf0e10cSrcweir 	void setLeft( double _fleft );
67cdf0e10cSrcweir 	double getTop();
68cdf0e10cSrcweir 	void setTop( double _ftop );
69cdf0e10cSrcweir 	// should make this part of the XHelperInterface with a default
70cdf0e10cSrcweir 	// implementation returning NULL
71cdf0e10cSrcweir 	css::uno::Reference< css::uno::XInterface > getUnoObject() throw ( css::script::BasicErrorException );
72cdf0e10cSrcweir };
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #endif //SC_VBA_WINDOW_HXX
75