1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef SC_VBA_PAGEBREAK_HXX 28 #define SC_VBA_PAGEBREAK_HXX 29 30 #include <cppuhelper/implbase1.hxx> 31 #include <ooo/vba/excel/XPageBreak.hpp> 32 #include <ooo/vba/excel/XHPageBreak.hpp> 33 #include <ooo/vba/excel/XVPageBreak.hpp> 34 #include <ooo/vba/excel/XRange.hpp> 35 #include <com/sun/star/uno/XComponentContext.hpp> 36 #include <com/sun/star/script/BasicErrorException.hpp> 37 #include <com/sun/star/sheet/TablePageBreakData.hpp> 38 #include <com/sun/star/beans/XPropertySet.hpp> 39 #include <vbahelper/vbahelperinterface.hxx> 40 41 template< typename Ifc1 > 42 class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 > 43 { 44 typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE; 45 protected: 46 css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet; 47 css::sheet::TablePageBreakData maTablePageBreakData; 48 public: 49 ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 50 const css::uno::Reference< css::uno::XComponentContext >& xContext, 51 css::uno::Reference< css::beans::XPropertySet >& xProps, 52 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException); 53 virtual ~ScVbaPageBreak(){} 54 55 virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException); 56 virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException); 57 58 virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException); 59 virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException); 60 61 // XHelperInterface 62 virtual rtl::OUString& getServiceImplName(); 63 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 64 }; 65 66 67 typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE; 68 69 class ScVbaHPageBreak : public ScVbaHPageBreak_BASE 70 { 71 public: 72 ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 73 const css::uno::Reference< css::uno::XComponentContext >& xContext, 74 css::uno::Reference< css::beans::XPropertySet >& xProps, 75 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException): 76 ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){} 77 78 virtual ~ScVbaHPageBreak(){} 79 80 // XHelperInterface 81 virtual rtl::OUString& getServiceImplName(); 82 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 83 }; 84 85 //VPageBreak 86 typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE; 87 88 class ScVbaVPageBreak : public ScVbaVPageBreak_BASE 89 { 90 public: 91 ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 92 const css::uno::Reference< css::uno::XComponentContext >& xContext, 93 css::uno::Reference< css::beans::XPropertySet >& xProps, 94 css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException); 95 96 virtual ~ScVbaVPageBreak(); 97 98 // XHelperInterface 99 virtual rtl::OUString& getServiceImplName(); 100 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 101 }; 102 103 #endif 104