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