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); ~ScVbaPageSetup()44 virtual ~ScVbaPageSetup(){} 45 46 // Attribute 47 virtual rtl::OUString SAL_CALL getPrintArea(); 48 virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ); 49 virtual double SAL_CALL getHeaderMargin(); 50 void SAL_CALL setHeaderMargin( double margin ); 51 double SAL_CALL getFooterMargin(); 52 void SAL_CALL setFooterMargin( double margin ); 53 virtual css::uno::Any SAL_CALL getFitToPagesTall(); 54 virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ); 55 virtual css::uno::Any SAL_CALL getFitToPagesWide(); 56 virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ); 57 virtual css::uno::Any SAL_CALL getZoom(); 58 virtual void SAL_CALL setZoom( const css::uno::Any& zoom ); 59 virtual rtl::OUString SAL_CALL getLeftHeader(); 60 virtual void SAL_CALL setLeftHeader( const rtl::OUString& leftHeader ); 61 virtual rtl::OUString SAL_CALL getCenterHeader(); 62 virtual void SAL_CALL setCenterHeader( const rtl::OUString& centerHeader ); 63 virtual rtl::OUString SAL_CALL getRightHeader(); 64 virtual void SAL_CALL setRightHeader( const rtl::OUString& rightHeader ); 65 virtual rtl::OUString SAL_CALL getLeftFooter(); 66 virtual void SAL_CALL setLeftFooter( const rtl::OUString& leftFooter ); 67 virtual rtl::OUString SAL_CALL getCenterFooter(); 68 virtual void SAL_CALL setCenterFooter( const rtl::OUString& centerFooter ); 69 virtual rtl::OUString SAL_CALL getRightFooter(); 70 virtual void SAL_CALL setRightFooter( const rtl::OUString& rightFooter ); 71 virtual sal_Int32 SAL_CALL getOrder(); 72 virtual void SAL_CALL setOrder( sal_Int32 order ); 73 virtual sal_Int32 SAL_CALL getFirstPageNumber(); 74 virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ); 75 virtual sal_Bool SAL_CALL getCenterVertically(); 76 virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ); 77 virtual sal_Bool SAL_CALL getCenterHorizontally(); 78 virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ); 79 virtual sal_Bool SAL_CALL getPrintHeadings(); 80 virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ); 81 82 // XHelperInterface 83 virtual rtl::OUString& getServiceImplName(); 84 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 85 }; 86 #endif 87