Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAPAGEBREAK_HXX
20 : #define INCLUDED_SC_SOURCE_UI_VBA_VBAPAGEBREAK_HXX
21 :
22 : #include <cppuhelper/implbase1.hxx>
23 : #include <ooo/vba/excel/XPageBreak.hpp>
24 : #include <ooo/vba/excel/XHPageBreak.hpp>
25 : #include <ooo/vba/excel/XVPageBreak.hpp>
26 : #include <ooo/vba/excel/XRange.hpp>
27 : #include <com/sun/star/uno/XComponentContext.hpp>
28 : #include <com/sun/star/script/BasicErrorException.hpp>
29 : #include <com/sun/star/sheet/TablePageBreakData.hpp>
30 : #include <com/sun/star/beans/XPropertySet.hpp>
31 : #include <vbahelper/vbahelperinterface.hxx>
32 :
33 : template< typename Ifc1 >
34 : class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
35 : {
36 : typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
37 : protected:
38 : css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
39 : css::sheet::TablePageBreakData maTablePageBreakData;
40 : public:
41 : ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
42 : const css::uno::Reference< css::uno::XComponentContext >& xContext,
43 : css::uno::Reference< css::beans::XPropertySet >& xProps,
44 : css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
45 8 : virtual ~ScVbaPageBreak(){}
46 :
47 : virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException);
48 : virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException);
49 :
50 : virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
51 : virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
52 :
53 : // XHelperInterface
54 : virtual OUString getServiceImplName();
55 : virtual css::uno::Sequence<OUString> getServiceNames();
56 : };
57 :
58 : typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE;
59 :
60 : class ScVbaHPageBreak : public ScVbaHPageBreak_BASE
61 : {
62 : public:
63 4 : ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
64 : const css::uno::Reference< css::uno::XComponentContext >& xContext,
65 : css::uno::Reference< css::beans::XPropertySet >& xProps,
66 : css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException):
67 4 : ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){}
68 :
69 8 : virtual ~ScVbaHPageBreak(){}
70 :
71 : // XHelperInterface
72 : virtual OUString getServiceImplName() SAL_OVERRIDE;
73 : virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
74 : };
75 :
76 : //VPageBreak
77 : typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE;
78 :
79 : class ScVbaVPageBreak : public ScVbaVPageBreak_BASE
80 : {
81 : public:
82 : ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
83 : const css::uno::Reference< css::uno::XComponentContext >& xContext,
84 : css::uno::Reference< css::beans::XPropertySet >& xProps,
85 : css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
86 :
87 : virtual ~ScVbaVPageBreak();
88 :
89 : // XHelperInterface
90 : virtual OUString getServiceImplName() SAL_OVERRIDE;
91 : virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
92 : };
93 :
94 : #endif
95 :
96 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|