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