merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / vba / vbapagebreak.hxx
blob1b2fb284730109a4a6cd3aca50633bc6be573a47
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$
10 * $Revision$
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_PAGEBREAK_HXX
31 #define SC_VBA_PAGEBREAK_HXX
33 #include <cppuhelper/implbase1.hxx>
34 #include <ooo/vba/excel/XPageBreak.hpp>
35 #include <ooo/vba/excel/XHPageBreak.hpp>
36 #include <ooo/vba/excel/XVPageBreak.hpp>
37 #include <ooo/vba/excel/XRange.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/script/BasicErrorException.hpp>
40 #include <com/sun/star/sheet/TablePageBreakData.hpp>
41 #include <com/sun/star/beans/XPropertySet.hpp>
42 #include <vbahelper/vbahelperinterface.hxx>
44 template< typename Ifc1 >
45 class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
47 typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
48 protected:
49 css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
50 css::sheet::TablePageBreakData maTablePageBreakData;
51 public:
52 ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
53 const css::uno::Reference< css::uno::XComponentContext >& xContext,
54 css::uno::Reference< css::beans::XPropertySet >& xProps,
55 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
56 virtual ~ScVbaPageBreak(){}
58 virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException);
59 virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException);
61 virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
62 virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
64 // XHelperInterface
65 virtual rtl::OUString& getServiceImplName();
66 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
70 typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE;
72 class ScVbaHPageBreak : public ScVbaHPageBreak_BASE
74 public:
75 ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
76 const css::uno::Reference< css::uno::XComponentContext >& xContext,
77 css::uno::Reference< css::beans::XPropertySet >& xProps,
78 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException):
79 ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){}
81 virtual ~ScVbaHPageBreak(){}
83 // XHelperInterface
84 virtual rtl::OUString& getServiceImplName();
85 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
88 //VPageBreak
89 typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE;
91 class ScVbaVPageBreak : public ScVbaVPageBreak_BASE
93 public:
94 ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
95 const css::uno::Reference< css::uno::XComponentContext >& xContext,
96 css::uno::Reference< css::beans::XPropertySet >& xProps,
97 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
99 virtual ~ScVbaVPageBreak();
101 // XHelperInterface
102 virtual rtl::OUString& getServiceImplName();
103 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
106 #endif