xref: /aoo41x/main/sc/source/ui/vba/vbapagesetup.hxx (revision 38d50f7b)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef SC_VBA_PAGESETUP_HXX
24 #define SC_VBA_PAGESETUP_HXX
25 
26 #include <cppuhelper/implbase1.hxx>
27 #include <ooo/vba/excel/XPageSetup.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <com/sun/star/sheet/XSpreadsheet.hpp>
30 #include <com/sun/star/beans/XPropertySet.hpp>
31 #include <vbahelper/vbahelperinterface.hxx>
32 #include <vbahelper/vbapagesetupbase.hxx>
33 
34 typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE;
35 
36 class ScVbaPageSetup :  public ScVbaPageSetup_BASE
37 {
38     css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
39 public:
40 	ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent,
41                     const css::uno::Reference< css::uno::XComponentContext >& xContext,
42 		            const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet,
43                     const css::uno::Reference< css::frame::XModel >& xModel) throw (css::uno::RuntimeException);
~ScVbaPageSetup()44 	virtual ~ScVbaPageSetup(){}
45 
46     // Attribute
47 	virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException);
48 	virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException);
49     virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException);
50     void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
51     double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
52     void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
53 	virtual css::uno::Any SAL_CALL getFitToPagesTall() throw (css::uno::RuntimeException);
54 	virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) throw (css::uno::RuntimeException);
55 	virtual css::uno::Any SAL_CALL getFitToPagesWide() throw (css::uno::RuntimeException);
56 	virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ) throw (css::uno::RuntimeException);
57 	virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
58 	virtual void SAL_CALL setZoom( const css::uno::Any& zoom ) throw (css::uno::RuntimeException);
59 	virtual rtl::OUString SAL_CALL getLeftHeader() throw (css::uno::RuntimeException);
60 	virtual void SAL_CALL setLeftHeader( const rtl::OUString& leftHeader ) throw (css::uno::RuntimeException);
61 	virtual rtl::OUString SAL_CALL getCenterHeader() throw (css::uno::RuntimeException);
62 	virtual void SAL_CALL setCenterHeader( const rtl::OUString& centerHeader ) throw (css::uno::RuntimeException);
63 	virtual rtl::OUString SAL_CALL getRightHeader() throw (css::uno::RuntimeException);
64 	virtual void SAL_CALL setRightHeader( const rtl::OUString& rightHeader ) throw (css::uno::RuntimeException);
65 	virtual rtl::OUString SAL_CALL getLeftFooter() throw (css::uno::RuntimeException);
66 	virtual void SAL_CALL setLeftFooter( const rtl::OUString& leftFooter ) throw (css::uno::RuntimeException);
67 	virtual rtl::OUString SAL_CALL getCenterFooter() throw (css::uno::RuntimeException);
68 	virtual void SAL_CALL setCenterFooter( const rtl::OUString& centerFooter ) throw (css::uno::RuntimeException);
69 	virtual rtl::OUString SAL_CALL getRightFooter() throw (css::uno::RuntimeException);
70 	virtual void SAL_CALL setRightFooter( const rtl::OUString& rightFooter ) throw (css::uno::RuntimeException);
71 	virtual sal_Int32 SAL_CALL getOrder() throw (css::uno::RuntimeException);
72 	virtual void SAL_CALL setOrder( sal_Int32 order ) throw (css::uno::RuntimeException);
73 	virtual sal_Int32 SAL_CALL getFirstPageNumber() throw (css::uno::RuntimeException);
74 	virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ) throw (css::uno::RuntimeException);
75 	virtual sal_Bool SAL_CALL getCenterVertically() throw (css::uno::RuntimeException);
76 	virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ) throw (css::uno::RuntimeException);
77 	virtual sal_Bool SAL_CALL getCenterHorizontally() throw (css::uno::RuntimeException);
78 	virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) throw (css::uno::RuntimeException);
79 	virtual sal_Bool SAL_CALL getPrintHeadings() throw (css::uno::RuntimeException);
80 	virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) throw (css::uno::RuntimeException);
81 
82 	// XHelperInterface
83 	virtual rtl::OUString& getServiceImplName();
84 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
85 };
86 #endif
87