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_SHAPERANGE_HXX
24 #define SC_VBA_SHAPERANGE_HXX
25 
26 #include <com/sun/star/drawing/XShapes.hpp>
27 #include <ooo/vba/msforms/XShapeRange.hpp>
28 #include <com/sun/star/drawing/XDrawPage.hpp>
29 #include <vbahelper/vbacollectionimpl.hxx>
30 #include <ooo/vba/msforms/XLineFormat.hpp>
31 #include <ooo/vba/msforms/XFillFormat.hpp>
32 
33 typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
34 
35 class VBAHELPER_DLLPUBLIC ScVbaShapeRange : public ScVbaShapeRange_BASE
36 {
37 private:
38     css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage;
39     css::uno::Reference< css::drawing::XShapes > m_xShapes;
40     sal_Int32 m_nShapeGroupCount;
41 protected:
42     css::uno::Reference< css::frame::XModel > m_xModel;
43 	virtual rtl::OUString& getServiceImplName();
44 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
45 	css::uno::Reference< css::drawing::XShapes > getShapes() throw (css::uno::RuntimeException) ;
46 public:
47     ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape, const css::uno::Reference< css::frame::XModel >& xModel );
48 
49     // Methods
50     virtual void SAL_CALL Select(  ) throw (css::uno::RuntimeException);
51     virtual css::uno::Reference< ::ooo::vba::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
52     virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
53     virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException) ;
54     virtual void SAL_CALL IncrementTop( double Increment ) throw (css::uno::RuntimeException);
55     virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException);
56     virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException);
57     virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException);
58     virtual void SAL_CALL setWidth( double _width ) throw (css::uno::RuntimeException);
59     virtual double SAL_CALL getLeft() throw (css::uno::RuntimeException);
60     virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
61     virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
62     virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
63     virtual css::uno::Reference< ov::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
64     virtual css::uno::Reference< ov::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
65     virtual ::sal_Bool SAL_CALL getLockAspectRatio() throw (css::uno::RuntimeException);
66     virtual void SAL_CALL setLockAspectRatio( ::sal_Bool _lockaspectratio ) throw (css::uno::RuntimeException);
67     virtual ::sal_Bool SAL_CALL getLockAnchor() throw (css::uno::RuntimeException);
68     virtual void SAL_CALL setLockAnchor( ::sal_Bool _lockanchor ) throw (css::uno::RuntimeException);
69     virtual ::sal_Int32 SAL_CALL getRelativeHorizontalPosition() throw (css::uno::RuntimeException);
70     virtual void SAL_CALL setRelativeHorizontalPosition( ::sal_Int32 _relativehorizontalposition ) throw (css::uno::RuntimeException);
71     virtual ::sal_Int32 SAL_CALL getRelativeVerticalPosition() throw (css::uno::RuntimeException);
72     virtual void SAL_CALL setRelativeVerticalPosition( ::sal_Int32 _relativeverticalposition ) throw (css::uno::RuntimeException);
73     virtual css::uno::Any SAL_CALL SAL_CALL TextFrame(  ) throw (css::uno::RuntimeException);
74     virtual css::uno::Any SAL_CALL SAL_CALL WrapFormat(  ) throw (css::uno::RuntimeException);
75     //XEnumerationAccess
76     virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
77     virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
78     // ScVbaCollectionBaseImpl
79     virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
80 };
81 
82 #endif//SC_VBA_SHAPERANGE_HXX
83