xref: /aoo41x/main/sc/source/ui/vba/vbapagebreaks.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_PAGEBREAKS_HXX
24 #define SC_VBA_PAGEBREAKS_HXX
25 
26 #include <cppuhelper/implbase1.hxx>
27 #include <ooo/vba/excel/XHPageBreaks.hpp>
28 #include <ooo/vba/excel/XHPageBreak.hpp>
29 #include <ooo/vba/excel/XVPageBreaks.hpp>
30 #include <ooo/vba/excel/XVPageBreak.hpp>
31 #include <ooo/vba/excel/XRange.hpp>
32 #include <com/sun/star/uno/XComponentContext.hpp>
33 #include <com/sun/star/script/BasicErrorException.hpp>
34 #include <com/sun/star/sheet/XSheetPageBreak.hpp>
35 #include <com/sun/star/sheet/TablePageBreakData.hpp>
36 #include <com/sun/star/beans/XPropertySet.hpp>
37 #include <com/sun/star/container/XIndexAccess.hpp>
38 #include <com/sun/star/table/XColumnRowRange.hpp>
39 #include <vbahelper/vbahelperinterface.hxx>
40 #include <vbahelper/vbacollectionimpl.hxx>
41 
42 typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
43 
44 class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
45 {
46 	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
47 public:
48 	ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent,
49                     const css::uno::Reference< css::uno::XComponentContext >& xContext,
50             		css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException);
~ScVbaHPageBreaks()51 	virtual ~ScVbaHPageBreaks(){}
52 
53     // XHPageBreaks
54     virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
55 
56 	// XEnumerationAccess
57 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
58 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
59 	virtual css::uno::Any createCollectionObject(const css::uno::Any&);
60 
61 	// XHelperInterface
62 	virtual rtl::OUString& getServiceImplName();
63 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
64 };
65 
66 //VPageBreaks
67 typedef CollTestImplHelper< ov::excel::XVPageBreaks > ScVbaVPageBreaks_BASE;
68 
69 class ScVbaVPageBreaks : public ScVbaVPageBreaks_BASE
70 {
71 	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
72 
73 public:
74 	ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent,
75 					  const css::uno::Reference< css::uno::XComponentContext >& xContext,
76             		  css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( css::uno::RuntimeException );
77 
78 	virtual ~ScVbaVPageBreaks();
79 
80 	// XVPageBreaks
81 	virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
82 
83 	// XEnumerationAccess
84 	virtual css::uno::Type SAL_CALL getElementType() throw ( css::uno::RuntimeException );
85 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw ( css::uno::RuntimeException );
86 	virtual css::uno::Any createCollectionObject( const css::uno::Any& );
87 
88 	// XHelperInterface
89 	virtual rtl::OUString& getServiceImplName();
90 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
91 };
92 
93 #endif
94