xref: /aoo41x/main/sc/source/ui/vba/vbapagesetup.hxx (revision cdf0e10c)
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_PAGESETUP_HXX
28 #define SC_VBA_PAGESETUP_HXX
29 
30 #include <cppuhelper/implbase1.hxx>
31 #include <ooo/vba/excel/XPageSetup.hpp>
32 #include <com/sun/star/uno/XComponentContext.hpp>
33 #include <com/sun/star/sheet/XSpreadsheet.hpp>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <vbahelper/vbahelperinterface.hxx>
36 #include <vbahelper/vbapagesetupbase.hxx>
37 
38 typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE;
39 
40 class ScVbaPageSetup :  public ScVbaPageSetup_BASE
41 {
42     css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
43 public:
44 	ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent,
45                     const css::uno::Reference< css::uno::XComponentContext >& xContext,
46 		            const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet,
47                     const css::uno::Reference< css::frame::XModel >& xModel) throw (css::uno::RuntimeException);
48 	virtual ~ScVbaPageSetup(){}
49 
50     // Attribute
51 	virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException);
52 	virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException);
53     virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException);
54     void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
55     double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
56     void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
57 	virtual css::uno::Any SAL_CALL getFitToPagesTall() throw (css::uno::RuntimeException);
58 	virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) throw (css::uno::RuntimeException);
59 	virtual css::uno::Any SAL_CALL getFitToPagesWide() throw (css::uno::RuntimeException);
60 	virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ) throw (css::uno::RuntimeException);
61 	virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
62 	virtual void SAL_CALL setZoom( const css::uno::Any& zoom ) throw (css::uno::RuntimeException);
63 	virtual rtl::OUString SAL_CALL getLeftHeader() throw (css::uno::RuntimeException);
64 	virtual void SAL_CALL setLeftHeader( const rtl::OUString& leftHeader ) throw (css::uno::RuntimeException);
65 	virtual rtl::OUString SAL_CALL getCenterHeader() throw (css::uno::RuntimeException);
66 	virtual void SAL_CALL setCenterHeader( const rtl::OUString& centerHeader ) throw (css::uno::RuntimeException);
67 	virtual rtl::OUString SAL_CALL getRightHeader() throw (css::uno::RuntimeException);
68 	virtual void SAL_CALL setRightHeader( const rtl::OUString& rightHeader ) throw (css::uno::RuntimeException);
69 	virtual rtl::OUString SAL_CALL getLeftFooter() throw (css::uno::RuntimeException);
70 	virtual void SAL_CALL setLeftFooter( const rtl::OUString& leftFooter ) throw (css::uno::RuntimeException);
71 	virtual rtl::OUString SAL_CALL getCenterFooter() throw (css::uno::RuntimeException);
72 	virtual void SAL_CALL setCenterFooter( const rtl::OUString& centerFooter ) throw (css::uno::RuntimeException);
73 	virtual rtl::OUString SAL_CALL getRightFooter() throw (css::uno::RuntimeException);
74 	virtual void SAL_CALL setRightFooter( const rtl::OUString& rightFooter ) throw (css::uno::RuntimeException);
75 	virtual sal_Int32 SAL_CALL getOrder() throw (css::uno::RuntimeException);
76 	virtual void SAL_CALL setOrder( sal_Int32 order ) throw (css::uno::RuntimeException);
77 	virtual sal_Int32 SAL_CALL getFirstPageNumber() throw (css::uno::RuntimeException);
78 	virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ) throw (css::uno::RuntimeException);
79 	virtual sal_Bool SAL_CALL getCenterVertically() throw (css::uno::RuntimeException);
80 	virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ) throw (css::uno::RuntimeException);
81 	virtual sal_Bool SAL_CALL getCenterHorizontally() throw (css::uno::RuntimeException);
82 	virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) throw (css::uno::RuntimeException);
83 	virtual sal_Bool SAL_CALL getPrintHeadings() throw (css::uno::RuntimeException);
84 	virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) throw (css::uno::RuntimeException);
85 
86 	// XHelperInterface
87 	virtual rtl::OUString& getServiceImplName();
88 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
89 };
90 #endif
91