merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / vba / vbachartobject.hxx
blobf149201314517e248ab5eba76c175d8d2fd6b640
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbachartobject.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_CHARTOBJECT_HXX
31 #define SC_VBA_CHARTOBJECT_HXX
32 #include <cppuhelper/implbase1.hxx>
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <com/sun/star/table/XTableChart.hpp>
35 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
36 #include <com/sun/star/container/XNamed.hpp>
37 #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
38 #include <ooo/vba/excel/XChartObject.hpp>
39 #include <vbahelper/vbahelperinterface.hxx>
40 #include <memory>
42 typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE;
44 class ScVbaChartObject : public ChartObjectImpl_BASE
47 css::uno::Reference< css::table::XTableChart > xTableChart;
48 css::uno::Reference< css::document::XEmbeddedObjectSupplier > xEmbeddedObjectSupplier;
49 css::uno::Reference< css::beans::XPropertySet > xPropertySet;
50 css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier;
51 css::uno::Reference< css::drawing::XDrawPage > xDrawPage;
52 css::uno::Reference< css::drawing::XShape > xShape;
53 css::uno::Reference< css::container::XNamed > xNamed;
54 rtl::OUString sPersistName;
55 std::auto_ptr<ov::ShapeHelper> oShapeHelper;
56 css::uno::Reference< css::container::XNamed > xNamedShape;
57 rtl::OUString getPersistName();
58 css::uno::Reference< css::drawing::XShape > setShape() throw ( css::script::BasicErrorException );
59 public:
60 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 );
61 virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
62 virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw (css::uno::RuntimeException);
63 virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
64 virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException );
65 virtual void Activate() throw ( css::script::BasicErrorException );
66 // XHelperInterface
67 virtual rtl::OUString& getServiceImplName();
68 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
69 // non interface methods
70 double getHeight();
71 void setHeight( double _fheight ) throw ( css::script::BasicErrorException );
72 double getWidth();
73 void setWidth( double _fwidth ) throw ( css::script::BasicErrorException );
74 double getLeft();
75 void setLeft( double _fleft );
76 double getTop();
77 void setTop( double _ftop );
78 // should make this part of the XHelperInterface with a default
79 // implementation returning NULL
80 css::uno::Reference< css::uno::XInterface > getUnoObject() throw ( css::script::BasicErrorException );
83 #endif //SC_VBA_WINDOW_HXX